Package: pirichain-api-workmail20
Pirichain-api-pythonPackage for Pirichain API calls through PythonPirichain is blockchain system that based on dPos (Delegated Proof of Stake) and has it own environment to create wallet and token, transactions, sending or storing data as a transaction, delegation.RequirementsPython >= 3.7;Installationpip install pirichain-api-workmail20Usagefromworkmail20.pirichainimportPIRIAPI_w20piri=PIRIAPI_w20(True)print(piri.createNewAddress())print(piri.createNewAddress("portuguese",True))print(piri.rescuePrivateKey("entry frequent airport firm document close human roof fix pond popular laugh banner fruit faint exact sleep axis pipe crush today elder inform saddle"))print(piri.getMnemonic("4bab94162ba406575bb5dd5814faa0bec124bb947a72cb221e951a8e348e9ce5"))print(piri.getBalance("PRTMRWG479eCmbbufg92qZsysYHMH7bRL7H6eDVwNSx"))print(piri.getBalanceList("PRTMRgoFporAfQYrNNJfj3Go37FT5AR3ueKCwpdKd1s"))print(piri.getToken())print(piri.listTokens())print(piri.getScenario("PRTMQ7fcZp7ACGDEom4KJQ4bvJ5nwQ3CcaUTFy642mE"))print(piri.listMyScenarios("PRTMPUAV2mTGq6Dpu9ZBYmJyXWdt9RYiiouvRaZ8xUR"))print(piri.listScenarios())print(piri.executeScenario("PRTMPBjj3sutTtHwvRgB8YFHtMdcTv1Bd7cMWMxMrZP","PRTMRWG479eCmbbufg92qZsysYHMH7bRL7H6eDVwNSx","9d656610ec7ff8a8e7e9225234ee54b6fa31d147981e1b91106ce901ae69bf00","init",'["11","22","333"]'))print(piri.previewScenario("{}","PRTMRWG479eCmbbufg92qZsysYHMH7bRL7H6eDVwNSx","9d656610ec7ff8a8e7e9225234ee54b6fa31d147981e1b91106ce901ae69bf00","init",'["11","22","333"]'))print(piri.listTransactions())print(piri.listPoolTransactions())print(piri.listTransactionsByAssetID("-1","0","50"))print(piri.listTransactionsByAddr("PRTMPUAV2mTGq6Dpu9ZBYmJyXWdt9RYiiouvRaZ8xUR","0","50"))print(piri.getTransaction("f0f5733c7cc71ad3ae2dea4417c7e16a39aed9edba6a4c414568875b30a1ad9b"))print(piri.getPoolTransaction("f0f5733c7cc71ad3ae2dea4417c7e16a39aed9edba6a4c414568875b30a1ad9b"))print(piri.getBlocks())print(piri.getBlocksDesc())print(piri.getLastBlocks())print(piri.getOnlyBlocks())print(piri.getBlock("2673310"))print(piri.pushData("PRTMRWG479eCmbbufg92qZsysYHMH7bRL7H6eDVwNSx","9d656610ec7ff8a8e7e9225234ee54b6fa31d147981e1b91106ce901ae69bf00","PRTMRN71Mz5mrZMA59mPtURrTG9S4yydYDyi1YNi5uX",'{"key":"xxxx1","value":"000","enc":0}',"043e6ace02e5b6c8031455d91ae88b411b80935f48404c6014075043e71d2ffb8da3b2f5f3a480f9be45b9455b846781bdbdf6466076645cc86e5a00c82c51bc00"))print(piri.pushDataList("PRTMRWG479eCmbbufg92qZsysYHMH7bRL7H6eDVwNSx","9d656610ec7ff8a8e7e9225234ee54b6fa31d147981e1b91106ce901ae69bf00","PRTMRN71Mz5mrZMA59mPtURrTG9S4yydYDyi1YNi5uX",'[{"key":"xxxx2","value":"000","enc":0},{"key":"xxxx3","value":"000","enc":0}]'))print(piri.listData())print(piri.listDataByAddress("PRTMRN71Mz5mrZMA59mPtURrTG9S4yydYDyi1YNi5uX"))print(piri.getAddressListByAsset())print(piri.isValidAddress("PRTMRN71Mz5mrZMA59mPtURrTG9S4yydYDyi1YNi5u0"))print(piri.search("99f9f4ec7012db95868bb9526cd9b239765634183b64ad3eb7b3c13daf5ed12d"))print(piri.search("2673310"))print(apiri.listData())print(piri.listDeputies())print(piri.checkDeputy("PRTMPRSg92ndyu5NeaEf7q3D6TdJeKKa6nKStVMcU4e"))print(piri.getMyRewardQuantity("PRTMRWG479eCmbbufg92qZsysYHMH7bRL7H6eDVwNSx","9d656610ec7ff8a8e7e9225234ee54b6fa31d147981e1b91106ce901ae69bf00"))print(piri.getPiriPrice())print(piri.getRichList())print(piri.getDetailStats())print(piri.getStats())print(piri.listDelegationTopN())print(piri.getCirculation())API documentationFor more detailed and up-to-date API documentation, you can access it athttps://api.pirichain.comand refer to the Postman collection documents specified at that address.ChangelogTo keep track, please refer toCHANGELOG.md.