From d5ec28cabd5aa3f6f5a502bfd14ceec13d9395e4 Mon Sep 17 00:00:00 2001 From: productshiv Date: Sat, 6 Apr 2024 20:04:09 +0530 Subject: [PATCH] Fix --- v1.0/RPC Nodes/rpc-others.md | 8 - v1.0/RPC Nodes/rpc-others/rpc-algorand.md | 8 - .../rpc-algorand-broadcasttransaction.md | 59 --- .../rpc-algorand/rpc-algorand-getaccount.md | 61 --- .../rpc-algorand-getaccountapplicationinfo.md | 63 --- .../rpc-algorand-getaccountapplications.md | 67 --- .../rpc-algorand-getaccountapsslocalstate.md | 67 --- .../rpc-algorand-getaccountassetinfo.md | 63 --- .../rpc-algorand-getaccountassets.md | 67 --- .../rpc-algorand-getaccountcreatedassets.md | 67 --- .../rpc-algorand-getaccountinfo.md | 64 --- .../rpc-algorand/rpc-algorand-getaccounts.md | 59 --- .../rpc-algorand-getaccounttransactions.md | 89 ---- .../rpc-algorand-getapplication.md | 61 --- .../rpc-algorand-getapplicationbox.md | 61 --- .../rpc-algorand-getapplicationboxes.md | 63 --- .../rpc-algorand-getapplicationdetails.md | 61 --- .../rpc-algorand-getapplicationlogs.md | 71 --- .../rpc-algorand-getapplications.md | 73 --- .../rpc-algorand/rpc-algorand-getasset.md | 61 --- .../rpc-algorand-getassetbalances.md | 69 --- .../rpc-algorand-getassetinformation.md | 59 --- .../rpc-algorand/rpc-algorand-getassets.md | 71 --- .../rpc-algorand-getassettransactions.md | 87 ---- .../rpc-algorand/rpc-algorand-getblock.md | 57 --- .../rpc-algorand/rpc-algorand-getblockhash.md | 59 --- .../rpc-algorand/rpc-algorand-getgenesis.md | 52 -- .../rpc-algorand/rpc-algorand-gethealth.md | 50 -- .../rpc-algorand-getledgerstatedelta.md | 61 --- .../rpc-algorand-getledgersupply.md | 52 -- .../rpc-algorand-getnodestatus.md | 57 --- .../rpc-algorand-getnodestatusafterround.md | 59 --- .../rpc-algorand-getpendingtransactions.md | 63 --- .../rpc-algorand-gettransaction.md | 53 -- .../rpc-algorand-gettransactionparams.md | 59 --- .../rpc-algorand-gettransactionproof.md | 71 --- .../rpc-algorand-gettransactions.md | 91 ---- .../rpc-algorand/rpc-algorand-ishealthy.md | 50 -- .../rpc-algorand/rpc-algorand-isready.md | 52 -- .../rpc-algorand-simulatetransaction.md | 76 --- v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon.md | 8 - .../rpc-bnb-beacon/rpc-bnb-beacon-abcinfo.md | 47 -- .../rpc-bnb-beacon-abciquerry.md | 60 --- .../rpc-bnb-beacon/rpc-bnb-beacon-block.md | 58 --- .../rpc-bnb-beacon-blockchain.md | 53 -- .../rpc-bnb-beacon-blockresults.md | 57 --- .../rpc-bnb-beacon-broadcasttxasync.md | 61 --- .../rpc-bnb-beacon-broadcasttxcommit.md | 60 --- .../rpc-bnb-beacon-broadcasttxsync.md | 56 --- .../rpc-bnb-beacon/rpc-bnb-beacon-commit.md | 51 -- .../rpc-bnb-beacon/rpc-bnb-beacon-genesis.md | 48 -- .../rpc-bnb-beacon/rpc-bnb-beacon-health.md | 46 -- .../rpc-bnb-beacon/rpc-bnb-beacon-netinfo.md | 54 -- .../rpc-bnb-beacon-numunconfirmedtxs.md | 50 -- .../rpc-bnb-beacon/rpc-bnb-beacon-status.md | 46 -- .../rpc-bnb-beacon/rpc-bnb-beacon-tx.md | 51 -- .../rpc-bnb-beacon/rpc-bnb-beacon-txsearch.md | 62 --- .../rpc-bnb-beacon-unconfirmedtxs.md | 52 -- .../rpc-bnb-beacon-validators.md | 55 --- v1.0/RPC Nodes/rpc-others/rpc-cardano.md | 8 - .../rpc-cardano-constructionmetadata.md | 86 ---- .../rpc-cardano-constructionpayloads.md | 163 ------ .../rpc-cardano-constructionpreprocess.md | 155 ------ .../rpc-cardano-createnetworktransaction.md | 120 ----- .../rpc-cardano/rpc-cardano-deriveaccount.md | 84 ---- .../rpc-cardano-getaccountbalance.md | 97 ---- .../rpc-cardano-getaccountcoins.md | 92 ---- .../rpc-cardano/rpc-cardano-getblock.md | 76 --- .../rpc-cardano-getblocktransaction.md | 81 --- .../rpc-cardano-gethashoftransaction.md | 75 --- .../rpc-cardano/rpc-cardano-getnetworklist.md | 59 --- .../rpc-cardano-getnetworkstatus.md | 77 --- .../rpc-cardano-parsetransaction.md | 77 --- .../rpc-cardano-searchtransactions.md | 122 ----- .../rpc-cardano-submittransaction.md | 75 --- v1.0/RPC Nodes/rpc-others/rpc-eos.md | 8 - .../rpc-others/rpc-eos/rpc-eos-get_abi.md | 91 ---- .../rpc-others/rpc-eos/rpc-eos-get_account.md | 211 -------- .../rpc-eos-get_accounts_by_authorizers.md | 83 ---- ...rpc-eos-get_activated_protocol_features.md | 96 ---- .../rpc-others/rpc-eos/rpc-eos-get_block.md | 121 ----- .../rpc-eos/rpc-eos-get_block_info.md | 104 ---- .../rpc-others/rpc-eos/rpc-eos-get_code.md | 91 ---- .../rpc-eos/rpc-eos-get_currency_balance.md | 86 ---- .../rpc-eos/rpc-eos-get_currency_stats.md | 89 ---- .../rpc-others/rpc-eos/rpc-eos-get_info.md | 100 ---- .../rpc-eos/rpc-eos-get_producers.md | 90 ---- .../rpc-others/rpc-eos/rpc-eos-get_raw_abi.md | 82 --- .../rpc-eos/rpc-eos-get_raw_code_and_abi.md | 82 --- .../rpc-eos/rpc-eos-get_required_keys.md | 103 ---- .../rpc-eos/rpc-eos-get_table_by_scope.md | 104 ---- .../rpc-eos/rpc-eos-get_table_rows.md | 100 ---- .../rpc-eos/rpc-eos-push_transaction.md | 94 ---- .../rpc-eos/rpc-eos-push_transactions.md | 103 ---- .../rpc-eos/rpc-eos-send_transaction.md | 82 --- .../rpc-eos/rpc-eos-trace-api-get_block.md | 122 ----- v1.0/RPC Nodes/rpc-others/rpc-solana.md | 8 - .../rpc-solana/rpc-solana-getaccountinfo.md | 106 ---- .../rpc-solana/rpc-solana-getbalance.md | 82 --- .../rpc-solana/rpc-solana-getblock.md | 183 ------- .../rpc-solana-getblockcommitment.md | 85 ---- .../rpc-solana/rpc-solana-getblockheight.md | 73 --- .../rpc-solana-getblockproduction.md | 89 ---- .../rpc-solana/rpc-solana-getblocks.md | 70 --- .../rpc-solana-getblockswithlimit.md | 72 --- .../rpc-solana/rpc-solana-getblocktime.md | 72 --- .../rpc-solana/rpc-solana-getclusternodes.md | 83 ---- .../rpc-solana/rpc-solana-getepochinfo.md | 83 ---- .../rpc-solana/rpc-solana-getepochschedule.md | 81 --- .../rpc-solana/rpc-solana-getfeeformessage.md | 80 --- .../rpc-solana-getfirstavailableblock.md | 67 --- .../rpc-solana/rpc-solana-getgenesishash.md | 67 --- .../rpc-solana/rpc-solana-gethealth.md | 95 ---- .../rpc-solana-gethighestsnapshotslot.md | 87 ---- .../rpc-solana/rpc-solana-getidentity.md | 73 --- .../rpc-solana-getinflationgovernor.md | 81 --- .../rpc-solana/rpc-solana-getinflationrate.md | 77 --- .../rpc-solana-getinflationreward.md | 96 ---- .../rpc-solana-getlargestaccounts.md | 86 ---- .../rpc-solana-getlatestblockhash.md | 86 ---- .../rpc-solana-getleaderschedule.md | 87 ---- .../rpc-solana-getmaxretransmitslot.md | 67 --- .../rpc-solana-getmaxshredinsertslot.md | 67 --- ...olana-getminimumbalanceforrentexemption.md | 71 --- .../rpc-solana-getmultipleaccounts.md | 127 ----- .../rpc-solana-getprogramaccounts.md | 127 ----- .../rpc-solana-getrecentperformancesamples.md | 105 ---- .../rpc-solana-getrecentprioritizationfees.md | 98 ---- .../rpc-solana-getsignaturesforaddress.md | 102 ---- .../rpc-solana-getsignaturestatuses.md | 108 ---- .../rpc-solana/rpc-solana-getslot.md | 70 --- .../rpc-solana/rpc-solana-getslotleader.md | 70 --- .../rpc-solana/rpc-solana-getslotleaders.md | 78 --- .../rpc-solana-getstakeactivation.md | 92 ---- .../rpc-solana-getstakeminimumdelegation.md | 77 --- .../rpc-solana/rpc-solana-getsupply.md | 87 ---- .../rpc-solana-gettokenaccountbalance.md | 101 ---- .../rpc-solana-gettokenaccountsbydelegate.md | 136 ----- .../rpc-solana-gettokenaccountsbyowner.md | 147 ------ .../rpc-solana-gettokenlargestaccounts.md | 103 ---- .../rpc-solana/rpc-solana-gettokensupply.md | 96 ---- .../rpc-solana/rpc-solana-gettransaction.md | 154 ------ .../rpc-solana-gettransactioncount.md | 71 --- .../rpc-solana/rpc-solana-getversion.md | 72 --- .../rpc-solana/rpc-solana-getvoteaccounts.md | 101 ---- .../rpc-solana/rpc-solana-isblockhashvalid.md | 87 ---- .../rpc-solana-minimumledgerslot.md | 69 --- .../rpc-solana/rpc-solana-requestairdrop.md | 69 --- .../rpc-solana/rpc-solana-sendtransaction.md | 97 ---- .../rpc-solana-simulatetransaction.md | 127 ----- v1.0/RPC Nodes/rpc-others/rpc-stellar.md | 8 - .../rpc-stellar/rpc-stellar-getaccount.md | 155 ------ .../rpc-stellar/rpc-stellar-getaccountdata.md | 61 --- .../rpc-stellar-getaccounteffects.md | 113 ----- .../rpc-stellar-getaccountoffers.md | 148 ------ .../rpc-stellar-getaccountoperations.md | 137 ----- .../rpc-stellar-getaccountpayments.md | 127 ----- .../rpc-stellar/rpc-stellar-getaccounts.md | 195 -------- .../rpc-stellar-getaccounttrades.md | 141 ------ .../rpc-stellar-getaccounttransactions.md | 160 ------ .../rpc-stellar/rpc-stellar-getassets.md | 129 ----- .../rpc-stellar-getclaimablebalance.md | 109 ---- .../rpc-stellar-getclaimablebalances.md | 129 ----- .../rpc-stellar/rpc-stellar-geteffects.md | 112 ----- .../rpc-stellar/rpc-stellar-getfeestats.md | 84 ---- .../rpc-stellar/rpc-stellar-getledger.md | 97 ---- .../rpc-stellar-getledgereffects.md | 108 ---- .../rpc-stellar-getledgeroperations.md | 142 ------ .../rpc-stellar-getledgerpayments.md | 467 ------------------ .../rpc-stellar/rpc-stellar-getledgers.md | 124 ----- .../rpc-stellar-getledgertransactions.md | 141 ------ .../rpc-stellar-getliquiditypool.md | 98 ---- .../rpc-stellar-getliquiditypooleffects.md | 97 ---- .../rpc-stellar-getliquiditypooloperations.md | 167 ------- .../rpc-stellar-getliquiditypools.md | 133 ----- .../rpc-stellar-getliquiditypooltrades.md | 128 ----- ...pc-stellar-getliquiditypooltransactions.md | 173 ------- .../rpc-stellar/rpc-stellar-getoffer.md | 93 ---- .../rpc-stellar/rpc-stellar-getoffers.md | 155 ------ .../rpc-stellar/rpc-stellar-getoffertrades.md | 133 ----- .../rpc-stellar/rpc-stellar-getoperation.md | 123 ----- .../rpc-stellar-getoperationeffects.md | 116 ----- .../rpc-stellar/rpc-stellar-getoperations.md | 138 ------ .../rpc-stellar/rpc-stellar-getorderbook.md | 169 ------- .../rpc-stellar/rpc-stellar-getpayments.md | 158 ------ ...pc-stellar-getstrictreceivepaymentpaths.md | 190 ------- .../rpc-stellar-getstrictsendpaymentpaths.md | 138 ------ .../rpc-stellar-gettradeaggregations.md | 184 ------- .../rpc-stellar/rpc-stellar-gettrades.md | 151 ------ .../rpc-stellar/rpc-stellar-gettransaction.md | 109 ---- .../rpc-stellar-gettransactioneffects.md | 139 ------ .../rpc-stellar-gettransactionoperations.md | 141 ------ .../rpc-stellar-gettransactions.md | 145 ------ .../rpc-stellar-submittransaction.md | 120 ----- v1.0/RPC Nodes/rpc-others/rpc-tezos.md | 8 - .../rpc-tezos/rpc-tezos-getbigmapvalue.md | 65 --- .../rpc-tezos/rpc-tezos-getblock.md | 81 --- .../rpc-tezos/rpc-tezos-getblockhash.md | 71 --- .../rpc-tezos/rpc-tezos-getblockhashes.md | 73 --- .../rpc-tezos/rpc-tezos-getblockheader.md | 81 --- .../rpc-tezos/rpc-tezos-getblockshead.md | 75 --- .../rpc-tezos/rpc-tezos-getblockshell.md | 62 --- .../rpc-tezos/rpc-tezos-getchainid.md | 63 --- .../rpc-tezos/rpc-tezos-getconfig.md | 56 --- .../rpc-tezos/rpc-tezos-getconracttickets.md | 73 --- .../rpc-tezos/rpc-tezos-getconstants.md | 141 ------ .../rpc-tezos/rpc-tezos-getcontract.md | 78 --- .../rpc-tezos/rpc-tezos-getcontractbalance.md | 55 --- ...-tezos-getcontractbalanceandfrozenbonds.md | 67 --- .../rpc-tezos/rpc-tezos-getcontractcounter.md | 65 --- .../rpc-tezos-getcontractdelegate.md | 67 --- .../rpc-tezos-getcontractentrypoint.md | 75 --- .../rpc-tezos-getcontractentrypoints.md | 74 --- .../rpc-tezos-getcontractmanagerkey.md | 69 --- .../rpc-tezos/rpc-tezos-getcontracttickets.md | 14 - .../rpc-tezos/rpc-tezos-geterrorsschema.md | 59 --- .../rpc-tezos/rpc-tezos-gethistorymode.md | 63 --- .../rpc-tezos/rpc-tezos-getinvalidblocks.md | 61 --- .../rpc-tezos/rpc-tezos-getlevelscaboose.md | 65 --- .../rpc-tezos-getlevelscheckpoint.md | 57 --- .../rpc-tezos/rpc-tezos-getlevelssavepoint.md | 68 --- .../rpc-tezos/rpc-tezos-getnetworkdal.md | 64 --- .../rpc-tezos/rpc-tezos-getnodeversion.md | 50 -- .../rpc-tezos/rpc-tezos-getoperationhashes.md | 53 -- .../rpc-tezos/rpc-tezos-getoperations.md | 53 -- .../rpc-tezos/rpc-tezos-getprotocol.md | 69 --- .../rpc-tezos-getprotocolenvironment.md | 49 -- .../rpc-tezos/rpc-tezos-getprotocols.md | 56 --- ...tezos-getuseractivatedprotocoloverrides.md | 62 --- .../rpc-tezos-getuseractivatedupgrades.md | 58 --- .../rpc-tezos/rpc-tezos-injectblock.md | 94 ---- .../rpc-tezos/rpc-tezos-injectoperation.md | 82 --- .../rpc-tezos/rpc-tezos-injectprotocol.md | 84 ---- .../rpc-tezos/rpc-tezos-isbootstrapped.md | 75 --- .../rpc-tezos/rpc-tezos-simulateoperation.md | 80 --- v1.0/RPC Nodes/rpc-others/rpc-tron.md | 8 - .../rpc-tron-accountpermissionupdate.md | 198 -------- .../rpc-tron/rpc-tron-broadcasthex.md | 87 ---- .../rpc-tron/rpc-tron-broadcasttransaction.md | 98 ---- .../rpc-others/rpc-tron/rpc-tron-clearabi.md | 101 ---- .../rpc-tron/rpc-tron-createaccount.md | 113 ----- .../rpc-tron/rpc-tron-createassetissue.md | 176 ------- .../rpc-tron/rpc-tron-createtransaction.md | 115 ----- .../rpc-tron-debug_traceblockbyhash.md | 131 ----- .../rpc-tron-debug_traceblockbynumber.md | 129 ----- .../rpc-tron/rpc-tron-debug_tracecall.md | 144 ------ .../rpc-tron-debug_tracetransaction.md | 14 - .../rpc-tron/rpc-tron-delegateresource.md | 114 ----- .../rpc-tron/rpc-tron-deploycontract.md | 151 ------ .../rpc-tron/rpc-tron-estimateenergy.md | 85 ---- .../rpc-tron/rpc-tron-eth_blocknumber.md | 79 --- .../rpc-tron/rpc-tron-eth_chainid.md | 77 --- .../rpc-tron/rpc-tron-eth_estimategas.md | 109 ---- .../rpc-tron/rpc-tron-eth_gasprice.md | 77 --- .../rpc-tron/rpc-tron-eth_getbalance.md | 127 ----- .../rpc-tron/rpc-tron-eth_getblockbyhash.md | 154 ------ .../rpc-tron/rpc-tron-eth_getblockbynumber.md | 151 ------ ...tron-eth_getblocktransactioncountbyhash.md | 85 ---- ...on-eth_getblocktransactioncountbynumber.md | 78 --- .../rpc-tron/rpc-tron-eth_getcode.md | 93 ---- .../rpc-tron/rpc-tron-eth_getlogs.md | 128 ----- .../rpc-tron/rpc-tron-eth_getproof.md | 124 ----- .../rpc-tron/rpc-tron-eth_getstorageat.md | 86 ---- ...n-eth_gettransactionbyblockhashandindex.md | 119 ----- ...eth_gettransactionbyblocknumberandindex.md | 119 ----- .../rpc-tron-eth_gettransactionbyhash.md | 109 ---- .../rpc-tron-eth_gettransactioncount.md | 91 ---- .../rpc-tron-eth_gettransactionreceipt.md | 125 ----- .../rpc-tron-eth_getunclecountbyblockhash.md | 86 ---- ...rpc-tron-eth_getunclecountbyblocknumber.md | 88 ---- .../rpc-tron-eth_maxpriorityfeepergas.md | 79 --- .../rpc-tron-eth_sendrawtransaction.md | 79 --- .../rpc-tron/rpc-tron-freezebalance.md | 115 ----- .../rpc-tron/rpc-tron-freezebalancev2.md | 82 --- .../rpc-tron/rpc-tron-getaccount.md | 131 ----- .../rpc-tron/rpc-tron-getaccountbalance.md | 94 ---- .../rpc-tron/rpc-tron-getaccountnet.md | 81 --- .../rpc-tron/rpc-tron-getaccountresource.md | 88 ---- .../rpc-tron-getassetissuebyaccount.md | 105 ---- .../rpc-tron/rpc-tron-getassetissuebyid.md | 90 ---- .../rpc-tron/rpc-tron-getassetissuebyname.md | 93 ---- .../rpc-tron/rpc-tron-getassetissuelist.md | 109 ---- .../rpc-tron-getassetissuelistbyname.md | 92 ---- .../rpc-tron-getavailableunfreezecount.md | 68 --- .../rpc-tron/rpc-tron-getbandwidthprices.md | 63 --- .../rpc-others/rpc-tron/rpc-tron-getblock.md | 298 ----------- .../rpc-tron/rpc-tron-getblockbalance.md | 101 ---- .../rpc-tron/rpc-tron-getblockbyid.md | 288 ----------- .../rpc-tron/rpc-tron-getblockbylatestnum.md | 188 ------- .../rpc-tron/rpc-tron-getblockbylimitnext.md | 149 ------ .../rpc-tron/rpc-tron-getblockbynum.md | 102 ---- .../rpc-tron/rpc-tron-getburntrx.md | 69 --- .../rpc-tron-getcandelegatedmaxsize.md | 77 --- .../rpc-tron-getcanwithdrawunfreezeamount.md | 76 --- .../rpc-tron/rpc-tron-getchainparameters.md | 305 ------------ .../rpc-tron/rpc-tron-getcontract.md | 319 ------------ .../rpc-tron/rpc-tron-getcontractinfo.md | 329 ------------ .../rpc-tron/rpc-tron-getdelegatedresource.md | 84 ---- ...c-tron-getdelegatedresourceaccountindex.md | 72 --- ...tron-getdelegatedresourceaccountindexv2.md | 79 --- .../rpc-tron-getdelegatedresourcev2.md | 88 ---- .../rpc-tron/rpc-tron-getenergyprices.md | 63 --- .../rpc-tron/rpc-tron-getnodeinfo.md | 295 ----------- .../rpc-tron/rpc-tron-getnowblock.md | 95 ---- .../rpc-tron-getpaginatedassetissuelist.md | 136 ----- .../rpc-tron/rpc-tron-gettransactionbyid.md | 107 ---- .../rpc-tron-gettransactioninfobyblocknum.md | 352 ------------- .../rpc-tron-gettransactioninfobyid.md | 93 ---- .../rpc-others/rpc-tron/rpc-tron-listnodes.md | 92 ---- .../rpc-tron-participateassetissue.md | 127 ----- .../rpc-tron/rpc-tron-transferasset.md | 120 ----- .../rpc-tron-triggerconstantcontract.md | 127 ----- .../rpc-tron/rpc-tron-triggersmartcontract.md | 139 ------ .../rpc-tron/rpc-tron-txpool_content.md | 146 ------ .../rpc-tron/rpc-tron-txpool_inspect.md | 93 ---- .../rpc-tron/rpc-tron-txpool_status.md | 81 --- .../rpc-tron/rpc-tron-undelegateresource.md | 116 ----- .../rpc-tron/rpc-tron-unfreezeasset.md | 95 ---- .../rpc-tron/rpc-tron-unfreezebalance.md | 106 ---- .../rpc-tron/rpc-tron-unfreezebalancev2.md | 113 ----- .../rpc-tron/rpc-tron-updateaccount.md | 103 ---- .../rpc-tron/rpc-tron-updateasset.md | 120 ----- .../rpc-tron/rpc-tron-updateenergylimit.md | 113 ----- .../rpc-tron/rpc-tron-updatesetting.md | 113 ----- .../rpc-tron/rpc-tron-validateaddress.md | 83 ---- .../rpc-tron/rpc-tron-web3_clientversion.md | 79 --- .../rpc-tron-withdrawexpireunfreeze.md | 100 ---- v1.0/RPC Nodes/rpc-others/rpc-xrp.md | 8 - .../rpc-xrp/rpc-xrp-account_channels.md | 120 ----- .../rpc-xrp/rpc-xrp-account_currencies.md | 88 ---- .../rpc-xrp/rpc-xrp-account_info.md | 147 ------ .../rpc-xrp/rpc-xrp-account_lines.md | 130 ----- .../rpc-xrp/rpc-xrp-account_nfts.md | 102 ---- .../rpc-xrp/rpc-xrp-account_objects.md | 177 ------- .../rpc-xrp/rpc-xrp-account_offers.md | 122 ----- .../rpc-others/rpc-xrp/rpc-xrp-account_tx.md | 236 --------- .../rpc-others/rpc-xrp/rpc-xrp-book_offers.md | 93 ---- .../rpc-xrp/rpc-xrp-channel_authorize.md | 87 ---- .../rpc-xrp/rpc-xrp-channel_verify.md | 84 ---- .../rpc-xrp/rpc-xrp-deposit_authorized.md | 85 ---- .../rpc-others/rpc-xrp/rpc-xrp-fee.md | 99 ---- .../rpc-others/rpc-xrp/rpc-xrp-ledger.md | 141 ------ .../rpc-xrp/rpc-xrp-ledger_closed.md | 75 --- .../rpc-others/rpc-xrp/rpc-xrp-ledger_data.md | 119 ----- .../rpc-xrp/rpc-xrp-ledger_entry.md | 95 ---- .../rpc-others/rpc-xrp/rpc-xrp-manifest.md | 85 ---- .../rpc-xrp/rpc-xrp-nft_buy_offers.md | 86 ---- .../rpc-xrp/rpc-xrp-nft_sell_offers.md | 85 ---- .../rpc-xrp/rpc-xrp-noripple_check.md | 120 ----- .../rpc-others/rpc-xrp/rpc-xrp-ping.md | 70 --- .../rpc-others/rpc-xrp/rpc-xrp-random.md | 70 --- .../rpc-xrp/rpc-xrp-ripple_path_find.md | 151 ------ .../rpc-others/rpc-xrp/rpc-xrp-server_info.md | 172 ------- .../rpc-xrp/rpc-xrp-server_state.md | 172 ------- .../rpc-others/rpc-xrp/rpc-xrp-submit.md | 159 ------ .../rpc-xrp/rpc-xrp-submit_multisigned.md | 117 ----- .../rpc-xrp/rpc-xrp-transaction_entry.md | 92 ---- .../rpc-others/rpc-xrp/rpc-xrp-tx.md | 199 -------- v1.0/RPC Nodes/rpc-utxo.md | 8 - v1.0/RPC Nodes/rpc-utxo/bitcoin-1.md | 8 - .../bitcoin-1/rpc-btc-getbestblockhash.md | 47 -- .../rpc-utxo/bitcoin-1/rpc-btc-getblock.md | 82 --- .../bitcoin-1/rpc-btc-getblockchaininfo.md | 61 --- .../bitcoin-1/rpc-btc-getblockcount.md | 44 -- .../bitcoin-1/rpc-btc-getblockhash.md | 49 -- .../bitcoin-1/rpc-btc-getblockheader.md | 71 --- .../bitcoin-1/rpc-btc-getblockstats.md | 88 ---- .../bitcoin-1/rpc-btc-getchaintips.md | 67 --- .../bitcoin-1/rpc-btc-getdifficulty.md | 43 -- .../bitcoin-1/rpc-btc-getmempoolancestors.md | 56 --- .../rpc-btc-getmempooldescendants.md | 55 --- .../bitcoin-1/rpc-btc-getmempoolentry.md | 66 --- .../bitcoin-1/rpc-btc-getmempoolinfo.md | 56 --- .../bitcoin-1/rpc-btc-getrawmempool.md | 72 --- .../rpc-utxo/bitcoin-1/rpc-btc-gettxout.md | 83 ---- .../bitcoin-1/rpc-btc-gettxoutproof.md | 51 -- .../bitcoin-1/rpc-btc-validateaddress.md | 66 --- .../bitcoin-1/rpc-btc-verifymessage.md | 60 --- .../bitcoin-1/rpc-btc-verifytxoutproof.md | 50 -- v1.0/RPC Nodes/rpc-utxo/rpc-bch.md | 8 - .../rpc-bch/rpc-bch-createrawtransaction.md | 107 ---- .../rpc-bch/rpc-bch-decoderawtransaction.md | 138 ------ .../rpc-utxo/rpc-bch/rpc-bch-decodescript.md | 93 ---- .../rpc-utxo/rpc-bch/rpc-bch-estimatefee.md | 52 -- .../rpc-bch/rpc-bch-estimatesmartfee.md | 93 ---- .../rpc-bch/rpc-bch-getbestblockhash.md | 81 --- .../rpc-utxo/rpc-bch/rpc-bch-getblock.md | 134 ----- .../rpc-bch/rpc-bch-getblockchaininfo.md | 111 ----- .../rpc-utxo/rpc-bch/rpc-bch-getblockcount.md | 81 --- .../rpc-utxo/rpc-bch/rpc-bch-getblockhash.md | 84 ---- .../rpc-bch/rpc-bch-getblockheader.md | 121 ----- .../rpc-utxo/rpc-bch/rpc-bch-getblockstats.md | 153 ------ .../rpc-utxo/rpc-bch/rpc-bch-getchaintips.md | 249 ---------- .../rpc-utxo/rpc-bch/rpc-bch-getdifficulty.md | 81 --- .../rpc-bch/rpc-bch-getmempoolancestors.md | 91 ---- .../rpc-bch/rpc-bch-getmempooldescendants.md | 91 ---- .../rpc-bch/rpc-bch-getmempoolentry.md | 120 ----- .../rpc-bch/rpc-bch-getmempoolinfo.md | 102 ---- .../rpc-utxo/rpc-bch/rpc-bch-getrawmempool.md | 129 ----- .../rpc-bch/rpc-bch-getrawtransaction.md | 184 ------- .../rpc-utxo/rpc-bch/rpc-bch-gettxout.md | 114 ----- .../rpc-utxo/rpc-bch/rpc-bch-gettxoutproof.md | 88 ---- .../rpc-bch/rpc-bch-sendrawtransaction.md | 87 ---- .../rpc-bch/rpc-bch-validateaddress.md | 104 ---- .../rpc-utxo/rpc-bch/rpc-bch-verifymessage.md | 92 ---- .../rpc-bch/rpc-bch-verifytxoutproof.md | 86 ---- v1.0/RPC Nodes/rpc-utxo/rpc-degecoin.md | 8 - .../rpc-dogecoin-createrawtransaction.md | 109 ---- .../rpc-dogecoin-decoderawtransaction.md | 140 ------ .../rpc-degecoin/rpc-dogecoin-decodescript.md | 95 ---- .../rpc-dogecoin-estimatesmartfee.md | 95 ---- .../rpc-dogecoin-getbestblockhash.md | 83 ---- .../rpc-degecoin/rpc-dogecoin-getblock.md | 132 ----- .../rpc-dogecoin-getblockchaininfo.md | 113 ----- .../rpc-dogecoin-getblockcount.md | 83 ---- .../rpc-degecoin/rpc-dogecoin-getblockhash.md | 86 ---- .../rpc-dogecoin-getblockheader.md | 123 ----- .../rpc-degecoin/rpc-dogecoin-getchaintips.md | 251 ---------- .../rpc-dogecoin-getdifficulty.md | 83 ---- .../rpc-dogecoin-getmempoolancestors.md | 91 ---- .../rpc-dogecoin-getmempooldescendants.md | 91 ---- .../rpc-dogecoin-getmempoolentry.md | 120 ----- .../rpc-dogecoin-getmempoolinfo.md | 104 ---- .../rpc-dogecoin-getrawmempool.md | 129 ----- .../rpc-dogecoin-getrawtransaction.md | 186 ------- .../rpc-degecoin/rpc-dogecoin-gettxout.md | 116 ----- .../rpc-dogecoin-gettxoutproof.md | 90 ---- .../rpc-dogecoin-sendrawtransaction.md | 87 ---- .../rpc-dogecoin-validateaddress.md | 106 ---- .../rpc-dogecoin-verifymessage.md | 92 ---- .../rpc-dogecoin-verifytxoutproof.md | 88 ---- v1.0/RPC Nodes/rpc-utxo/rpc-litecoin.md | 8 - .../rpc-litecoin-createrawtransaction.md | 109 ---- .../rpc-litecoin-decoderawtransaction.md | 140 ------ .../rpc-litecoin/rpc-litecoin-decodescript.md | 95 ---- .../rpc-litecoin-estimatesmartfee.md | 95 ---- .../rpc-litecoin-getbestblockhash.md | 83 ---- .../rpc-litecoin/rpc-litecoin-getblock.md | 136 ----- .../rpc-litecoin-getblockchaininfo.md | 113 ----- .../rpc-litecoin-getblockcount.md | 83 ---- .../rpc-litecoin/rpc-litecoin-getblockhash.md | 86 ---- .../rpc-litecoin-getblockheader.md | 123 ----- .../rpc-litecoin-getblockstats.md | 155 ------ .../rpc-litecoin/rpc-litecoin-getchaintips.md | 251 ---------- .../rpc-litecoin-getdifficulty.md | 83 ---- .../rpc-litecoin-getmempoolancestors.md | 91 ---- .../rpc-litecoin-getmempooldescendants.md | 91 ---- .../rpc-litecoin-getmempoolentry.md | 120 ----- .../rpc-litecoin-getmempoolinfo.md | 104 ---- .../rpc-litecoin-getrawmempool.md | 129 ----- .../rpc-litecoin-getrawtransaction.md | 186 ------- .../rpc-litecoin/rpc-litecoin-gettxout.md | 116 ----- .../rpc-litecoin-gettxoutproof.md | 90 ---- .../rpc-litecoin-sendrawtransaction.md | 87 ---- .../rpc-litecoin-validateaddress.md | 106 ---- .../rpc-litecoin-verifymessage.md | 92 ---- .../rpc-litecoin-verifytxoutproof.md | 88 ---- v1.0/RPC Nodes/rpc-utxo/zcash.md | 8 - .../zcash/rpc-zcash-createrawtransaction.md | 107 ---- .../zcash/rpc-zcash-decoderawtransaction.md | 138 ------ .../rpc-utxo/zcash/rpc-zcash-decodescript.md | 93 ---- .../zcash/rpc-zcash-estimatesmartfee.md | 93 ---- .../zcash/rpc-zcash-getbestblockhash.md | 81 --- .../rpc-utxo/zcash/rpc-zcash-getblock.md | 134 ----- .../zcash/rpc-zcash-getblockchaininfo.md | 111 ----- .../rpc-utxo/zcash/rpc-zcash-getblockcount.md | 81 --- .../rpc-utxo/zcash/rpc-zcash-getblockhash.md | 84 ---- .../zcash/rpc-zcash-getblockheader.md | 121 ----- .../rpc-utxo/zcash/rpc-zcash-getblockstats.md | 153 ------ .../rpc-utxo/zcash/rpc-zcash-getchaintips.md | 249 ---------- .../rpc-utxo/zcash/rpc-zcash-getdifficulty.md | 81 --- .../zcash/rpc-zcash-getmempoolancestors.md | 91 ---- .../zcash/rpc-zcash-getmempooldescendants.md | 91 ---- .../zcash/rpc-zcash-getmempoolentry.md | 120 ----- .../zcash/rpc-zcash-getmempoolinfo.md | 102 ---- .../rpc-utxo/zcash/rpc-zcash-getrawmempool.md | 129 ----- .../zcash/rpc-zcash-getrawtransaction.md | 184 ------- .../rpc-utxo/zcash/rpc-zcash-gettxout.md | 114 ----- .../rpc-utxo/zcash/rpc-zcash-gettxoutproof.md | 88 ---- .../zcash/rpc-zcash-sendrawtransaction.md | 87 ---- .../zcash/rpc-zcash-validateaddress.md | 104 ---- .../rpc-utxo/zcash/rpc-zcash-verifymessage.md | 92 ---- .../zcash/rpc-zcash-verifytxoutproof.md | 86 ---- 483 files changed, 47545 deletions(-) delete mode 100644 v1.0/RPC Nodes/rpc-others.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-broadcasttransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapplicationinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapplications.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapsslocalstate.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountassetinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountassets.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountcreatedassets.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccounts.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccounttransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplication.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationbox.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationboxes.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationdetails.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationlogs.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplications.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getasset.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassetbalances.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassetinformation.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassets.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassettransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getgenesis.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gethealth.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getledgerstatedelta.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getledgersupply.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getnodestatus.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getnodestatusafterround.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getpendingtransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactionparams.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactionproof.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-ishealthy.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-isready.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-simulatetransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-abcinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-abciquerry.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-block.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-blockchain.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-blockresults.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxasync.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxcommit.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxsync.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-commit.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-genesis.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-health.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-netinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-numunconfirmedtxs.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-status.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-tx.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-txsearch.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-unconfirmedtxs.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-validators.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionmetadata.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionpayloads.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionpreprocess.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-createnetworktransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-deriveaccount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getaccountbalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getaccountcoins.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getblocktransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-gethashoftransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getnetworklist.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getnetworkstatus.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-parsetransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-searchtransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-submittransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_abi.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_account.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_accounts_by_authorizers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_activated_protocol_features.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_block.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_block_info.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_code.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_currency_balance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_currency_stats.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_info.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_producers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_raw_abi.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_raw_code_and_abi.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_required_keys.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_table_by_scope.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_table_rows.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-push_transaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-push_transactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-send_transaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-trace-api-get_block.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getaccountinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getbalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockcommitment.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockheight.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockproduction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblocks.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockswithlimit.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblocktime.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getclusternodes.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getepochinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getepochschedule.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getfeeformessage.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getfirstavailableblock.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getgenesishash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gethealth.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gethighestsnapshotslot.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getidentity.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationgovernor.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationrate.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationreward.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getlargestaccounts.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getlatestblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getleaderschedule.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmaxretransmitslot.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmaxshredinsertslot.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getminimumbalanceforrentexemption.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmultipleaccounts.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getprogramaccounts.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getrecentperformancesamples.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getrecentprioritizationfees.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsignaturesforaddress.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsignaturestatuses.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslot.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslotleader.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslotleaders.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getstakeactivation.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getstakeminimumdelegation.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsupply.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountbalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountsbydelegate.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountsbyowner.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenlargestaccounts.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokensupply.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettransactioncount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getversion.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getvoteaccounts.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-isblockhashvalid.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-minimumledgerslot.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-requestairdrop.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-sendtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-simulatetransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoffers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoperations.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountpayments.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounts.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttrades.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getassets.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalances.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-geteffects.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getfeestats.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledger.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgereffects.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgeroperations.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgerpayments.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgertransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypool.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooleffects.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooloperations.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypools.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltrades.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffer.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffertrades.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperation.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperationeffects.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperations.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getorderbook.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getpayments.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictreceivepaymentpaths.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictsendpaymentpaths.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettradeaggregations.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettrades.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactioneffects.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactionoperations.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactions.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-submittransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getbigmapvalue.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockhashes.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockheader.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockshead.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockshell.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getchainid.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconfig.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconracttickets.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconstants.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontract.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractbalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractbalanceandfrozenbonds.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractcounter.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractdelegate.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractentrypoint.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractentrypoints.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractmanagerkey.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontracttickets.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-geterrorsschema.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-gethistorymode.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getinvalidblocks.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelscaboose.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelscheckpoint.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelssavepoint.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getnetworkdal.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getnodeversion.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getoperationhashes.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getoperations.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocol.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocolenvironment.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocols.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getuseractivatedprotocoloverrides.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getuseractivatedupgrades.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectblock.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectoperation.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectprotocol.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-isbootstrapped.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-simulateoperation.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-accountpermissionupdate.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-broadcasthex.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-broadcasttransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-clearabi.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createaccount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createassetissue.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_traceblockbyhash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_traceblockbynumber.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_tracecall.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_tracetransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-delegateresource.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-deploycontract.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-estimateenergy.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_blocknumber.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_chainid.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_estimategas.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gasprice.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getbalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblockbyhash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblockbynumber.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblocktransactioncountbyhash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblocktransactioncountbynumber.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getcode.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getlogs.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getproof.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getstorageat.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyblockhashandindex.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyblocknumberandindex.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyhash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactioncount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionreceipt.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getunclecountbyblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getunclecountbyblocknumber.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_maxpriorityfeepergas.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_sendrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-freezebalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-freezebalancev2.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountbalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountnet.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountresource.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyaccount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyid.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyname.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuelist.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuelistbyname.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getavailableunfreezecount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getbandwidthprices.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbyid.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbylatestnum.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbylimitnext.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbynum.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getburntrx.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcandelegatedmaxsize.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcanwithdrawunfreezeamount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getchainparameters.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcontract.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcontractinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresource.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourceaccountindex.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourceaccountindexv2.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourcev2.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getenergyprices.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getnodeinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getnowblock.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getpaginatedassetissuelist.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactionbyid.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactioninfobyblocknum.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactioninfobyid.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-listnodes.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-participateassetissue.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-transferasset.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-triggerconstantcontract.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-triggersmartcontract.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_content.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_inspect.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_status.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-undelegateresource.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezeasset.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezebalance.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezebalancev2.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateaccount.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateasset.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateenergylimit.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updatesetting.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-validateaddress.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-web3_clientversion.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-withdrawexpireunfreeze.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_channels.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_currencies.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_info.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_lines.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_nfts.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_objects.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_offers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_tx.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-book_offers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-channel_authorize.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-channel_verify.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-deposit_authorized.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-fee.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_closed.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_data.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_entry.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-manifest.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-nft_buy_offers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-nft_sell_offers.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-noripple_check.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ping.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-random.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ripple_path_find.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-server_info.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-server_state.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-submit.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-submit_multisigned.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-transaction_entry.md delete mode 100644 v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-tx.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getbestblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockchaininfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockcount.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockheader.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockstats.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getchaintips.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getdifficulty.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolancestors.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempooldescendants.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolentry.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getrawmempool.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-gettxout.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-gettxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-validateaddress.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-verifymessage.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-verifytxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-createrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-decoderawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-decodescript.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-estimatefee.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-estimatesmartfee.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getbestblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockchaininfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockcount.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockheader.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockstats.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getchaintips.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getdifficulty.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolancestors.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempooldescendants.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolentry.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getrawmempool.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-gettxout.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-gettxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-sendrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-validateaddress.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-verifymessage.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-verifytxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-createrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decoderawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decodescript.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-estimatesmartfee.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getbestblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockchaininfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockcount.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockheader.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getchaintips.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getdifficulty.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolancestors.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempooldescendants.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolentry.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getrawmempool.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-gettxout.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-gettxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-sendrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-validateaddress.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-verifymessage.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-verifytxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-createrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-decoderawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-decodescript.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-estimatesmartfee.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getbestblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockchaininfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockcount.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockheader.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockstats.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getchaintips.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getdifficulty.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolancestors.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempooldescendants.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolentry.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getrawmempool.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-gettxout.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-gettxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-sendrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-validateaddress.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-verifymessage.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-verifytxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-createrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-decoderawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-decodescript.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-estimatesmartfee.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getbestblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblock.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockchaininfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockcount.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockheader.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockstats.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getchaintips.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getdifficulty.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolancestors.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempooldescendants.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolentry.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolinfo.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getrawmempool.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-gettxout.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-gettxoutproof.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-sendrawtransaction.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-validateaddress.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-verifymessage.md delete mode 100644 v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-verifytxoutproof.md diff --git a/v1.0/RPC Nodes/rpc-others.md b/v1.0/RPC Nodes/rpc-others.md deleted file mode 100644 index ec2739a9..00000000 --- a/v1.0/RPC Nodes/rpc-others.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Others" -slug: "rpc-others" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:03 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:34 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand.md deleted file mode 100644 index 468236c4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Algorand" -slug: "rpc-algorand" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:38 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-broadcasttransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-broadcasttransaction.md deleted file mode 100644 index 20c3ace1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-broadcasttransaction.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "broadcastTransaction" -slug: "rpc-algorand-broadcasttransaction" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - broadcastTransaction: 'RAW_TRANSACTION', // Specify the byte encoded signed transaction to broadcast to network. -}; - -// Broadcast raw transaction to Algorand network -const transactionId = await tatum.rpc.broadcastTransaction(params); - -// Log the transaction ID -console.log('Algorand Transaction ID:', transactionId); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `broadcastTransaction` method allows you to broadcast a raw transaction or transaction group to the Algorand network. - -### Example Use Cases - -1. **Transaction Broadcasting**: Developers can use this method to directly broadcast a byte encoded signed transaction to the Algorand network for further processing. - -### Request Parameters - -The `broadcastTransaction` method requires the following parameters: - -- `broadcastTransaction` (string, required): The byte encoded signed transaction to broadcast to the Algorand network. - -### Return Object - -The method returns an object representing the transaction ID of the submitted transaction on the Algorand network. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccount.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccount.md deleted file mode 100644 index aa4d26df..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccount.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getAccount" -slug: "rpc-algorand-getaccount" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -\\n - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters as an object -const accountAddress = { address: 'ALGORAND_ACCOUNT_ADDRESS' }; // Replace with the Algorand account address you want to retrieve information for. - -// Retrieve account information using the Algorand Indexer -const accountInfo = await tatum.rpc.getAccount(accountAddress); - -// Log the account information -console.log('Algorand Account Information:', accountInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccount` method allows you to retrieve detailed information about a specific Algorand account based on its account address. - -### Example Use Cases - -1. **Account Balance**: Developers can use this method to check the balance of a specific Algorand account by providing its address. - -2. **Account Details**: Retrieve various details of an Algorand account, including its transactions, assets, and more, for further analysis. - -### Request Parameters - -The `getAccount` method requires the following parameter: - -- `account-address` (string, required): The Algorand account address for which you want to retrieve account information. - -### Return Object - -The method returns an object representing the detailed information of the specified Algorand account, including various parameters. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapplicationinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapplicationinfo.md deleted file mode 100644 index 1639d634..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapplicationinfo.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "getAccountApplicationInfo" -slug: "rpc-algorand-getaccountapplicationinfo" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - address: 'ALGORAND_PUBLIC_KEY', // Specify the Algorand account public key. - applicationId: 12345, // Specify the application identifier. - format: 'json' // Optional: Configures whether the response object is JSON or MessagePack encoded (enum: json, msgpack). -}; - -// Retrieve account application information for the Algorand account -const accountApplicationInfo = await tatum.rpc.getAccountApplicationInfo(params); - -// Log the account application information -console.log('Algorand Account Application Information:', accountApplicationInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountApplicationInfo` method allows you to retrieve the account's application local state and global state for a specific Algorand account and application ID. - -### Example Use Cases - -1. **Retrieve Application State**: Developers can use this method to retrieve the application state (local and global) for a specific Algorand account. - -### Request Parameters - -The `getAccountApplicationInfo` method requires the following parameters: - -- `address` (string, required): An Algorand account public key. -- `applicationId` (number, required): An application identifier. -- `format` (enum: json, msgpack, optional): Configures whether the response object is JSON or MessagePack encoded. - -### Return Object - -The method returns an object representing the account's application local state and global state (if exists) for the specified Algorand account and application ID. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapplications.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapplications.md deleted file mode 100644 index 58e55567..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapplications.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getAccountApplications" -slug: "rpc-algorand-getaccountapplications" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - accountId: 'ALGORAND_ACCOUNT_ID', // Specify the Algorand account ID for which you want to retrieve created applications. - applicationId: 123, // Optional: Specify the application ID (number) for filtering. - includeAll: true, // Optional: Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states (boolean). - limit: 100, // Optional: Maximum number of results to return (number). - next: 'NEXT_PAGE_TOKEN' // Optional: The next page of results. Use the next token provided by the previous results (string). -}; - -// Retrieve created application parameters for the Algorand account -const createdApplications = await tatum.rpc.getAccountApplications(params); - -// Log the created application parameters -console.log('Algorand Account Created Applications:', createdApplications); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountApplications` method allows you to retrieve the created application parameters of a specific Algorand account. - -### Example Use Cases - -1. **Application Parameters**: Developers can use this method to retrieve the parameters of applications created by an Algorand account, including information about specific applications and their details. - -### Request Parameters - -The `getAccountApplications` method requires the following parameters: - -- `accountId` (string, required): Specify the Algorand account ID for which you want to retrieve created application parameters. -- `applicationId` (number, optional): Specify the application ID for filtering the results. -- `includeAll` (boolean, optional): Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states. -- `limit` (number, optional): Maximum number of results to return. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. - -### Return Object - -The method returns an object representing the created application parameters of the specified Algorand account, including information about specific applications and their details. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapsslocalstate.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapsslocalstate.md deleted file mode 100644 index 19bfcd65..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountapsslocalstate.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getAccountApssLocalState" -slug: "rpc-algorand-getaccountapsslocalstate" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define optional query parameters -const params = { - accountId: 'ALGORAND_ACCOUNT_ID', // Replace with the Algorand account ID for which you want to retrieve local application state. - applicationId: 123, // Optional: Specify the application ID (number) for filtering. - includeAll: true, // Optional: Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states (boolean). - limit: 100, // Optional: Maximum number of results to return (number). - next: 'NEXT_PAGE_TOKEN' // Optional: The next page of results. Use the next token provided by the previous results (string). -}; - -// Retrieve local application state for the Algorand account -const appsLocalState = await tatum.rpc.getAccountAppsLocalState(params); - -// Log the local application state information -console.log('Algorand Account Local Application State:', appsLocalState); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountAppsLocalState` method allows you to retrieve the local application state of a specific Algorand account. - -### Example Use Cases - -1. **Application State**: Developers can use this method to retrieve the local application state of an Algorand account, including information about its asset holdings and applications. - -### Request Parameters - -The `getAccountAppsLocalState` method requires the following parameters: - -- `account-id` (string, required): The Algorand account ID for which you want to retrieve local application state. -- `application-id` (number, optional): Specify the application ID for filtering the results. -- `include-all` (boolean, optional): Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states. -- `limit` (number, optional): Maximum number of results to return. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. - -### Return Object - -The method returns an object representing the local application state of the specified Algorand account, including information about asset holdings and applications. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountassetinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountassetinfo.md deleted file mode 100644 index e6903a0f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountassetinfo.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "getAccountAssetInfo" -slug: "rpc-algorand-getaccountassetinfo" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - address: 'ALGORAND_ACCOUNT_ADDRESS', // Specify the Algorand account address for which you want to retrieve asset information. - assetId: 123, // Specify the asset ID for which you want to retrieve information. - format: 'json' // Optional: Configures whether the response object is JSON or MessagePack encoded. Defaults to JSON. -}; - -// Retrieve asset information for the Algorand account -const assetInformation = await tatum.rpc.getAccountAssetInformation(params); - -// Log the asset information -console.log('Algorand Account Asset Information:', assetInformation); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountAssetInformation` method allows you to retrieve asset holding and asset parameters (if applicable) for a specific asset ID and account address. - -### Example Use Cases - -1. **Asset Holdings**: Developers can use this method to retrieve the asset holdings of a specific Algorand account, including information about the asset and its parameters. - -### Request Parameters - -The `getAccountAssetInformation` method requires the following parameters: - -- `address` (string, required): Specify the Algorand account address for which you want to retrieve asset information. -- `assetId` (number, required): Specify the asset ID for which you want to retrieve information. -- `format` (enum: json, msgpack, optional): Configures whether the response object is JSON or MessagePack encoded. Defaults to JSON. - -### Return Object - -The method returns an object representing the asset holding and asset parameters (if applicable) for the specified asset ID and account address. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountassets.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountassets.md deleted file mode 100644 index aae16456..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountassets.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getAccountAssets" -slug: "rpc-algorand-getaccountassets" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:36 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - accountId: 'ALGORAND_ACCOUNT_ID', // Specify the Algorand account ID for which you want to retrieve asset holdings. - assetId: 123, // Optional: Specify the asset ID (number) for filtering. - includeAll: true, // Optional: Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states (boolean). - limit: 100, // Optional: Maximum number of results to return (number). - next: 'NEXT_PAGE_TOKEN' // Optional: The next page of results. Use the next token provided by the previous results (string). -}; - -// Retrieve asset holdings for the Algorand account -const accountAssets = await tatum.rpc.getAccountAssets(params); - -// Log the asset holdings information -console.log('Algorand Account Asset Holdings:', accountAssets); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountAssets` method allows you to retrieve the asset holdings of a specific Algorand account. - -### Example Use Cases - -1. **Asset Holdings**: Developers can use this method to retrieve the asset holdings of an Algorand account, including information about specific assets held by the account. - -### Request Parameters - -The `getAccountAssets` method requires the following parameters: - -- `accountId` (string, required): Specify the Algorand account ID for which you want to retrieve asset holdings. -- `assetId` (number, optional): Specify the asset ID for filtering the results. -- `includeAll` (boolean, optional): Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states. -- `limit` (number, optional): Maximum number of results to return. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. - -### Return Object - -The method returns an object representing the asset holdings of the specified Algorand account, including information about specific assets and their quantities. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountcreatedassets.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountcreatedassets.md deleted file mode 100644 index 7cfee71c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountcreatedassets.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getAccountCreatedAssets" -slug: "rpc-algorand-getaccountcreatedassets" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - accountId: 'ALGORAND_ACCOUNT_ID', // Specify the Algorand account ID for which you want to retrieve created asset parameters. - assetId: 123, // Optional: Specify the asset ID (number) for filtering. - includeAll: true, // Optional: Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states (boolean). - limit: 100, // Optional: Maximum number of results to return (number). - next: 'NEXT_PAGE_TOKEN' // Optional: The next page of results. Use the next token provided by the previous results (string). -}; - -// Retrieve created asset parameters for the Algorand account -const createdAssets = await tatum.rpc.getAccountCreatedAssets(params); - -// Log the created asset parameters -console.log('Algorand Account Created Assets:', createdAssets); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountCreatedAssets` method allows you to retrieve the created asset parameters of a specific Algorand account. - -### Example Use Cases - -1. **Asset Parameters**: Developers can use this method to retrieve the parameters of assets created by an Algorand account, including information about specific assets and their details. - -### Request Parameters - -The `getAccountCreatedAssets` method requires the following parameters: - -- `accountId` (string, required): Specify the Algorand account ID for which you want to retrieve created asset parameters. -- `assetId` (number, optional): Specify the asset ID for filtering the results. -- `includeAll` (boolean, optional): Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states. -- `limit` (number, optional): Maximum number of results to return. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. - -### Return Object - -The method returns an object representing the created asset parameters of the specified Algorand account, including information about specific assets and their details. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountinfo.md deleted file mode 100644 index fe5f0c32..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccountinfo.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: "getAccountInfo" -slug: "rpc-algorand-getaccountinfo" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - address: 'ALGORAND_ADDRESS', // Specify the Algorand public key for which you want to retrieve account information. - format: 'json', // Optional: Configures whether the response object is JSON or MessagePack encoded (enum: json, msgpack). - exclude: 'none' // Optional: When set to 'all' will exclude asset holdings, application local state, created asset parameters, any created application parameters. Defaults to 'none' (enum: all, none). -}; - -// Retrieve account information for the Algorand account -const accountInfo = await tatum.rpc.getAccountInformation(params); - -// Log the account information -console.log('Algorand Account Information:', accountInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountInformation` method allows you to retrieve the status, balance, and spendable amounts of a specific Algorand account. - -### Example Use Cases - -1. **Account Balance**: Developers can use this method to retrieve the balance and spendable amounts of an Algorand account. -2. **Account Status**: Users can check the status of their Algorand account, including the account public key and other related information. - -### Request Parameters - -The `getAccountInformation` method requires the following parameters: - -- `address` (string, required): Specify the Algorand public key for which you want to retrieve account information. -- `format` (enum: json, msgpack, optional): Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON. -- `exclude` (enum: all, none, optional): When set to 'all', it will exclude asset holdings, application local state, created asset parameters, and any created application parameters. Defaults to 'none'. - -### Return Object - -The method returns an object representing the account information of the specified Algorand account, including the account status, balance, and spendable amounts. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccounts.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccounts.md deleted file mode 100644 index db6acbaa..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccounts.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "getAccounts" -slug: "rpc-algorand-getaccounts" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters -const address = { address: 'ALGORAND_ADDRESS' }; // Replace with the Algorand address you want to retrieve account information for. - -// Retrieve account information using the Algorand Indexer -const accountInfo = await tatum.rpc.getAccounts(address); - -// Log the account information -console.log('Algorand Account Information:', accountInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccounts` method from the Algorand Indexer API allows you to retrieve detailed information about an Algorand account based on its address. - -### Example Use Cases - -1. **Account Balance**: Developers can use this method to check the balance of an Algorand account by providing its address. - -2. **Account Details**: You can retrieve various details of an Algorand account, including its transactions, assets, and more, for further analysis. - -### Request Parameters - -The `getAccounts` method requires the following parameter: - -- `address` (string, required): The Algorand address for which you want to retrieve account information. - -### Return Object - -The method returns an object representing the detailed information of the specified Algorand account, including various parameters. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccounttransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccounttransactions.md deleted file mode 100644 index 165937b2..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getaccounttransactions.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "getAccountTransactions" -slug: "rpc-algorand-getaccounttransactions" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - accountId: 'ALGORAND_ACCOUNT_ID', // Specify the Algorand account ID for which you want to retrieve transactions. - afterTime: 'RFC3339_DATETIME', // Optional: Include results after the given time (string in RFC 3339 format). - assetId: 123, // Optional: Specify the asset ID (number) for filtering. - beforeTime: 'RFC3339_DATETIME', // Optional: Include results before the given time (string in RFC 3339 format). - currencyGreaterThan: 1000, // Optional: Results should have an amount greater than this value (number). - currencyLessThan: 5000, // Optional: Results should have an amount less than this value (number). - limit: 100, // Optional: Maximum number of results to return (number). - maxRound: 10000, // Optional: Include results at or before the specified max-round (number). - minRound: 9000, // Optional: Include results at or after the specified min-round (number). - next: 'NEXT_PAGE_TOKEN', // Optional: The next page of results. Use the next token provided by the previous results (string). - notePrefix: 'NOTE_PREFIX', // Optional: Specifies a prefix which must be contained in the note field (string). - rekeyTo: true, // Optional: Include results which include the rekey-to field (boolean). - round: 8000, // Optional: Include results for the specified round (number). - sigType: 'sig', // Optional: SigType filters just results using the specified type of signature (enum: sig, msig, lsig). - txType: 'pay', // Optional: Filters results by transaction type (enum: pay, keyreg, acfg, axfer, afrz, appl, stpf). - txId: 'TRANSACTION_ID' // Optional: Lookup the specific transaction by ID (string). -}; - -// Retrieve account transactions for the Algorand account -const accountTransactions = await tatum.rpc.getAccountTransactions(params); - -// Log the account transactions -console.log('Algorand Account Transactions:', accountTransactions); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountTransactions` method allows you to retrieve transactions of a specific Algorand account. - -### Example Use Cases - -1. **Transaction History**: Developers can use this method to retrieve the transaction history of an Algorand account, including information about specific transactions and their details. - -### Request Parameters - -The `getAccountTransactions` method requires the following parameters: - -- `accountId` (string, required): Specify the Algorand account ID for which you want to retrieve transactions. -- `afterTime` (string in RFC 3339 format, optional): Include results after the given time. -- `assetId` (number, optional): Specify the asset ID for filtering. -- `beforeTime` (string in RFC 3339 format, optional): Include results before the given time. -- `currencyGreaterThan` (number, optional): Results should have an amount greater than this value. -- `currencyLessThan` (number, optional): Results should have an amount less than this value. -- `limit` (number, optional): Maximum number of results to return. -- `maxRound` (number, optional): Include results at or before the specified max-round. -- `minRound` (number, optional): Include results at or after the specified min-round. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. -- `notePrefix` (string, optional): Specifies a prefix which must be contained in the note field. -- `rekeyTo` (boolean, optional): Include results which include the rekey-to field. -- `round` (number, optional): Include results for the specified round. -- `sigType` (enum: sig, msig, lsig, optional): Filters just results using the specified type of signature. -- `txType` (enum: pay, keyreg, acfg, axfer, afrz, appl, stpf, optional): Filters results by transaction type. -- `txId` (string, optional): Lookup the specific transaction by ID. - -### Return Object - -The method returns an object representing the transactions of the specified Algorand account, including information about specific transactions and their details. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplication.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplication.md deleted file mode 100644 index 3673d22e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplication.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getApplication" -slug: "rpc-algorand-getapplication" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:38 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - applicationId: 123, // Specify the application ID (number) you want to lookup. - includeAll: true // Optional: Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states (boolean). -}; - -// Lookup the Algorand application -const applicationInfo = await tatum.rpc.getApplication(params); - -// Log the application information -console.log('Algorand Application Information:', applicationInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getApplication` method allows you to lookup an Algorand application. - -### Example Use Cases - -1. **Application Information**: Developers can use this method to retrieve detailed information about a specific Algorand application, including its status and details. - -### Request Parameters - -The `getApplication` method requires the following parameters: - -- `applicationId` (number, required): Specify the application ID you want to lookup. -- `includeAll` (boolean, optional): Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application local states. - -### Return Object - -The method returns an object representing the information about the specified Algorand application, including its status and details. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationbox.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationbox.md deleted file mode 100644 index 0b0b006b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationbox.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getApplicationBox" -slug: "rpc-algorand-getapplicationbox" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - applicationId: 123, // Specify the application ID (number) for which you want to get the box information. - name: 'int:1234' // Specify the box name in goal-arg form (string). -}; - -// Get the box information for the Algorand application -const boxInfo = await tatum.rpc.getApplicationBox(params); - -// Log the box information -console.log('Algorand Application Box Information:', boxInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getApplicationBox` method allows you to get box information for a given Algorand application. - -### Example Use Cases - -1. **Box Information**: Developers can use this method to retrieve base64 encoded box name and value for a specific box within an Algorand application. - -### Request Parameters - -The `getApplicationBox` method requires the following parameters: - -- `applicationId` (number, required): Specify the application ID for which you want to get the box information. -- `name` (string, required): Specify the box name in goal-arg form, such as 'int:1234', 'b64:A==', 'str:hello', or 'addr:XYZ...'. - -### Return Object - -The method returns an object representing the base64 encoded box name and value for the specified box within the Algorand application. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationboxes.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationboxes.md deleted file mode 100644 index ed894eee..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationboxes.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "getApplicationBoxes" -slug: "rpc-algorand-getapplicationboxes" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - applicationId: 123, // Specify the application ID (number) for which you want to get box names. - limit: 100, // Optional: Maximum number of results to return (number). - next: 'NEXT_TOKEN' // Optional: The next page of results. Use the next token provided by the previous results (string). -}; - -// Get the box names for the Algorand application -const boxNames = await tatum.rpc.getApplicationBoxes(params); - -// Log the box names -console.log('Algorand Application Box Names:', boxNames); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getApplicationBoxes` method allows you to get box names for a given Algorand application. - -### Example Use Cases - -1. **Box Names**: Developers can use this method to retrieve the box names of an Algorand application sorted lexicographically. - -### Request Parameters - -The `getApplicationBoxes` method requires the following parameters: - -- `applicationId` (number, required): Specify the application ID for which you want to get box names. -- `limit` (number, optional): Maximum number of results to return. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. - -### Return Object - -The method returns an array of box names for the specified Algorand application, sorted lexicographically. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationdetails.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationdetails.md deleted file mode 100644 index 42fcee15..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationdetails.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getApplicationDetails" -slug: "rpc-algorand-getapplicationdetails" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - applicationId: 'APPLICATION_ID', // Application ID to filter the applications (number, optional). - creator: 'CREATOR_ADDRESS', // Filter applications by the creator address (string, optional). - includeAll: true, // Include all items like closed accounts and deleted applications (boolean, optional). - limit: 100, // Maximum number of results to return (number, optional). - next: 'NEXT_PAGE_TOKEN' // The next page of results. Use the next token from previous results (string, optional). -}; - -// Retrieve details of the specified Algorand application -const applicationDetails = await tatum.rpc.getApplicationDetails(params); - -// Log the details of the Algorand application -console.log('Algorand Application Details:', applicationDetails); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getApplicationDetails` method fetches details for Algorand applications, with the ability to filter based on the application ID, creator, and other criteria. - -### Request Parameters - -- `applicationId` (number, optional): Application ID to filter the applications. -- `creator` (string, optional): Filter applications by the creator address. -- `includeAll` (boolean, optional): Include all related items in the results. -- `limit` (number, optional): Maximum number of results to return. -- `next` (string, optional): The next page of results, using the next token from previous results. - -### Return Object - -The method returns detailed information about the specified Algorand applications based on the provided filters. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationlogs.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationlogs.md deleted file mode 100644 index 4ee406d6..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplicationlogs.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "getApplicationLogs" -slug: "rpc-algorand-getapplicationlogs" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - applicationId: 123, // Specify the application ID (number) for which you want to lookup logs. - limit: 100, // Optional: Maximum number of results to return (number). - maxRound: 10000, // Optional: Include results at or before the specified max-round (number). - minRound: 9000, // Optional: Include results at or after the specified min-round (number). - next: 'NEXT_PAGE_TOKEN', // Optional: The next page of results. Use the next token provided by the previous results (string). - senderAddress: 'ALGORAND_SENDER_ADDRESS', // Optional: Only include transactions with this sender address (string). - txId: 'TRANSACTION_ID' // Optional: Lookup the specific transaction by ID (string). -}; - -// Lookup application logs for the Algorand application -const applicationLogs = await tatum.rpc.getApplicationLogs(params); - -// Log the application logs -console.log('Algorand Application Logs:', applicationLogs); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getApplicationLogs` method allows you to lookup logs for an Algorand application. - -### Example Use Cases - -1. **Application Logs**: Developers can use this method to retrieve logs associated with a specific Algorand application. - -### Request Parameters - -The `getApplicationLogs` method requires the following parameters: - -- `applicationId` (number, required): Specify the application ID for which you want to lookup logs. -- `limit` (number, optional): Maximum number of results to return. -- `maxRound` (number, optional): Include results at or before the specified max-round. -- `minRound` (number, optional): Include results at or after the specified min-round. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. -- `senderAddress` (string, optional): Only include transactions with this sender address. -- `txId` (string, optional): Lookup the specific transaction by ID. - -### Return Object - -The method returns an array of application logs for the specified Algorand application. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplications.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplications.md deleted file mode 100644 index 94fc257f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getapplications.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "getApplications" -slug: "rpc-algorand-getapplications" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters as a dictionary object -const params = { - applicationId: 123, // Application ID (integer). - creator: 'ALGORAND_ADDRESS', // Filter just applications with the given creator address (string). - includeAll: true, // Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates (boolean). - limit: 10, // Maximum number of results to return (integer). - next: 'NEXT_TOKEN', // The next page of results. Use the next token provided by the previous results (string). -}; - -// Search for applications -const applications = await tatum.indexer.getApplications(params); - -// Log the applications -console.log('Applications:', applications); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getApplications` method allows you to search for applications on the Algorand network using various filtering criteria. You can filter applications by their Application ID, creator address, and more. - -### Request Parameters - -The `getApplications` method requires the following parameters: - -- `applicationId` (integer, optional): Application ID used to filter applications. - -- `creator` (string, optional): Filter applications by the creator's address. - -- `includeAll` (boolean, optional): Whether to include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. - -- `limit` (integer, optional): Maximum number of results to return. Additional pages may be available even if the limit is not reached. - -- `next` (string, optional): The next page token to use for pagination. Provide this token when making another request to retrieve the next set of results. - -### Return Object - -The method returns a response object containing information about the applications: - -- `applications` (array of objects): An array of application objects that match the search criteria. - -- `current-round` (integer): The round at which the results were computed. - -- `next-token` (string): Used for pagination. When making another request, provide this token with the `next` parameter to retrieve the next set of results. - -Please note that the structure of the returned object may change in different Algorand Indexer API versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getasset.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getasset.md deleted file mode 100644 index cee8d94b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getasset.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getAsset" -slug: "rpc-algorand-getasset" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters as a dictionary object -const params = { - assetId: 123, // Specify the asset ID (number) for which you want to lookup asset information. - includeAll: true // Optional: Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates (boolean). -}; - -// Lookup asset information -const assetInfo = await tatum.rpc.getAsset(params); - -// Log the asset information -console.log('Asset Information:', assetInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAsset` method allows you to lookup information for a specific asset. - -### Example Use Cases - -1. **Asset Lookup**: Developers can use this method to retrieve detailed information about a specific asset. - -### Request Parameters - -The `getAsset` method requires the following parameters, all included in the `params` dictionary object: - -- `assetId` (number, required): Specify the asset ID for which you want to lookup asset information. -- `includeAll` (boolean, optional): Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates (boolean). - -### Return Object - -The method returns an object representing the detailed information of the specified asset, including its properties. - -Please note that the structure of the returned object may change in different RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassetbalances.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassetbalances.md deleted file mode 100644 index 7a2a5197..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassetbalances.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "getAssetBalances" -slug: "rpc-algorand-getassetbalances" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters as a dictionary object -const params = { - assetId: 123, // Specify the asset ID (number) for which you want to lookup balances. - currencyGreaterThan: 100, // Optional: Results should have an amount greater than this value (number). - currencyLessThan: 500, // Optional: Results should have an amount less than this value (number). - includeAll: true, // Optional: Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates (boolean). - limit: 100, // Optional: Maximum number of results to return (number). - next: 'NEXT_PAGE_TOKEN' // Optional: The next page of results. Use the next token provided by the previous results (string). -}; - -// Lookup the list of accounts holding the specified asset -const assetBalances = await tatum.rpc.getAssetBalances(params); - -// Log the list of accounts and their asset balances -console.log('Asset Balances:', assetBalances); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAssetBalances` method allows you to lookup the list of accounts that hold a specific asset. - -### Example Use Cases - -1. **Asset Balances**: Developers can use this method to retrieve a list of accounts holding a particular asset, with optional filters for currency amounts. - -### Request Parameters - -The `getAssetBalances` method requires the following parameters: - -- `assetId` (number, required): Specify the asset ID for which you want to lookup balances. -- `currencyGreaterThan` (number, optional): Results should have an amount greater than this value (number). -- `currencyLessThan` (number, optional): Results should have an amount less than this value (number). -- `includeAll` (boolean, optional): Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates (boolean). -- `limit` (number, optional): Maximum number of results to return (number). -- `next` (string, optional): The next page of results. Use the next token provided by the previous results (string). - -### Return Object - -The method returns a list of accounts holding the specified asset, along with their asset balances. - -Please note that the structure of the returned object may change in different RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassetinformation.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassetinformation.md deleted file mode 100644 index 7169dd36..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassetinformation.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "getAssetInformation" -slug: "rpc-algorand-getassetinformation" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - assetId: 123, // Specify the asset ID for which you want to retrieve information. -}; - -// Retrieve the asset information for the specified asset ID -const assetInfo = await tatum.rpc.getAssetInformation(params); - -// Log the asset information -console.log('Asset Information:', assetInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAssetInformation` method allows you to retrieve asset information, including creator, name, total supply, and special addresses, for a specific asset ID. - -### Example Use Cases - -1. **Asset Details**: Developers can use this method to retrieve detailed information about a specific asset, including the address of the asset's creator, the name of the asset, the total supply of the asset, and any special addresses associated with the asset. - -### Request Parameters - -The `getAssetInformation` method requires the following parameter: - -- `assetId` (integer, required): An asset identifier representing the asset for which you want to retrieve information. - -### Return Object - -The method returns an object representing the asset information for the specified asset ID. The returned object includes details such as the asset's creator, name, total supply, and special addresses. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassets.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassets.md deleted file mode 100644 index 820ad665..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassets.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "getAssets" -slug: "rpc-algorand-getassets" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters in a single object -const params = { - assetId: 123, // Optional: Asset ID (number). - creator: 'CREATOR_ADDRESS', // Optional: Filter assets with the given creator address (string). - includeAll: true, // Optional: Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates (boolean). - limit: 100, // Optional: Maximum number of results to return (number). - name: 'ASSET_NAME', // Optional: Filter assets with the given name (string). - next: 'NEXT_PAGE_TOKEN', // Optional: The next page of results. Use the next token provided by the previous results (string). - unit: 'ASSET_UNIT' // Optional: Filter assets with the given unit (string). -}; - -// Search for assets using the Algorand Indexer -const assets = await tatum.rpc.getAssets(params); - -// Log the asset information -console.log('Algorand Assets:', assets); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAssets` method allows you to search for assets in the Algorand blockchain. - -### Example Use Cases - -1. **Asset Search**: Developers can use this method to search for assets with specific criteria, such as asset ID, creator address, name, or unit. - -### Request Parameters - -The `getAssets` method requires the following parameters: - -- `assetId` (number, optional): Asset ID to filter assets by (number). -- `creator` (string, optional): Filter assets with the given creator address (string). -- `includeAll` (boolean, optional): Include all items, including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates (boolean). -- `limit` (number, optional): Maximum number of results to return (number). -- `name` (string, optional): Filter assets with the given name (string). -- `next` (string, optional): The next page of results. Use the next token provided by the previous results (string). -- `unit` (string, optional): Filter assets with the given unit (string). - -### Return Object - -The method returns an array of asset information that matches the specified criteria. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassettransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassettransactions.md deleted file mode 100644 index 8fe7119d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getassettransactions.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "getAssetTransactions" -slug: "rpc-algorand-getassettransactions" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters as a dictionary object -const params = { - assetId: 123, // Specify the asset ID (number) for which you want to lookup transactions. - address: 'ALGORAND_ADDRESS', // Optional: Include transactions with this address in one of the transaction fields (string). - addressRole: 'sender', // Optional: Define what type of address to search for (enum: sender, receiver, freeze-target). - afterTime: '2023-11-06T00:00:00Z', // Optional: Include results after the given time (RFC 3339 formatted string). - beforeTime: '2023-11-07T00:00:00Z', // Optional: Include results before the given time (RFC 3339 formatted string). - currencyGreaterThan: 100, // Optional: Results should have an amount greater than this value (number). - currencyLessThan: 500, // Optional: Results should have an amount less than this value (number). - excludeCloseTo: true, // Optional: Exclude close-to addresses when searching for a specific address (boolean). - limit: 100, // Optional: Maximum number of results to return (number). - maxRound: 1000, // Optional: Include results at or before the specified max-round (number). - minRound: 900, // Optional: Include results at or after the specified min-round (number). - next: 'NEXT_PAGE_TOKEN', // Optional: The next page of results. Use the next token provided by the previous results (string). - notePrefix: 'PREFIX_TEXT', // Optional: Specify a prefix that must be contained in the note field (string). - rekeyTo: true, // Optional: Include results which include the rekey-to field (boolean). - round: 1000, // Optional: Include results for the specified round (number). - sigType: 'sig', // Optional: Filter results using the specified type of signature (enum: sig, msig, lsig). - txType: 'pay', // Optional: Filter results by transaction type (enum: pay, keyreg, acfg, axfer, afrz, appl, stpf). - txId: 'TRANSACTION_ID' // Optional: Lookup the specific transaction by ID (string). -}; - -// Lookup transactions for the specified asset -const assetTransactions = await tatum.rpc.getAssetTransactions(params); - -// Log the list of transactions related to the asset -console.log('Asset Transactions:', assetTransactions); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAssetTransactions` method allows you to lookup transactions for a specific asset. Transactions are returned in chronological order, from oldest to newest. - -### Request Parameters - -The method requires the following parameters: - -- `assetId` (number, required): Specify the asset ID for which you want to lookup transactions. -- `address` (string, optional): Include transactions with this address in one of the transaction fields. -- `addressRole` (enum, optional): Define what type of address to search for (sender, receiver, freeze-target). -- `afterTime` (string, optional): Include results after the given time (RFC 3339 formatted string). -- `beforeTime` (string, optional): Include results before the given time (RFC 3339 formatted string). -- `currencyGreaterThan` (number, optional): Results should have an amount greater than this value. -- `currencyLessThan` (number, optional): Results should have an amount less than this value. -- `excludeCloseTo` (boolean, optional): Exclude close-to addresses when searching for a specific address. -- `limit` (number, optional): Maximum number of results to return. -- `maxRound` (number, optional): Include results at or before the specified max-round. -- `minRound` (number, optional): Include results at or after the specified min-round. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. -- `notePrefix` (string, optional): Specify a prefix that must be contained in the note field. -- `rekeyTo` (boolean, optional): Include results which include the rekey-to field. -- `round` (number, optional): Include results for the specified round. -- `sigType` (enum, optional): Filter results using the specified type of signature ( - -### Return Object - -The method returns a list of transactions related to the specified asset. Transactions are returned in chronological order, from oldest to newest. Each transaction in the list includes details such as transaction ID, sender address, receiver address, transaction type, and more. - -Please note that the structure of the returned object may change in different RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getblock.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getblock.md deleted file mode 100644 index 95c55b5f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getblock.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "getBlock" -slug: "rpc-algorand-getblock" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters as a dictionary object -const params = { - roundNumber: 1000, // Specify the round number (integer) for which you want to lookup the block. - headerOnly: true // Optional: Set to true to retrieve only the block header without transactions (boolean). -}; - -// Lookup the block for the specified round number -const blockInfo = await tatum.rpc.getBlock(params); - -// Log the block information -console.log('Block Information:', blockInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlock` method allows you to lookup a block by specifying its round number. You can retrieve both the block header and transactions, or only the block header using the `headerOnly` flag. - -### Request Parameters - -The method requires the following parameters: - -- `roundNumber` (number, required): Specify the round number for which you want to lookup the block. -- `headerOnly` (boolean, optional): Set to true to retrieve only the block header without transactions (boolean). - -### Return Object - -The method returns information about the specified block, which includes details such as the block's round number, timestamp, previous block ID, seed, transactions, and more. If the `headerOnly` flag is set to true, the returned object will contain only the block header information. - -Please note that the structure of the returned object may change in different RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getblockhash.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getblockhash.md deleted file mode 100644 index 6515a98e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getblockhash.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "getBlockHash" -slug: "rpc-algorand-getblockhash" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - round: 12345, // Specify the round from which you want to fetch block hash information (integer). -}; - -// Get the block hash for the specified round -const blockHash = await tatum.rpc.getBlockHash(params); - -// Log the block hash -console.log('Block Hash:', blockHash); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlockHash` method allows you to fetch the block hash information for a specific block on the Algorand blockchain. - -### Example Use Cases - -1. **Retrieve Block Hash**: Developers can use this method to fetch the block hash for a specific block on the Algorand blockchain. - -### Request Parameters - -The `getBlockHash` method requires the following parameter: - -- `round` (integer, required): Specify the round from which you want to fetch block hash information. - -### Return Object - -The method returns an object representing the block hash of the specified round on the Algorand blockchain. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getgenesis.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getgenesis.md deleted file mode 100644 index 31a26efa..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getgenesis.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "getGenesis" -slug: "rpc-algorand-getgenesis" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Retrieve the genesis information -const genesisInfo = await tatum.rpc.getGenesis(); - -// Log the genesis information -console.log('Algorand Genesis:', genesisInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getGenesis` method allows you to retrieve the entire genesis file in JSON format. - -### Example Use Cases - -1. **Genesis Information**: Developers can use this method to retrieve the genesis information of the Algorand network, including details about the network configuration. - -### Request Parameters - -The `getGenesis` method does not require any parameters. - -### Return Object - -The method returns a string representing the entire genesis file in JSON format. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gethealth.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gethealth.md deleted file mode 100644 index e7148d36..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gethealth.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "getHealth" -slug: "rpc-algorand-gethealth" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Check the health status of the Algorand node -const healthStatus = await tatum.rpc.health(); - -// Log the health status -console.log('Algorand Node Health Status:', healthStatus); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getHealth` method allows you to check the health status of the Algorand node connected to the Tatum SDK. It provides information about the node's availability and operational status. - -### Example Use Cases: - -1. **Node Monitoring:** Developers and operators can use this method to monitor the health of the Algorand node connected to their application and ensure it is operational. - -2. **Application Resilience:** It can be used to build resilience into your application by checking the health status of the node before making requests to it. - -### Return Object - -The method returns an object representing the health status of the Algorand Indexer node. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getledgerstatedelta.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getledgerstatedelta.md deleted file mode 100644 index 4ab83fb8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getledgerstatedelta.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getLedgerStateDelta" -slug: "rpc-algorand-getledgerstatedelta" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - round: 12345, // Specify the round for which the deltas are desired (number). - format: 'json' // Optional: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON (enum: json, msgpack). -}; - -// Retrieve ledger deltas for the specified round -const ledgerStateDelta = await tatum.rpc.getLedgerStateDelta(params); - -// Log the ledger deltas -console.log('Ledger State Delta:', ledgerStateDelta); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLedgerStateDelta` method allows you to retrieve the ledger deltas for a specific round in the Algorand network. - -### Example Use Cases - -1. **Ledger Analysis**: Developers can use this method to retrieve the ledger deltas for a specific round and analyze the changes in the Algorand ledger. - -### Request Parameters - -The `getLedgerStateDelta` method requires the following parameters: - -- `round` (number, required): Specify the round for which the deltas are desired. -- `format` (enum: json, msgpack, optional): Configures whether the response object is JSON or MessagePack encoded. If not provided, it defaults to JSON. - -### Return Object - -The method returns an object representing the ledger deltas for the specified round in the Algorand network. - -Please note that the structure and contents of the returned object may vary depending on the Algorand network and RPC version. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getledgersupply.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getledgersupply.md deleted file mode 100644 index fe8f7322..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getledgersupply.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "getLedgerSupply" -slug: "rpc-algorand-getledgersupply" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Retrieve the current supply of MicroAlgos reported by the ledger -const supply = await tatum.rpc.getLedgerSupply(); - -// Log the current supply -console.log('Algorand Current Supply:', supply); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLedgerSupply` method allows you to retrieve the current supply of MicroAlgos reported by the ledger. - -### Example Use Cases - -1. **Supply Information**: Developers can use this method to retrieve the current supply of MicroAlgos in the Algorand system. - -### Request Parameters - -The `getLedgerSupply` method does not require any parameters. - -### Return Object - -The method returns an object representing the current supply of MicroAlgos in the Algorand system. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getnodestatus.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getnodestatus.md deleted file mode 100644 index 697fc398..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getnodestatus.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "getNodeStatus" -slug: "rpc-algorand-getnodestatus" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Retrieve the current node status -const nodeStatus = await tatum.rpc.getNodeStatus(); - -// Log the node status -console.log('Algorand Node Status:', nodeStatus); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getNodeStatus` method allows you to retrieve the current status of an Algorand node. - -### Example Use Cases - -1. **Check Node Status**: Developers can use this method to check the status of an Algorand node and get information about the node's catchup progress, last round seen, consensus version details, and more. - -### Request Parameters - -The `getNodeStatus` method does not require any parameters. - -### Return Object - -The method returns an object representing the current status of the Algorand node. The object contains information about the node's catchup progress, last round seen, consensus version details, and more. - -Please note that the structure of the returned object may change in different Algorand RPC versions. - -``` - - -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getnodestatusafterround.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getnodestatusafterround.md deleted file mode 100644 index 6756b195..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getnodestatusafterround.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "getNodeStatusAfterRound" -slug: "rpc-algorand-getnodestatusafterround" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - round: 10000 // Specify the round to wait until returning status. -}; - -// Wait for a block to appear after the specified round and return the node's status at the time -const nodeStatus = await tatum.rpc.getNodeStatusAfterRound(params); - -// Log the node status -console.log('Algorand Node Status:', nodeStatus); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getNodeStatusAfterRound` method allows you to wait for a block to appear after a specified round and returns the node's status at that time. - -### Example Use Cases - -1. **Wait for Block**: Developers can use this method to wait for a specific round and retrieve the node's status when a block appears after that round. - -### Request Parameters - -The `getNodeStatusAfterRound` method requires the following parameter: - -- `round` (integer, required): The round to wait until returning status. - -### Return Object - -The method returns an object representing the node's status at the time a block appears after the specified round. The object includes various properties that provide information about the node's status, such as catchpoints, catchup progress, last round seen, consensus version, and voting information. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getpendingtransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getpendingtransactions.md deleted file mode 100644 index 1d7008a1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-getpendingtransactions.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "getPendingTransactions" -slug: "rpc-algorand-getpendingtransactions" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - max: 10, // Optional: Truncated number of transactions to display. If max=0, returns all pending txns (number). - format: 'json', // Optional: Configures whether the response object is JSON or MessagePack encoded (enum: json, msgpack). -}; - -// Retrieve the list of pending transactions -const pendingTransactions = await tatum.rpc.getPendingTransactions(params); - -// Log the pending transactions -console.log('Pending Transactions:', pendingTransactions); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getPendingTransactions` method allows you to retrieve the list of unconfirmed transactions currently in the transaction pool. - -### Example Use Cases - -1. **Monitor Pending Transactions**: Developers can use this method to monitor and retrieve information about pending transactions in the transaction pool. - -### Request Parameters - -The `getPendingTransactions` method requires the following parameters: - -- `max` (number, optional): Truncated number of transactions to display. If max = 0, returns all pending transactions. -- `format` (enum: json, msgpack, optional): Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON. - -### Return Object - -The method returns a potentially truncated list of transactions currently in the node's transaction pool. This includes an array of signed transaction objects as they were submitted, along with the total number of transactions in the pool. - -You can compute whether or not the list is truncated if the number of elements in the `top-transactions` array is fewer than `total-transactions`. - -Please note that the structure of the returned object may vary depending on the Algorand RPC version. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransaction.md deleted file mode 100644 index 05e691b5..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransaction.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "getTransaction" -slug: "rpc-algorand-gettransaction" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters as a dictionary object -const txId = { txId : 'TRANSACTION_ID'}; // Specify the transaction ID you want to lookup (string). - -// Lookup a single transaction by its ID -const transaction = await tatum.rpc.getTransactionById(txId); - -// Log the transaction information -console.log('Transaction Information:', transaction); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getTransactionById` method allows you to lookup a single transaction by its unique transaction ID. - -### Request Parameters - -The method requires the following parameter: - -- `txId` (string, required): Specify the transaction ID you want to lookup. - -### Return Object - -The method returns information about the specified transaction, including details such as the transaction's ID, sender address, receiver address, transaction type, amount, and more. - -Please note that the structure of the returned object may change in different RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactionparams.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactionparams.md deleted file mode 100644 index 8844c8df..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactionparams.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "getTransactionParams" -slug: "rpc-algorand-gettransactionparams" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Retrieve transaction parameters for constructing a new transaction -const transactionParams = await tatum.rpc.getTransactionParams(); - -// Log the transaction parameters -console.log('Transaction Parameters:', transactionParams); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getTransactionParams` method allows you to retrieve the parameters that help a client construct a new transaction in Algorand. - -### Example Use Cases - -1. **Transaction Construction**: Developers can use this method to get the necessary parameters required for constructing a new transaction in Algorand. - -### Request Parameters - -The `getTransactionParams` method does not require any parameters. - -### Return Object - -The method returns an object representing the parameters that help a client construct a new transaction in Algorand. The returned object includes the following properties: - -- `consensus-version` (string): Indicates the consensus protocol version as of LastRound. -- `fee` (integer): The suggested transaction fee. The fee is in units of micro-Algos per byte. The fee may fall to zero but transactions must still have a fee of at least MinTxnFee for the current network protocol. -- `genesis-hash` (string): The hash of the genesis block. -- `genesis-id` (string): An ID listed in the genesis block. -- `last-round` (integer): Indicates the last round seen. -- `min-fee` (integer): The minimum transaction fee (not per byte) required for the transaction to validate for the current network protocol. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactionproof.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactionproof.md deleted file mode 100644 index 66af74ca..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactionproof.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "getTransactionProof" -slug: "rpc-algorand-gettransactionproof" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - round: ROUND_NUMBER, // Specify the round in which the transaction appears. - txid: 'TRANSACTION_ID', // Specify the transaction ID for which to generate a proof. - format: 'json', // Optional: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON. - hashtype: 'sha512_256' // Optional: The type of hash function used to create the proof, must be one of: sha512_256 or sha256. -}; - -// Generate a proof for a transaction in a block -const transactionProof = await tatum.rpc.getTransactionProof(params); - -// Log the transaction proof -console.log('Transaction Proof:', transactionProof); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getTransactionProof` method allows you to get a proof for a transaction in a block. - -### Example Use Cases - -1. **Transaction Verification**: Developers can use this method to get a proof for a transaction in a block in order to verify the authenticity and integrity of the transaction. - -### Request Parameters - -The `getTransactionProof` method requires the following parameters: - -- `round` (integer, required): Specify the round in which the transaction appears. -- `txid` (string, required): Specify the transaction ID for which to generate a proof. -- `hashtype` (enum: sha512_256, sha256, optional): The type of hash function used to create the proof, must be one of: sha512_256 or sha256. -- `format` (enum: json, msgpack, optional): Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON. - -### Return Object - -The method returns an object representing the proof of the specified transaction in a block. The object includes the following properties: - -- `hashtype` (string): The type of hash function used to create the proof, must be one of: sha512_256 or sha256. -- `idx` (integer): Index of the transaction in the block's payset. -- `proof` (string): Proof of transaction membership. -- `stibhash` (string): Hash of SignedTxnInBlock for verifying the proof. -- `treedepth` (integer): Represents the depth of the tree that is being proven, i.e. the number of edges from a leaf to the root. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactions.md deleted file mode 100644 index 1b8e5d0f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-gettransactions.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getTransactions" -slug: "rpc-algorand-gettransactions" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandIndexer, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK -const tatum = await TatumSDK.init({ network: Network.ALGORAND_INDEXER }); - -// Define the input parameters as a dictionary object -const params = { - address: 'ALGORAND_ADDRESS', // Optional: Only include transactions with this address in one of the transaction fields (string). - addressRole: 'sender', // Optional: Combine with the address parameter to define what type of address to search for (enum: sender, receiver, freeze-target). - afterTime: '2023-11-06T00:00:00Z', // Optional: Include results after the given time (RFC 3339 formatted string). - applicationId: 123, // Optional: Application ID (integer). - assetId: 456, // Optional: Asset ID (integer). - beforeTime: '2023-11-07T00:00:00Z', // Optional: Include results before the given time (RFC 3339 formatted string). - currencyGreaterThan: 100, // Optional: Results should have an amount greater than this value (number). - currencyLessThan: 500, // Optional: Results should have an amount less than this value (number). - excludeCloseTo: true, // Optional: Combine with address and address-role parameters to define what type of address to search for (boolean). - limit: 100, // Optional: Maximum number of results to return (number). - maxRound: 1000, // Optional: Include results at or before the specified max-round (number). - minRound: 900, // Optional: Include results at or after the specified min-round (number). - next: 'NEXT_PAGE_TOKEN', // Optional: The next page of results. Use the next token provided by the previous results (string). - notePrefix: 'PREFIX_TEXT', // Optional: Specify a prefix that must be contained in the note field (string). - rekeyTo: true, // Optional: Include results which include the rekey-to field (boolean). - round: 1000, // Optional: Include results for the specified round (number). - sigType: 'sig', // Optional: Filter results using the specified type of signature (enum: sig, msig, lsig). - txType: 'pay', // Optional: Filter results by transaction type (enum: pay, keyreg, acfg, axfer, afrz, appl, stpf). - txId: 'TRANSACTION_ID' // Optional: Lookup the specific transaction by ID (string). -}; - -// Search for transactions based on the specified parameters -const transactions = await tatum.rpc.getTransactions(params); - -// Log the list of transactions that match the criteria -console.log('Transactions:', transactions); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getTransactions` method allows you to search for transactions based on various criteria. Transactions can be filtered by address, address role, time, application ID, asset ID, currency amount, and more. By default, transactions are returned in chronological order from oldest to newest, but you can reverse the order using the `address` parameter. - -### Request Parameters - -The method requires the following parameters: - -- `address` (string, optional): Only include transactions with this address in one of the transaction fields. -- `addressRole` (enum, optional): Combine with the address parameter to define what type of address to search for (sender, receiver, freeze-target). -- `afterTime` (string, optional): Include results after the given time (RFC 3339 formatted string). -- `applicationId` (integer, optional): Application ID for filtering transactions. -- `assetId` (integer, optional): Asset ID for filtering transactions. -- `beforeTime` (string, optional): Include results before the given time (RFC 3339 formatted string). -- `currencyGreaterThan` (number, optional): Results should have an amount greater than this value. -- `currencyLessThan` (number, optional): Results should have an amount less than this value. -- `excludeCloseTo` (boolean, optional): Combine with address and address-role parameters to define what type of address to search for. -- `limit` (number, optional): Maximum number of results to return. -- `maxRound` (number, optional): Include results at or before the specified max-round. -- `minRound` (number, optional): Include results at or after the specified min-round. -- `next` (string, optional): The next page of results. Use the next token provided by the previous results. -- `notePrefix` (string, optional): Specifies a prefix that must be contained in the note field. -- `rekeyTo` (boolean, optional): Include results which include the rekey-to field. -- `round` (number, optional): Include results for the specified round. -- `sigType` (enum, optional): Filter results using the specified type of signature (sig, msig, lsig). -- `txType` (enum, optional): Filter results by transaction type (pay, keyreg, acfg, axfer, afrz, appl, stpf). -- `txId` (string, optional): Lookup the specific transaction by ID. - -### Return Object - -The method returns a list of transactions that match the specified criteria. Transactions include details such as transaction ID, sender address, receiver address, transaction type, and more. The order of results can be reversed based on the `address` parameter. - -Please note that the structure of the returned object may change in different RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-ishealthy.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-ishealthy.md deleted file mode 100644 index 268ed09c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-ishealthy.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "isHealthy" -slug: "rpc-algorand-ishealthy" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Retrieve health check status for the Algorand node -const isHealthy = await tatum.rpc.isHealthy(); - -// Log the health check status -console.log('Algorand Health Check:', isHealthy); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `isHealthy` method allows you to check the health of the Algorand node. - -### Example Use Cases - -1. **Health Monitoring**: Developers can use this method to regularly monitor the health status of the Algorand node and ensure that it is functioning properly. - -### Request Parameters - -The `isHealthy` method does not require any parameters. - -### Return Object - -The method returns an empty object with a response code indicating the health status of the Algorand node. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-isready.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-isready.md deleted file mode 100644 index 78e77e81..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-isready.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "isReady" -slug: "rpc-algorand-isready" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Retrieve the health status of the Algorand node -const readyStatus = await tatum.rpc.isReady(); - -// Log the health status -console.log('Algorand Node Ready:', readyStatus); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `isReady` method allows you to check the health status of the Algorand node and confirm if it is fully caught up. - -### Example Use Cases - -1. **Node Health Check**: Developers can use this method to check if the Algorand node is healthy and fully caught up, ensuring that it is ready to process requests. - -### Request Parameters - -The `isReady` method does not require any parameters. - -### Return Object - -The method returns a response indicating the health status of the Algorand node. - -Please note that the structure of the returned object may change in different Algorand RPC versions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-simulatetransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-simulatetransaction.md deleted file mode 100644 index 34817d4e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-algorand/rpc-algorand-simulatetransaction.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: "simulateTransaction" -slug: "rpc-algorand-simulatetransaction" -excerpt: "Algorand RPC" -hidden: false -metadata: - description: "Algorand RPC" - image: [] - keywords: "algorand, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, AlgorandAlgod, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Algorand -const tatum = await TatumSDK.init({ network: Network.ALGORAND_ALGOD }); - -// Define the input parameters in a single object -const params = { - format: 'json', // Optional: Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON. -}; - -// Define the request body object -const requestBody = { - // Specify the transactions to simulate, along with any other inputs. - // Please refer to the Tatum SDK documentation for detailed information about the request body schema. -}; - -// Simulate the transaction or transaction group on the Algorand network -const simulationResult = await tatum.rpc.simulateTransaction(params, requestBody); - -// Log the simulation result -console.log('Algorand Transaction Simulation Result:', simulationResult); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `simulateTransaction` method allows you to simulate a raw transaction or transaction group as it would be evaluated on the Algorand network. The simulation will use blockchain state from the latest committed round. - -### Example Use Cases - -1. **Transaction Simulation**: Developers can use this method to test the validity and outcome of a transaction or transaction group before actually submitting it to the Algorand network. This can help avoid failed transactions and wasted resources. - -### Request Parameters - -The `simulateTransaction` method requires the following parameters: - -- `format` (enum: json, msgpack, optional): Configures whether the response object is JSON or MessagePack encoded. If not provided, defaults to JSON. - -### Request Body - -The `simulateTransaction` method requires a request body object. Please refer to the Tatum SDK documentation for detailed information about the request body schema. - -### Return Object - -The method returns an object representing the result of the simulated transaction or transaction group. Please note that the structure of the returned object may vary depending on the format specified in the request parameters and the Algorand RPC version. - -### Error Responses - -- `400`: Bad Request. The request was invalid or missing required parameters. -- `401`: Invalid API Token. The API token used for authentication is invalid. -- `500`: Internal Error. An unexpected error occurred on the server. -- `503`: Service Temporarily Unavailable. The server is temporarily unable to handle the request. - -Please refer to the Tatum SDK documentation for more information about error responses. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon.md deleted file mode 100644 index fade8f8d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Bnb Beacon" -slug: "rpc-bnb-beacon" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:39 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-abcinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-abcinfo.md deleted file mode 100644 index 20adb9ba..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-abcinfo.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "abcInfo" -slug: "rpc-bnb-beacon-abcinfo" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Using the 'abciInfo' method to get information about the ABCI (Application Blockchain Interface) application -const abciInfoData = await tatum.rpc.abciInfo(); - -console.log(abciInfoData); - -// Destroying the Tatum SDK instance. This is necessary to stop any background jobs that the SDK may have started. -await tatum.destroy(); -``` - -### Overview - -The `abciInfo` method is utilized to retrieve information about the BNB Beacon Chain application. - -### Return Object - -The `abciInfo` method typically returns an object containing the details about the application. While the exact structure might vary, the return object may include the following fields: - -- `version` (string): The version of the application. -- `lastBlockHeight` (string number): The height of the last block processed. -- `lastBlockAppHash` (string number): The hash of the last block processed. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-abciquerry.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-abciquerry.md deleted file mode 100644 index 2935fba4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-abciquerry.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "abciQuerry" -slug: "rpc-bnb-beacon-abciquerry" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -/// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining query parameters for the 'abciQuery' method -const queryParams = { - path: 'YOUR_PATH_HERE', - data: 'YOUR_DATA_HERE', - height: 'YOUR_HEIGHT_VALUE', - prove: YOUR_PROVE_BOOLEAN -}; - -// Using the 'abciQuery' method to query data from the ABCI application -const abciQueryData = await tatum.rpc.abciQuery(queryParams); - -console.log(abciQueryData); - -// Destroying the Tatum SDK instance. This is necessary to stop any background jobs that the SDK may have started. -await tatum.destroy(); -``` - -### Overview - -The `abciQuery` method is used to query the BNB Beacon Chain application directly via ABCI. This provides a direct interface to the application layer, enabling specific data retrieval from the chain. - -### Parameters - -- `path` (string, required): The query path which corresponds to the type of data or information you want to retrieve. This is a required parameter and should follow a format like `"/a/b/c"`. -- `data` (string, required): The data associated with the query. This is also a required parameter and is used to provide additional context or filters for the query. -- `height` (string number, optional): The height at which to perform the query. If set to 0, it queries the latest data. This is an optional parameter. -- `prove` (boolean, optional): If set to `true`, the response will include proofs of the transactions' inclusion in the block. This is also an optional parameter. - -### Return Object - -The `abciQuery` method returns an object with details about the queried data from the application layer. The exact structure and content depend on the query path and data, but the return object might typically include: - -- `response` (object): The response data from the ABCI query. It may contain fields like `key`, `value`, `height`, and `index`. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-block.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-block.md deleted file mode 100644 index d19ebd11..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-block.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "block" -slug: "rpc-bnb-beacon-block" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the parameters for fetching a specific block from the blockchain -const blockParams = { - height: YOUR_HEIGHT_VALUE -}; - -// Fetching the block data using the 'block' method and the defined parameters -const blockData = await tatum.rpc.block(blockParams); - -console.log(blockData); - -// Destroying the Tatum SDK instance to stop any background jobs and free up resources -await tatum.destroy(); - -``` - -### Overview - -The `block` method is utilized to fetch block details for a specific height from the BNB Beacon Chain. Without specific block `height`, method returns last known block. - -### Parameters - -- `height` (string number, optional): The height of the block to be fetched. This is a optional parameter. - -### Return Object - -The `block` method returns an object containing the details of the block at the specified height. While the exact structure might vary, the return object may include fields like: - -- `header` (object): Information about the block header. -- `transactions` (array): List of transactions within the block. -- `blockHash` (string): Hash of the block. -- ... and other details depending on the BNB Beacon Chain's implementation and version. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-blockchain.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-blockchain.md deleted file mode 100644 index 6e40433a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-blockchain.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "blockchain" -slug: "rpc-bnb-beacon-blockchain" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the block height range parameters for the query (optional) -const blockchainParams = { - minHeight: 'YOUR_MIN_HEIGHT_VALUE', // Optional: e.g., "12345" - maxHeight: 'YOUR_MAX_HEIGHT_VALUE' // Optional: e.g., "67890" -}; - -// Fetching blockchain data within the specified block height range -const blockchainData = await tatum.rpc.blockchain(blockchainParams); -console.log(blockchainData); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `blockchain` method is utilized to fetch blockchain data from the BNB Beacon Chain. Users can optionally specify a block height range to filter the results. - -### Parameters - -- `minHeight` (string, optional): The minimum block height from which to fetch the data. If not provided, there is no lower limit. -- `maxHeight` (string, optional): The maximum block height up to which to fetch the data. If not provided, there is no upper limit. - -### Return Object - -The `blockchain` method returns an object that provides a snapshot of the blockchain data within the specified block height range. The exact structure of the return object can vary, but it generally includes information related to blocks, transactions, and possibly other blockchain-specific details. - -(Note: The exact fields in the return object can differ based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-blockresults.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-blockresults.md deleted file mode 100644 index e11c3088..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-blockresults.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "blockResults" -slug: "rpc-bnb-beacon-blockresults" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the block height parameter for the query -const blockParams = { - height: YOUR_HEIGHT_VALUE -}; - -// Fetching and logging the block result data from the BNB Beacon Chain -const blockResultData = await tatum.rpc.blockResult(blockParams); -console.log(blockResultData); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `blockResult` method is used to fetch the results of transactions in a specified block on the BNB Beacon Chain. - -### Parameters - -- `height`: (string number, optional) The height of the block you are interested in. If not specified, it will default to the latest block. - -### Return Object - -The method returns an object containing detailed information about the transactions in the specified block. The exact structure of the returned object can depend on the BNB Beacon Chain's implementation and version. Some of the fields you might see include: - -- `block_meta` (object): Metadata about the block. -- `block` (object): Detailed information about the block itself. -- `results` (object): Results of transactions included in the block. -- `validator_updates` (array): Information about any validator updates. -- `consensus_param_updates` (object): Information about any updates to consensus parameters. - -(Note: The exact fields in the return object can differ based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxasync.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxasync.md deleted file mode 100644 index 471d69b4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxasync.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "broadcastTxAsync" -slug: "rpc-bnb-beacon-broadcasttxasync" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the transaction to broadcast -const signedTx = 'SIGNED_TRANSACTION_STRING'; // Replace with your signed transaction string - -// Broadcasting the transaction asynchronously -const txResponse = await tatum.rpc.broadcastTxAsync({ tx: signedTx }); -console.log(txResponse); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `broadcastTxAsync` method is used to broadcast a signed transaction to the BNB Beacon Chain asynchronously. - -### Parameters - -- `tx` (string, required): The signed transaction string that you want to broadcast. - -### Return Object - -The method returns a promise that resolves to a JSON-RPC response containing information about the broadcasted transaction. The response includes the following fields: - -- `code` (string): The status code of the transaction. - - Example: `0` - -- `data` (string): Additional data related to the transaction. - - Example: `7B226F726465725F6964223A22383133453439333946313536374232313937303446464332414434444635384244453031303837392D3438227D` - -- `hash` (string): The hash of the broadcasted transaction. - - Example: `008EA3C57B15E34B045F69DCEB2A5589B979B2B58BA282C15DF2AEA8B441AB6B` - -- `log` (string): Transaction log information. - - Example: `Msg 0:` - -(Note: The exact response structure may vary depending on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxcommit.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxcommit.md deleted file mode 100644 index 797751ce..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxcommit.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "broadcastTxCommit" -slug: "rpc-bnb-beacon-broadcasttxcommit" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the signed transaction string to broadcast -const signedTx = 'SIGNED_TRANSACTION_STRING'; // Replace with your signed transaction string - -// Broadcasting the transaction and waiting for commit -const commitResponse = await tatum.rpc.broadcastTxCommit({ tx: signedTx }); -console.log(commitResponse); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `broadcastTxCommit` method is used to broadcast a signed transaction to the BNB beacon chain and wait for it to be included in a block (commit). This method provides information about the committed transaction, including its status, block height, and other relevant data. - -### Parameters - -- `tx` (string, required): The signed transaction string that you want to broadcast. - -### Return Object - -The method returns a response containing information about the committed transaction. The response includes the following fields: - -- `height` (string): The block height at which the transaction was included. - - Example: `7734637` - -- `hash` (string): The hash of the committed transaction. - - Example: `008EA3C57B15E34B045F69DCEB2A5589B979B2B58BA282C15DF2AEA8B441AB6B` - -- `check_tx` (object): Additional information related to the check transaction phase. - - Example: `{ }` - -- `deliver_tx` (object): Additional information related to the deliver transaction phase. - -(Note: The exact structure of the response may vary based on the BNB beacon chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxsync.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxsync.md deleted file mode 100644 index dc1c4fea..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-broadcasttxsync.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "broadcastTxSync" -slug: "rpc-bnb-beacon-broadcasttxsync" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the signed transaction string to broadcast -const signedTx = 'SIGNED_TRANSACTION_STRING'; // Replace with your signed transaction string - -// Broadcasting the transaction synchronously -const syncResponse = await tatum.rpc.broadcastTxSync({ tx: signedTx }); -console.log(syncResponse); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `broadcastTxSync` method is used to broadcast a signed transaction to the BNB beacon chain synchronously. - -### Parameters - -- `tx` (string, required): The signed transaction string that you want to broadcast. - -(Note: The `tx` parameter should contain the signed transaction in the appropriate format for the BNB beacon chain.) - -### Return Object - -This method returns a JSON-RPC response containing information about the broadcasted transaction. The response includes the following fields: - -- `code` (string): The status code of the transaction. -- `data` (string): Additional data related to the transaction. -- `hash` (string): The hash of the broadcasted transaction. -- `log` (string): Transaction log information. - -(Note: The exact structure of the response may vary based on the BNB beacon chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-commit.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-commit.md deleted file mode 100644 index 886f9858..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-commit.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "commit" -slug: "rpc-bnb-beacon-commit" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the block height parameter for the query -const commitParams = { - height: 'YOUR_HEIGHT_VALUE', // e.g., "12345" -}; - -// Fetching commit information for the specified block height -const commitData = await tatum.rpc.commit(commitParams); -console.log(commitData); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `commit` method is used to retrieve the commit information of a specific block in the BNB Beacon Chain by providing the block height. If no height is provided, it will fetch commit information regarding the latest block. - -### Parameters - -- `height` (string, optional): The height of the block for which you want to retrieve commit information. - -### Return Object - -This method returns an object containing commit information for the specified block, including details like commit hash, precommit validators, and more. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-genesis.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-genesis.md deleted file mode 100644 index 8af7092c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-genesis.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "genesis" -slug: "rpc-bnb-beacon-genesis" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Retrieve the genesis information -const genesisInfo = await tatum.rpc.genesis(); -console.log(genesisInfo); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `genesis` method is used to retrieve the genesis information of the Beacon Chain. - -### Parameters - -This method does not require any parameters. - -### Return Object (Required) - -The method returns a Promise that resolves to a JSON-RPC response containing the following field: - -- `genesis` (object): General information about the Beacon Chain genesis. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-health.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-health.md deleted file mode 100644 index 76fd73cc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-health.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "health" -slug: "rpc-bnb-beacon-health" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Check the health status -const healthStatus = await tatum.rpc.health(); -console.log(healthStatus); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `health` method is used to check the health status of the Beacon Chain. - -### Parameters - -This method does not require any parameters. - -### Return Object (Required) - -The method returns a Promise that resolves to a JSON-RPC response containing information about the health status of the Beacon Chain. - -(Note: The exact structure of the transaction objects and response may vary based on the BNB beacon chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-netinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-netinfo.md deleted file mode 100644 index cea3444a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-netinfo.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "netInfo" -slug: "rpc-bnb-beacon-netinfo" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BEACON_CHAIN }); - -// Retrieve network information -const networkInfo = await tatum.rpc.netInfo(); -console.log(networkInfo); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `netInfo` method is used to retrieve network information from the Beacon Chain. - -### Parameters - -This method does not require any parameters. - -### Return Object - -The method returns a Promise that resolves to a JSON-RPC response containing the following fields: - -- `listening` (boolean): Indicates whether the BNB Beacon Chain node is currently listening for incoming connections. If it is listening, the value will be `true`, otherwise, it will be `false`. - -- `listeners` (array): An array of listener objects. Listener objects typically represent information about nodes or entities that are actively connected to the BNB Beacon Chain node, such as peers or clients. - -- `n_peers` (number): Represents the number of peers that the BNB Beacon Chain node is currently connected to. It provides a count of how many other nodes or entities the node is actively communicating with. - -- `peers` (array): An array of peer objects. Peer objects typically represent information about the peers or other nodes that the BNB Beacon Chain node is connected to. It may include details about these peers, such as their addresses, identities, or status. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-numunconfirmedtxs.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-numunconfirmedtxs.md deleted file mode 100644 index 50df8fb0..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-numunconfirmedtxs.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "numUnconfirmedTxs" -slug: "rpc-bnb-beacon-numunconfirmedtxs" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -```typescript -// Importing Tatum SDK for BNB Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for BNB Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Retrieve the number of unconfirmed transactions -const numUnconfirmedTxs = await tatum.rpc.numUnconfirmedTxs(); -console.log(numUnconfirmedTxs); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `numUnconfirmedTxs` method is used to retrieve the number of unconfirmed transactions in the BNB Beacon Chain. - -### Parameters - -This method does not require any parameters. - -### Return Object - -The method returns a Promise that resolves to a JSON-RPC response containing the following fields: - -- `n_txs` (string): The number of unconfirmed transactions. Example: `0` -- `total` (string): The total value associated with unconfirmed transactions. Example: `0` -- `total_bytes` (string): The total size in bytes of unconfirmed transactions. Example: `0` - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-status.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-status.md deleted file mode 100644 index d91a8bfa..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-status.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "status" -slug: "rpc-bnb-beacon-status" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Fetching and logging the status of the Beacon Chain -const statusData = await tatum.rpc.status(); -console.log(statusData); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `status` method is used to obtain information about the current status of the BNB Beacon Chain. - -### Return Object - -The `status` method provides an object that contains details about the current state of the chain. The returned structure might differ, but commonly includes these fields: - -- `nodeInfo` (object): Details about the node, like its ID, listen address, and version. -- `syncInfo` (object): Information about the node's synchronization status, like the latest block hash, height, and timestamp. -- `validator_info` (object): Information about the node as a validator, such as its address and voting power. - -(Note: The exact fields in the return object can differ based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-tx.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-tx.md deleted file mode 100644 index dff3d705..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-tx.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "tx" -slug: "rpc-bnb-beacon-tx" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:37 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the transaction hash parameter for the query -const txParams = { - hash: 'YOUR_TRANSACTION_HASH', // e.g., "0x1234abcd..." -}; - -// Fetching transaction information by hash -const txData = await tatum.rpc.tx(txParams); -console.log(txData); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `tx` method is used to retrieve detailed information about a specific transaction on the BNB Beacon Chain using the transaction's hash. - -### Parameters - -- `hash` (string, required): The hash of the transaction you want to retrieve information about. - -### Return Object - -This method returns an object containing detailed information about the specified transaction, including the transaction's hash, block height, and other relevant data. - -(Note: The exact fields in the return object might vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-txsearch.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-txsearch.md deleted file mode 100644 index 3914d2e8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-txsearch.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "txSearch" -slug: "rpc-bnb-beacon-txsearch" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Defining the search parameters -const searchParams = { - query: 'QUERY_STRING', // Replace with your query string (Required) - prove: true, // Include proofs of transaction inclusion in the block (true/false) (Required) - page: '1', // Page number (1-based) (Optional) - per_page: '10' // Number of entries per page (max: 100) (Optional) -}; - -// Searching for transactions -const searchResults = await tatum.rpc.txSearch(searchParams); -console.log(searchResults); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `txSearch` method is used to search for transactions on the BNB beacon chain that match specific search criteria. - -### Parameters - -- `query` (string, Required): The query string used to search for transactions. -- `prove` (boolean, Required): Include proofs of the transaction's inclusion in the block (true/false). -- `page` (string number, Optional): Page number for paginating results (1-based). -- `per_page` (string number, Optional): Number of entries per page (max: 100). - -### Return Object - -The method returns a JSON-RPC response containing information about the matching transactions. The response includes the following fields: - -- `total_count` (string, Required): The total count of matching transactions. - - Example: `2` -- `txs` (array, Required): An array of transaction objects. - - Example: `[ ]` - -(Note: The exact structure of the transaction objects and response may vary based on the BNB beacon chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-unconfirmedtxs.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-unconfirmedtxs.md deleted file mode 100644 index ee77a551..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-unconfirmedtxs.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "unconfirmedTxs" -slug: "rpc-bnb-beacon-unconfirmedtxs" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:37 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Define the limit for unconfirmed transactions -const limit = { limit : '10' }; - -// Retrieve unconfirmed transactions -const unconfirmedTxs = await tatum.rpc.unconfirmedTxs(limit); -console.log(unconfirmedTxs); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `unconfirmedTxs` method is used to retrieve unconfirmed transactions from the BNB Beacon Chain. - -### Parameters - -- `limit` (string, optional): The maximum number of unconfirmed transactions to retrieve. - -### Return Object (Required) - -- `n_txs` (number): The number of unconfirmed transactions. -- `total` (number): The total value associated with unconfirmed transactions. -- `total_bytes` (number): The total size in bytes of unconfirmed transactions. -- `txs` (array): An array of unconfirmed transaction objects. - -(Note: The exact structure of the transaction objects and response may vary based on the BNB beacon chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-validators.md b/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-validators.md deleted file mode 100644 index 994ea2dc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-bnb-beacon/rpc-bnb-beacon-validators.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "validators" -slug: "rpc-bnb-beacon-validators" -excerpt: "Bnb Beacon RPC" -hidden: false -metadata: - description: "Bnb Beacon RPC" - image: [] - keywords: "bnb-beacon, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -```typescript -// Importing Tatum SDK for Beacon Chain -import { TatumSDK, Network, Bnb } from '@tatumio/tatum'; - -// Initializing SDK for Beacon Chain network -const tatum = await TatumSDK.init({ network: Network.BNB }); - -// Optional parameters -const params = { - height : 'your-height', - page : 'your-page', - perPage : 'entries-per-page' -}; -// Retrieve the current validator set -const validatorSet = await tatum.rpc.validators(params); -console.log(validatorSet); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `validators` method is used to retrieve the current validator set on the BNB Beacon Chain. - -### Parameters - -- `height` (string, optional): Height to return. If no height is provided, it will fetch the validator set corresponding to the latest block. -- `page` (string, optional): Page number (1-based). -- `perPage` (string, optional): Number of entries per page (max: 100). - -### Return Object (Required) - -- `block_height` (string): Example: `55` -- `validators` (array): An array of validator objects representing the validators in the set. Example: `[]` - -(Note: The exact structure of the validator objects and response may vary based on the BNB Beacon Chain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano.md deleted file mode 100644 index 40c9eaee..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Cardano" -slug: "rpc-cardano" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionmetadata.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionmetadata.md deleted file mode 100644 index 8a09743e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionmetadata.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "constructionMetadata" -slug: "rpc-cardano-constructionmetadata" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // string, required - network: 'NETWORK_NAME', // string, required - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // string (optional) - metadata: { - [key: string]: any, // object (optional) - }, - }, - }, - options: { - // Optional object - }, - publicKeys: [ - { - hexBytes: 'PUBLIC_KEY_HEX_BYTES', // Required: Specifies the hexadecimal representation of the staking credential . - curveType: 'SECP256K1', // Required: Specifies the curve type for the staking credential .] - }, - ] -}; - -// Retrieve metadata for transaction construction on the Cardano network -const metadata = await tatum.rpc.constructionMetadata(params); - -// Log the metadata -console.log('Cardano Transaction Construction Metadata:', metadata); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `constructionMetadata` method allows you to retrieve metadata required to construct a transaction for a specific network. - -### Example Use Cases - -1. **Metadata Retrieval**: Developers can use this method along with the `constructionPreprocess` endpoint to retrieve metadata required for transaction construction in an offline environment. - -### Request Parameters - -The `constructionMetadata` method requires the following parameters: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `options` (object, optional): Some blockchains require different metadata for different types of transaction construction (ex: delegation versus a transfer). Instead of requiring a blockchain node to return all possible types of metadata for construction (which may require multiple node fetches), the client can populate an options object to limit the metadata returned to only the subset required. -- `publicKey` (object, required): PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. - - `hexBytes` (string, required): The hexadecimal representation of the public key. - - `curveType` (string, enum, required): The type of cryptographic curve associated with the public key (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). - -### Return Object - -The method returns an object representing the metadata required to construct a transaction for a specific network. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionpayloads.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionpayloads.md deleted file mode 100644 index ab4ba2ba..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionpayloads.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -title: "constructionPayloads" -slug: "rpc-cardano-constructionpayloads" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // Required: Specifies the blockchain . - network: 'MAINNET', // Required: Specifies the network name . - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // Optional: Specifies the sub-network name . - metadata: { - KEY: 'VALUE', // Optional: Specify metadata . - }, - }, - }, - operations: [ - { - operation_identifier: { - index: 1, // Required: Specifies the operation index (number). - network_index: 0, // Optional: Specifies the network index (number). - }, - related_operations: [ - { - index: 2, // Optional: Specifies the related operation index (number). - network_index: 1, // Optional: Specifies the related network index (number). - }, - ], - type: 'OPERATION_TYPE', // Required: Specifies the operation type. - status: 'OPERATION_STATUS', // Optional: Specifies the operation status . - account: { - address: 'ACCOUNT_ADDRESS', // Required: Specifies the account address . - sub_account: { - address: 'SUB_ACCOUNT_ADDRESS', // Optional: Specifies the sub-account address . - metadata: { - // Optional metadata object for the sub-account - }, - }, - metadata: { - // Optional metadata object for the account - }, - }, - amount: { - value: 'AMOUNT_VALUE', // Required: Specifies the amount value (string). - currency: { - symbol: 'CURRENCY_SYMBOL', // Required: Specifies the currency symbol . - decimals: 6, // Required: Specifies the currency decimals (number). - metadata: { - // Optional metadata for amount object - }, - }, - metadata: { - // Optional: Specify metadata here only if applicable. - }, - }, - coin_change: { - coin_identifier: { - identifier: 'COIN_IDENTIFIER', // Required: uniquely identifies a Coin. - }, - coin_action: 'coin_created', // Required - }, - metadata: { - // Optional: Specify operations metadata only if applicable. - } - }, - ], - metadata: { - // Optional metadata for constructionPayloads - }, - publicKeys: [ - { - hexBytes: 'PUBLIC_KEY_HEX_BYTES', // Required: Specifies the hexadecimal representation of the staking credential . - curveType: 'SECP256K1', // Required: Specifies the curve type for the staking credential .] - }, - ] -}; - -// Generate an unsigned transaction and signing payloads -const constructionPayloads = await tatum.constructionPayloads(params); - -// Log the construction payloads -console.log('Construction Payloads:', constructionPayloads); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `constructionPayloads` contains the network, a slice of operations, and arbitrary metadata that was returned by the call to `constructionMetadata`. Optionally, the request can also include an array of publicKeys associated with the AccountIdentifiers returned in `constructionPreprocess` response. - -### Example Use Cases - -1. **Transaction Construction**: Developers can use this method to construct an unsigned transaction that specifies the intent of the transaction but not all possible effects. The generated payloads can be signed by the specified account identifiers to complete the transaction. - -### Request Parameters - -The `constructionPayloads` method requires the following parameters: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `operations` (array of objects, required): An array of operation objects, where each object represents a transaction to be included in the Cardano transaction. - - `operation_identifier` (object, required): An object containing an index that uniquely identifies the operation. - - `index` (number, required): The index of the operation. - - `network_index` (number, optional): The network-specific index of the operation. - - `related_operations` (array of objects, optional): An array of related operation identifiers if applicable. - - `index` (number, optional): The index of the related operation. - - `network_index` (number, optional): The network-specific index of the related operation. - - `type` (string, required): The type of the operation (e.g., "TRANSFER"). - - `status` (string, optional): The status of the operation (e.g., "SUCCESS"). - - `account` (object, required): An object containing information about the account. - - `address` (string, required): The Cardano account address associated with the operation. - - `sub_account` (object, optional): An optional sub-account object. - - `address` (string, optional): The sub-account address. - - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. - - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. - - `amount` (object, required): An object containing information about the transaction amount. - - `value` (string, required): The value of the transaction amount. - - `currency` (object, required): An object specifying the currency details. - - `symbol` (string, required): The symbol or code of the currency. - - `decimals` (number, required): The number of decimal places for the currency. - - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. - - `metadata` (object, optional): metadata object for the amount. - - `coin_change` (object, required): An object containing information about coin changes in the operation. - - `coin_identifier` (object, required): An object containing a coin identifier. - - `identifier` (string, required): Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index.. - - `coin_action` (string, required): CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once. (e.g., 'coin_created' | 'coin_spent'). - - `metadata` (object, optional): An optional metadata object for the operation, including withdrawal, deposit, refund, staking credential, pool key hash, epoch, token bundle, pool registration certificate, pool registration parameters, and vote registration metadata details. -- `metadata` (object, optional): Specify the metadata for transaction construction. -- `publicKey` (object, required): PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. - - `hexBytes` (string, required): The hexadecimal representation of the public key. - - `curveType` (string, enum, required): The type of cryptographic curve associated with the public key (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). - -### Return Object - -The `constructionPayloads` method returns an object representing the unsigned transaction blob and a collection of payloads that must be signed by particular AccountIdentifiers using a certain SignatureType. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionpreprocess.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionpreprocess.md deleted file mode 100644 index 16591f2b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-constructionpreprocess.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "constructionPreprocess" -slug: "rpc-cardano-constructionpreprocess" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // Required: Specifies the blockchain . - network: 'MAINNET', // Required: Specifies the network name . - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // Optional: Specifies the sub-network name . - metadata: { - KEY: 'VALUE', // Optional: Specify metadata . - }, - }, - }, - operations: [ - { - operation_identifier: { - index: 1, // Required: Specifies the operation index (number). - network_index: 0, // Optional: Specifies the network index (number). - }, - related_operations: [ - { - index: 2, // Optional: Specifies the related operation index (number). - network_index: 1, // Optional: Specifies the related network index (number). - }, - ], - type: 'OPERATION_TYPE', // Required: Specifies the operation type. - status: 'OPERATION_STATUS', // Optional: Specifies the operation status . - account: { - address: 'ACCOUNT_ADDRESS', // Required: Specifies the account address . - sub_account: { - address: 'SUB_ACCOUNT_ADDRESS', // Optional: Specifies the sub-account address . - metadata: { - // Optional metadata object for the sub-account - }, - }, - metadata: { - // Optional metadata object for the account - }, - }, - amount: { - value: 'AMOUNT_VALUE', // Required: Specifies the amount value (string). - currency: { - symbol: 'CURRENCY_SYMBOL', // Required: Specifies the currency symbol . - decimals: 6, // Required: Specifies the currency decimals (number). - metadata: { - // Optional metadata for amount object - }, - }, - metadata: { - // Optional: Specify metadata here only if applicable. - }, - }, - coin_change: { - coin_identifier: { - identifier: 'COIN_IDENTIFIER', // Required: uniquely identifies a Coin. - }, - coin_action: 'coin_created', // Required - }, - metadata: { - // Optional: Specify operations metadata only if applicable. - } - }, - ], - metadata: { - //Optional: Specify constructionPreprocess metadata only if applicable. - } -}; - -// Create a request to fetch metadata for transaction construction -const preprocessRequest = await tatum.rpc.constructionPreprocess(params); - -// Log the preprocess request -console.log('Construction Preprocess Request:', preprocessRequest); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `constructionPreprocess` method is called prior to `constructionPayloads` to construct a request for any metadata that is needed for transaction construction. This method is used to fetch information such as account nonce. The `options` object returned from this method will be sent to the `constructionMetadata` endpoint **UNMODIFIED** by the caller in an offline execution environment. If your Construction API implementation has configuration options, they MUST be specified in the `constructionPreprocess` request in the `metadata` field. - -### Example Use Cases - -1. **Transaction Construction**: Developers can use this method to fetch metadata required for transaction construction, such as the account nonce. -2. **Validation**: Validators can use this method to validate transaction data before the actual transaction construction. - -### Request Parameters - -The `constructionPreprocess` method requires the following parameters: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `operations` (array of objects, required): An array of operation objects, where each object represents a transaction to be included in the Cardano transaction. - - `operation_identifier` (object, required): An object containing an index that uniquely identifies the operation. - - `index` (number, required): The index of the operation. - - `network_index` (number, optional): The network-specific index of the operation. - - `related_operations` (array of objects, optional): An array of related operation identifiers if applicable. - - `index` (number, optional): The index of the related operation. - - `network_index` (number, optional): The network-specific index of the related operation. - - `type` (string, required): The type of the operation (e.g., "TRANSFER"). - - `status` (string, optional): The status of the operation (e.g., "SUCCESS"). - - `account` (object, required): An object containing information about the account. - - `address` (string, required): The Cardano account address associated with the operation. - - `sub_account` (object, optional): An optional sub-account object. - - `address` (string, optional): The sub-account address. - - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. - - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. - - `amount` (object, required): An object containing information about the transaction amount. - - `value` (string, required): The value of the transaction amount. - - `currency` (object, required): An object specifying the currency details. - - `symbol` (string, required): The symbol or code of the currency. - - `decimals` (number, required): The number of decimal places for the currency. - - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. - - `metadata` (object, optional): metadata object for the amount. - - `coin_change` (object, required): An object containing information about coin changes in the operation. - - `coin_identifier` (object, required): An object containing a coin identifier. - - `identifier` (string, required): Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index.. - - `coin_action` (string, required): CoinActions are different state changes that a Coin can undergo. When a Coin is created, it is coin_created. When a Coin is spent, it is coin_spent. It is assumed that a single Coin cannot be created or spent more than once. (e.g., 'coin_created' | 'coin_spent'). - - `metadata` (object, optional): An optional metadata object for the operation, including withdrawal, deposit, refund, staking credential, pool key hash, epoch, token bundle, pool registration certificate, pool registration parameters, and vote registration metadata details. -- `metadata` (object, optional): Metadata for `constructionPreprocess` - -### Return Object - -The method returns an object representing the preprocess request for transaction construction. This object includes the metadata required for constructing the transaction. The `options` object in this request will be sent to the `constructionMetadata` endpoint **UNMODIFIED** by the caller in an offline execution environment. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-createnetworktransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-createnetworktransaction.md deleted file mode 100644 index 5402c6c5..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-createnetworktransaction.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "createNetworkTransaction" -slug: "rpc-cardano-createnetworktransaction" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // Specify the blockchain identifier ('CARDANO' for Cardano). - network: 'NETWORK_NAME', // Specify the network name. - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // Specify the sub-network name (optional). - metadata: { - // Optional metadata key-value pairs. - }, - }, - }, - unsignedTransaction: 'UNSIGNED_TRANSACTION', // Specify the unsigned transaction blob. - signatures: [ - { - signing_payload: { - address: 'ADDRESS', // [DEPRECATED] Network-specific address (optional). - accountIdentifier: { - address: 'ADDRESS', // Account address. - subAccount: { - address: 'ADDRESS', // Sub-account address (optional). - metadata: { - // Sub-account metadata (optional). - }, - }, - metadata: { - // Account metadata (optional). - }, - }, - hexBytes: 'PAYLOAD_HEX', // Hex-encoded payload bytes. - signatureType: 'ecdsa', // Signature type (ecdsa, ecdsa_recovery, ed25519, schnorr_1, schnorr_bip340, schnorr_poseidon). - }, - publicKeys: [ - { - hexBytes: 'PUBLIC_KEY_HEX', // Hexadecimal representation of the public key. - curveType: 'secp256k1', // Curve type (secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). - }, - ], - signatureType: 'ecdsa', // Signature type (ecdsa, ecdsa_recovery, ed25519, schnorr_1, schnorr_bip340, schnorr_poseidon). - hexBytes: 'SIGNATURE_HEX', // Hex-encoded signature. - }, - ], -}; - -// Create network transaction from signatures -const networkTransaction = await tatum.rpc.createNetworkTransaction(params); - -// Log the network transaction -console.log('Network Transaction:', networkTransaction); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `createNetworkTransaction` method allows you to create a network-specific transaction from an unsigned transaction and an array of provided signatures. The signed transaction returned from this method will be sent to the `/construction/submit` endpoint by the caller. - -### Example Use Cases - -1. **Transaction Construction**: Developers can use this method to combine an unsigned Cardano transaction with the corresponding signatures, resulting in a fully signed network transaction ready to be submitted to the Cardano network. - -### Request Parameters - -The `createNetworkTransaction` method requires the following parameters in the request body: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `unsignedTransaction` (string, required): Contains the unsigned transaction blob returned by the `constructionPayloads` endpoint. The unsigned transaction represents the basic structure and details of the transaction before it is signed. -- `signatures` (array of objects, required): This parameter is an array of signatures. Each signature is represented by a Signature object. Signatures are required to create a network transaction by combining them with the unsigned transaction. - - `signing_payload` (object, required): The payload that was signed. - - `address` (string, optional): [DEPRECATED] The network-specific address of the account that should sign the payload. - - `accountIdentifier` (object, optional): An object containing information about the account. - - `address` (string, required): The Cardano account address associated with the operation. - - `sub_account` (object, optional): An optional sub-account object. - - `address` (string, optional): The sub-account address. - - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. - - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. - - `hex_bytes` (string, required): Hex-encoded string of the payload bytes. - - `signatureType` (string, enum, optional): Signature type (Choose from: ecdsa, ecdsa_recovery, ed25519, schnorr_1, schnorr_bip340, schnorr_poseidon). - - `publicKey` (object, required): PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. - - `hexBytes` (string, required): The hexadecimal representation of the public key. - - `curveType` (string, enum, required): The type of cryptographic curve associated with the public key (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). - - `signatureType` (string, enum, required): Signature type (Choose from: ecdsa, ecdsa_recovery, ed25519, schnorr_1, schnorr_bip340, schnorr_poseidon). - - `hexBytes` (string, required): Hex-encoded string representing the signature. - -### Return Object - -The method returns an object representing the network transaction created from the unsigned transaction and provided signatures. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-deriveaccount.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-deriveaccount.md deleted file mode 100644 index 2e047c87..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-deriveaccount.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "deriveAccount" -slug: "rpc-cardano-deriveaccount" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // string, required - network: 'NETWORK_NAME', // string, required - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // string (optional) - metadata: { - [key: string]: any, // object (optional) - }, - }, - }, - publicKeys: { - hexBytes: 'PUBLIC_KEY_HEX_BYTES', // string, required - curveType: 'secp256k1', // CurveType, required (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas) - }, - metadata: { - // metadata is optional object - }, -}; - -// Derive the account identifier from the public key -const accountIdentifier = await tatum.rpc.deriveAccount(params); - -// Log the account identifier -console.log('Account Identifier:', accountIdentifier); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `deriveAccount` method allows you to derive an account identifier (AccountIdentifier) from a public key. - -### Example Use Cases - -1. **Account Identification**: Developers can use this method to derive the account identifier associated with a public key. - -### Request Parameters - -The `deriveAccount` method requires the following parameter: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `publicKey` (object, required): PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation. - - `hexBytes` (string, required): The hexadecimal representation of the public key. - - `curveType` (string, enum, required): The type of cryptographic curve associated with the public key (Choose from: secp256k1, secp256k1_bip340, secp256r1, edwards25519, tweedle, pallas). -- `metadata` (object, optional): An optional metadata object. - -### Return Object - -The method returns an object representing the derived account identifier (AccountIdentifier) associated with the specified public key. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getaccountbalance.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getaccountbalance.md deleted file mode 100644 index 6b03035a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getaccountbalance.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "getAccountBalance" -slug: "rpc-cardano-getaccountbalance" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // string, required - network: 'NETWORK_NAME', // string, required - }, - accountIdentifier: { - address: 'ACCOUNT_ADDRESS', // string, required - sub_account: { - // Specify sub-account information if applicable - }, - metadata: { - chain_code: 'CHAIN_CODE', // Specify chain code only if applicable - }, - }, - blockIdentifier: { - index: 1123941, // number (int64), optional - hash: '0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85', // string, optional - }, // `blockIdentifier` is optional object - currency: { - symbol: 'ADA', // string, required - decimals: 6, // number, required - metadata: { - // Specify metadata if applicable - }, - }, // `currency` is optional object -}; - -// Retrieve the account balance for the specified Cardano account -const accountBalance = await tatum.rpc.getAccountBalance(params); - -// Log the account balance -console.log('Cardano Account Balance:', accountBalance); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountBalance` method allows you to get an account's balance for a specified Cardano account identifier and block identifier. - -### Example Use Cases - -1. **Balance Summary**: Developers can use this method to retrieve the balance summary of a Cardano account, including the total balance and balances of specific sub-accounts. - -### Request Parameters - -The `getAccountBalance` method requires the following parameters: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `'CARDANO'` for Cardano. - - `network` (string, required): The network name for Cardano. -- `accountIdentifier` (object, optional): An object containing information about the account. - - `address` (string, required): The Cardano account address associated with the operation. - - `sub_account` (object, optional): An optional sub-account object. - - `address` (string, optional): The sub-account address. - - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. - - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. -- `blockIdentifier` (object, optional): An object containing information about the block. - - `index` (number, optional): The index of the block (Type: number, Format: int64). - - `hash` (string, optional): The hash of the block. -- `currency` (object, required): An object specifying the currency details. - - `symbol` (string, required): The symbol or code of the currency. - - `decimals` (number, required): The number of decimal places for the currency. - - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. - -### Return Object - -The method returns an object representing the account's balance for the specified Cardano account identifier and block identifier. It includes the total balance and balances of specific sub-accounts. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getaccountcoins.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getaccountcoins.md deleted file mode 100644 index a6138ef1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getaccountcoins.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "getAccountCoins" -slug: "rpc-cardano-getaccountcoins" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameter in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // string, required - network: 'NETWORK_NAME', // string, required - }, - accountIdentifier: { - address: 'ACCOUNT_ADDRESS', // string, required - sub_account: { - // Specify sub-account information if applicable - }, - metadata: { - chain_code: 'CHAIN_CODE', // Specify chain code if applicable - }, - }, - includeMempool: true, // boolean, optional - currency: { - symbol: 'ADA', // string, required - decimals: 6, // number, required - metadata: { - // Specify metadata only if applicable - }, - }, -}; - -// Retrieve unspent coins for an account in Cardano blockchain -const unspentCoins = await tatum.rpc.getAccountCoins(params); - -// Log the unspent coins -console.log('Unspent Coins:', unspentCoins); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountCoins` method allows you to get an array of all unspent coins for a Cardano account. - -### Example Use Cases - -1. **Account Balance**: Developers can use this method to retrieve the unspent coins for a Cardano account and calculate its balance. - -### Request Parameters - -The `getAccountCoins` method requires the following parameters: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `'CARDANO'` for Cardano. - - `network` (string, required): The network name for Cardano. -- `accountIdentifier` (object, optional): An object containing information about the account. - - `address` (string, required): The Cardano account address associated with the operation. - - `sub_account` (object, optional): An optional sub-account object. - - `address` (string, optional): The sub-account address. - - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. - - `metadata` (object, optional): An optional metadata object for the account. Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata. -- `includeMempool` (boolean, optional): An optional boolean flag to indicate whether to include mempool transactions. Default is `true`. -- `currency` (object, required): An object specifying the currency details. - - `symbol` (string, required): The symbol or code of the currency. - - `decimals` (number, required): The number of decimal places for the currency. - - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. - -### Return Object - -The method returns an object representing the unspent coins for the specified Cardano account. This object includes details about the unspent coins and the block identifier at which the lookup was performed. - -Please note that the structure of the returned object may vary based on the Cardano RPC version. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getblock.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getblock.md deleted file mode 100644 index e5279e8d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getblock.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: "getBlock" -slug: "rpc-cardano-getblock" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // string, required - network: 'NETWORK_NAME', // string, required - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // string (optional) - metadata: { - [key: string]: any, // object (optional) - }, - }, - }, - blockIdentifier: { - index: 1123941, // number (int64), required - hash: '0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85', // string (optional) - }, -}; - -// Call the getBlock -const block = await tatum.rpc.getBlock(params); - -// Log the block details -console.log('Block:', block); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlock` method allows you to retrieve information about a specific Cardano block based on the provided parameters. - -### Request Body - -The request body should contain the following parameters: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `blockIdentifier` (object): An object containing information about the block to retrieve. - - `index` (number, required): The index of the block (Type: number, Format: int64). - - `hash` (string): The hash of the block (optional). - -### Response - -The response will contain details about the specified Cardano block. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getblocktransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getblocktransaction.md deleted file mode 100644 index b1ceaf52..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getblocktransaction.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getBlockTransaction" -slug: "rpc-cardano-getblocktransaction" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', // string, required - network: 'NETWORK_NAME', // string, required - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', - metadata: { - [key: string]: any - } // string (optional) - }, - }, - blockIdentifier: { - index: 1123941, // number (int64), required - hash: '0x1f2cc6c5027d2f201a5453ad1119574d2aed23a392654742ac3c78783c071f85', // string, required - }, - transactionIdentifier: { - hash: 'TRANSACTION_HASH', // string, required - }, -}; - -// Call the getBlockTransaction -const transaction = await tatum.rpc.getBlockTransaction(params); - -// Log the transaction details -console.log('Transaction:', transaction); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlockTransaction` method allows you to retrieve information about a specific transaction within a Cardano block based on the provided parameters. - -### Request Body - -The request body should contain the following parameters: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `blockIdentifier` (object, required): An object containing information about the block to which the transaction belongs. - - `index` (number, required): The index of the block (Type: number, Format: int64). - - `hash` (string, required): The hash of the block. -- `transactionIdentifier` (object, required): An object containing information about the transaction. - - `hash` (string, required): The hash of the transaction. - -### Response - -The response will contain details about the specified Cardano transaction. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-gethashoftransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-gethashoftransaction.md deleted file mode 100644 index 4645b990..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-gethashoftransaction.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "getHashOfTransaction" -slug: "rpc-cardano-gethashoftransaction" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const hashRequest = { - networkIdentifier: { - blockchain: 'CARDANO', // Specify the blockchain identifier ('CARDANO' for Cardano). - network: 'NETWORK_NAME', // Specify the network name. - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // Specify the sub-network name (optional). - metadata: { - // Optional metadata key-value pairs. - }, - }, - }, - signedTransaction: 'SIGNED_TRANSACTION', // Specify the signed transaction blob. -}; - -// Calculate the hash of the transaction -const transactionHash = await tatum.rpc.getHashOfTransaction(hashRequest); - -// Log the transaction hash -console.log('Transaction Hash:', transactionHash); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getHashOfTransaction` method allows you to calculate the unique transaction hash (ID) for a signed transaction. The transaction hash represents the unique identifier for a transaction on the Cardano blockchain. - -### Example Use Cases - -1. **Transaction Hash Calculation**: Developers can use this method to calculate the transaction hash for a signed transaction, which can be useful for tracking and verifying transactions on the Cardano network. - -### Request Parameters - -The `getHashOfTransaction` method requires the following parameters in the request body: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `signedTransaction` (string, required): The signed transaction blob for which you want to calculate the transaction hash. - -### Return Object - -The method returns a string representing the transaction hash (ID) of the provided signed transaction. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getnetworklist.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getnetworklist.md deleted file mode 100644 index 0821abde..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getnetworklist.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "getNetworkList" -slug: "rpc-cardano-getnetworklist" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Optional metadata parameter -const params = metadata: { - [key: string]: any, // object (optional) - }, - -// Call the `getNetworkList` method -const networkList = await tatum.rpc.getNetworkList(params); - -// Log the network list -console.log('Network List:', networkList); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getNetworkList` method allows you to retrieve a list of available networks that the Rosetta server supports. - -### Example Use Cases - -1. **Supported Networks**: Developers can use this method to retrieve the list of networks supported by the Rosetta server. - -### Request Parameters - -The `getNetworkList` method has only optional metadata object. - -- `metadata` (object, optional) - -### Return Object - -The method returns an object representing the list of available networks supported by the Rosetta server. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getnetworkstatus.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getnetworkstatus.md deleted file mode 100644 index 415b6e61..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-getnetworkstatus.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "getNetworkStatus" -slug: "rpc-cardano-getnetworkstatus" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - network_identifier: { - blockchain: 'CARDANO', // string, required - network: 'NETWORK_NAME', // string, required - sub_network_identifier: { - network: 'SUB_NETWORK_NAME', // string (optional) - metadata: { - [key: string]: any, // object (optional) - }, - }, - }, - metadata: { - [key: string]: any, // object (optional) - }, -}; - -// Retrieve the status of the Cardano network -const getNetworkStatus = await tatum.rpc.getNetworkStatus(params); - -// Log the network status -console.log('Cardano Network Status:', getNetworkStatus); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getNetworkStatus` method allows you to retrieve the current status of a Cardano network. - -### Example Use Cases - -1. **Network Information**: Developers can use this method to retrieve the current status and information of a Cardano network, including details about the network itself and its status. - -### Request Parameters - -The `getNetworkStatus` method requires the following parameters: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `metadata` (object, optional): Metadata associated with the network status. - -### Return Object - -The method returns an object representing the current status of the Cardano network. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-parsetransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-parsetransaction.md deleted file mode 100644 index c2978cb1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-parsetransaction.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "parseTransaction" -slug: "rpc-cardano-parsetransaction" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const parseRequest = { - networkIdentifier: { - blockchain: 'CARDANO', // Specify the blockchain identifier ('CARDANO' for Cardano). - network: 'NETWORK_NAME', // Specify the network name. - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // Specify the sub-network name (optional). - metadata: { - // Optional metadata key-value pairs. - }, - }, - }, - signed: true, // Specify whether the transaction is signed (boolean). - transaction: 'TRANSACTION', // Specify the transaction blob (either unsigned or signed). -}; - -// Parse the transaction -const parsedTransaction = await tatum.rpc.transactionParse(parseRequest); - -// Log the parsed transaction -console.log('Parsed Transaction:', parsedTransaction); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `transactionParse` method allows you to parse either an unsigned or signed transaction and retrieve information about the transaction. It is used to examine the details of a transaction without submitting it to the blockchain. - -### Example Use Cases - -1. **Transaction Inspection**: Developers can use this method to inspect and verify the details of a transaction before submitting it to the Cardano network. - -### Request Parameters - -The `transactionParse` method requires the following parameters in the request body: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `signed` (boolean, required): A boolean indicating whether the transaction is signed. Set to `true` for a signed transaction and `false` for an unsigned transaction. -- `transaction` (string, required): The transaction blob, which must be either the unsigned transaction blob returned by `constructionPayloads` or the signed transaction blob returned by `constructionCombine`. - -### Return Object - -The method returns an object containing parsed information about the transaction, such as transaction inputs, outputs, and other details. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-searchtransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-searchtransactions.md deleted file mode 100644 index fbb4bbe5..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-searchtransactions.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: "searchTransactions" -slug: "rpc-cardano-searchtransactions" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const params = { - networkIdentifier: { - blockchain: 'CARDANO', - network: 'NETWORK_NAME', - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', - metadata: { - // Optional metadata key-value pairs. - }, - }, - }, - operator: { - // Specify search conditions (optional). - }, - max_block: 5, // The largest block index to consider (optional). - offset: 5, // The offset into the query result to start returning transactions (optional). - limit: 5, // The maximum number of transactions to return in one call (optional). - transactionIdentifier: { - hash: 'TRANSACTION_HASH', // string, required - }, - accountIdentifier: { - address: 'ACCOUNT_ADDRESS', // string, required - sub_account: { - // Specify sub-account information if applicable - }, - metadata: { - chain_code: 'CHAIN_CODE', // Specify chain code if applicable - }, - }, - coin_identifier: { - identifier: 'CO' // Specify search conditions (optional). - }, - currency: { - symbol: 'CURRENCY_SYMBOL', // Required: Specifies the currency symbol . - decimals: 6, // Required: Specifies the currency decimals (number). - metadata: { - // Optional metadata for amount object - }, - }, - status: 'reverted', // The network-specific operation status type (optional). - type: 'transfer', // The network-specific operation type (optional). - address: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', // Account address (optional). - success: true, // A synthetic condition (optional). -}; - -// Search for transactions -const transactions = await tatum.rpc.searchTransactions(params); - -// Log the retrieved transactions -console.log('Transactions:', transactions); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `searchTransactions` method allows you to search for transactions matching a set of provided conditions in canonical blocks. This can be useful for querying transaction data based on various criteria. - -### Example Use Cases - -1. **Transaction Query**: Developers can use this method to search for transactions that meet specific criteria, such as a particular status or operation type. -2. **Block Analysis**: Users can analyze transactions within a specific range of blocks to identify patterns or trends. - -## Request Parameters - -The `searchTransactions` method requires the following parameters in the request body: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to `CARDANO` for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, optional): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `operator` (enum, optional): Additional search conditions `or` and `and`. -- `max_block` (number, optional): The largest block index to consider when searching for transactions. If not populated, the current block is considered the `max_block`. If you do not specify a `max_block`, it is possible that a newly synced block will interfere with paginated transaction queries (as the offset could become invalid with newly added rows). -- `offset` (number, optional): The offset into the query result to start returning transactions. If any search conditions are changed, the query offset will change, and you must restart your search iteration. -- `limit` (number, optional): The maximum number of transactions to return in one call. The implementation may return \<= `limit` transactions. -- `transactionIdentifier` (object, required): An object containing information about the transaction. - - `hash` (string, required): The hash of the transaction. -- `accountIdentifier` (object, optional): An object containing information about the account. - - `address` (string, required): The Cardano account address associated with the operation. - - `sub_account` (object, optional): An optional sub-account object. - - `address` (string, optional): The sub-account address. - - `metadata` (object, optional): An optional metadata object for the sub-account. If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients. - - `metadata` (object, optional): An optional metadata object for the account. -- `coinIdentifier` (object, optional): Specify search conditions for coin identifier. Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction\_hash: index. - - `identifier` (string, required): Example: '0x2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f: 1' -- `currency` (object, required): An object specifying the currency details. - `symbol` (string, required): The symbol or code of the currency. - `decimals` (number, required): The number of decimal places for the currency. - `metadata` (object, optional): Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token. -- `status` (string, optional): The network-specific operation status type (optional). -- `type` (string, optional): The network-specific operation type (optional). -- `address` (string, optional): AccountIdentifier.Address. This is used to get all transactions related to an AccountIdentifier.Address, regardless of SubAccountIdentifier. -- `success` (boolean, optional): A synthetic condition populated by parsing network-specific operation statuses. - -### Return Object - -The method returns a list of transactions that match the specified search criteria. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-submittransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-submittransaction.md deleted file mode 100644 index 742edd87..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-cardano/rpc-cardano-submittransaction.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "submitTransaction" -slug: "rpc-cardano-submittransaction" -excerpt: "Cardano RPC" -hidden: false -metadata: - description: "Cardano RPC" - image: [] - keywords: "cardano, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, CardanoRosetta, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Cardano -const tatum = await TatumSDK.init({ network: Network.CARDANO_ROSETTA }); - -// Define the input parameters in a single object -const submitRequest = { - networkIdentifier: { - blockchain: 'CARDANO', // Specify the blockchain identifier ('CARDANO' for Cardano). - network: 'NETWORK_NAME', // Specify the network name. - subNetworkIdentifier: { - network: 'SUB_NETWORK_NAME', // Specify the sub-network name (optional). - metadata: { - // Optional metadata. - }, - }, - }, - signedTransaction: 'SIGNED_TRANSACTION', // Specify the signed transaction to submit. -}; - -// Submit the signed transaction to the network -const transactionResponse = await tatum.rpc.submitTransaction(submitRequest); - -// Log the transaction response -console.log('Transaction Response:', transactionResponse); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `submitTransaction` method allows you to submit a signed transaction to the Cardano network for processing. After successfully constructing and signing a transaction, you can use this method to broadcast it to the network. - -### Example Use Cases - -1. **Transaction Submission**: Developers can use this method to submit a signed Cardano transaction to the network for execution. This is the final step in the transaction lifecycle. - -### Request Parameters - -The `submitTransaction` method requires the following parameters in the request body: - -- `networkIdentifier` (object, required): An object containing information about the blockchain network. - - `blockchain` (string, required): The blockchain identifier, which should be set to 'CARDANO' for Cardano. - - `network` (string, required): The network name for Cardano. - - `subNetworkIdentifier` (object, optional): An optional sub-network identifier object. - - `network` (string, required): The name of the sub-network within Cardano. - - `metadata` (object, optional): Metadata associated with the sub-network. -- `signedTransaction` (string, required): The signed transaction blob that you want to submit to the Cardano network. - -### Return Object - -The method returns an object representing the response from the Cardano network after submitting the signed transaction. This response may include details about the transaction's acceptance by the network. - -Structure and behavior of this method may vary with different versions of the Cardano service. Always refer to the documentation specific to the version you are using for the most accurate information. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos.md b/v1.0/RPC Nodes/rpc-others/rpc-eos.md deleted file mode 100644 index ce3d6698..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Eos" -slug: "rpc-eos" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_abi.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_abi.md deleted file mode 100644 index dd1b6a7b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_abi.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "get_abi" -slug: "rpc-eos-get_abi" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_abi` method is utilized to retrieve the ABI (Application Binary Interface) associated with an EOS account. ABI is critical for encoding and decoding the data correctly to interact with the smart contracts deployed by the account. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getAbi({ accountName: 'b1' }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Smart Contract Interaction:** - Developers can use the `get_abi` method to obtain the ABI of a smart contract, enabling them to interact with the contract's methods and access its state variables and structures. - -2. **Data Encoding and Decoding:** - The method is crucial for encoding the data sent to a smart contract and decoding the data received from it, facilitating seamless interaction with smart contracts deployed on the EOS blockchain. - -3. **Contract Development and Testing:** - `get_abi` is invaluable for developers in the development and testing phases of smart contract deployment, allowing for accurate and efficient contract interaction and validation. - -### Request Parameters - -The `getAbi` method usually requires one parameter in the request body: - -- `accountName` (string, required): The name of the EOS account whose ABI is being requested. - -### Return Object - -The `get_abi` method typically returns an object containing the ABI details including the version, types, structs, actions, tables, and more, of the requested account: - -- `version` (string): The version of the ABI. -- `types` (array): An array containing the types used in the ABI. -- `structs` (array): An array of structures defined in the ABI. -- `actions` (array): The actions that are defined in the ABI. -- `tables` (array): The tables that are defined in the ABI. -- `ricardian_clauses` (array): The ricardian clauses defined in the ABI. -- `error_messages` (array): Possible error messages that are defined in the ABI. -- `abi_extensions` (array): Any extensions to the ABI. - -### JSON-RPC Request Example - -```json -{ - "account_name": "b1" -} -``` - -### JSON-RPC Response Example - -```json -{ - "version": "eosio::abi/1.0", - "types": [...], - "structs": [...], - "actions": [...], - "tables": [...], - "ricardian_clauses": [...], - "error_messages": [...], - "abi_extensions": [...] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_account.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_account.md deleted file mode 100644 index 52ab7bff..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_account.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: "get_account" -slug: "rpc-eos-get_account" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_account` returns an object containing various details about a specific account on the blockchain. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const account = await tatum.rpc.getAccount({ accountName: 'b1' }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Fetching Account Details:** - Developers or users may need to retrieve specific details about an account, such as the account's balance, permissions, resource allocation (CPU, NET, and RAM usage), and other parameters. - -2. **Checking Resource Allocation and Consumption:** - get_account can be used to monitor the amount of network, CPU, and RAM resources an account has allocated and consumed. This can help users manage their resources more effectively to ensure their dApps run smoothly. - -3. **Monitoring Staked and Unstaked Tokens:** - Users can utilize this method to check the status of their tokens, whether they are staked or unstaked, and make decisions about staking and unstaking based on this information. - -### Request Parameters - -The `getAccount` method requires the following parameter: - -- `accountName` (string, required): A unique identifier assigned to every account. It is required to be 12 characters long and can only contain the characters a-z, 1-5, and . (dot). - -### Return Object - -The `get_account` method returns an object containing detailed information about the requested account. The object includes the following fields: - -- `account_name` (string): The name of the requested account. -- `head_block_num` (integer): The most recent block number on the blockchain at the time of the request. -- `head_block_time` (string): The timestamp of the most recent block on the blockchain at the time of the request. -- `last_code_update` (string): The timestamp of the last time the account’s smart contract code was updated. -- `created` (string): The timestamp of when the account was created. -- `refund_request` (object): Details of any pending refund requests for the account due to unstaking resources. -- `ram_quota` (integer): The total RAM allocated to the account. -- `net_limit` (object): The available network bandwidth. -- `cpu_limit` (object): CPU time for the account. -- `total_resources` (object): A summary of the total resources (RAM, CPU, and NET) allocated to the account. -- `core_liquid_balance` (string): The amount of liquid (available) core token (usually EOS) the account holds. -- `self_delegated_bandwidth` (object): The amount of bandwidth the account has delegated to itself. -- `net_weight` (integer): The amount of network bandwidth staked by the account. -- `cpu_weight` (integer): CPU time staked by the account. -- `ram_usage` (integer): The amount of RAM currently used by the account. -- `privileged` (boolean): Indicates whether the account has elevated (privileged) permissions. -- `permissions` (array): A list of the account’s permissions and their details, including the public keys associated with the account and any custom permission structures. -- `voter_info` (object): Information related to the account’s voting, such as the proxies used, the number of votes, and the staked amount for voting. - -### JSON-RPC Request Example - -```json -{ - "account_name": "string" -} -``` - -### JSON-RPC Response Example - -```json -{ - "account_name": "b1", - "head_block_num": 333261323, - "head_block_time": "2023-09-27T12:52:25.000", - "privileged": false, - "last_code_update": "1970-01-01T00:00:00.000", - "created": "2018-06-09T11:58:03.500", - "core_liquid_balance": "0.2849 EOS", - "ram_quota": 9487, - "net_weight": "350078512340", - "cpu_weight": "296624975145", - "net_limit": { - "used": 271, - "available": "659675344495", - "max": "659675344766", - "last_usage_update_time": "2022-08-23T01:41:35.000", - "current_used": 0 - }, - "cpu_limit": { - "used": 4647, - "available": 26734970, - "max": 26739617, - "last_usage_update_time": "2022-08-23T01:41:35.000", - "current_used": 0 - }, - "ram_usage": 5010, - "permissions": [ - { - "perm_name": "active", - "parent": "owner", - "required_auth": { - "threshold": 2, - "keys": [ - { - "key": "EOS5BUDFbb2erXiRP8qHQAgVboCHgHGesbCubUfgXYJhnYZKSqNbD", - "weight": 1 - }, - { - "key": "EOS6hQ6v8vut1V2giQCYha7J225GCzFJtF3o7fy8JYuN7k6fG4n23", - "weight": 1 - }, - { - "key": "EOS7RodmQofvAxgYBJzfNuwRKr6TWh5LbCBfB4uQ8tjrjQ8Ukkwqq", - "weight": 1 - }, - { - "key": "EOS7c9jHNgbtTMYgpXvmTb1kW61oH6kwfGioWk75ugDMhsywe6rWu", - "weight": 1 - } - ], - "accounts": [], - "waits": [] - }, - "linked_actions": [] - }, - { - "perm_name": "owner", - "parent": "", - "required_auth": { - "threshold": 2, - "keys": [ - { - "key": "EOS5BUDFbb2erXiRP8qHQAgVboCHgHGesbCubUfgXYJhnYZKSqNbD", - "weight": 1 - }, - { - "key": "EOS6hQ6v8vut1V2giQCYha7J225GCzFJtF3o7fy8JYuN7k6fG4n23", - "weight": 1 - }, - { - "key": "EOS7RodmQofvAxgYBJzfNuwRKr6TWh5LbCBfB4uQ8tjrjQ8Ukkwqq", - "weight": 1 - }, - { - "key": "EOS7c9jHNgbtTMYgpXvmTb1kW61oH6kwfGioWk75ugDMhsywe6rWu", - "weight": 1 - } - ], - "accounts": [], - "waits": [] - }, - "linked_actions": [] - } - ], - "total_resources": { - "owner": "b1", - "net_weight": "35007851.2340 EOS", - "cpu_weight": "29662497.5145 EOS", - "ram_bytes": 8087 - }, - "self_delegated_bandwidth": { - "from": "b1", - "to": "b1", - "net_weight": "35007851.2340 EOS", - "cpu_weight": "29662497.5145 EOS" - }, - "refund_request": null, - "voter_info": { - "owner": "b1", - "proxy": "", - "producers": [], - "staked": "646723487485", - "last_vote_weight": "2768257912613634048.00000000000000000", - "proxied_vote_weight": "0.00000000000000000", - "is_proxy": 0, - "flags1": 0, - "reserved2": 0, - "reserved3": "0.0000 EOS" - }, - "rex_info": null, - "subjective_cpu_bill_limit": { - "used": 0, - "available": 0, - "max": 0, - "last_usage_update_time": "2000-01-01T00:00:00.000", - "current_used": 0 - }, - "eosio_any_linked_actions": [] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_accounts_by_authorizers.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_accounts_by_authorizers.md deleted file mode 100644 index e12aed71..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_accounts_by_authorizers.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "get_accounts_by_authorizers" -slug: "rpc-eos-get_accounts_by_authorizers" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_accounts_by_authorizers` method retrieves accounts associated with specific authorizers, serving as an essential tool for developers and users interested in understanding account access and control on the EOS blockchain. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getAccountsByAuthorizers({ - accounts: ["eosio"] -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Account Access Analysis:** - Developers can utilize this method to discern which accounts have access through specific authorizers, fortifying access control and security management. - -2. **Permission Management:** - Users managing multiple accounts can benefit from this method by identifying which accounts are controlled by specific authorizers, optimizing permission management processes. - -3. **Enhanced Account Retrieval:** - This method facilitates the retrieval of accounts based on specific authorizers, fostering efficient data interaction and management on the EOS blockchain. - -### Request Parameters - -The `getAccountsByAuthorizers` method requires the following parameters in the request body: - -- `keys` (array of strings): An array of public keys used to retrieve accounts. -- `accounts` (array of strings): An array of account names used to retrieve accounts. - - `actor` (string, required): Name of the actor. - - `permission` (string, required): Specifies the permission name. - -### Return Object - -The `get_accounts_by_authorizers` method typically returns an object containing: - -- `accounts` (array of strings): An array of account names associated with the provided authorizers. - -### JSON-RPC Request Example - -```json -{ - "keys": ["EOS6MRy..."], - "accounts": ["eosio"] -} -``` - -### JSON-RPC Reponse Example - -```json -{ - "accounts": ["account1", "account2"] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_activated_protocol_features.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_activated_protocol_features.md deleted file mode 100644 index 0b794680..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_activated_protocol_features.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: "get_activated_protocol_features" -slug: "rpc-eos-get_activated_protocol_features" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_activated_protocol_features` method retrieves the activated protocol features for a producer node in the EOS blockchain. This method is crucial for developers and block producers to identify and understand the protocol features activated on a node, ensuring proper configuration and management of producer nodes. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getActivatedProtocolFeatures({ - lowerBound: 0, - upperBound: 100, - limit: 2, - searchByBlockNum: true, - reverse: false -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Producer Node Management:** - Developers and block producers can utilize this method to analyze and manage the activated protocol features, ensuring the optimal configuration of producer nodes. - -2. **Protocol Feature Exploration:** - This method allows users and developers to explore and understand the activated protocol features on the blockchain, enhancing their interaction and experience with the EOS blockchain. - -3. **Enhanced Feature Retrieval:** - The method provides extensive filtering options for retrieving activated protocol features, enabling users to efficiently manage and interact with the protocol features. - -### Request Parameters - -The `getActivatedProtocolFeatures` method requires the following parameters in the request body: - -- `params` (object, required): Defines the filters to retrieve the protocol features by. - - `lowerBound` (integer): Lower bound. - - `upperBound` (integer): Upper bound. - - `limit` (integer, default: 10): The limit. - - `searchByBlockNum` (boolean, required): Flag to indicate whether it has to search by block number. - - `reverse` (boolean, required): Flag to indicate whether it has to search in reverse. - -### Return Object - -The `get_activated_protocol_features` method returns an object with the following properties: - -- `activated_protocol_features` (Array of strings, required): Variant type, an array of strings representing the activated protocol features. -- `more` (integer): Represents whether there are more activated protocol features to be fetched. If there's `more` activated protocol features than the input parameter limit requested, it returns the ordinal of the next activated protocol feature which was not returned, otherwise, it returns zero. - -### JSON-RPC Request Example - -```json -{ - "params": { - "lower_bound": 0, - "upper_bound": 100, - "limit": 10, - "search_by_block_num": true, - "reverse": false - } -} -``` - -### JSON-RPC Response Example - -```json -{ - "activated_protocol_features": ["0a1b2c3d4e5f6789abcdef10", "1a2b3c4d5e6f7890abcdef01"], - "more": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_block.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_block.md deleted file mode 100644 index 7234487a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_block.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: "get_block" -slug: "rpc-eos-get_block" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -{% hint style="warning" %} -Please note that you are able to get data only from block number 260742168 and newer. -{% endhint %} - -### Overview - -The `get_block` method returns an object containing various details about a specific block on the blockchain, providing block number or block id in request. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const block = await tatum.rpc.getBlock({ blockNumOrId: '260742168' }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Block Verification:** - Developers or validators might use the `get_block` method to fetch specific block details for the purpose of verifying block information. It allows the comparison of block data retrieved from different nodes to ensure data consistency and integrity across the network. - -2. **Transaction Confirmation:** - Users and services might utilize the `get_block` method to confirm transaction inclusion within a block. By examining the transactions field of the returned block object, users can ascertain whether a specific transaction has been included and, consequently, confirm its successful execution. - -3. **Data Analysis and Chain Exploration:** - Researchers and analysts can employ the `get_block` method to retrieve detailed block data for analytical purposes, exploring block and transaction patterns, studying network activity, and gaining insights into blockchain operations and behavior. - -### Request Parameters - -The `getBlock` method requires the following parameter in the request body: - -- `blockNumOrId` (string, required): Provide either a block number or a block ID. - -### Return Object - -The `get_block` method returns an object containing the following parameters: - -- `timestamp` (string): Date/time string in the format YYYY-MM-DDTHH:MM:SS.sss. -- `producer` (string): The account name of the block producer. -- `confirmed` (integer): Number of prior blocks confirmed by this block producer in the current schedule. -- `previous` (string, Sha256): The ID of the block that immediately precedes this one. -- `transaction_mroot` (string, Sha256): The Merkle root of the transactions included in this block. -- `action_mroot` (string, Sha256): The Merkle root of the actions included in this block. -- `schedule_version` (integer): Number of times the producer schedule has changed since genesis. -- `new_producers` (nullable array of objects): Information about any new block producers that have been elected in this block. -- `header_extensions` (array of integers or strings): Any extensions to the block header. -- `new_protocol_features` (array of objects): List of new protocol features. -- `producer_signature` (string, Signature): Base58 encoded EOSIO cryptographic signature. -- `transactions` (array of objects): List of valid transaction receipts included in block. -- `block_extensions` (array of integers or strings): Any extensions to this block. -- `id` (string, Sha256): The ID of this block. -- `block_num` (integer): The height of this block in the chain. -- `ref_block_prefix` (integer): 32-bit portion of block ID. - -### JSON-RPC Request Example - -```json -{ - "block_num_or_id": "260742168" -} -``` - -### JSON-RPC Response Example - -```json -{ - "timestamp": "2023-09-26T16:50:32.500", - "producer": "eosio", - "confirmed": 0, - "previous": "0000004bc2b4483cfad9a2aeb93196c8c47744cc553d5ed30b71058e9aa2e410", - "transaction_mroot": "0000000000000000000000000000000000000000000000000000000000000000", - "action_mroot": "0e6e36f2db9fc3f7a7d3f1a1a7fd2aef9b9b9827060bbe5a8811e0e86e7d7d3a", - "schedule_version": 0, - "new_producers": null, - "header_extensions": [], - "new_protocol_features": [], - "producer_signature": "SIG_K1_Jyv4wSc8yr5UWwLq9m7eKzWEVJgEo9rzUq9Zt49gCQjzjxrtBQyd1ZQsZt5Ge9wXCUsMxra1mHLJyZXFqSRcR5wSEDF1", - "transactions": [ - { - "status": "executed", - "cpu_usage_us": 758, - "net_usage_words": 14, - "trx": [ "2", "e4be63d97b553a5d7b2c9b0 - -d21e753b69a3c0bf4a7f9f0b2ff806c16d8a8e959" ] - } - ], - "block_extensions": [], - "id": "0000004cc2b4483cfad9a2aeb93196c8c47744cc553d5ed30b71058e9aa2e410", - "block_num": 76, - "ref_block_prefix": 3708016389 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_block_info.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_block_info.md deleted file mode 100644 index b3c6932a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_block_info.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "get_block_info" -slug: "rpc-eos-get_block_info" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -{% hint style="warning" %} -Please note that you are able to get data only from block number 260742168 and newer. -{% endhint %} - -### Overview - -The `get_block_info` method retrieves crucial information about a specific block in the EOS blockchain. It returns an object containing details such as block time, block number, previous block ID, producer, and transaction count. Similar to `get_block` but returns a fixed-size smaller subset of the block data. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const blockInfo = await tatum.rpc.getBlockInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Fetching Specific Block Details:** - Developers and users may utilize the `get_block_info` method to gather information about a particular block, aiding in debugging or validating blockchain states and transactions. - -2. **Block Verification:** - Validators and network participants can employ this method to verify the integrity and authenticity of a block, ensuring the security and reliability of the network. - -3. **Data Analysis and Chain Exploration:** - Blockchain analysts and enthusiasts might use `get_block_info` to study block patterns and transaction activities, gaining insights into the network’s operations and behaviors. - -### Request Parameters - -The `getBlockInfo` method requires the following parameter in the request body: - -- `blockNumOrId` (string, required): It could be either a block number or a block ID. - -### Return Object - -The `get_block_info` method returns an object containing the following parameters: - -- `block_num` (integer): The block number. -- `ref_block_num` (integer): The reference block number. -- `id` (string): The ID of the block. -- `timestamp` (string): The timestamp when the block was produced. -- `producer` (string): The name of the block producer. -- `confirmed` (integer): The number of confirmed transactions in the block. -- `previous` (string): The ID of the previous block. -- `transaction_mroot` (string): The Merkle root of the transactions in the block. -- `action_mroot` (string): The Merkle root of the actions in the block. -- `schedule_version` (integer): The schedule version. -- `producer_signature` (string): The signature of the block producer. -- `ref_block_prefix` (integer): The reference block prefix. - -### JSON-RPC Request Example - -```json -{ - "block_num_or_id": "260742168" -} -``` - -### JSON-RPC Response Example - -```json -{ - "block_num": 260742168, - "ref_block_num": 39960, - "id": "0f8a9c180c996f9a88e463ca22428b3ed13c7ddc5ad09fc9c77c3c635ef9872b", - "timestamp": "2022-08-03T16:00:36.000", - "producer": "eosasia11111", - "confirmed": 240, - "previous": "0f8a9c1787cb055ab97b9beae18b762d6c3b4cfebf25060ddcc47213a2ef64d2", - "transaction_mroot": "03313763ba0a854edbd46517bc515d090ff8e64c842e19ab91fb61f6f7bb0ce8", - "action_mroot": "7c91b3be9fab14fe589a99312c6366d4077f49a80fd1f0ad4077f7575bbb4fe8", - "schedule_version": 2023, - "producer_signature": "SIG_K1_KkDoLCNaRyV62pxoUW8XQDgbZ31TrvSEDVebKFrL6fU8EsVkEFL7Wx8YMXyx2ydqY9KhPSYKQZD6dtD2cnbBmsETsZsdxt", - "ref_block_prefix": 3395544200 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_code.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_code.md deleted file mode 100644 index 5488f26a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_code.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "get_code" -slug: "rpc-eos-get_code" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_code` method returns an object containing the smart contract WASM code for a specified account on the EOS blockchain. This method is paramount for developers who are looking to analyze or understand the WASM code of deployed smart contracts, enabling an in-depth interaction and integration with the smart contracts. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getCode({ - accountName: "eosio.token", - codeAsWasm: 1 -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Smart Contract Analysis:** - Developers use this method to retrieve and analyze the WASM code of smart contracts, allowing for comprehensive understanding and debugging of the contract logic. - -2. **WASM Code Inspection:** - This method is vital for users and developers wishing to inspect the WASM code, ensuring the contract's integrity, functionality, and security. - -3. **Enhanced Integration and Interaction:** - Retrieving the WASM code facilitates seamless integration and interaction with smart contracts, ensuring proper deployment, execution, and management of contracts on the EOS blockchain. - -### Request Parameters - -The `getCode` method requires the following parameters in the request body: - -- `accountName` (string, required): The name of the account whose smart contract WASM code needs to be retrieved. Acceptable types are NamePrivileged, NameBasic, NameBid, and NameCatchAll. -- `codeAsWasm` (integer, required): This must be 1 (true). - -### Return Object - -The `get_code` method returns an object containing: - -- `name` (string): The name of the account from which the WASM code was retrieved. Acceptable types are NamePrivileged, NameBasic, NameBid, and NameCatchAll. -- `code_hash` (string): A Sha256 hash representing the WASM code of the retrieved smart contract. -- `wast` (string): The WebAssembly text format representation of the smart contract. -- `wasm` (string): The WebAssembly binary representation of the smart contract. -- `abi` (object): The ABI (Application Binary Interface) of the smart contract, representing the binary representation of the contract's interface. - -### JSON-RPC Request Example - -```json -{ - "accountName": "eosio.token", - "codeAsWasm": 1 -} -``` - -### JSON-RPC Response Example - -```json -{ - "name": "eosio.token", - "code_hash": "a1b2c3d4e5f67890abcdef1234567890abcdef1234567890abcdef1234567890ab", - "wast": "... (WAST string) ...", - "wasm": "... (WASM binary string) ...", - "abi": { ... (ABI object) ... } -} - -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_currency_balance.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_currency_balance.md deleted file mode 100644 index e38ec936..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_currency_balance.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "get_currency_balance" -slug: "rpc-eos-get_currency_balance" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_currency_balance` method is used to retrieve the balance of a specific currency/token for a given account on the EOS blockchain. This method is essential for users and developers who wish to query and manage account balances, ensuring accurate and up-to-date financial data. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getCurrencyBalance({ - account: 'eosio', - code: 'eosio.token', - symbol: 'EOS' -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Balance Querying:** - Users and developers can utilize the `get_currency_balance` method to query the balances of specific currencies or tokens, enabling effective account management and financial planning. - -2. **Financial Management:** - This method is pivotal for financial management in decentralized applications, allowing for the implementation of features related to balance checking, fund transfer validations, and more. - -3. **Smart Contract Interaction:** - Developers can leverage this method to interact with token contracts to retrieve the balance of an account, facilitating the development of functionalities around token transactions and balance validations in dApps. - -### Request Parameters - -The `getCurrencyBalance` method requires the following parameters in the request body: - -- `account` (string, required): The name of the account for which the balance is being requested. -- `code` (string, required): The smart contract that operates the currency. -- `symbol` (string, optional): The symbol of the currency/token. If not provided, the balances of all tokens available under the smart contract will be returned. - -### Return Object - -Upon a successful request, the method returns an array containing the balances of the specified currency/token for the given account: - -- Each item in the array represents a balance in the format `"amount SYMBOL"` (e.g., `"100.0000 EOS"`). - -### JSON-RPC Request Example - -```json -{ - "account": "eosio", - "code": "eosio.token", - "symbol": "EOS" -} -``` - -### JSON-RPC Response Example - -```json -[ - "1667.0290 EOS" -] -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_currency_stats.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_currency_stats.md deleted file mode 100644 index 6fc92820..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_currency_stats.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "get_currency_stats" -slug: "rpc-eos-get_currency_stats" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_currency_stats` method is utilized to retrieve the statistics for a specific currency on the EOS blockchain. By employing this method, users and developers can obtain crucial information about a currency, such as its supply, maximum supply, and issuer, thereby enabling in-depth analysis and insights into the currency's status and distribution. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getCurrencyStats({ - code: 'eosio.token', - symbol: 'EOS' -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Token Analysis:** - Individuals and analysts can utilize the `get_currency_stats` method to gather comprehensive details about a token's supply and issuer, facilitating profound analysis and research on the token’s characteristics and distribution. - -2. **Smart Contract Interaction:** - Developers can use this method to obtain necessary information about a token, which can aid in interacting efficiently with smart contracts that deal with tokens, for operations like transferring tokens or querying balances. - -3. **Market Analysis:** - `get_currency_stats` is instrumental for acquiring essential details about a token, which are critical for performing market analysis. This enables users and potential investors to make informed and insightful decisions based on the available token data. - -### Request Parameters - -The `getCurrencyStats` method requires the following parameters in the request body: - -- `code` (string, required): The contract that operates the token. -- `symbol` (string, required): The symbol of the token for which the statistics are being requested. - -### Return Object - -The `get_currency_stats` method typically returns an object containing the statistics of the requested currency. This object includes: - -- `supply` (string): The total supply of the token in circulation. -- `max_supply` (string): The maximum supply of the token that can ever be created. -- `issuer` (string): The account name of the issuer of the token. - -### JSON-RPC Request Example - -```json -{ - "code": "eosio.token", - "symbol": "EOS" -} -``` - -### JSON-RPC Response Example - -```json -{ - "EOS": { - "supply": "1168690795.8555 EOS", - "max_supply": "10000000000.0000 EOS", - "issuer": "eosio" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_info.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_info.md deleted file mode 100644 index ae0d8f1e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_info.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "get_info" -slug: "rpc-eos-get_info" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_info` RPC method in the EOS blockchain is used to retrieve various details about the blockchain's state, such as the head block, the last irreversible block, and the chain ID. It is one of the most fundamental RPC calls in the EOSIO blockchain, providing essential information about the network's status. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const info = await tatum.rpc.getInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Checking Blockchain Status:** - Developers and users often use the `get_info` method to quickly check the status of the EOS blockchain, such as the head block number and the last irreversible block number, to ensure they are interacting with the most recent and confirmed state of the blockchain. - -2. **Synchronization and Validation:** - For node operators and block producers, `get_info` is crucial to verify that their node is synchronized with the network, and to compare the `chain_id` and other details to ensure they are on the correct chain and avoid forks. - -3. **Development and Debugging:** - Developers frequently use `get_info` during the development and debugging of dApps and smart contracts, to fetch real-time information about the blockchain, validate transactions, and test the behavior of their applications against the current state of the blockchain. - -### Request Parameters - -The `getInfo` method does not require any parameters; it is a simple GET request to the endpoint. - -### Return Object - -The `get_info` method returns an object with the following response parameters: - -- `server_version` (string): The version of the nodeos software running on the node. -- `chain_id` (string): The unique identifier for the EOSIO blockchain. -- `head_block_num` (integer): The most recent block number on the blockchain. -- `head_block_id` (string): The unique identifier of the head block. -- `head_block_time` (string): The timestamp of when the head block was produced. -- `head_block_producer` (string): The name of the block producer that produced the head block. -- `last_irreversible_block_num` (integer): The most recent block that has been irreversibly confirmed on the blockchain. -- `last_irreversible_block_id` (string): The unique identifier of the last irreversible block. -- `virtual_block_cpu_limit` (integer): The current limit on CPU usage for virtual blocks. -- `virtual_block_net_limit` (integer): The current limit on NET usage for virtual blocks. -- `block_cpu_limit` (integer): The current limit on CPU usage for blocks. -- `block_net_limit` (integer): The current limit on NET usage for blocks. -- `server_version_string` (string): The server version as a string. -- `fork_db_head_block_num` (integer): Sequential block number representing the best known head in the fork database tree. -- `fork_db_head_block_id` (string): Hash representing the best known head in the fork database tree. - -### JSON-RPC Response Example - -```json -{ - "server_version": "7e1ad13e", - "chain_id": "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906", - "head_block_num": 333261268, - "last_irreversible_block_num": 333260936, - "last_irreversible_block_id": "13dd2888c6e933ac455978baf53554605d95e0e2d2abd0c1159ddb218936fe03", - "head_block_id": "13dd29d4aa69b67d138d0bbb82ee4d1de74ec0cd404d58902381ea9d5bdbff67", - "head_block_time": "2023-09-27T12:51:57.500", - "head_block_producer": "eoseouldotio", - "virtual_block_cpu_limit": 200000, - "virtual_block_net_limit": 1048576000, - "block_cpu_limit": 200000, - "block_net_limit": 1048576, - "server_version_string": "v4.0.4", - "fork_db_head_block_num": 333261268, - "fork_db_head_block_id": "13dd29d4aa69b67d138d0bbb82ee4d1de74ec0cd404d58902381ea9d5bdbff67", - "server_full_version_string": "v4.0.4-7e1ad13e1e98b1e0703d0ea072b4fca5419cfdbe", - "total_cpu_weight": "383377176232761", - "total_net_weight": "96156545705220", - "earliest_available_block_num": 260742168, - "last_irreversible_block_time": "2023-09-27T12:49:11.500" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_producers.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_producers.md deleted file mode 100644 index 29c0bcdc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_producers.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: "get_producers" -slug: "rpc-eos-get_producers" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_producers` method is designed to retrieve a list of producers from the EOS blockchain. Producers are essential entities in the EOS network responsible for producing blocks, and this method provides valuable insights into their details and statuses, including active, pending, and proposed producers. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getProducers({ - limit: '10', - lowerBound: '0', - json: true -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Monitoring Network Health:** - Developers and network monitors can use the `get_producers` method to observe the active, pending, and proposed producers, assessing the overall health and consensus of the network. - -2. **Network Statistics:** - This method aids in gathering statistical data about the network, including the number and statuses of producers, facilitating enhanced network analysis and management. - -3. **Voting and Governance:** - `get_producers` can be instrumental for users involved in EOS governance, helping them to make informed decisions by providing a current list of producers along with their statuses. - -### Request Parameters - -The `get_producers` method requires the following parameters in the request body: - -- `limit` (string, required): The total number of producers to retrieve. -- `lowerBound` (string, required): In conjunction with limit, it can be used to paginate through the results. For example, limit=10 and lower_bound=10 would represent page 2. -- `json` (boolean, required): Indicates whether the result should be returned in JSON format. - -### Return Object - -The `getProducers` method typically returns an object containing lists of active, pending, and proposed producers: - -- `active` (Array of objects, nullable): A list of currently active producers. -- `pending` (Array of objects, nullable): A list of producers that are pending. -- `proposed` (Array of objects, nullable): A list of producers that are proposed. - -### JSON-RPC Request Example - -```json -{ - "limit": "10", - "lower_bound": "0", - "json": true -} -``` - -### JSON-RPC Response Example - -```json -{ - "active": [...], - "pending": [...], - "proposed": [...] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_raw_abi.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_raw_abi.md deleted file mode 100644 index 83d30d29..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_raw_abi.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "get_raw_abi" -slug: "rpc-eos-get_raw_abi" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_raw_abi` method is used to fetch the raw, serialized ABI (Application Binary Interface) for a specified account, providing essential details needed for interacting with smart contracts on the EOS network. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const rawAbi = await tatum.rpc.getRawAbi({ accountName: 'b1' }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Smart Contract Interaction:** - Developers or users may use the `get_raw_abi` method to obtain the raw ABI of a smart contract, essential for decoding binary data and enabling effective interaction with the contract. -2. **ABI Analysis and Verification:** - The method allows developers and analysts to study and analyze the ABI of a contract, verify its integrity, and understand its structure and methods by comparing the retrieved `abi_hash` with known hash values. -3. **Development and Debugging:** - This method is crucial for developers during the development and debugging phases, enabling quick access to and assessment of the ABI, ensuring alignment with the contract’s intended design and functionality. - -### Request Parameters - -The `getRawAbi` method has one parameter: - -- `accountName` (string, required): The unique EOSIO account name of the smart contract whose ABI is to be retrieved. - -### Return Object - -The `get_raw_abi` method returns an object with the following parameters: - -- `account_name` (string, required): The name of the account whose ABI was retrieved. -- `code_hash` (string, required): The hash of the smart contract code. -- `abi_hash` (string, required): The hash of the ABI of the smart contract. -- `abi` (string, required): The raw, serialized ABI data. - -### JSON-RPC Request Example - -```json -{ - "account_name": "b1" -} -``` - -### JSON-RPC Response Example - -```json -{ - "account_name": "b1", - "code_hash": "0000000000000000000000000000000000000000000000000000000000000000", - "abi_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "abi": "" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_raw_code_and_abi.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_raw_code_and_abi.md deleted file mode 100644 index b9e47617..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_raw_code_and_abi.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "get_raw_code_and_abi" -slug: "rpc-eos-get_raw_code_and_abi" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_raw_code_and_abi` method is used to retrieve both the raw code and the ABI (Application Binary Interface) for a contract, based on the account name. This is pivotal for developers who wish to interact with, decode, and understand the underlying code and interfaces of smart contracts deployed on the EOS blockchain. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getRawCodeAndAbi({ accountName: 'eosio' }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Understanding Smart Contracts:** - Developers can use the `get_raw_code_and_abi` method to gain insights into the raw code and ABI of smart contracts, enabling them to understand and interact with the contract's methods, state variables, and structures more effectively. - -2. **Development and Debugging:** - This method is crucial for developers in the development and debugging phases, allowing for precise interaction and validation of the contract's code and interfaces, thereby facilitating a smoother development process. - -3. **Enhanced Interaction with Smart Contracts:** - With the detailed insight provided by this method, developers can optimize their interaction with the smart contracts, making the development of decentralized applications more efficient and robust. - -### Request Parameters - -The `geRrawCodeAndAbi` method requires the following parameter in the request body: - -- `accountName` (string, required): This can be `NamePrivileged`, `NameBasic`, `NameBid`, or `NameCatchAll`. It represents the name of the account for which the raw code and ABI are being requested. - -### Return Object - -Upon a successful request, the method returns an object containing the following details: - -- `account_name` (string): Name of the account. -- `wasm` (string): The base64 encoded WebAssembly (WASM) code of the smart contract. -- `abi` (string): The base64 encoded ABI of the smart contract. - -### JSON-RPC Request Example - -```json -{ - "account_name": "eosio" -} -``` - -### JSON-RPC Response Example - -```json -{ - "account_name": "eosio", - "wasm": "base64EncodedWASM", - "abi": "base64EncodedABI" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_required_keys.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_required_keys.md deleted file mode 100644 index 1c3e591f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_required_keys.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: "get_required_keys" -slug: "rpc-eos-get_required_keys" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_required_keys` method returns the required keys that are needed to sign a transaction. This feature is extremely valuable for users and developers aiming to ensure secure and accurate transaction signatures, thus maintaining the integrity of transactions within the EOS blockchain. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getRequiredKeys({ - transaction: { /* Transaction Object. See request params below. */ }, - availableKeys: ["EOS..."] -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Secure Transaction Signing:** - Users and developers can use the `get_required_keys` method to identify the specific keys required to sign a transaction, enhancing the security and accuracy of the signing process and avoiding unauthorized or faulty transactions. - -2. **Blockchain Interaction:** - This method is crucial for interactions and operations on the EOS blockchain where transactions are involved, ensuring that only the correct keys are utilized to sign the transactions, maintaining the validity and authenticity of the transactions. - -3. **Smart Contract Interaction:** - Developers interacting with smart contracts on the EOS blockchain can leverage this method to determine the appropriate keys to sign transactions related to smart contract execution, thereby maintaining the correctness and reliability of contract interactions. - -### Request Parameters - -The `getRequiredKeys` method mandates the following parameters in the request body: - -- `transaction` (object, required): Represents the transaction that is set to be signed. - - `expiration`: (string, required) - A date and time indicating when the transaction expires. - - `refBlockNum`: (number, required) - The reference block number. - - `refBlockPrefix`: (number, required) - The reference block prefix. - - `maxNetUsageWords`: (string | number, required) - The maximum net usage words. - - `maxCpuUsageMs`: (string | number, required) - The maximum CPU usage in milliseconds. - - `delaySec`: (number, required) - The delay in seconds. - - `contextFreeActions`: (Array of Action, required) - Context-free actions. - - `account`: (string, required) - EOSIO account name. - - `name`: (string, required) - Name of the action. - - `authorization`: (Array of objects, required) - - `actor`: (string, required) - EOSIO account name that is the actor. - - `permission`: (string, required) - Permission level for the actor. - - `data`: (object, required) - - `hexData`: (string, required) - Hexadecimal representation of the data for the action. - - `actions` (Array of objects, required) - - `account`: (string, required) - EOSIO account name. - - `name`: (string, required) - Name of the action. - - `authorization` (Array of objects, required) - - `actor`: (string, required) - EOSIO account name that is the actor. - - `permission`: (string, required) - Permission level for the actor. - - `data`: (object, required) - - `hexData`: (string, required) - Hexadecimal representation of the data for the action. -- `availableKeys` (array of strings, required): Represents the available public keys. - -### Return Object - -The `get_required_keys` method typically returns an object containing the keys that are required to sign the transaction. - -### JSON-RPC Request Example - -```json -{ - "transaction": { /* Transaction Object */ }, - "available_keys": ["EOS..."] -} -``` - -## JSON-RPC Response Example - -```json -{ - "required_keys": ["EOS..."] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_table_by_scope.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_table_by_scope.md deleted file mode 100644 index b7e28d85..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_table_by_scope.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "get_table_by_scope" -slug: "rpc-eos-get_table_by_scope" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_table_by_scope` method retrieves the table scope for a given contract in the EOS blockchain. It is essential for developers and users who interact with smart contracts and need to query table data associated with a specific contract. This method provides flexibility by allowing filtered and limited results, making it highly adaptable to various use cases. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getTableByScope({ - code: 'eosio.token', - table: 'accounts', - lowerBound: '0', - upperBound: '100', - limit: 10, - reverse: false, - show_payer: false -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Smart Contract Interaction:** - Developers can use this method to interact with and retrieve table data for a specific contract, which is crucial for accurate and efficient contract interaction and validation. - -2. **Data Analysis and Management:** - By retrieving table scope, users and developers can perform detailed data analysis and management, which aids in optimizing and improving smart contract functionalities. - -3. **Enhanced Querying:** - The flexible filtering options provided by this method facilitate enhanced querying capabilities, allowing users to retrieve precise and relevant data according to their requirements. - -### Request Parameters - -The `getTableByScope` method requires the following parameters in the request body: - -- `code` (string, required): The name of the contract to return table data for. -- `table` (string): To filter the results by table. -- `lowerBound` (string): Filters results to return the first element that is not less than the provided value in set. -- `upperBound` (string): Filters results to return the first element that is greater than the provided value in set. -- `limit` (integer , default: 10): Limit the number of results returned. -- `reverse` (boolean, default: false): Reverse the order of returned results. -- `showPayer` (boolean, default: false): Show RAM payer. - -### Return Object - -The `get_table_by_scope` method typically returns an array containing the requested table scope details related to the specified contract. - -### JSON-RPC Request Example - -```json -{ - "code": "eosio.token", - "table": "accounts", - "lower_bound": "0", - "upper_bound": "100", - "limit": 10, - "reverse": false, - "show_payer": false -} -``` - -### JSON-RPC Response Example - -```json -{ - "rows": [ - { - "code": "eosio.token", - "scope": "........ehbo5", - "table": "stat", - "payer": "eosio.token", - "count": 1 - } - ], - "more": "111222333445" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_table_rows.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_table_rows.md deleted file mode 100644 index 474f6e15..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-get_table_rows.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "get_table_rows" -slug: "rpc-eos-get_table_rows" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `get_table_rows` method retrieves rows from a specified table in a given smart contract on the EOS blockchain. This method is essential for developers and users who need to interact with and analyze the data stored in smart contract tables. It provides multiple filtering options, ensuring extensive flexibility in querying specific data. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.getTableRows({ - code: 'eosio.token', - table: 'accounts', - scope: 'eosio', - limit: 10 -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Smart Contract Data Interaction:** - Developers may find this method critical for interacting with the data within the tables of a smart contract, allowing for effective management and analysis of stored data. - -2. **Detailed Data Analysis:** - Users can employ this method to conduct detailed data analysis, which is pivotal for optimizing data use in smart contracts and enhancing functionalities. - -3. **Enhanced Query Flexibility:** - The diverse filtering options of this method enable the querying of specific data according to user needs, ensuring efficient and effective data retrieval and interaction. - -### Request Parameters - -The `getTableRows` method requires the following parameters in the request body: - -- `code` (string, required): The name of the smart contract that controls the provided table. -- `table` (string, required): The name of the table to query. -- `scope` (string, required): The account to which this data belongs. -- `indexPosition` (string): Position of the index used; accepted parameters are primary, secondary, tertiary, fourth, fifth, sixth, seventh, eighth, ninth, tenth. -- `keyType` (string): The type of key specified by indexPosition (e.g., uint64_t or name). -- `encodeType` (string): The encoding type used. -- `lowerBound` (string): Filters results to return the first element that is not less than the provided value in set. -- `upperBound` (string): Filters results to return the first element that is greater than the provided value in set. -- `limit` (integer , default: 10): Limits the number of results returned. -- `reverse` (boolean, default: false): Reverses the order of returned results. -- `showPayer` (boolean, default: false): Shows RAM payer. - -### Return Object - -The `get_table_rows` method typically returns an object containing the requested rows from the specified table associated with the provided smart contract. - -### JSON-RPC Request Example - -```json -{ - "code": "eosio.token", - "table": "accounts", - "scope": "eosio", - "limit": 10 -} -``` - -### JSON-RPC Response Example - -```json -{ - "rows": [ - {"30010000000000000000000000000000011030555d4db7b23b01000000000000000000000000003041000000000000000000000000000000000000000000000000000000000000000000"}, - {"c00e000000000000000000000000000000c0270900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}, - {"002400000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}, - {"50330000000000000000000000000000004c040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"} - ], - "more": true, - "next_key": "595056260442244752" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-push_transaction.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-push_transaction.md deleted file mode 100644 index 86a3c33a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-push_transaction.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: "push_transaction" -slug: "rpc-eos-push_transaction" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `push_transaction` method is utilized to transmit a transaction to the EOS blockchain. This method takes a transaction in JSON format and endeavors to apply it to the blockchain, facilitating numerous interactions such as transferring tokens and invoking smart contracts. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const transaction = { - signatures: [/* array of signatures */], - compression: false, - packedContextFreeData: 'string', // json to hex - packedTrx: 'string' // Transaction object json to hex -} - -const response = await tatum.rpc.pushTransaction(transaction) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Transaction Submission:** - Developers and users might employ the `push_transaction` method to broadcast transactions to the EOS network, allowing for various interactions and operations on the blockchain. - -2. **Smart Contract Interaction:** - Invoking actions on smart contracts deployed on the EOS blockchain is another crucial functionality of this method, granting users the ability to interface with decentralized applications. - -3. **Token Transfer:** - For transferring EOS tokens or other tokens available on the EOS blockchain between accounts, the `push_transaction` method is used. - -### Request Parameters - -The `pushTransaction` method mandates the following parameters in the request body: - -- `signatures` (array of strings, required) - An array of strings representing signatures needed to authorize the transaction. -- `compression` (boolean, required) - A boolean indicating the status of compression used, typically false. -- `packedContextFreeData` (string, required) - Represents the JSON converted to hex. -- `packedTrx` (string, required) - Specifies the transaction object, converted from JSON to hex. - -### Return Object - -When a transaction is successfully broadcasted, the `push_transaction` method typically returns nothing but a 200 OK status. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "push_transaction", - "params": { - "signatures": ["SIG_K1_..."], - "compression": false, - "packedContextFreeData": "746573742064617461", // Example hex of JSON data - "packedTrx": "00e1f5055c95b089c2e0d0e4" // Example hex of JSON transaction object - } -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-push_transactions.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-push_transactions.md deleted file mode 100644 index c85545cf..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-push_transactions.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: "push_transactions" -slug: "rpc-eos-push_transactions" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `push_transactions` method is designed to submit multiple transactions to the EOS blockchain simultaneously. This method expects an array of transactions in JSON format and attempts to apply them to the blockchain, enabling a range of blockchain interactions like transferring tokens, invoking smart contracts, and more. - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const transactions = [{ - expiration: "2023-09-27T10:00:00", - refBlockNum: 12345, - refBlockPrefix: 67890, - maxNetUsageWords: "10", - maxCpuUsageMs: "10", - delaySec: 0, - contextFreeActions: [], - actions: [], - transactionExtensions: [] -}] - -const response = await tatum.rpc.pushTransaction(transactions) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Bulk Transaction Submission:** - Developers and users can use the `push_transactions` method to broadcast multiple transactions to the EOS network in one go, facilitating various blockchain interactions and operations. - -2. **Bulk Smart Contract Interaction:** - This method is vital for invoking actions on multiple smart contracts deployed on the EOS blockchain, allowing users to interact with multiple decentralized applications simultaneously. - -3. **Bulk Token Transfer:** - `push_transactions` is used for transferring EOS tokens or other tokens deployed on the EOS blockchain between multiple accounts in a single request. - -### Request Parameters - -The `pushTransactions` method requires the following parameters in the request body: - -- `transactions` (array of Transaction Objects, required), each containing: - - `expiration` (string, required): Time that the transaction must be confirmed by. - - `refBlockNum` (integer, required) - - `refBlockPrefix` (integer, required): 32-bit portion of block ID. - - `maxNetUsageWords` (string or integer, required): A whole number. - - `maxCpuUsageMs` (string or integer, required): A whole number. - - `delaySec` (integer, required): Number of seconds to delay execution (used for scheduling). - - `contextFreeActions` (array of objects, required): Actions that are context-free. - - `actions` (array of objects, required): Actions that are context-dependent. - - `transactionExtensions` (array of array of integers or strings): Extensions to the transaction. - -### Return Object - -Upon successful broadcast of transactions, the `push_transactions` method typically does not return any object but acknowledges with a 200 OK status. - -### JSON-RPC Request Example - -```json -[ - { - "expiration": "2023-09-27T10:00:00", - "ref_block_num": 12345, - "ref_block_prefix": 67890, - "max_net_usage_words": "10", - "max_cpu_usage_ms": "10", - "delay_sec": 0, - "context_free_actions": [], - "actions": [], - "transaction_extensions": [] - } -] -``` - -### JSON-RPC Response Example - -200 OK status implies successful broadcast, and typically no object is returned. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-send_transaction.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-send_transaction.md deleted file mode 100644 index 80397a2e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-send_transaction.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "send_transaction" -slug: "rpc-eos-send_transaction" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:39 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `send_transaction` method is designed to submit a transaction to the EOS blockchain. This method expects a transaction in JSON format and will attempt to apply it to the blockchain, enabling various blockchain interactions such as transferring tokens, invoking smart contracts, etc. -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const response = await tatum.rpc.sendTransaction({ - signatures: [/* array of signatures */], - compression: false, - packedContextFreeData: 'string', // json to hex - packedTrx: 'string' // Transaction object json to hex -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Example use cases: - -1. **Transaction Submission:** - Developers and users can utilize the `send_transaction` method to broadcast their transactions to the EOS network, enabling various blockchain interactions and operations. - -2. **Smart Contract Interaction:** - This method is crucial for invoking actions on smart contracts deployed on the EOS blockchain, allowing users to interact with decentralized applications. - -3. **Token Transfer:** - `send_transaction` is used for transferring EOS tokens or other tokens deployed on the EOS blockchain between accounts. - -### Request Parameters - -The `sendTransaction` method requires the following parameters in the request body: - -- `signatures` (array of strings, required): Array of signatures required to authorize the transaction. -- `compression` (boolean): Compression used, usually false. -- `packedContextFreeData` (string): JSON converted to hex. -- `packedTrx` (string): Transaction object converted from JSON to hex. - -### Return Object - -The `send_transaction` method typically does not return any object but acknowledges with a 200 OK status upon a successful transaction broadcast. - -### JSON-RPC Request Example - -```json -{ - "signatures": ["SIG_K1_..."], - "compression": false, - "packed_context_free_data": "0x...", - "packed_trx": "0x..." -} -``` - -### JSON-RPC Response Example - -200 OK status implies successful broadcast, and typically no object is returned. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-trace-api-get_block.md b/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-trace-api-get_block.md deleted file mode 100644 index 25cb7c56..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-eos/rpc-eos-trace-api-get_block.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: "trace-api-get_block" -slug: "rpc-eos-trace-api-get_block" -excerpt: "Eos RPC" -hidden: false -metadata: - description: "Eos RPC" - image: [] - keywords: "eos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -{% hint style="warning" %} -Please note that you are able to get data only from block number 260742168 and newer. -{% endhint %} - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Eos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.EOS }) - -const block = await tatum.rpc.traceApiGetBlock({ blockNum: '260742168' }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -{% hint style="info" %} -This method is available only on the full archive node. -{% endhint %} - -### Overview - -The `get_block` method of the Trace API retrieves detailed information concerning a specific block in the blockchain, returning a JSON object that conforms to the BlockTraceV1 schema. This method is crucial for applications and services requiring access to block and transaction details such as the list of transactions, actions within those transactions, the producer of the block, and more. - -### Example use cases: - -1. **Block Verification:** - Developers or validators might use the `get_block` method to fetch specific block details for the purpose of verifying block information. It allows the comparison of block data retrieved from different nodes to ensure data consistency and integrity across the network. - -2. **Transaction Confirmation:** - Users and services might utilize the `get_block` method to confirm transaction inclusion within a block. By examining the transactions field of the returned block object, users can ascertain whether a specific transaction has been included and, consequently, confirm its successful execution. - -3. **Data Analysis and Chain Exploration:** - Researchers and analysts can employ the `get_block` method to retrieve detailed block data for analytical purposes, exploring block and transaction patterns, studying network activity, and gaining insights into blockchain operations and behavior. - -### Request Parameters - -The `getBlock` method accepts the following parameters: - -- `blockNum` (integer, required): The height of this block in the chain. - -### Return Object - -The return object provides detailed information about the requested block and contains the following fields: - -- `id` (string): A unique identifier for the block. -- `number` (integer): The height of this block in the chain. -- `previous_id` (string): The unique identifier of the previous block in the chain. -- `status` (string): String indicating whether the block is "pending" or "irreversible". -- `timestamp` (string): The timestamp when the block was produced. -- `producer` (string): Information about who produced the block. -- `transaction_mroot` (string): The Merkle root of all transactions in the block. -- `action_mroot` (string): The Merkle root of all actions in the block. -- `schedule_version` (integer): Indicates the number of times the producer schedule has changed since genesis. -- `transactions` (array): An array containing TransactionTraceV1 objects representing each transaction included in the block. - -### JSON-RPC Request Example - -```json -{ - "block_num": "260742168" -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": "string", - "number": 0, - "previous_id": "string", - "status": "string", - "timestamp": "string", - "producer": "string", - "transactions": [ - { - "id": "string", - "actions": [ - { - "global_sequence": 0, - "receiver": "string", - "account": "string", - "action": "string", - "authorization": [ - { - "account": "string", - "permission": "string" - } - ], - "data": {} - } - ] - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana.md b/v1.0/RPC Nodes/rpc-others/rpc-solana.md deleted file mode 100644 index 5547c56d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Solana" -slug: "rpc-solana" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Wed Mar 06 2024 13:09:53 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getaccountinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getaccountinfo.md deleted file mode 100644 index 08f10f44..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getaccountinfo.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "getaccountinfo" -slug: "rpc-solana-getaccountinfo" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getAccountInfo('ChkH4bTk7c5NSGbxvXx89yY2oU7rFJsr3Cq1gPNCCPVe') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAccountInfo` RPC method is used to fetch and retrieve specific and detailed information about a particular account on the Solana blockchain. This information includes the current state of the account, its associated data, and the account's current balance. - -This method could be used in scenarios where detailed account data is required, for example, to verify transactions, check account balances, or to review the account's history. - -{% embed url=" %} - -### Parameters - -The `getAccountInfo` method accepts two parameters: - -- `accountPubkey`(string, required): The public key of the account for which information is to be fetched. - - Example: `"ChkH4bTk7c5NSGbxvXx89yY2oU7rFJsr3Cq1gPNCCPVe"` -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `encoding` (string, optional): Encoding format for Account data - - Values: `base58` `base64` `base64+zstd` `jsonParsed` - -### Return object - -The `getAccountInfo` method returns an object containing the following fields: - -- `context`: An object containing details about the context in which the account information was fetched. - - `slot`: The slot at which the data was fetched. -- `value`: An object containing the account's information. - - `owner`: The public key of the account's owner. - - `lamports`: The account's current balance. - - `data`: data associated with the account, either as encoded binary data or JSON format `{: }` - depending on encoding parameter - - `executable`: Whether the account is marked as executable. - - `rentEpoch`: The rent epoch value of the account. - - `size`: The data size of the account - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getAccountInfo", - "params": [ - "ChkH4bTk7c5NSGbxvXx89yY2oU7rFJsr3Cq1gPNCCPVe", - { - "commitment": "finalized", - "encoding": "base64" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "context": { - "slot": 123456 - }, - "value": { - "owner": "Base58('11111111111111111111111111111111')", - "lamports": 1000000, - "data": "Base64('...')", - "executable": false, - "rentEpoch": 20, - "size": 120 - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getbalance.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getbalance.md deleted file mode 100644 index 47737f41..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getbalance.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "getbalance" -slug: "rpc-solana-getbalance" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getBalance('8Ew6iQXcTRHAUNNu3X9VBn1g1bJkXEZJ9gFD2AGKtdPB') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBalance` RPC method is used to retrieve the current balance of a specified account on the Solana blockchain. It's a straightforward and efficient way to monitor and keep track of account balances. - -This method is typically used in scenarios where you need to check the available balance before initiating a transaction or for accounting purposes in a wallet application. - -### Parameters - -The `getBalance` method requires one parameter: - -- (string, required) Pubkey of account to query, as base-58 encoded string - - Example: `"8Ew6iQXcTRHAUNNu3X9VBn1g1bJkXEZJ9gFD2AGKtdPB"` - -### Return object - -The `getBalance` method returns an object containing the following fields: - -- `context`: An object containing details about the context in which the balance was fetched. - - `slot`: The slot at which the data was fetched. -- `value`: The current balance of the account, in lamports. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getBalance", - "params": [ - "8Ew6iQXcTRHAUNNu3X9VBn1g1bJkXEZJ9gFD2AGKtdPB", - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "context": { - "slot": 194573649 - }, - "value": 2484257209 - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblock.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblock.md deleted file mode 100644 index 4f6641e3..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblock.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -title: "getblock" -slug: "rpc-solana-getblock" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const slotNumber = 430 - -const config = { - encoding: "jsonParsed", - transactionDetails: "full", - rewards: false, - maxSupportedTransactionVersion: 0, -} - -const res = await tatum.rpc.getBlock(slotNumber, config) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlock` method returns identity and transaction information about a confirmed block in the ledger. It provides detailed data about each transaction within the block, including pre and post transaction balances, transaction status, fees charged, and more. - -This method is essential for blockchain explorers or any application that needs to track and represent blockchain transaction data. For instance, it could be used by a wallet application to show transaction details or by a network analytics tool for data gathering and analysis. - -{% embed url=" %} - -### Parameters - -This method takes the following parameters: - -- `slot` (number, required): Slot number -- `options` (object, optional): This object can contain the following fields: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `encoding` (string, optional): Encoding format for each returned transaction. The default is `json`. Other possible values include: `jsonParsed`, `base58`, `base64`. - - `transactionDetails` (string, optional): Level of transaction detail to return. The default is `full`. Other possible values include: `accounts`, `signatures`, `none`. - - `maxSupportedTransactionVersion` (number, optional): The max transaction version to return in responses. - - `rewards` (bool, optional): Whether to populate the `rewards` array. The default includes rewards. - -### Return Object - -The method returns a JSON object that includes detailed information about the block and the transactions it contains. If the specified block is not confirmed, the result will be `null`. - -The returned JSON object includes the following fields: - -- `blockhash`: The blockhash of this block, as base-58 encoded string. -- `previousBlockhash`: The blockhash of this block's parent, as base-58 encoded string. If the parent block is not available due to ledger cleanup, this field will return "11111111111111111111111111111111". -- `parentSlot`: The slot index of this block's parent. -- `transactions`: An array of JSON objects containing detailed transaction information. This field is present if "full" transaction details are requested. - - `transaction:` Transaction object, either in JSON format or encoded binary data, depending on encoding parameter - - `meta:` Transaction status metadata object, containing `null` or: - - `err:` Error if transaction failed, null if transaction succeeded. TransactionError definitions - - `fee:` Fee this transaction was charged, as u64 integer - - `preBalances:` Array of numbers representing account balances from before the transaction was processed - - `postBalances:` Array of numbers representing account balances after the transaction was processed - - `innerInstructions:` List of inner instructions or `null` if inner instruction recording was not enabled during this transaction - - `preTokenBalances:` List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transaction - - `postTokenBalances:` List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transaction - - `logMessages:` Array of string log messages or `null` if log message recording was not enabled during this transaction - - `rewards:` Transaction-level rewards, populated if rewards are requested; an array of JSON objects containing: - - `pubkey:` The public key, as base-58 encoded string, of the account that received the reward - - `lamports:` Number of reward lamports credited or debited by the account - - `postBalance:` Account balance in lamports after the reward was applied - - `rewardType:` Type of reward: "fee", "rent", "voting", "staking" - - `commission:` Vote account commission when the reward was credited, only present for voting and staking rewards - - DEPRECATED: `status:` Transaction status - - `"Ok":` Transaction was successful - - `"Err":` Transaction failed with TransactionError - - `loadedAddresses:` Transaction addresses loaded from address lookup tables. Undefined if `maxSupportedTransactionVersion` is not set in request params. - - `writable:` Ordered list of base-58 encoded addresses for writable loaded accounts - - `readonly:`Ordered list of base-58 encoded addresses for readonly loaded accounts - - `returnData:` The most-recent return data generated by an instruction in the transaction, with the following fields: - - `programId:` The program that generated the return data, as base-58 encoded Pubkey - - `data:` The return data itself, as base-64 encoded binary data - - `computeUnitsConsumed:` Number of compute units consumed by the transaction - - `version:` Transaction version. Undefined if `maxSupportedTransactionVersion` is not set in request params. -- `signatures`: An array of signatures strings, corresponding to the transaction order in the block. This field is present if "signatures" are requested for transaction details. -- `rewards`: Block-level rewards, present if rewards are requested. -- `blockTime`: Estimated production time, as Unix timestamp (seconds since the Unix epoch). -- `blockHeight`: The number of blocks beneath this block. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getBlock", - "params": [ - 430, - { - "encoding": "json", - "maxSupportedTransactionVersion": 0, - "transactionDetails": "full", - "rewards": false - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "blockHeight": 428, - "blockTime": null, - "blockhash": "3Eq21vXNB5s86c62bVuUfTeaMif1N2kUqRPBmGRJhyTA", - "parentSlot": 429, - "previousBlockhash": "mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B", - "transactions": [ - { - "meta": { - "err": null, - "fee": 5000, - "innerInstructions": [], - "logMessages": [], - "postBalances": [499998932500, 26858640, 1, 1, 1], - "postTokenBalances": [], - "preBalances": [499998937500, 26858640, 1, 1, 1], - "preTokenBalances": [], - "rewards": null, - "status": { - "Ok": null - } - }, - "transaction": { - "message": { - "accountKeys": [ - "3UVYmECPPMZSCqWKfENfuoTv51fTDTWicX9xmBD2euKe", - "AjozzgE83A3x1sHNUR64hfH7zaEBWeMaFuAN9kQgujrc", - "SysvarS1otHashes111111111111111111111111111", - "SysvarC1ock11111111111111111111111111111111", - "Vote111111111111111111111111111111111111111" - ], - "header": { - "numReadonlySignedAccounts": 0, - "numReadonlyUnsignedAccounts": 3, - "numRequiredSignatures": 1 - }, - "instructions": [ - { - "accounts": [1, 2, 3, 0], - "data": "37u9WtQpcm6ULa3WRQHmj49EPs4if7o9f1jSRVZpm2dvihR9C8jY4NqEwXUbLwx15HBSNcP1", - "programIdIndex": 4 - } - ], - "recentBlockhash": "mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B" - }, - "signatures": [ - "2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv" - ] - } - } - ] - }, - "id": 1 -}js -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockcommitment.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockcommitment.md deleted file mode 100644 index f773d0a5..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockcommitment.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "getblockcommitment" -slug: "rpc-solana-getblockcommitment" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getBlockCommitment(5) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockCommitment` method returns the commitment for a particular block. Commitment in Solana refers to the amount of cluster stake in lamports that has voted on the block at each depth from 0 to `MAX_LOCKOUT_HISTORY` + 1. - -This method is crucial for understanding the level of consensus or agreement about a block in the network, as it indicates how much of the network's total stake has confirmed the block. It can be used by blockchain explorers to show the confirmation status of transactions and by network monitors to track the progress of the blockchain. - -{% embed url=" %} - -### Parameters - -This method takes the following parameter: - -- `number` (required): The block number, identified by Slot. - -### Return Object - -The method returns a JSON object that includes detailed information about the block's commitment and the total active stake in the current epoch. If the specified block is not known, the `commitment` field will be `null`. - -The returned JSON object includes the following fields: - -- `commitment`: Commitment, comprising either: - - `` - Unknown block. - - `` - Commitment, an array of integers logging the amount of cluster stake in lamports that has voted on the block at each depth from 0 to `MAX_LOCKOUT_HISTORY` + 1. -- `totalStake`: The total active stake, in lamports, of the current epoch. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getBlockCommitment", - "params": [5] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "commitment": [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 10, 32 - ], - "totalStake": 42 - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockheight.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockheight.md deleted file mode 100644 index aece75e9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockheight.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "getblockheight" -slug: "rpc-solana-getblockheight" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getBlockHeight() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockHeight` method returns the current block height of the node. Block height refers to the number of blocks preceding the current one in the blockchain. - -This method is beneficial for understanding the current status of the blockchain, as it provides the most recent block number processed by the node. It can be used for monitoring the progress of the blockchain, troubleshooting node synchronisation issues, and determining the confirmation status of a transaction by comparing its block number with the current block height. - -{% embed url=" %} - -### Parameters - -`options` (object, optional): This object can contain the following fields: - -- `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` -- `minContextSlot` (number, optional): This field can be used to specify the minimum slot that the request can be evaluated at. - -### Return Object - -The method returns a single number, representing the current block height. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"getBlockHeight" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 1233, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockproduction.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockproduction.md deleted file mode 100644 index 5127ae04..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockproduction.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "getblockproduction" -slug: "rpc-solana-getblockproduction" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getBlockProduction() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockProduction` method provides information about the recent block production from the current or previous epoch. This can be used to monitor the performance and activity of validators on the Solana network. - -{% embed url=" %} - -### Parameters - -- `options` (object, optional): This object can contain the following fields: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `identity` (string, optional): Only return results for this validator identity (base-58 encoded). - - `range` (object, optional): Slot range to return block production for. - - `firstSlot` (number): First slot to return block production information for (inclusive). - - `lastSlot` (number, optional): Last slot to return block production information for (inclusive). - -### Return Object - -The result will be a JSON object with value equal to object with the following fields: - -- `byIdentity` (object): A dictionary of validator identities, as base-58 encoded strings. The value is a two-element array containing the number of leader slots and the number of blocks produced. -- `range` (object): Block production slot range with fields `firstSlot` and `lastSlot` indicating the first and last slot of block production information respectively. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getBlockProduction" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 9887 - }, - "value": { - "byIdentity": { - "85iYT5RuzRTDgjyRa3cP8SYhM2j21fj7NhfJ3peu1DPr": [9888, 9886] - }, - "range": { - "firstSlot": 0, - "lastSlot": 9887 - } - } - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblocks.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblocks.md deleted file mode 100644 index 52fe6bab..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblocks.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "getblocks" -slug: "rpc-solana-getblocks" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getBlocks(5,10) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlocks` method returns a list of confirmed blocks between two specified slots. This can be useful when needing to examine a specific range of blocks for transaction analysis, data verification, or other blockchain analysis tasks. - -### Parameters - -- `endSlot` (number, required): This is the upper limit of the slot range from which blocks are to be returned. -- `startSlot` (number, optional): This is the lower limit of the slot range. If not provided, the method will return blocks from the start of the blockchain to the `endSlot`. Note that `startSlot` must be no more than 500,000 blocks lower than the `end_slot`. -- `options` (object, optional): This object can contain the following fields: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` Note that `processed` is not supported. - -### Return Object - -The method returns an array of integers, each representing a confirmed block between `startSlot` and either `endSlot` (if provided) or the latest confirmed block, inclusive. The maximum range allowed is 500,000 slots. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getBlocks", - "params": [5, 10] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": [5, 6, 7, 8, 9, 10], - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockswithlimit.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockswithlimit.md deleted file mode 100644 index 5aa02b2d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblockswithlimit.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "getblockswithlimit" -slug: "rpc-solana-getblockswithlimit" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getBlocksWithLimit(5, 3) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlocksWithLimit` method returns a list of confirmed blocks starting at a given slot and up to a specified limit. This can be helpful when you need to retrieve a specific number of recent blocks for transaction analysis or blockchain data verification purposes. - -### Parameters - -This method requires and optionally accepts the following parameters: - -- `startSlot` (number, required): This is the slot from which the method will start returning blocks. -- `limit` (number, optional): This is the number of blocks to be returned starting from the `startSlot`. If not provided, the method will return all blocks from the `startSlot` to the end of the blockchain. Note that `limit` must be no more than 500,000 blocks higher than the `startSlot`. -- `options` (object, optional): This object can contain the following fields: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` Note that `processed` is not supported. - -### Return Object - -The method returns an array of integers, each representing a confirmed block starting from the `startSlot` and up to the `limit` blocks, inclusive. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id":1, - "method":"getBlocksWithLimit", - "params":[5, 3] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": [5, 6, 7], - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblocktime.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblocktime.md deleted file mode 100644 index 706bd9be..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getblocktime.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "getblocktime" -slug: "rpc-solana-getblocktime" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getBlockTime(5) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockTime` method returns the estimated production time of a block. Each validator in the Solana network reports their UTC time to the ledger at regular intervals by intermittently adding a timestamp to a vote for a specific block. A requested block's time is then calculated from the stake-weighted mean of these vote timestamps recorded on the ledger in a set of recent blocks. - -This method is useful in understanding when a particular block was produced, which is essential for various analysis and audit purposes. - -{% embed url=" %} - -### Parameters - -- `blockNumber` (number, required): This is the number of the block for which you want to retrieve the production time. The block number is identified by its slot. - -### Return Object - -The method returns an integer or null: - -- If the production time of the block is available, the method returns the estimated production time as a Unix timestamp (seconds since the Unix epoch). -- If the production time of the block is not available, the method returns null. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", "id":1, - "method": "getBlockTime", - "params":[5] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 1574721591, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getclusternodes.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getclusternodes.md deleted file mode 100644 index 0c938a45..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getclusternodes.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "getclusternodes" -slug: "rpc-solana-getclusternodes" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getClusterNodes() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getClusterNodes` method returns information about all the nodes participating in the cluster. This method can be used for network analysis, monitoring, and audit purposes. For example, you can use it to track the versions of software running on various nodes, identify the public keys of nodes, or determine the network addresses for various services. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The method returns an array of JSON objects, each containing the following fields: - -- `pubkey`: Node's public key, as base-58 encoded string. -- `gossip`: Gossip network address for the node. -- `tpu`: TPU network address for the node. -- `rpc`: JSON RPC network address for the node, or `null` if the JSON RPC service is not enabled. -- `version`: The software version of the node, or `null` if the version information is not available. -- `featureSet`: The unique identifier of the node's feature set. -- `shredVersion`: The shred version the node has been configured to use. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getClusterNodes" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": [ - { - "gossip": "10.239.6.48:8001", - "pubkey": "9QzsJf7LPLj8GkXbYT3LFDKqsj2hHG7TA3xinJHu8epQ", - "rpc": "10.239.6.48:8899", - "tpu": "10.239.6.48:8856", - "version": "1.0.0 c375ce1f" - } - ], - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getepochinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getepochinfo.md deleted file mode 100644 index e331dc6d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getepochinfo.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "getepochinfo" -slug: "rpc-solana-getepochinfo" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getEpochInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getEpochInfo` method returns information about the current epoch on the Solana network. This includes the current slot, block height, epoch number, slot index, the number of slots in this epoch, and the total number of transactions processed without error since genesis. This data can be essential for developers and operators of Solana nodes to understand the current state of the network and to track its progress over time. - -{% embed url=" %} - -### Parameters - -- `options` (object, optional): A configuration object containing: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at. - -### Return Object - -The result field will be an object with the following fields: - -- `absoluteSlot`: The current slot. -- `blockHeight`: The current block height. -- `epoch`: The current epoch. -- `slotIndex`: The current slot relative to the start of the current epoch. -- `slotsInEpoch`: The number of slots in this epoch. -- `transactionCount`: Total number of transactions processed without error since genesis. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"getEpochInfo" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "absoluteSlot": 166598, - "blockHeight": 166500, - "epoch": 27, - "slotIndex": 2790, - "slotsInEpoch": 8192, - "transactionCount": 22661093 - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getepochschedule.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getepochschedule.md deleted file mode 100644 index 710bdd97..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getepochschedule.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getepochschedule" -slug: "rpc-solana-getepochschedule" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getEpochSchedule() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getEpochSchedule` method returns the epoch schedule information from this cluster's genesis config. This includes the maximum number of slots in each epoch, the number of slots before the beginning of an epoch to calculate a leader schedule for that epoch, whether epochs start short and grow, the first normal-length epoch, and the first normal slot. This data can be useful for planning and understanding the progression of epochs in the Solana network. - -{% embed url=" %} -Try this Feature -{% endembed %} - -### Parameters - -None - -### Return Object - -The result field will be an object with the following fields: - -- `slotsPerEpoch`: The maximum number of slots in each epoch. -- `leaderScheduleSlotOffset`: The number of slots before beginning of an epoch to calculate a leader schedule for that epoch. -- `warmup`: Whether epochs start short and grow. -- `firstNormalEpoch`: The first normal-length epoch, log2(slotsPerEpoch) - log2(MINIMUM\_SLOTS\_PER\_EPOCH). -- `firstNormalSlot`: MINIMUM\_SLOTS\_PER\_EPOCH \* (2.pow(firstNormalEpoch) - 1). - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"getEpochSchedule" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "firstNormalEpoch": 8, - "firstNormalSlot": 8160, - "leaderScheduleSlotOffset": 8192, - "slotsPerEpoch": 8192, - "warmup": true - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getfeeformessage.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getfeeformessage.md deleted file mode 100644 index 69b72a13..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getfeeformessage.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "getfeeformessage" -slug: "rpc-solana-getfeeformessage" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const message = { - // Message content goes here... -} -const res = await tatum.rpc.getFeeForMessage(message) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getFeeForMessage` method is used to estimate the transaction fee for a given message. This is very useful when you are preparing to send a transaction and you want to estimate the transaction cost. This can be used in situations where you need to validate whether a user has enough funds to cover the transaction fee or to provide an estimate of the cost to the user. - -### Parameters - -- `message`(string, required): Base-64 encoded Message for which the fee should be estimated. - - Example: "`AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA`" -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at - - Example: `1000` - -### Return Object - -The result will be a JSON object with `value` equal to Fee corresponding to the message at the specified blockhash - -### JSON-RPC Request Example - -```json -{ - "id":1, - "jsonrpc":"2.0", - "method":"getFeeForMessage", - "params":[ - "AQABAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAA", - { - "commitment":"processed" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { "context": { "slot": 5068 }, "value": 5000 }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getfirstavailableblock.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getfirstavailableblock.md deleted file mode 100644 index a776f433..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getfirstavailableblock.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getfirstavailableblock" -slug: "rpc-solana-getfirstavailableblock" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getFirstAvailableBlock() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getFirstAvailableBlock` method returns the slot of the lowest confirmed block that has not been purged from the ledger. This method is useful when you want to start parsing the ledger from the oldest available data, or when you want to check how far back the data in your node goes. This can be critical in scenarios where historical block data is required for backtracking transactions or auditing purposes. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The method returns an integer representing the slot of the oldest confirmed block that has not been purged from the ledger. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"getFirstAvailableBlock" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 250000, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getgenesishash.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getgenesishash.md deleted file mode 100644 index 646485cd..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getgenesishash.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getgenesishash" -slug: "rpc-solana-getgenesishash" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getGenesisHash() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getGenesisHash` method returns the genesis hash of the Solana network. The genesis hash is an important piece of information in the blockchain world. It is the initial block or the very first block in a blockchain. The genesis hash can be used for various use cases such as to verify the integrity of data, as a reference point in the blockchain, and for debugging purposes. - -{% embed url=" %} - -### Parameters - -None - -### Return Object - -- Returns a string, which is a Hash as base-58 encoded string. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"getGenesisHash" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": "GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC", - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gethealth.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gethealth.md deleted file mode 100644 index b7a1fca9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gethealth.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "gethealth" -slug: "rpc-solana-gethealth" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getHealth() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getHealth` method is used to monitor the current health of the node. This method can be beneficial for maintenance and troubleshooting purposes. For instance, you may use this method to check the health status of your node periodically or to validate if a newly set up node is functioning correctly. - -Please note that if one or more `--known-validator` arguments are provided to `solana-validator`, "ok" is returned when the node is within `HEALTH_CHECK_SLOT_DISTANCE` slots of the highest known validator; otherwise, an error is returned. If no known validators are provided, "ok" is always returned. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -If the node is healthy, it returns "ok". If the node is unhealthy, a JSON RPC error response is returned. The specifics of the error response are unstable and may change in the future. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getHealth" -} -``` - -### JSON-RPC Response Examples - -- Healthy node response: - - ```json - { "jsonrpc": "2.0", "result": "ok", "id": 1 } - ``` -- Unhealthy node response (generic): - - ```json - { - "jsonrpc": "2.0", - "error": { - "code": -32005, - "message": "Node is unhealthy", - "data": {} - }, - "id": 1 - } - ``` -- Unhealthy node response (if additional information is available): - - ```json - { - "jsonrpc": "2.0", - "error": { - "code": -32005, - "message": "Node is behind by 42 slots", - "data": { - "numSlotsBehind": 42 - } - }, - "id": 1 - } - ``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gethighestsnapshotslot.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gethighestsnapshotslot.md deleted file mode 100644 index a4ac7d78..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gethighestsnapshotslot.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "gethighestsnapshotslot" -slug: "rpc-solana-gethighestsnapshotslot" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getHighestSnapshotSlot() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getHighestSnapshotSlot` method provides the highest slot information for which the node has snapshots. It determines the highest full snapshot slot and, if available, the highest incremental snapshot slot based on the full snapshot slot. - -This method can be used in a variety of scenarios, including managing data storage and synchronisation of blockchain data. By knowing the highest snapshot slot, developers can estimate the amount of data that needs to be downloaded to sync a new node, or to ensure the node is up to date with the current state of the blockchain. - -{% embed url=" %} - -### Parameters - -None - -### Return Object - -When the node has a snapshot, this method returns a JSON object with the following fields: - -- `full`: The highest full snapshot slot. -- `incremental`: The highest incremental snapshot slot based on the full snapshot slot, if available. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"getHighestSnapshotSlot" -} -``` - -### JSON-RPC Response Example - -Here is an example response when the node has a snapshot: - -```json -{ - "jsonrpc": "2.0", - "result": { - "full": 100, - "incremental": 110 - }, - "id": 1 -} -``` - -In case the node does not have a snapshot, the response would be: - -```json -{ - "jsonrpc": "2.0", - "error": { "code": -32008, "message": "No snapshot" }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getidentity.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getidentity.md deleted file mode 100644 index 4f1eb044..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getidentity.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "getidentity" -slug: "rpc-solana-getidentity" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getIdentity() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getIdentity` method is used to retrieve the identity pubkey for the current node. This pubkey represents a unique identifier for the node in the Solana network. - -Use cases for this method might include retrieving the identity of a node for tracking or monitoring purposes, or validating the identity of a node in scenarios where only certain nodes are trusted for certain operations. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The result field will be a JSON object with the following fields: - -- `identity`: The identity pubkey of the current node as a base-58 encoded string. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getIdentity" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "identity": "2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN" - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationgovernor.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationgovernor.md deleted file mode 100644 index a87148a3..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationgovernor.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getinflationgovernor" -slug: "rpc-solana-getinflationgovernor" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getInflationGovernor() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getInflationGovernor` method is used to retrieve the current inflation governor in the Solana blockchain. - -{% embed url=" %} - -### Parameters - -- `options` (object, optional): Configuration object containing the following fields: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - -### Return Object - -The method returns a JSON object with the following fields: - -- `initial`: The initial inflation percentage from time 0. -- `terminal`: Terminal inflation percentage. -- `taper`: Rate per year at which inflation is lowered. The rate reduction is derived using the target slot time in the genesis config. -- `foundation`: Percentage of total inflation allocated to the foundation. -- `foundationTerm`: Duration of foundation pool inflation in years. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getInflationGovernor" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "foundation": 0.05, - "foundationTerm": 7, - "initial": 0.15, - "taper": 0.15, - "terminal": 0.015 - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationrate.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationrate.md deleted file mode 100644 index 8f3f8b94..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationrate.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "getinflationrate" -slug: "rpc-solana-getinflationrate" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getInflationRate() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getInflationRate` method is used to retrieve the specific inflation values for the current epoch in the Solana blockchain. - -{% embed url=" %} - -### Parameters - -No parameters are required for this method. - -### Return Object - -The method returns a JSON object with the following fields: - -- `total`: Total inflation rate. -- `validator`: Inflation allocated to validators. -- `foundation`: Inflation allocated to the foundation. -- `epoch`: The epoch for which these values are valid. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getInflationRate" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "epoch": 100, - "foundation": 0.001, - "total": 0.149, - "validator": 0.148 - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationreward.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationreward.md deleted file mode 100644 index 687fd059..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getinflationreward.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: "getinflationreward" -slug: "rpc-solana-getinflationreward" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:38 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const addresses = ["Address1", "Address2", "Address3"] -const config = { - epoch: 2 -} - -const res = await tatum.rpc.getInflationReward(addresses, config) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getInflationReward` method returns the inflation or staking reward for a list of addresses for a particular epoch on the Solana blockchain. - -### Parameters - -- An array of addresses (array of strings, optional): These are the addresses to query, as base-58 encoded strings. -- A configuration object (optional): This object can contain the following fields: - - `commitment` (string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `epoch` (number, optional): An epoch for which the reward occurs. If omitted, the previous epoch will be used. - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at. - -### Return Object - -The method returns a JSON array where each object represents the reward details for the corresponding address in the input array. Each object has the following fields: - -- `epoch`: The epoch for which the reward occurred. -- `effectiveSlot`: The slot in which the rewards are effective. -- `amount`: The reward amount in lamports. -- `postBalance`: The post-balance of the account in lamports. -- `commission` : The vote account commission when the reward was credited. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getInflationReward", - "params": [ - [ - "6dmNQ5jwLeLk5REvio1JcMshcbvkYMwy26sJ8pbkvStu", - "BGsqMegLpV6n6Ve146sSX2dTjUMj3M92HnU8BbNRMhF2" - ], - {"epoch": 2} - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": [ - { - "amount": 2500, - "effectiveSlot": 224, - "epoch": 2, - "postBalance": 499999442500 - }, - null - ], - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getlargestaccounts.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getlargestaccounts.md deleted file mode 100644 index 09a52749..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getlargestaccounts.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "getlargestaccounts" -slug: "rpc-solana-getlargestaccounts" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getLargestAccounts() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getLargestAccounts` method returns the 20 largest accounts by lamport balance. This method may cache results for up to two hours. - -### Parameters - -- `options` (object, optional): A configuration object containing: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `filter` (string, optional): Filters the results by account type. Possible values are `circulating` or `nonCirculating`. - -### Return Object - -The result field will be an `RpcResponse` JSON object with a `value` field equal to an array of objects, each containing: - -- `address`: Base-58 encoded address of the account. -- `lamports`: Number of lamports in the account. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getLargestAccounts" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 54 - }, - "value": [ - { - "lamports": 999974, - "address": "99P8ZgtJYe1buSK8JXkvpLh8xPsCFuLYhz9hQFNw93WJ" - }, - { - "lamports": 42, - "address": "uPwWLo16MVehpyWqsLkK3Ka8nLowWvAHbBChqv2FZeL" - }, - // ...additional accounts... - ] - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getlatestblockhash.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getlatestblockhash.md deleted file mode 100644 index 119c1cfa..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getlatestblockhash.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "getlatestblockhash" -slug: "rpc-solana-getlatestblockhash" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getLatestBlockhash({commitment: 'processed'}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getLatestBlockhash` method returns the latest blockhash of the ledger. The blockhash is essential for transaction processing to ensure transaction uniqueness and to provide cryptographic security for the ledger. This method is critical in scenarios where the latest blockhash is needed for transaction signing or to confirm the most recent state of the blockchain. - -{% embed url=" %} - -### Parameters - -- `options` (object, optional): This object can contain the following fields: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at. - -### Return Object - -The method returns a `RpcResponse` JSON object with `value` field set to a JSON object including: - -- `blockhash`: The latest blockhash as a base-58 encoded string. -- `lastValidBlockHeight` : The last block height at which the blockhash will be valid. - -### JSON-RPC Request Example - -```json -{ - "id":1, - "jsonrpc":"2.0", - "method":"getLatestBlockhash", - "params":[ - { - "commitment":"processed" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 2792 - }, - "value": { - "blockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N", - "lastValidBlockHeight": 3090 - } - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getleaderschedule.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getleaderschedule.md deleted file mode 100644 index 2c99b41f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getleaderschedule.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "getleaderschedule" -slug: "rpc-solana-getleaderschedule" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getLeaderSchedule({ - identity: '4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F' -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getLeaderSchedule` method returns the leader schedule for an epoch. This method is useful for understanding the rotation of leadership among the validators, which is key in maintaining a decentralized and secure network. The schedule can be fetched for a specific epoch, or for the current epoch if no parameter is specified. - -### Parameters - -- `slot` (number, optional): Fetch the leader schedule for the epoch that corresponds to the provided slot. If unspecified, the leader schedule for the current epoch is fetched. -- `options` (object, optional): A configuration object containing: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `identity` (string, optional): Only return results for this validator identity (base-58 encoded). - -### Return Object - -The method returns one of the two following values: - -- `null` - If requested epoch is not found. -- `object` - The result field will be a dictionary of validator identities, as base-58 encoded strings, and their corresponding leader slot indices as values (indices are relative to the first slot in the requested epoch). - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getLeaderSchedule", - "params": [ - null, - { - "identity": "4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F": [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63 - ] - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmaxretransmitslot.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmaxretransmitslot.md deleted file mode 100644 index ad40287f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmaxretransmitslot.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getmaxretransmitslot" -slug: "rpc-solana-getmaxretransmitslot" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getMaxRetransmitSlot() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getMaxRetransmitSlot` method returns the highest slot number seen from the retransmit stage. This can be useful for monitoring the progress of the network or for determining the highest slot number that has been processed by a specific node. - -{% embed url=" %} - -### Parameters - -None - -### Return Object - -The method returns a value representing the highest slot number observed in the retransmit stage. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getMaxRetransmitSlot" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 1234, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmaxshredinsertslot.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmaxshredinsertslot.md deleted file mode 100644 index e99138f1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmaxshredinsertslot.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getmaxshredinsertslot" -slug: "rpc-solana-getmaxshredinsertslot" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getMaxShredInsertSlot() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getMaxShredInsertSlot` method returns the highest slot number observed after a shred insert. This can be useful for monitoring the highest slot number that a specific node has processed after the shred insert stage, providing insights into the node's synchronisation status. - -{% embed url=" %} - -### Parameters - -None - -### Return Object - -The method returns a value representing the highest slot number observed after a shred insert. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getMaxShredInsertSlot" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 1234, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getminimumbalanceforrentexemption.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getminimumbalanceforrentexemption.md deleted file mode 100644 index 05e1ad85..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getminimumbalanceforrentexemption.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "getminimumbalanceforrentexemption" -slug: "rpc-solana-getminimumbalanceforrentexemption" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getMinimumBalanceForRentExemption(50) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getMinimumBalanceForRentExemption` method returns the minimum balance required to make an account rent exempt. This is useful when setting up a new account or assessing the cost of maintaining an account in a rent-free state. - -{% embed url=" %} - -### Parameters - -- `dataSize` (number, optional): The account's data length. -- `options` (object, optional): A configuration object containing: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - -### Return Object - -The result field will be a number indicating the minimum lamports required in the account to remain rent free. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getMinimumBalanceForRentExemption", - "params": [50] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 500, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmultipleaccounts.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmultipleaccounts.md deleted file mode 100644 index 261fd390..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getmultipleaccounts.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: "getmultipleaccounts" -slug: "rpc-solana-getmultipleaccounts" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const accounts = [ - "GPHrLJNBeFDkHEChoN6CyHFLroen7jVU3HBmJQXvqGQa", - "4DBehwe4U1gHaE575LZVnjN1MfyPSyWjidadRJoQcyAR", - ]; - -const res = await tatum.rpc.getMultipleAccounts(accounts) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getMultipleAccounts` RPC method fetches information about multiple accounts. This is handy when you need to retrieve data about multiple accounts simultaneously, such as for a portfolio management application or a multi-account wallet. - -{% embed url=" %} - -### Parameters - -The `getMultipleAccounts` method accepts an array of public keys and an optional `GetMultipleAccountsOptions` object: - -- `publicKeys`(array of strings, required): An array of public keys of the accounts to be fetched. - - Example: `["accountPubkey1", "accountPubkey2"]` -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot to include in the response. - - Example: `1000` - - `dataSlice` (object, optional): The range of data to include in the response. - - `offset` (number, optional): The starting index of the data slice. - - Example: `0` - - `length` (number, optional): The length of the data slice. - - Example: `100` - - `encoding` (string, optional): The encoding for the account data. - - Values: `base58` `base64` `base64+zstd` `jsonParsed` - -### Return object - -The result will be a JSON object with `value` equal to an array of: - -- `null` - if the account at that Pubkey doesn't exist, or -- `object` - a JSON object containing: - - `data`: `[string, encoding]|object` - data associated with the account, either as encoded binary data or JSON format `{program: state}` - depending on encoding parameter - - `executable`: A boolean indicating whether the account is executable. - - `lamports`: The current balance of the account, in lamports. - - `owner`: The public key of the account's owner. - - `rentEpoch:`The epoch at which this account will next owe rent, as u64 - - `size:`The data size of the account - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getMultipleAccounts", - "params": [ - ["accountPubkey1", "accountPubkey2"], - { - "commitment": "finalized", - "minContextSlot": 1000, - "dataSlice": { "offset": 0, "length": 100 }, - "encoding": "base64" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "result":{ - "context":{ - "slot":123456 - }, - "value":[ - { - "owner": "Base58('11111111111111111111111111111111')", - "lamports": 1000000, - "data": "Base64('...')", - "executable": false, - "rentEpoch": 20, - "size": 120 - }, - { - "owner": "Base58('11111111111111111111111111111111')", - "lamports": 1000000, - "data": "Base64('...')", - "executable": false, - "rentEpoch": 20, - "size": 120 - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getprogramaccounts.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getprogramaccounts.md deleted file mode 100644 index 65234c47..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getprogramaccounts.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: "getprogramaccounts" -slug: "rpc-solana-getprogramaccounts" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getProgramAccounts('BPFLoaderUpgradeab1e11111111111111111111111') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getProgramAccounts` RPC method retrieves all accounts owned by a specific program on the Solana blockchain. This method can be useful when monitoring the state of a program or tracking the accounts associated with a particular smart contract. - -Currently pagination is not supported. Requests to `getProgramAccounts` should include the `dataSlice` and/or `filters` parameters to improve response time and return only intended results. - -### Parameters - -The `getProgramAccounts` method accepts a program ID and an optional object: - -- `programId`(string, required): Pubkey of program, as base-58 encoded string - - Example: `"BPFLoaderUpgradeab1e11111111111111111111111"` -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at - - Example: `123456` - - `withContext` (boolean, optional): Whether to wrap the result in an RpcResponse JSON object - - Example: `true` - - `encoding` (string, optional): The encoding format for the returned Account data - - Example: `base58` `base64` `base64+zstd` `jsonParsed` - - `dataSlice` (object, optional): Limit the returned account data using the provided \`offset: number\` and \`length: number\` fields; - - only available for "base58", "base64" or "base64+zstd" encodings. - - Example: `{ offset: 0, length: 100 }` - - `filters` (array, optional): An array of filter objects to filter the accounts based on certain conditions. - - Example: `[{ memcmp: { offset: 0, bytes: "base64" } }` - -### Return object - -The `getProgramAccounts` method returns an array of objects, each containing the following fields: - -- `pubkey`: The public key of the account. -- `account`: An object containing: - - `data`: The account's data, encoded according to the requested format. - - `executable`: Whether the account is executable. - - `lamports`: The account's current balance. - - `owner`: The account's owner public key. - - `rentEpoch`: The epoch at which the account will owe rent again. - - `size`: The data size of the account - -If `withContext` is set to true, the response will also include a `context` object: - -- `context`: An object containing details about the context in which the data was fetched. - - `slot`: The slot at which the data was fetched. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getProgramAccounts", - "params": [ - "BPFLoaderUpgradeab1e11111111111111111111111", - { - "commitment": "finalized", - "minContextSlot": 123456, - "withContext": true, - "encoding": "base64", - "dataSlice": { "offset": 0, "length": 100 }, - "filters": [{ "memcmp": { "offset": 0, "bytes": "base64" } }] - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "context": { - "slot": 123456 - }, - "value": [ - { - "pubkey": "9ehXDD5bnhSpFVRf99veikjgq8VajtRH7e3D9aVPLqYd", - "account": { - "data": "base64 encoded data", - "executable": false, - "lamports": 10000, - "owner": "BPFLoaderUpgradeab1e11111111111111111111111", - "rentEpoch": 10 - "size": 120 - } - } - //... more accounts - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getrecentperformancesamples.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getrecentperformancesamples.md deleted file mode 100644 index 0f1acdf3..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getrecentperformancesamples.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: "getrecentperformancesamples" -slug: "rpc-solana-getrecentperformancesamples" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getRecentPerformanceSamples(limit) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getRecentPerformanceSamples` method returns a list of recent performance samples, in reverse slot order. Performance samples are taken every 60 seconds and include the number of transactions and slots that occur in a given time window. This data can be used to monitor network performance and understand the activity within the Solana network. - -{% embed url=" %} - -### Parameters - -- `limit` (usize, optional): The number of samples to return (maximum 720). - -### Return Object - -The result will be an array of objects with the following fields: - -- `slot`: Slot in which sample was taken at. -- `numTransactions`: Number of transactions in sample. -- `numSlots`: Number of slots in sample. -- `samplePeriodSecs`: Number of seconds in a sample window. -- `numNonVoteTransaction`: Number of non-vote transactions in sample. - -Note: `numNonVoteTransaction` is present starting with v1.15. To get the number of voting transactions, compute: numTransactions - numNonVoteTransaction. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"getRecentPerformanceSamples", - "params": [4] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": [ - { - "numSlots": 126, - "numTransactions": 126, - "numNonVoteTransaction": 1, - "samplePeriodSecs": 60, - "slot": 348125 - }, - { - "numSlots": 126, - "numTransactions": 126, - "numNonVoteTransaction": 1, - "samplePeriodSecs": 60, - "slot": 347999 - }, - { - "numSlots": 125, - "numTransactions": 125, - "numNonVoteTransaction": 0, - "samplePeriodSecs": 60, - "slot": 347873 - }, - { - "numSlots": 125, - "numTransactions": 125, - "numNonVoteTransaction": 0, - "samplePeriodSecs": 60, - "slot": 347748 - } - ], - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getrecentprioritizationfees.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getrecentprioritizationfees.md deleted file mode 100644 index 9492c0bd..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getrecentprioritizationfees.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: "getrecentprioritizationfees" -slug: "rpc-solana-getrecentprioritizationfees" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const accounts = ['CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY'] - -const res = await tatum.rpc.getRecentPrioritizationFees(accounts) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getRecentPrioritizationFees` method returns a list of prioritization fees from recent blocks. This method can be used to determine the fees required to prioritize transactions for faster processing. - -{% embed url=" %} - -### Parameters - -- `accountAddresses` (array, optional): An array of account addresses (up to a maximum of 128 addresses), as base-58 encoded strings. - - **Note**: If this parameter is provided, the response will reflect a fee to land a transaction locking all of the provided accounts as writable. - -### Return Object - -The result is an array of objects with the following fields: - -- `slot`: The slot in which the fee was observed. -- `prioritizationFee`: The per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getRecentPrioritizationFees", - "params": [ - ["CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY"] - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": [ - { - "slot": 348125, - "prioritizationFee": 0 - }, - { - "slot": 348126, - "prioritizationFee": 1000 - }, - { - "slot": 348127, - "prioritizationFee": 500 - }, - { - "slot": 348128, - "prioritizationFee": 0 - }, - { - "slot": 348129, - "prioritizationFee": 1234 - } - ], - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsignaturesforaddress.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsignaturesforaddress.md deleted file mode 100644 index 651b2d4f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsignaturesforaddress.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "getsignaturesforaddress" -slug: "rpc-solana-getsignaturesforaddress" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const address = 'H8UvHwUaXKmHyr1UzEy1y5F5KjU6kGXMDFddxEjqJ2Sn' -const options = {limit: 10} // optional - -const res = await tatum.rpc.getSignaturesForAddress(address, options) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getSignaturesForAddress` method fetches the signatures for confirmed transactions that include the given address in their `accountKeys` list. Returns signatures backwards in time from the provided signature or most recent confirmed block. This is especially useful for tracking the transaction history of an address, auditing transactions, or for debugging purposes. - -### Parameters - -- `address`(string, required): The address for which to fetch the transaction signatures. - - Example: `"H8UvHwUaXKmHyr1UzEy1y5F5KjU6kGXMDFddxEjqJ2Sn"` -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at - - Example: `1000` - - `limit`(number, optional): The maximum number of signatures to return (between 1 and 1,000). - - Example: `10` - - `before`(string, optional): Start searching backwards from this transaction signature. If not provided the search starts from the top of the highest max confirmed block. - - Example: `"5Z7dVQaRBAjBjJZVhdJygdAEyRm3N8D1BQot9aJuthFU"` - - `until`(string, optional): Search until this transaction signature, if found before limit reached - - Example: `"5Z7dVQaRBAjBjJZVhdJygdAEyRm3N8D1BQot9aJuthFU"` - -### Return Object - -An array of ``, ordered from **newest** to **oldest** transaction, containing transaction signature information with the following fields: - -- `signature`: The transaction's signature as base-58 encoded string. -- `slot`: The slot in which the transaction was processed. -- `err`: Error if transaction failed, null if transaction succeeded. -- `memo:` Memo associated with the transaction, null if no memo is present -- `blockTime:` Estimated production time, as Unix timestamp (seconds since the Unix epoch) of when transaction was processed. null if not available. -- `confirmationStatus:` The transaction's cluster confirmation status; Either `processed`, `confirmed`, or `finalized`. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getSignaturesForAddress", - "params": [ - "Vote111111111111111111111111111111111111111", - { - "limit": 1 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": [ - { - "err": null, - "memo": null, - "signature": "5h6xBEauJ3PK6SWCZ1PGjBvj8vDdWG3KpwATGy1ARAXFSDwt8GFXM7W5Ncn16wmqokgpiKRLuS83KUxyZyv2sUYv", - "slot": 114, - "blockTime": null - } - // More signatures... - ], - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsignaturestatuses.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsignaturestatuses.md deleted file mode 100644 index a8f2af19..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsignaturestatuses.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: "getsignaturestatuses" -slug: "rpc-solana-getsignaturestatuses" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const signatures = ['4CgnQtRfnUekfn21meTyHYvoAc6pBYK3DhimeiZL6a6o2QXMTHqDomninDkaZLmSfdiEzZfyfLGN4mrDvs8HmnBh'] // list of transaction signatures -const options = {searchTransactionHistory: true} // optional - -const res = await tatum.rpc.getSignatureStatuses(signatures, options) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getSignatureStatuses` method fetches the processing statuses of a list of transactions, identified by their signatures. This is especially useful for tracking the status of transactions, whether they are being processed, confirmed or finalised. - -{% embed url=" %} - -### Parameters - -- `signatures`: (Array of strings, required) An array of transaction signatures to fetch the statuses of. - - Example: `["4CgnQtRfnUekfn21meTyHYvoAc6pBYK3DhimeiZL6a6o2QXMTHqDomninDkaZLmSfdiEzZfyfLGN4mrDvs8HmnBh"]` -- `options` (object, optional): Configuration object containing the following fields: - - `searchTransactionHistory` (bool, optional): if `true` - a Solana node will search its ledger cache for any signatures not found in the recent status cache - - Example: `true` - -### Return Object - -The result will be an RpcResponse JSON object with `value` equal to an array of JSON objects, consisting of either: - -- `null` Unknown transaction, or -- `object` - - `slot:` The slot the transaction was processed - - `confirmations:` Number of blocks since signature confirmation, null if rooted, as well as finalized by a supermajority of the cluster - - `err:` Error if transaction failed, null if transaction succeeded. - - `confirmationStatus:` The transaction's cluster confirmation status; Either `processed`, `confirmed`, or `finalized`. - - DEPRECATED: `status:` Transaction status object - - `"Ok":` Transaction was successful - - `"Err":` Transaction failed with TransactionError - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getSignatureStatuses", - "params": [ - [ - "4CgnQtRfnUekfn21meTyHYvoAc6pBYK3DhimeiZL6a6o2QXMTHqDomninDkaZLmSfdiEzZfyfLGN4mrDvs8HmnBh" - ], - { - "searchTransactionHistory": true - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 82 - }, - "value": [ - { - "slot": 48, - "confirmations": null, - "err": null, - "status": { - "Ok": null - }, - "confirmationStatus": "finalized" - }, - null - ] - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslot.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslot.md deleted file mode 100644 index 43bd8ca8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslot.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "getslot" -slug: "rpc-solana-getslot" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getSlot() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getSlot` method returns the slot that has reached the given or default commitment level. Slots are a fundamental concept in the Solana blockchain, representing the passing of time in the ledger. This method is helpful for tracking the progress of the blockchain and can be used in numerous cases, such as determining the current state of the ledger, or for timekeeping purposes in a DApp. - -{% embed url=" %} - -### Parameters - -- `options` (object, optional): A configuration object containing: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at. - -### Return Object - -The method returns an integer, representing the current slot that has reached the given or default commitment level. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getSlot" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 1234, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslotleader.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslotleader.md deleted file mode 100644 index fe570a0e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslotleader.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "getslotleader" -slug: "rpc-solana-getslotleader" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getSlotLeader() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getSlotLeader` method returns the identity of the node that is currently the leader of the slot. In the Solana network, a slot leader is responsible for producing blocks for the network during their assigned slot time. This method could be used to monitor the network's operation or for analysis of network activity. - -{% embed url=" %} - -### Parameters - -- `options` (object, optional): A configuration object containing: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at. - -### Return Object - -The method returns a string that represents the Node identity Pubkey as a base-58 encoded string. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getSlotLeader" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": "ENvAW7JScgYq6o4zKZwewtkzzJgDzuJAFxYasvmEQdpS", - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslotleaders.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslotleaders.md deleted file mode 100644 index de4ef3de..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getslotleaders.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "getslotleaders" -slug: "rpc-solana-getslotleaders" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getSlotLeaders(100,10) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getSlotLeaders` method returns an array of the slot leaders for a given slot range. In the Solana network, a slot leader is responsible for producing blocks for the network during their assigned slot time. This method could be used to monitor the network's operation, for analysis of network activity, or to understand which nodes have been assigned to produce blocks in the upcoming slots. - -### Parameters - -- `startSlot` (number, optional) -- `limit` (number, optional): Integer between 1 and 5,000. - -### Return Object - -The method returns an array of strings that represents an array of Node identity public keys as base-58 encoded strings. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id": 1, - "method": "getSlotLeaders", - "params": [100, 10] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": [ - "ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n", - "ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n", - "ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n", - "ChorusmmK7i1AxXeiTtQgQZhQNiXYU84ULeaYF1EH15n", - "Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM", - "Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM", - "Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM", - "Awes4Tr6TX8JDzEhCZY2QVNimT6iD1zWHzf1vNyGvpLM", - "DWvDTSh3qfn88UoQTEKRV2JnLt5jtJAVoiCo3ivtMwXP", - "DWvDTSh3qfn88UoQTEKRV2JnLt5jtJAVoiCo3ivtMwXP" - ], - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getstakeactivation.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getstakeactivation.md deleted file mode 100644 index 69bf939f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getstakeactivation.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "getstakeactivation" -slug: "rpc-solana-getstakeactivation" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const pubkey = "CYRJWqiSjLitBAcRxPvWpgX3s5TvmN2SuRY3eEYypFvT" -const config = { - epoch: 4 -} - -const res = await tatum.rpc.getStakeActivation(pubkey, config) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getStakeActivation` method returns epoch activation information for a stake account on the Solana blockchain. - -### Parameters - -This method takes the following parameters: - -- A string (required): This is the pubkey of the stake account to query, as a base-58 encoded string. - - Example: `"CYRJWqiSjLitBAcRxPvWpgX3s5TvmN2SuRY3eEYypFvT"` -- A configuration object (optional): This object can contain the following fields: - - `commitment` (string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at. - - `epoch` (number, optional): The epoch for which to calculate activation details. If this parameter is not provided, it defaults to the current epoch. - -### Return Object - -The method returns a JSON object that includes the following fields: - -- `state`: The activation state of the stake account. This can be 'active', 'inactive', 'activating', or 'deactivating'. -- `active`: The stake that is active during the epoch. -- `inactive`: The stake that is inactive during the epoch. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getStakeActivation", - "params": [ - "CYRJWqiSjLitBAcRxPvWpgX3s5TvmN2SuRY3eEYypFvT", - { - "epoch": 4 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "active": 124429280, - "inactive": 73287840, - "state": "activating" - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getstakeminimumdelegation.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getstakeminimumdelegation.md deleted file mode 100644 index ac05e101..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getstakeminimumdelegation.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "getstakeminimumdelegation" -slug: "rpc-solana-getstakeminimumdelegation" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getStakeMinimumDelegation() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getStakeMinimumDelegation` method is an essential component of Solana's staking process. It returns the minimum delegation amount, expressed in lamports, that is required to stake on the Solana network. The staking process is an integral part of Solana's Proof of Stake consensus mechanism, where stakeholders are rewarded for their participation in securing the network. - -This method is commonly used by wallets and staking services to inform their users about the minimum amount required for staking. By delegating a certain amount of Solana tokens, participants can earn staking rewards and contribute to the network's security. The minimum delegation amount is set by the network to prevent spam and maintain a high level of network performance. - -{% embed url=" %} - -### Parameters - -This method takes the following parameters: - -- A configuration object (optional): This object can contain the following fields: - - `commitment` (string, optional): The level of commitment desired for the query. - -### Return Object - -The return object contains a `bool` value of the minimum delegation amount for staking, in lamports. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method": "getStakeMinimumDelegation" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 501 - }, - "value": 1000000000 - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsupply.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsupply.md deleted file mode 100644 index b18fae83..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getsupply.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "getsupply" -slug: "rpc-solana-getsupply" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getSupply() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getSupply` method returns information about the current supply of lamports in the Solana network. It provides insights into the distribution of lamports, such as the total supply, the amount in circulation, and the amount that is not circulating. This can be useful for anyone interested in the macroeconomics of the Solana network or in tracking the circulation of lamports over time. - -{% embed url=" %} - -### Parameters - -- `options` (object, optional): A configuration object containing: - - `commitment`(string, optional): Specifies the level of commitment to apply when fetching data. - - `excludeNonCirculatingAccountsList` (bool, optional): If true, the returned array of non-circulating accounts will be empty. - -### Return Object - -The result field will be a JSON object containing: - -- `total`: Total supply in lamports. -- `circulating`: Circulating supply in lamports. -- `nonCirculating`: Non-circulating supply in lamports. -- `nonCirculatingAccounts`: An array of account addresses of non-circulating accounts, as strings. If `excludeNonCirculatingAccountsList` is enabled, the returned array will be empty. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getSupply" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 1114 - }, - "value": { - "circulating": 16000, - "nonCirculating": 1000000, - "nonCirculatingAccounts": [ - "FEy8pTbP5fEoqMV1GdTz83byuA8EKByqYat1PKDgVAq5", - "9huDUZfxoJ7wGMTffUE7vh1xePqef7gyrLJu9NApncqA", - "3mi1GmwEE3zo2jmfDuzvjSX9ovRXsDUKHvsntpkhuLJ9", - "BYxEJTDerkaRWBem3XgnVcdhppktBXa2HbkHPKj2Ui4Z" - ], - "total": 1016000 - } - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountbalance.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountbalance.md deleted file mode 100644 index e0a9084d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountbalance.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "gettokenaccountbalance" -slug: "rpc-solana-gettokenaccountbalance" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getTokenAccountBalance('DhzDoryP2a4rMK2bcWwJxrE2uW6ir81ES8ZwJJPPpxDN') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTokenAccountBalance` method provides the ability to fetch the current balance of a given SPL Token account. It is used when you want to know the amount of tokens held in a specific token account. The token account is specified by its public key. - -{% embed url=" %} - -### Parameters - -This method accepts two parameters: - -- `pubkey` (string, required): Pubkey of Token account to query, as base-58 encoded string - - Example: `"DhzDoryP2a4rMK2bcWwJxrE2uW6ir81ES8ZwJJPPpxDN"` -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - -### Return object - -The `getTokenAccountBalance` method returns an object containing the following fields: - -- `value`: An object containing: - - `amount`: The raw balance without decimals, a string representation of number - - `decimals`: Number of base 10 digits to the right of the decimal place - - `uiAmount`: Number or null. The balance, using mint-prescribed decimals **DEPRECATED** - - `uiAmountString`: The balance as a string, using mint-prescribed decimals - -If `withContext` is set to true, the response will also include a `context` object: - -- `context`: An object containing details about the context in which the data was fetched. - - `slot`: The slot at which the data was fetched. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getTokenAccountBalance", - "params": [ - "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - { - "commitment": "finalized", - "encoding": "base64" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "context": { - "slot": 123456 - }, - "value": { - "amount": "10000", - "decimals": 6, - "uiAmount": 0.01, - "uiAmountString": "0.01" - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountsbydelegate.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountsbydelegate.md deleted file mode 100644 index 363dd774..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountsbydelegate.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: "gettokenaccountsbydelegate" -slug: "rpc-solana-gettokenaccountsbydelegate" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const delegate = "GgPpTKg78vmzgDtP1DNn72CHAYjRdKY7AV6zgszoHCSa"; - -const res = await tatum.rpc.getTokenAccountsByDelegate(delegate) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTokenAccountsByDelegate` method returns all SPL Token accounts by a specified delegate. This can be useful when you need to retrieve all token accounts associated with a specific delegate address, typically in situations where you are managing or auditing the accounts managed by a particular delegate. - -### Parameters - -- `delegate` (string, required): Pubkey of account delegate to query, as base-58 encoded string - - Example: `"GgPpTKg78vmzgDtP1DNn72CHAYjRdKY7AV6zgszoHCSa"` -- `config`(object, optional): An optional object containing either of the following: - - `mint`(string): Pubkey of the specific token Mint to limit accounts to, as base-58 encoded string - - Example: `{ mint: 'So11111111111111111111111111111111111111112' }` - - `programId` (string): Pubkey of the Token program that owns the accounts, as base-58 encoded string - - Example: `{ programId: 'So11111111111111111111111111111111111111112' }` -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at - - Example: `1000` - - `dataSlice` (object, optional): limit the returned account data using the provided `offset` (number) and `length` (number) fields; only available for `base58`, `base64` or `base64+zstd` encodings. - - Example: `{ "offset": 0, "length": 100 }` - - `encoding` (string, optional): The encoding for the account data. - - Values: `base58` `base64` `base64+zstd` `jsonParsed` - -### Return object - -The result will be an RpcResponse JSON object with `value` equal to an array of JSON objects, which will contain: - -- `pubkey`: Public key of the account. -- `account`: A JSON object, with the following sub fields: - - `executable`: Whether the account is executable. - - `owner`: Base-58 encoded Pubkey of the program this account has been assigned to - - `lamports`: Number of lamports in the account. - - `data`: Token state data associated with the account, either as encoded binary data or in JSON format `{program: state}` - - `rentEpoch`: The epoch at which the account will next owe rent. - - `size`: The data size of the account - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getTokenAccountsByDelegate", - "params": [ - "28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp" - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 1114 - }, - "value": [ - { - "account": { - "data": { - "program": "spl-token", - "parsed": { - "info": { - "tokenAmount": { - "amount": "1", - "decimals": 1, - "uiAmount": 0.1, - "uiAmountString": "0.1" - }, - "delegate": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T", - "delegatedAmount": { - "amount": "1", - "decimals": 1, - "uiAmount": 0.1, - "uiAmountString": "0.1" - }, - "state": "initialized", - "isNative": false, - "mint": "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E", - "owner": "CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD" - }, - "type": "account" - }, - "space": 165 - }, - "executable": false, - "lamports": 1726080, - "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", - "rentEpoch": 4, - "space": 165 - }, - "pubkey": "28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp" - } - ] - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountsbyowner.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountsbyowner.md deleted file mode 100644 index 6cff6667..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenaccountsbyowner.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: "gettokenaccountsbyowner" -slug: "rpc-solana-gettokenaccountsbyowner" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network, Encoding } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getTokenAccountsByOwner( - 'GgPpTKg78vmzgDtP1DNn72CHAYjRdKY7AV6zgszoHCSa', - { - mint: '1YDQ35V8g68FGvcT85haHwAXv1U7XMzuc4mZeEXfrjE', - }, - { encoding: Encoding.JsonParsed } -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTokenAccountsByOwner` method retrieves all SPL token accounts owned by a specified address on the Solana blockchain. It allows you to fetch a list of token accounts associated with a particular owner. This method is useful for querying the token holdings of a specific address and performing operations related to token management. - -{% embed url=" %} - -### Parameters - -- `ownerAddress` (string, required): The address of the owner for whom to retrieve token accounts. - - Example: `'rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn'` -- `config`(object, optional): An optional object containing either of the following: - - `mint`(string): Pubkey of the specific token Mint to limit accounts to, as base-58 encoded string - - Example: `{ mint: 'So11111111111111111111111111111111111111112' }` - - `programId` (string): Pubkey of the Token program that owns the accounts, as base-58 encoded string - - Example: `{ programId: 'So11111111111111111111111111111111111111112' }` -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at - - Example: `1000` - - `dataSlice` (object, optional): limit the returned account data using the provided `offset` (number) and `length` (number) fields; only available for `base58`, `base64` or `base64+zstd` encodings. - - Example: `{ "offset": 0, "length": 100 }` - - `encoding` (string, optional): The encoding for the account data. - - Values: `base58` `base64` `base64+zstd` `jsonParsed` - -### Return object - -The result will be an RpcResponse JSON object with `value` equal to an array of JSON objects, which will contain: - -- `pubkey`: Public key of the account. -- `account`: A JSON object, with the following sub fields: - - `executable`: Whether the account is executable. - - `owner`: Base-58 encoded Pubkey of the program this account has been assigned to - - `lamports`: Number of lamports in the account. - - `data`: Token state data associated with the account, either as encoded binary data or in JSON format `{program: state}` - - `rentEpoch`: The epoch at which the account will next owe rent. - - `size`: The data size of the account - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getTokenAccountsByOwner", - "params": [ - 'GgPpTKg78vmzgDtP1DNn72CHAYjRdKY7AV6zgszoHCSa', - { - mint: '1YDQ35V8g68FGvcT85haHwAXv1U7XMzuc4mZeEXfrjE', - }, - { encoding: 'jsonParsed'}, - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 1114 - }, - "value": [ - { - "account": { - "data": { - "program": "spl-token", - "parsed": { - "accountType": "account", - "info": { - "tokenAmount": { - "amount": "1", - "decimals": 1, - "uiAmount": 0.1, - "uiAmountString": "0.1" - }, - "delegate": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T", - "delegatedAmount": { - "amount": "1", - "decimals": 1, - "uiAmount": 0.1, - "uiAmountString": "0.1" - }, - "state": "initialized", - "isNative": false, - "mint": "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E", - "owner": "4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F" - }, - "type": "account" - }, - "space": 165 - }, - "executable": false, - "lamports": 1726080, - "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", - "rentEpoch": 4, - "space": 165 - }, - "pubkey": "C2gJg6tKpQs41PRS1nC8aw3ZKNZK3HQQZGVrDFDup5nx" - } - ] - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenlargestaccounts.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenlargestaccounts.md deleted file mode 100644 index 1a0ace98..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokenlargestaccounts.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: "gettokenlargestaccounts" -slug: "rpc-solana-gettokenlargestaccounts" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getTokenLargestAccounts() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTokenLargestAccounts` method is a valuable resource for analyzing the distribution of a particular SPL (Solana Program Library) Token in the network. This method returns the 20 largest accounts of a specific SPL Token type. - -The primary use case for this method is to gain insights into the distribution of a particular token. For instance, token issuers might want to monitor the distribution of their tokens and identify the largest holders. - -Another use case is for research and analysis purposes. Data providers, exchange platforms, or individuals might use this information to study market behavior, make predictions, or develop trading strategies based on the ownership concentration of a specific token. - -### Parameters - -This method takes the following parameters: - -- `pubkey` (string, required): A string that represents the Pubkey of the token Mint to query, as base-58 encoded string. -- A configuration object (optional): This object can contain the following fields: - - `commitment` (string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - -### Return Object - -The result will be an RpcResponse JSON object with `value` equal to an array of JSON objects containing: - -- `address`: The address of the token account. -- `amount`: The raw token account balance without decimals, a string representation of u64. -- `decimals`: The number of base 10 digits to the right of the decimal place. -- `uiAmount`: The token account balance, using mint-prescribed decimals. Note: This field is deprecated. -- `uiAmountString`: The token account balance as a string, using mint-prescribed decimals. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getTokenLargestAccounts", - "params": [ - "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E" - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 1114 - }, - "value": [ - { - "address": "FYjHNoFtSQ5uijKrZFyYAxvEr87hsKXkXcxkcmkBAf4r", - "amount": "771", - "decimals": 2, - "uiAmount": 7.71, - "uiAmountString": "7.71" - }, - { - "address": "BnsywxTcaYeNUtzrPxQUvzAWxfzZe3ZLUJ4wMMuLESnu", - "amount": "229", - "decimals": 2, - "uiAmount": 2.29, - "uiAmountString": "2.29" - } - ] - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokensupply.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokensupply.md deleted file mode 100644 index d6923a79..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettokensupply.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: "gettokensupply" -slug: "rpc-solana-gettokensupply" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const tokenMintPubkey = "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E" - -const res = await tatum.rpc.getTokenSupply(tokenMintPubkey, config) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTokenSupply` method returns the total supply of a specific SPL (Solana Program Library) Token in the network. - -This method is especially useful for token issuers or traders who want to keep track of the total token supply for market analysis or supply management. - -Another use case for this method is for financial services applications or DeFi protocols, where it is important to know the total supply of a token to calculate various financial metrics such as market capitalisation or liquidity. - -{% embed url=" %} - -### Parameters - -This method takes the following parameters: - -- `pubkey` (string, required): A string that represents the Pubkey of the token Mint to query. -- `options` (object, optional): This object can contain the following fields: - - `commitment` (string, optional): Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - -### Return Object - -The result will be an RpcResponse JSON object with `value` equal to a JSON object containing: - -- `amount`: The raw total token supply without decimals, a string representation of u64. -- `decimals`: The number of base 10 digits to the right of the decimal place. -- `uiAmount`: The total token supply, using mint-prescribed decimals. Note: This field is deprecated. -- `uiAmountString`: The total token supply as a string, using mint-prescribed decimals. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getTokenSupply", - "params": [ - "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E" - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 1114 - }, - "value": { - "amount": "100000", - "decimals": 2, - "uiAmount": 1000, - "uiAmountString": "1000" - } - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettransaction.md deleted file mode 100644 index cd45a4a8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettransaction.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: "gettransaction" -slug: "rpc-solana-gettransaction" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const signature = '4CgnQtRfnUekfn21meTyHYvoAc6pBYK3DhimeiZL6a6o2QXMTHqDomninDkaZLmSfdiEzZfyfLGN4mrDvs8HmnBh' // transaction signature - -const res = await tatum.rpc.getTransaction(signature) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTransaction` method retrieves the details of a specific transaction, identified by its signature. This method can be used to fetch transaction details such as the addresses involved, the amount transacted, the block in which the transaction was included, and so forth. - -### Parameters - -- `signature`(string): Transaction signature, as base-58 encoded string - - Example: `"4CgnQtRfnUekfn21meTyHYvoAc6pBYK3DhimeiZL6a6o2QXMTHqDomninDkaZLmSfdiEzZfyfLGN4mrDvs8HmnBh"` -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `maxSupportedTransactionVersion` (number): Set the max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned. If this parameter is omitted, only legacy transactions will be returned, and any versioned transaction will prompt the error. - - Example: `1` - - `encoding` (string, optional): The encoding for the account data. - - Values: `base58` `base64` `jsonParsed` - -### Return Object - -- `null` If transaction is not found or not confirmed -- `object` If transaction is confirmed, an object with the following fields: - - `slot:` The slot this transaction was processed in - - `transaction:` Transaction object, either in JSON format or encoded binary data, depending on encoding parameter - - `blockTime:` Estimated production time, as Unix timestamp (seconds since the Unix epoch) of when the transaction was processed. null if not available - - `meta:` Transaction status metadata object: - - `err:` Error if transaction failed, null if transaction succeeded. - - `fee:` Fee this transaction was charged, as u64 integer - - `preBalances:` Array of u64 account balances from before the transaction was processed - - `postBalances:` Array of u64 account balances after the transaction was processed - - `innerInstructions:` List of inner instructions or `null` if inner instruction recording was not enabled during this transaction - - `preTokenBalances:` List of token balances from before the transaction was processed or omitted if token balance recording was not yet enabled during this transaction - - `postTokenBalances:` List of token balances from after the transaction was processed or omitted if token balance recording was not yet enabled during this transaction - - `logMessages:` Array of string log messages or `null` if log message recording was not enabled during this transaction - - DEPRECATED: `status:` Transaction status - - `"Ok":` Transaction was successful - - `"Err":` Transaction failed with TransactionError - - `rewards:` Transaction-level rewards, populated if rewards are requested; an array of JSON objects containing: - - `pubkey:` The public key, as base-58 encoded string, of the account that received the reward - - `lamports:`Number of reward lamports credited or debited by the account, as a i64 - - `postBalance:` Account balance in lamports after the reward was applied - - `rewardType:` Type of reward: currently only "rent", other types may be added in the future - - `commission:` Vote account commission when the reward was credited, only present for voting and staking rewards - - `loadedAddresses:` Transaction addresses loaded from address lookup tables. Undefined if `maxSupportedTransactionVersion` is not set in request params. - - `writable:` Ordered list of base-58 encoded addresses for writable loaded accounts - - `readonly:` Ordered list of base-58 encoded addresses for readonly loaded accounts - - `returnData:` The most-recent return data generated by an instruction in the transaction, with the following fields: - - `programId:` The program that generated the return data, as base-58 encoded Pubkey - - `data:` The return data itself, as base-64 encoded binary data - - `computeUnitsConsumed:` Number of compute units consumed by the transaction - - `version:` Transaction version. Undefined if `maxSupportedTransactionVersion` is not set in request params. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getTransaction", - "params": [ - "4CgnQtRfnUekfn21meTyHYvoAc6pBYK3DhimeiZL6a6o2QXMTHqDomninDkaZLmSfdiEzZfyfLGN4mrDvs8HmnBh", - { - "encoding": "jsonParsed" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "meta": { - "err": null, - "fee": 5000, - "innerInstructions": [], - "postBalances": [499998932500, 26858640, 1, 1, 1], - "postTokenBalances": [], - "preBalances": [499998937500, 26858640, 1, 1, 1], - "preTokenBalances": [], - "rewards": [], - "status": { - "Ok": null - } - }, - "slot": 430, - "transaction": { - "message": { - "accountKeys": [ - "3UVYmECPPMZSCqWKfENfuoTv51fTDTWicX9xmBD2euKe", - "AjozzgE83A3x1sHNUR64hfH7zaEBWeMaFuAN9kQgujrc", - "SysvarS1otHashes111111111111111111111111111", - "SysvarC1ock11111111111111111111111111111111", - "Vote111111111111111111111111111111111111111" - ], - "header": { - "numReadonlySignedAccounts": 0, - "numReadonlyUnsignedAccounts": 3, - "numRequiredSignatures": 1 - }, - "instructions": [ - { - "accounts": [1, 2, 3, 0], - "data": "37u9WtQpcm6ULa3WRQHmj49EPs4if7o9f1jSRVZpm2dvihR9C8jY4NqEwXUbLwx15HBSNcP1", - "programIdIndex": 4 - } - ], - "recentBlockhash": "mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B" - }, - "signatures": [ - "2nBhEBYYvfaAe16UMNqRHre4YNSskvuYgx3M6E4JP1oDYvZEJHvoPzyUidNgNX5r9sTyN1J9UxtbCXy2rqYcuyuv" - ] - } - }, - "blockTime": null, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettransactioncount.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettransactioncount.md deleted file mode 100644 index 9e87e3a1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-gettransactioncount.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "gettransactioncount" -slug: "rpc-solana-gettransactioncount" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getTransactionCount() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTransactionCount` method retrieves the current transaction count from the ledger. This can be used to track the number of transactions processed by the network. - -{% embed url=" %} - -### Parameters - -- `options` (object, optional): Configuration object containing the following fields: - - `commitment` (string, optional): Specifies the confirmation level of data to be fetched. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot`: (number, optional) The minimum slot that the request can be evaluated at. - - Example: `5` - -### Return Object - -The method returns a number indicating the current transaction count from the ledger. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getTransactionCount", -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 268, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getversion.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getversion.md deleted file mode 100644 index 12b6d037..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getversion.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "getversion" -slug: "rpc-solana-getversion" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getVersion() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getVersion` method is used to retrieve the current Solana version running on the node. This information can be useful for troubleshooting, compatibility checks, or for understanding the node's capabilities based on its version. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The result field will be a JSON object with the following fields: - -- `solana-core`: The software version of `solana-core`. -- `feature-set`: The unique identifier of the current software's feature set. - -### JSON-RPC Request Example - -```json -jsonCopy code{ - "jsonrpc": "2.0", - "id": 1, - "method": "getVersion" -} -``` - -### JSON-RPC Response Example - -```json -jsonCopy code{ - "jsonrpc": "2.0", - "result": { - "solana-core": "1.15.0" - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getvoteaccounts.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getvoteaccounts.md deleted file mode 100644 index 4599d21f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-getvoteaccounts.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "getvoteaccounts" -slug: "rpc-solana-getvoteaccounts" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.getVoteAccounts({ votePubkey: 'beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -{% embed url=" %} - -### Overview - -The `getVoteAccounts` method is used to fetch the current list of vote accounts and their associated stake in the network. This is particularly useful when you want to understand the current validators in the Solana network and their voting records. It can be used in situations where you need to analyse the active participation in the network's consensus protocol. - -### Parameters - -- `options` (object, optional): Configuration object containing the following fields: - - `commitment`(string, optional): Specifies the confirmation level of data to be fetched. - - Example: `"confirmed"` - - `votePubkey` (string, optional): Specifies the public key of the vote account to fetch. - - Example: `"beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar"` - - `keepUnstakedDelinquents` (boolean, optional): Do not filter out delinquent validators with no stake - - Example: `true` - - `delinquentSlotDistance` (number, optional): Specify the number of slots behind the tip that a validator must fall to be considered delinquent. **NOTE:** For the sake of consistency between ecosystem products, _it is not recommended that this argument be specified._ - - Example: `10` - -### Return object - -The result field will be a JSON object of `current` and `delinquent` accounts, each containing an array of JSON objects with the following sub fields: - -- `votePubkey:`Vote account address, as base-58 encoded string -- `nodePubkey:` Validator identity, as base-58 encoded string -- `activatedStake:` The stake, in lamports, delegated to this vote account and active in this epoch -- `epochVoteAccount:` Whether the vote account is staked for this epoch -- `commission:` Percentage (0-100) of rewards payout owed to the vote account -- `lastVote:` Most recent slot voted on by this vote account -- `epochCredits:` Latest history of earned credits for up to five epochs, as an array of arrays containing: `[epoch, credits, previousCredits]`. -- `rootSlot:` Current root slot for this vote account - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "getTokenAccountsByOwner", - "params": [{votePubkey: 'beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar'}] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "current": [ - { - "commission": 0, - "epochVoteAccount": true, - "epochCredits": [ - [1, 64, 0], - [2, 192, 64] - ], - "nodePubkey": "B97CCUW3AEZFGy6uUg6zUdnNYvnVq5VG8PUtb2HayTDD", - "lastVote": 147, - "activatedStake": 42, - "votePubkey": "3ZT31jkAGhUaw8jsy4bTknwBMP8i4Eueh52By4zXcsVw" - } - ], - "delinquent": [] - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-isblockhashvalid.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-isblockhashvalid.md deleted file mode 100644 index 41c91ea3..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-isblockhashvalid.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "isblockhashvalid" -slug: "rpc-solana-isblockhashvalid" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network, Commitment } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const blockhash = 'J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW' -const options = { - commitment: Commitment.Processed, - minContextSlot: 5 -} // optional - -const res = await tatum.rpc.isBlockhashValid(blockhash, options) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `isBlockhashValid` method evaluates the validity of a specified blockhash. This can be used to confirm if a blockhash is still valid on the network. - -{% embed url=" %} - -### Parameters - -- `blockhash`(string, required): The blockhash of the block to evaluate, as a base-58 encoded string. - - Example: `'J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW'` -- `options`: (object, optional) Configuration object containing the following fields: - - `commitment`: (string, optional) Specifies the level of commitment to apply when fetching data. - - Values: `finalized` `confirmed` `processed` - - `minContextSlot`: (number, optional) The minimum slot that the request can be evaluated at. - - Example: `5` - -### Return Object - -The return object contains a `bool` value indicating if the blockhash is still valid. - -### JSON-RPC Request Example - -```json -{ - "id": 45, - "jsonrpc": "2.0", - "method": "isBlockhashValid", - "params": [ - "J7rBdM6AecPDEZp8aPq5iPSNKVkU5Q76F3oAV4eW5wsW", {"commitment":"processed"} - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 2483 - }, - "value": false - }, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-minimumledgerslot.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-minimumledgerslot.md deleted file mode 100644 index 612a4e7a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-minimumledgerslot.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "minimumledgerslot" -slug: "rpc-solana-minimumledgerslot" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const res = await tatum.rpc.minimumLedgerSlot() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `minimumLedgerSlot` method returns the lowest slot number that the node has information about in its ledger. This is useful when tracking the node's ledger history, such as for auditing, ledger analysis, or understanding the node's data retention policies. - -Note: This value may change over time if the node is configured to purge older ledger data, meaning that older data may no longer be accessible. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The method returns an integer that represents the minimum ledger slot number. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc":"2.0", - "id":1, - "method":"minimumLedgerSlot" -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": 1234, - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-requestairdrop.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-requestairdrop.md deleted file mode 100644 index ce4a0308..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-requestairdrop.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "requestairdrop" -slug: "rpc-solana-requestairdrop" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.SOLANA_DEVNET}) - -const res = await tatum.rpc.requestAirdrop('G35uLP74uj4eCSfMs17ePKtK1ThuH8JKebAP1T2y6CYw',1000000000) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `requestAirdrop` method is used to request an airdrop of lamports to a specific Pubkey. This is particularly useful for testing or development environments where you need to distribute tokens for various accounts for testing purposes. - -### Parameters - -- `pubkey` (string, required): The public key of the account that will receive the lamports, represented as a base-58 encoded string. -- `lamports` (integer, required): The number of lamports to airdrop. - -### Return Object - -The result is a string representing the transaction signature of the airdrop, as a base-58 encoded string. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "requestAirdrop", - "params": [ - "G35uLP74uj4eCSfMs17ePKtK1ThuH8JKebAP1T2y6CYw", - 1000000000 - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW", - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-sendtransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-sendtransaction.md deleted file mode 100644 index b1a2ce60..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-sendtransaction.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "sendtransaction" -slug: "rpc-solana-sendtransaction" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:39 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const transaction = '4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT' -const options = { - encoding: Encoding.Base58, - skipPreflight: false, - preflightCommitment: Commitment.Finalized, - maxRetries: 5, - minContextSlot: 10 -} // optional - -const res = await tatum.rpc.sendTransaction(transaction, options) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `sendTransaction` method is used to submit a fully signed transaction to the cluster for processing. This method does not alter the transaction in any way; it relays the transaction created by clients to the node as-is. A successful response from this method does not guarantee the transaction is processed or confirmed by the cluster. - -While the rpc service will reasonably retry to submit it, the transaction could be rejected if transaction's `recent_blockhash` expires before it lands. - -Use `getSignatureStatuses` to ensure a transaction is processed and confirmed. - -Before submitting, the following preflight checks are performed: - -1. The transaction signatures are verified -2. The transaction is simulated against the bank slot specified by the preflight commitment. On failure an error will be returned. Preflight checks may be disabled if desired. It is recommended to specify the same commitment and preflight commitment to avoid confusing behaviour. - -The returned signature is the first signature in the transaction, which is used to identify the transaction (transaction id). This identifier can be easily extracted from the transaction data before submission. - -### Parameters - -- `transaction`(string, required): Fully-signed Transaction, as an encoded string. - - Example: `'4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT'` -- `options` (object, optional): An object containing various options for the request. - - `encoding` (string, optional): Encoding used for the transaction data. - - Values: `base58` (_slow_, **DEPRECATED**), or `base64`. - - `skipPreflight` (boolean, optional): If "true", skip the preflight transaction checks. - - `preflightCommitment`(string, optional): Commitment level to use for preflight. - - Values: `finalised` `confirmed` `processed` - - `maxRetries`(number, optional): Maximum number of times for the RPC node to retry sending the transaction to the leader. - - `minContextSlot` (number, optional): Set the minimum slot at which to perform preflight transaction checks. - -### Return Object - -The method returns a base-58 encoded `string` value which is the first Transaction Signature embedded in the transaction. This is used to identify the transaction. - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "sendTransaction", - "params": [ - "4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT" - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": "2id3YC2jK9G5Wo2phDx4gJVAew8DcY5NAojnVuao8rkxwPYPe8cSwE5GzhEgJA2y8fVjDEo6iR6ykBvDxrTQrtpb", - "id": 1 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-simulatetransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-simulatetransaction.md deleted file mode 100644 index 07e3370d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-solana/rpc-solana-simulatetransaction.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: "simulatetransaction" -slug: "rpc-solana-simulatetransaction" -excerpt: "Solana RPC" -hidden: false -metadata: - description: "Solana RPC" - image: [] - keywords: "solana, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Solana, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.SOLANA }) - -const transaction = 'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=' - -const options = { - encoding: 'base64' -} // optional - -const res = await tatum.rpc.simulateTransaction(transaction, options) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `simulateTransaction` method is used to simulate sending a transaction without actually submitting it to the cluster. This can be useful for debugging and testing purposes. - -### Parameters - -- `transaction`: (string, required) Transaction, as an encoded string. The transaction must have a valid blockhash, but is not required to be signed. -- `options` (object, optional): Configuration object containing various options for the request. This includes: - - `commitment` (string, optional): Commitment level to simulate the transaction at. Default is 'finalized'. - - Values: `finalised` `confirmed` `processed` - - `sigVerify` (boolean, optional): If `true`, the transaction signatures will be verified. This conflicts with `replaceRecentBlockhash`. - - `replaceRecentBlockhash` (boolean, optional): If `true`, the transaction's recent blockhash will be replaced with the most recent blockhash. This conflicts with `sigVerify`. - - `minContextSlot` (number, optional): The minimum slot that the request can be evaluated at. - - `encoding` (string, optional): Encoding used for the transaction data. Values can be `base58` or `base64`. Default is `base58`. - - `accounts` (object, optional): Accounts configuration object. This includes: - - `addresses`: (array of strings, optional) An array of accounts to return, as base-58 encoded strings. - - `encoding`: (string, optional) Encoding for returned Account data. Values can be `base64`, `base58`, `base64+zstd`, `jsonParsed`. - -### Return Object - -The method returns an `RpcResponse` object with `value` set to a JSON object with the following fields: - -- `err`: Error if transaction failed, null if transaction succeeded. -- `logs`: Array of log messages the transaction instructions output during execution. Null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure) -- `accounts`: Array of accounts with the same length as the `accounts.addresses` array in the request. Each Account object resolves to either: - - `null` - If the account doesn't exist or if `err` is not null - - `object` - Otherwise, a JSON object containing: - - `lamports:` Number of lamports assigned to this account, as a u64 - - `owner:` Base-58 encoded Pubkey of the program this account has been assigned to - - `data:` Data associated with the account, either as encoded binary data or JSON format `{: }` - depending on encoding parameter - - `executable:` Boolean indicating if the account contains a program (and is strictly read-only) - - `rentEpoch:` The epoch at which this account will next owe rent, as u64 -- `unitsConsumed`: The number of compute budget units consumed during the processing of this transaction. -- `returnData`: The most-recent return data generated by an instruction in the transaction - - with the following fields: - - - `programId:` The program that generated the return data, as base-58 encoded Pubkey - - `data:` The return data itself, as base-64 encoded binary data - -### JSON-RPC Request Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "simulateTransaction", - "params": [ - "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=", - { - "encoding": "base64" - } - ] -} - -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "result": { - "context": { - "slot": 218 - }, - "value": { - "err": null, - "accounts": null, - "logs": [ - "Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri invoke [1]", - "Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri consumed 2366 of 1400000 compute units", - "Program return: 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri KgAAAAAAAAA=", - "Program 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri success" - ], - "returnData": { - "data": ["Kg==", "base64"], - "programId": "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri" - }, - "unitsConsumed": 2366 - } - }, - "id": 1 -} -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar.md deleted file mode 100644 index abe6a97c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Stellar" -slug: "rpc-stellar" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Wed Mar 06 2024 13:09:53 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.md deleted file mode 100644 index 7c4b55e8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "getAccount" -slug: "rpc-stellar-getaccount" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define the account ID (Replace placeholder with the actual account ID) -const accountId = "YOUR_ACCOUNT_ID"; - -// Retrieve details of a specific account -const accountDetails = await tatum.rpc.getAccount(accountId); - -// Log the account details -console.log("Account Details:", accountDetails); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccount` method allows you to retrieve detailed information about a specific account. This includes information about balances and trustlines, including those that haven't been authorized yet. - -### Example use cases: - -1. **Account Information:** - Developers and applications can use this method to access detailed information about a specific account, including its balances and trustlines. - -2. **Trustline Analysis:** - You can use the response to analyze the trustlines established by the account, including those that haven't been authorized yet. - -### Request Parameters - -The `getAccount` method requires the following parameter: - -- `accountId` (string, required): - The unique identifier (account ID) of the account for which you want to retrieve details. - -### Return Object - -The `getAccount` method returns a JSON object containing details about the specified account, including balances, sponsorships, and other relevant information. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U" - }, - "transactions": { - "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/transactions{?cursor,limit,order}", - "templated": true - }, - "operations": { - "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/operations{?cursor,limit,order}", - "templated": true - }, - "payments": { - "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/payments{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/effects{?cursor,limit,order}", - "templated": true - }, - "offers": { - "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/offers{?cursor,limit,order}", - "templated": true - }, - "trades": { - "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/trades{?cursor,limit,order}", - "templated": true - }, - "data": { - "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/data/{key}", - "templated": true - } - }, - "id": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", - "account_id": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", - "sequence": "24739097524306468", - "subentry_count": 3, - "inflation_destination": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", - "home_domain": "tempo.eu.com", - "last_modified_ledger": 23569316, - "num_sponsoring": 0, - "num_sponsored": 0, - "thresholds": { - "low_threshold": 5, - "med_threshold": 0, - "high_threshold": 0 - }, - "flags": { - "auth_required": false, - "auth_revocable": true, - "auth_immutable": false, - "auth_clawback_enabled": true - }, - "balances": [ - { - "balance": "1.0000005", - "limit": "922337203685.4775807", - "buying_liabilities": "0.0000000", - "selling_liabilities": "0.0000000", - "last_modified_ledger": 22651481, - "is_authorized": true, - "is_clawback_enabled": false, - "asset_type": "credit_alphanum4", - "asset_code": "EURT", - "asset_issuer": "GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" - }, - { - "balance": "0.0000000", - "limit": "922337203685.4775807", - "buying_liabilities": "0.0000000", - "selling_liabilities": "0.0000000", - "last_modified_ledger": 7877447, - "is_authorized": false, - "is_clawback_enabled": false, - "asset_type": "credit_alphanum4", - "asset_code": "PHP", - "asset_issuer": "GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" - } - ], - "signers": [ - { - "weight": 10, - "key": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", - "type": "ed25519_public_key" - } - ], - "data": {}, - "paging_token": "" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.md deleted file mode 100644 index 3e56aebe..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getAccountData" -slug: "rpc-stellar-getaccountdata" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const params = { - accountId: "YOUR_ACCOUNT_ID", - key: "YOUR_DATA_KEY", -}; - -// Retrieve data for a specific key of a given account -const data = await tatum.rpc.getAccountData(params); - -// Log the data value -console.log("Account Data:", data.value); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountData` method allows you to retrieve a single data value for a specific key of a given account on the Stellar blockchain. Please note that the content and structure of the data returned can vary based on the specific use case and applications interacting with the Stellar blockchain. - -### Request Parameters - -The `getAccountData` method accepts the following request parameters: - -- `accountId` (string, required): - The unique identifier (account ID) of the account for which you want to retrieve data. - -- `key` (string, required): - The data key for which you want to retrieve the corresponding value. - -### Return Object - -The `getAccountData` method returns a JSON object with account data: - -`value` (string): -The value associated with the specified data key for the given account. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.md deleted file mode 100644 index d3b788c9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: "getAccountEffects" -slug: "rpc-stellar-getaccounteffects" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const inputParams = { - accountId: "YOUR_ACCOUNT_ID", - cursor: "now", - order: "asc", - limit: 10, -}; - -// Retrieve effects of a specific account -const effects = await tatum.rpc.getAccountEffects(inputParams); - -// Log the list of effects -console.log("Account Effects:", effects); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountEffects` method allows you to retrieve the effects of a specific account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new effects for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known effect unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream effects created since your request time. - -### Request Parameters - -The `getAccountEffects` method accepts the following request parameters: - -- `accountId` (string, required): - The unique identifier (account ID) of the account for which you want to retrieve effects. - -- `cursor` (string, optional): - A cursor value that determines the starting point for retrieving effects. Set it to 'now' to stream effects created since your request time. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of effects to fetch in a single request. - -### Return Object - -The `getAccountEffects` method returns a JSON object containing the list of effects associated with the specified account. Each effect represents an event that has occurred on the Stellar blockchain, such as the creation of an account, a payment, or other actions. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://.." - }, - "next": { - "href": "https://.." - }, - "prev": { - "href": "https://.." - } - }, - "_embedded": { - "records": [ - { - "_links": { - "operation": { - "href": "https://..." - }, - "succeeds": { - "href": "https://..." - }, - "precedes": { - "href": "https://..." - } - }, - "id": "0216517620744060929-0000000002", - "paging_token": "216517620744060929-2", - "account": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", - "type": "claimable_balance_claimant_created", - "type_i": 51, - "created_at": "2024-02-17T14:03:50Z", - "asset": "ENIZ:GDLMUA4ZQSU3LMKEW7LETSIYLYMATTGVPXCHFRRTGQTF6K55XOQIENIZ", - "balance_id": "000000004c56a7b5e98e7d5225f37d27fbd93c4fe2f03b00d2c80d23771ae97e66f599c7", - "amount": "5000.0000000", - "predicate": { - "unconditional": true - } - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoffers.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoffers.md deleted file mode 100644 index 0948beae..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoffers.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -title: "getAccountOffers" -slug: "rpc-stellar-getaccountoffers" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const params = { - accountId: "YOUR_ACCOUNT_ID", - cursor: "now", - order: "asc", - limit: 10, -}; - -// Retrieve all offers currently open for a given account -const offers = await tatum.rpc.getAccountOffers(params); - -// Log the list of offers -console.log("Account Offers:", offers); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountOffers` method allows you to retrieve all offers that a specific account has currently open on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new offers for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known offer unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream offers created since your request time. - -### Request Parameters - -The `getAccountOffers` method accepts the following request parameters: - -- `accountId` (string, required): - The unique identifier (account ID) of the account for which you want to retrieve offers. - -- `cursor` (string, optional): - A cursor value that determines the starting point for retrieving offers. Set it to 'now' to stream offers created since your request time. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of offers to fetch in a single request. - -### Return Object - -The `getAccountOffers` method returns a JSON object containing the list of offers associated with the specified account. Each offer represents an open order on the Stellar network, such as a trade offer to exchange one asset for another. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_links": { - "self": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=164943216&limit=10&order=asc" - }, - "prev": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=164555927&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://horizon.stellar.org/offers/164555927" - }, - "offer_maker": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" - } - }, - "id": 164555927, - "paging_token": "164555927", - "seller": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K", - "selling": { - "asset_type": "native" - }, - "buying": { - "asset_type": "credit_alphanum4", - "asset_code": "BB1", - "asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN" - }, - "amount": "214.9999939", - "price_r": { - "n": 10000000, - "d": 86000001 - }, - "price": "0.1162791", - "last_modified_ledger": 28383147, - "last_modified_time": "2020-02-24T22:58:38Z" - }, - { - "_links": { - "self": { - "href": "https://horizon.stellar.org/offers/164943216" - }, - "offer_maker": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" - } - }, - "id": 164943216, - "paging_token": "164943216", - "seller": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K", - "selling": { - "asset_type": "credit_alphanum4", - "asset_code": "BB1", - "asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN" - }, - "buying": { - "asset_type": "native" - }, - "amount": "24.9999990", - "price_r": { - "n": 32224991, - "d": 2500000 - }, - "price": "12.8899964", - "last_modified_ledger": 28394149, - "last_modified_time": "2020-02-25T15:49:57Z" - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoperations.md deleted file mode 100644 index f9d2cf13..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoperations.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -title: "getAccountOperations" -slug: "rpc-stellar-getaccountoperations" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const params = { - accountId: "YOUR_ACCOUNT_ID", - cursor: "now", - order: "asc", - limit: 10, - includeFailed: true, - join: true, -}; - -// Retrieve successful operations for a given account -const operations = await tatum.rpc.getAccountOperations(params); - -// Log the list of operations -console.log("Account Operations:", operations); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountOperations` method allows you to retrieve successful operations for a given account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new operations for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known operation unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream operations created since your request time. - -### Request Parameters - -The `getAccountOperations` method accepts the following request parameters: - -- `accountId` (string, required): - The unique identifier (account ID) of the account for which you want to retrieve operations. - -- `cursor` (string, optional): - A cursor value that determines the starting point for retrieving operations. Set it to 'now' to stream operations created since your request time. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of operations to fetch in a single request. - -- `includeFailed` (boolean, optional): - A flag to indicate whether to include failed operations in the results. Set to `true` to include failed operations. - -- `join` (boolean, optional): - A flag to indicate whether to join operation data with relevant accounts. Set to `true` to join operation data with accounts. - -### Return Object - -The `getAccountOperations` method returns a JSON object containing the list of operations associated with the specified account. Each operation may represent a variety of actions such as payments, account creations, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/operations?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/operations?cursor=216532408316960769&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/operations?cursor=216517620744060929&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/216517620744060929" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/8ed978ce9f9f2cfe245470a06e9d0ce178f0cc602fd2b8d5e6047192e13d7475" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/216517620744060929/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=216517620744060929" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=216517620744060929" - } - }, - "id": "216517620744060929", - "paging_token": "216517620744060929", - "transaction_successful": true, - "source_account": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", - "type": "create_claimable_balance", - "type_i": 14, - "created_at": "2024-02-17T14:03:50Z", - "transaction_hash": "8ed978ce9f9f2cfe245470a06e9d0ce178f0cc602fd2b8d5e6047192e13d7475", - "sponsor": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", - "asset": "ENIZ:GDLMUA4ZQSU3LMKEW7LETSIYLYMATTGVPXCHFRRTGQTF6K55XOQIENIZ", - "amount": "5000.0000000", - "claimants": [ - { - "destination": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", - "predicate": { - "unconditional": true - } - }, - { - "destination": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", - "predicate": { - "unconditional": true - } - } - ] - } -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountpayments.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountpayments.md deleted file mode 100644 index ea362766..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountpayments.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: "getAccountPayments" -slug: "rpc-stellar-getaccountpayments" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const params = { - accountId: "YOUR_ACCOUNT_ID", - cursor: "now", - order: "asc", - limit: 10, - includeFailed: true, - join: true, -}; - -// Retrieve successful payments for a given account -const payments = await tatum.rpc.getAccountPayments(params); - -// Log the list of payments -console.log("Account Payments:", payments); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountPayments` method allows you to retrieve successful payments for a given account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new payments for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known payment unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream payments created since your request time. - -### Request Parameters - -The `getAccountPayments` method accepts the following request parameters: - -- `accountId` (string, required): - The unique identifier (account ID) of the account for which you want to retrieve payments. - -- `cursor` (string, optional): - A cursor value that determines the starting point for retrieving payments. Set it to 'now' to stream payments created since your request time. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of payments to fetch in a single request. - -- `includeFailed` (boolean, optional): - A flag to indicate whether to include failed payments in the results. Set to `true` to include failed payments. - -- `join` (boolean, optional): - A flag to indicate whether to join payment data with relevant accounts. Set to `true` to join payment data with accounts. - -### Return Object - -The `getAccountPayments` method returns a JSON object containing the list of payments associated with the specified account. Each payment includes details such as its source, destination, amount, and other relevant information. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/payments?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/payments?cursor=216532408316960769&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/payments?cursor=216518179090239489&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/216518179090239489" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/57d2fccfb885169155913177f74d390a6675fcc28ccab529b8848cfcb1882435" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/216518179090239489/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=216518179090239489" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=216518179090239489" - } - }, - "id": "216518179090239489", - "paging_token": "216518179090239489", - "transaction_successful": true, - "source_account": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", - "type": "payment", - "type_i": 1, - "created_at": "2024-02-17T14:16:35Z", - "transaction_hash": "57d2fccfb885169155913177f74d390a6675fcc28ccab529b8848cfcb1882435", - "asset_type": "native", - "from": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", - "to": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", - "amount": "0.0000100" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounts.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounts.md deleted file mode 100644 index 3a752964..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounts.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: "getAccounts" -slug: "rpc-stellar-getaccounts" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define the account filters (Replace placeholders with actual values and remove redundant) -const filters: AccountFilters = { - sponsor: "YOUR_SPONSOR_ACCOUNT_ID", - asset: "YOUR_ASSET_CODE:ISSUER_ACCOUNT_ID", - signer: "YOUR_SIGNER_ACCOUNT_ID", - liquidityPool: "YOUR_LIQUIDITY_POOL_ID", - cursor: 6606617478959105, - order: "asc", - limit: 10, -}; - -// List accounts based on the specified filters -const accounts = await tatum.rpc.getAccounts(filters); - -// Log the list of accounts -console.log("List of Accounts:", accounts); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccounts` method allows you to retrieve a list of accounts based on various filters, including signer, asset, liquidity pool, or sponsor. - -**Please ensure that you are including a signer, sponsor, asset, or liquidity pool filter**. - -### Example use cases: - -1. **Account Filtering:** - Developers and applications can use this method to filter and retrieve accounts based on specific criteria, such as signer, asset, or sponsor. - -2. **Data Analysis:** - Researchers and analysts can utilize this endpoint to gather account data for analysis and reporting. - -3. **Pagination Support:** - The method supports pagination using the `cursor`, `order`, and `limit` parameters for efficient data retrieval. - -### Request Parameters - -The `getAccounts` method requires the following parameters in camelCase: - -- `sponsor` (string, optional): - Account ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a subentry (trustline, offer, or data entry) which is sponsored by the given account ID. - -- `asset` (string, optional): - An issued asset represented as "code:issuerAccountID". Every account in the response will have a trustline for the given asset. - -- `signer` (string, optional): - Account ID of the signer. Every account in the response will have the given account ID as a signer. - -- `liquidityPool` (string, optional): - With this parameter, the results will include only accounts which have trustlines to the specified liquidity pool. - -- `cursor` (number, optional): - A number that points to a specific location in a collection of responses and is pulled from the `pagingToken` value of a record. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include "asc" (ascending) or "desc" (descending). If this argument isn’t set, it defaults to "asc". - -- `limit` (number, optional): - The maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10. - -### Return Object - -The `getAccounts` method returns a list of accounts based on the provided filters. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://horizon.stellar.org/accounts?asset=USDC%3AGA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN&cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://horizon.stellar.org/accounts?asset=USDC%3AGA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN&cursor=GA223H7O26KC7NWDEH6R4D5ITI35I4R7BH5VDLPFTSKMWH2RUZD474TJ&limit=10&order=asc" - }, - "prev": { - "href": "https://horizon.stellar.org/accounts?asset=USDC%3AGA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN&cursor=GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6" - }, - "transactions": { - "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/transactions{?cursor,limit,order}", - "templated": true - }, - "operations": { - "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/operations{?cursor,limit,order}", - "templated": true - }, - "payments": { - "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/payments{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/effects{?cursor,limit,order}", - "templated": true - }, - "offers": { - "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/offers{?cursor,limit,order}", - "templated": true - }, - "trades": { - "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/trades{?cursor,limit,order}", - "templated": true - }, - "data": { - "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/data/{key}", - "templated": true - } - }, - "id": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", - "account_id": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", - "sequence": "194013564070002690", - "sequence_ledger": 45173210, - "sequence_time": "1677700612", - "subentry_count": 1, - "last_modified_ledger": 50415380, - "last_modified_time": "2024-02-17T19:44:28Z", - "thresholds": { - "low_threshold": 0, - "med_threshold": 0, - "high_threshold": 0 - }, - "flags": { - "auth_required": false, - "auth_revocable": false, - "auth_immutable": false, - "auth_clawback_enabled": false - }, - "balances": [ - { - "balance": "0.0000000", - "limit": "922337203685.4775807", - "buying_liabilities": "0.0000000", - "selling_liabilities": "0.0000000", - "last_modified_ledger": 45173210, - "is_authorized": true, - "is_authorized_to_maintain_liabilities": true, - "asset_type": "credit_alphanum4", - "asset_code": "USDC", - "asset_issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN" - }, - { - "balance": "2.9975391", - "buying_liabilities": "0.0000000", - "selling_liabilities": "0.0000000", - "asset_type": "native" - } - ], - "signers": [ - { - "weight": 1, - "key": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", - "type": "ed25519_public_key" - } - ], - "data": {}, - "num_sponsoring": 0, - "num_sponsored": 0, - "paging_token": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6" - } -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttrades.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttrades.md deleted file mode 100644 index b85d7f34..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttrades.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: "getAccountTrades" -slug: "rpc-stellar-getaccounttrades" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const params = { - accountId: "YOUR_ACCOUNT_ID", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// Retrieve all trades for a specific account -const trades = await tatum.rpc.getTradesByAccountId(params); - -// Log the list of trades -console.log("Trades:", trades); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountTrades` method allows you to retrieve all trades associated with a specific account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new trades as they are added to the Stellar ledger. When used in streaming mode, it starts at the earliest known trade unless a cursor is set, in which case it starts from that cursor. You can also set the cursor value to 'now' to stream trades created since your request time. - -### Request Parameters - -The `getAccountTrades` method accepts the following request parameters: - -- `accountId` (string, required): - The unique identifier (account ID) of the account for which you want to retrieve trades. - -- `cursor` (string, optional): - A cursor value that determines the starting point for pagination. Use this parameter to retrieve trades from a specific point in the trade list. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of trades to fetch in a single request. - -### Return Object - -The `getAccountTrades` method returns a JSON object containing the list of trades associated with the specified account. Each trade is represented as an object with various properties describing its details. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_links": { - "self": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/trades?cursor=&limit=3&order=asc" - }, - "next": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/trades?cursor=107449584845914113-0&limit=3&order=asc" - }, - "prev": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/trades?cursor=107449468881756161-0&limit=3&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "" - }, - "base": { - "href": "https://horizon.stellar.org/accounts/GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX" - }, - "counter": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" - }, - "operation": { - "href": "https://horizon.stellar.org/operations/107449468881756161" - } - }, - "id": "107449468881756161-0", - "paging_token": "107449468881756161-0", - "ledger_close_time": "2019-07-26T09:17:02Z", - "trade_type": "orderbook", - "base_offer_id": "104078276", - "base_account": "GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX", - "base_amount": "4433.2000000", - "base_asset_type": "native", - "counter_offer_id": "4719135487309144065", - "counter_account": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K", - "counter_amount": "443.3200000", - "counter_asset_type": "credit_alphanum4", - "counter_asset_code": "BB1", - "counter_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "base_is_seller": true, - "price": { - "n": "1", - "d": "10" - } - }, - { - "_links": { - "self": { - "href": "" - }, - "base": { - "href": "https://horizon.stellar.org/accounts/GCQDOTIILRG634IRWAODTUS6H6Q7VUUNKZINBDJOXGJFR7YZ57FGYV7B" - }, - "counter": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" - }, - "operation": { - "href": "https://horizon.stellar.org/operations/107449486061649921" - } - } - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttransactions.md deleted file mode 100644 index 2c2570b9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttransactions.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: "getAccountTransactions" -slug: "rpc-stellar-getaccounttransactions" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const params = { - accountId: "YOUR_ACCOUNT_ID", - cursor: "now", - order: "asc", - limit: 10, - includeFailed: true, -}; - -// Retrieve successful transactions for a given account -const transactions = await tatum.rpc.getAccountTransactions(params); - -// Log the list of transactions -console.log("Account Transactions:", transactions); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAccountTransactions` method allows you to retrieve successful transactions for a given account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new transactions for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known transaction unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream transactions created since your request time. - -### Example use cases: - -1. **Transaction History:** - Developers and applications can use this method to retrieve the transaction history for a specific Stellar account. - -2. **Real-time Transaction Monitoring:** - By using streaming mode with the appropriate cursor, you can monitor and react to new transactions in real-time. - -### Request Parameters - -The `getAccountTransactions` method accepts the following parameters: - -- `accountId` (string, required): - The unique identifier (account ID) of the account for which you want to retrieve transactions. - -- `cursor` (string, optional): - A cursor value that determines the starting point for retrieving transactions. Set it to 'now' to stream transactions created since your request time. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of transactions to fetch in a single request. - -- `includeFailed` (boolean, optional): - A flag to indicate whether to include failed transactions in the results. Set to `true` to include failed transactions. - -### Return Object - -The `getAccountTransactions` method returns a JSON object containing the list of transactions associated with the specified account. Each transaction includes details such as its source, destination, amount, and other relevant information. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/transactions?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/transactions?cursor=216532408316960768&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/transactions?cursor=216517620744060928&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "memo": "Check ENIZ.IO Airdrop", - "memo_bytes": "Q2hlY2sgRU5JWi5JTyBBaXJkcm9w", - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16" - }, - "account": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GB5NGIDRDXRMBRSLT7FTZ47CBUZXCWL6LYOLBH6ZYCXR6NCNJTE2ENIZ" - }, - "ledger": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/50415380" - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16/operations{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16/effects{?cursor,limit,order}", - "templated": true - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=asc&cursor=216532408316960768" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=desc&cursor=216532408316960768" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16" - } - }, - "id": "36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16", - "paging_token": "216532408316960768", - "successful": true, - "hash": "36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16", - "ledger": 50415380, - "created_at": "2024-02-17T19:44:28Z", - "source_account": "GB5NGIDRDXRMBRSLT7FTZ47CBUZXCWL6LYOLBH6ZYCXR6NCNJTE2ENIZ", - "source_account_sequence": "215074769429599166", - "fee_account": "GB5NGIDRDXRMBRSLT7FTZ47CBUZXCWL6LYOLBH6ZYCXR6NCNJTE2ENIZ", - "fee_charged": "10000", - "max_fee": "1000500", - "operation_count": 100, - "envelope_xdr": "Hex data", - "result_xdr": "Hex data", - "result_meta_xdr": "Hex data", - "fee_meta_xdr": "Hex data", - "memo_type": "text", - "signatures": [ - "yroAw0Hl/cWJymRofDN5jHkeknbBp8I5Uuq/+VGgAOL1bwVDEL7SHCYUcmCix96mIXUwln4yaeTb1v505AvtBA==" - ], - "valid_after": "1970-01-01T00:00:00Z", - "valid_before": "2024-02-17T19:45:53Z", - "preconditions": { - "timebounds": { - "min_time": "0", - "max_time": "1708199153" - } - } - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getassets.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getassets.md deleted file mode 100644 index 408e3489..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getassets.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "getAssets" -slug: "rpc-stellar-getassets" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const inputParams = { - assetCode: "YOUR_ASSET_CODE", - assetIssuer: "YOUR_ASSET_ISSUER", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// Retrieve a list of all assets -const assets = await tatum.rpc.getAssets(inputParams); - -// Log the list of assets -console.log("Assets:", assets); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getAssets` method allows you to retrieve a list of all assets on the Stellar blockchain. You can use various filtering options to narrow down the asset list based on asset code, asset issuer, cursor for pagination, sorting order, and limit for the number of records to be returned. - -### Request Parameters - -The `getAssets` method accepts the following request parameters: - -- `assetCode` (string, optional): - The asset code for filtering assets by code. Use this parameter to list assets with a specific code. - -- `assetIssuer` (string, optional): - The asset issuer for filtering assets by issuer. Use this parameter to list assets issued by a specific account. - -- `cursor` (string, optional): - A cursor value that determines the starting point for pagination. Use this parameter to retrieve assets from a specific point in the asset list. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of assets to fetch in a single request. - -### Return Object - -The `getAssets` method returns a JSON object containing the list of assets that match the specified criteria. Each asset is represented as an object with various properties describing its characteristics. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/assets?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/assets?cursor=0001_GB7L7CB7F5R7GXXI2VY3AUHDIBGWHUB2SAYO7NPERUCQO4F35G62DBAR_credit_alphanum4&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/assets?cursor=0_GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT_credit_alphanum4&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "toml": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/.well-known/stellar.toml" - } - }, - "asset_type": "credit_alphanum4", - "asset_code": "0", - "asset_issuer": "GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT", - "paging_token": "0_GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT_credit_alphanum4", - "num_accounts": 24, - "num_claimable_balances": 0, - "num_liquidity_pools": 0, - "num_contracts": 0, - "num_archived_contracts": 0, - "amount": "998.9481303", - "accounts": { - "authorized": 24, - "authorized_to_maintain_liabilities": 0, - "unauthorized": 0 - }, - "claimable_balances_amount": "0.0000000", - "liquidity_pools_amount": "0.0000000", - "contracts_amount": "0.0000000", - "archived_contracts_amount": "0.0000000", - "balances": { - "authorized": "998.9481303", - "authorized_to_maintain_liabilities": "0.0000000", - "unauthorized": "0.0000000" - }, - "flags": { - "auth_required": false, - "auth_revocable": false, - "auth_immutable": false, - "auth_clawback_enabled": false - } - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalance.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalance.md deleted file mode 100644 index 0031e282..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalance.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "getClaimableBalance" -slug: "rpc-stellar-getclaimablebalance" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define the claimable balance ID (Replace 'YOUR_CLAIMABLE_BALANCE_ID' with the actual claimable balance ID) -const claimableBalanceId = "YOUR_CLAIMABLE_BALANCE_ID"; - -// Retrieve information about a specific claimable balance -const claimableBalance = await tatum.rpc.getClaimableBalance( - claimableBalanceId -); - -// Log the claimable balance details -console.log("Claimable Balance:", claimableBalance); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getClaimableBalance` method allows you to retrieve information about a specific claimable balance on the Stellar blockchain. You need to provide the claimable balance ID to identify the balance you want to retrieve. - -### Request Parameters - -The `getClaimableBalance` method accepts the following request parameters: - -- `claimableBalanceId` (string, required): - The unique identifier of the claimable balance you want to retrieve. - -### Return Object - -The `getClaimableBalance` method returns a JSON object containing the details of the requested claimable balance. The object includes various properties describing the characteristics of the claimable balance. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=33494305-000000006f6cd6031f3e4fcdfb795412cc0f1ffd45663098691f5eff88ff9b6cff1006a0&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=32747318-00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9" - }, - "transactions": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/transactions{?cursor,limit,order}", - "templated": true - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations{?cursor,limit,order}", - "templated": true - } - }, - "id": "00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9", - "asset": "BODHI:GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF", - "amount": "0.1000000", - "sponsor": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF", - "last_modified_ledger": 32747318, - "last_modified_time": null, - "claimants": [ - { - "destination": "GBEUDKANIFPTFHPWJ5T3R6RIO36RQBFGHYPAQ6STH7KMNDHAT36LHOLD", - "predicate": { - "unconditional": true - } - } - ], - "flags": { - "clawback_enabled": false - }, - "paging_token": "32747318-00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalances.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalances.md deleted file mode 100644 index b6f375c1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalances.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "getClaimableBalances" -slug: "rpc-stellar-getclaimablebalances" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const params = { - sponsor: "YOUR_SPONSOR_ACCOUNT_ID", - asset: "YOUR_ASSET", - claimant: "YOUR_CLAIMANT_ACCOUNT_ID", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// Retrieve a list of all claimable balances -const claimableBalances = await tatum.rpc.getClaimableBalances(params); - -// Log the list of claimable balances -console.log("Claimable Balances:", claimableBalances); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getClaimableBalances` method allows you to retrieve a list of all available claimable balances on the Stellar blockchain. You can use various filtering options to narrow down the list based on the sponsor account, asset code, claimant account, cursor for pagination, sorting order, and limit for the number of records to be returned. - -### Request Parameters - -The `getClaimableBalances` method accepts the following request parameters: - -- `sponsor` (string, optional): - The account ID of the sponsor to filter claimable balances. Use this parameter to list claimable balances sponsored by a specific account. - -- `asset` (string, optional): - The asset code to filter claimable balances. Use this parameter to list claimable balances associated with a specific asset. - -- `claimant` (string, optional): - The account ID of the claimant to filter claimable balances. Use this parameter to list claimable balances claimable by a specific account. - -- `cursor` (string, optional): - A cursor value that determines the starting point for pagination. Use this parameter to retrieve claimable balances from a specific point in the list. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of claimable balances to fetch in a single request. - -### Return Object - -The `getClaimableBalances` method returns a JSON object containing the list of claimable balances that match the specified criteria. Each claimable balance is represented as an object with various properties describing its characteristics. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=33494305-000000006f6cd6031f3e4fcdfb795412cc0f1ffd45663098691f5eff88ff9b6cff1006a0&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=32747318-00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9" - }, - "transactions": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/transactions{?cursor,limit,order}", - "templated": true - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations{?cursor,limit,order}", - "templated": true - } - }, - "id": "00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9", - "asset": "BODHI:GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF", - "amount": "0.1000000", - "sponsor": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF", - "last_modified_ledger": 32747318, - "last_modified_time": null, - "claimants": [ - { - "destination": "GBEUDKANIFPTFHPWJ5T3R6RIO36RQBFGHYPAQ6STH7KMNDHAT36LHOLD", - "predicate": { - "unconditional": true - } - } - ], - "flags": { - "clawback_enabled": false - }, - "paging_token": "32747318-00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-geteffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-geteffects.md deleted file mode 100644 index c17796fc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-geteffects.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: "getEffects" -slug: "rpc-stellar-geteffects" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// List all effects -const effects = await tatum.rpc.getEffects(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getEffects` method allows you to list all effects in the Stellar blockchain. Effects represent events or actions that have occurred on the network, such as payments, offers, and trustline changes. - -### Example use cases: - -1. **Effect Monitoring:** - Developers and applications can use this method to monitor and retrieve information about all effects on the Stellar network. - -2. **Streaming Effects:** - Users can use streaming mode to listen for real-time updates to effects as they are added to the Stellar ledger. - -### Request Parameters - -The `getEffects` method accepts a `params` object with the following properties: - -- `cursor` (string, optional): - An optional cursor to start listing effects from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of effects to return. The limit can range from 1 to 200. - -### Return Object - -The `getEffects` method returns an array of effects from the Stellar blockchain. Each effect object contains information about the effect type, details, and related transaction. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?cursor=215271955673288705-1&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?cursor=215271955673169921-1&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "operation": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673169921" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673169921-1" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673169921-1" - } - }, - "id": "0215271955673169921-0000000001", - "paging_token": "215271955673169921-1", - "account": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", - "type": "account_credited", - "type_i": 2, - "created_at": "2024-01-28T14:07:11Z", - "asset_type": "credit_alphanum4", - "asset_code": "yXLM", - "asset_issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55", - "amount": "1.0291984" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getfeestats.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getfeestats.md deleted file mode 100644 index aea15a57..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getfeestats.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "getFeeStats" -slug: "rpc-stellar-getfeestats" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Retrieve fee statistics -const feeStats = await tatum.rpc.getFeeStats(); - -// Log the fee statistics -console.log("Fee Statistics:", feeStats); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getFeeStats` method allows you to retrieve information about per-operation fee statistics over the last 5 ledgers on the Stellar blockchain. - -### Return Object - -The `getFeeStats` method returns a JSON object containing fee statistics for various operations. The structure of the returned object is defined by the `FeeStats` schema. - -(Note: The exact fields in the return object may vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "last_ledger": "50744146", - "last_ledger_base_fee": "100", - "ledger_capacity_usage": "0.58", - "fee_charged": { - "max": "100", - "min": "100", - "mode": "100", - "p10": "100", - "p20": "100", - "p30": "100", - "p40": "100", - "p50": "100", - "p60": "100", - "p70": "100", - "p80": "100", - "p90": "100", - "p95": "100", - "p99": "100" - }, - "max_fee": { - "max": "369592103", - "min": "100", - "mode": "100", - "p10": "100", - "p20": "100", - "p30": "100", - "p40": "1000", - "p50": "20000", - "p60": "51234", - "p70": "51234", - "p80": "100159", - "p90": "250005", - "p95": "500000", - "p99": "358388826" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledger.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledger.md deleted file mode 100644 index bf1f96d6..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledger.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "getLedger" -slug: "rpc-stellar-getledger" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define the sequence number of the ledger to retrieve (Replace placeholders with actual values and remove redundant) -const sequenceNumber = "YOUR_SEQUENCE_NUMBER"; - -// Retrieve information about a specific ledger using its sequence number -const ledgerInfo = await tatum.rpc.getLedger(sequenceNumber); - -// Log the ledger information -console.log("Ledger Info:", ledgerInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLedger` method allows you to retrieve information about a specific ledger on the Stellar blockchain. You can specify the ledger you want to retrieve by providing its sequence number as a parameter. - -### Request Parameters - -The `getLedger` method requires the following request parameter: - -- `sequence` (string, required): - The sequence number of the ledger you want to retrieve. This uniquely identifies the ledger you're interested in. - -### Return Object - -The `getLedger` method returns a JSON object containing information about the specified ledger. The returned object includes various properties describing the ledger's characteristics, such as its sequence number, transaction count, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908" - }, - "transactions": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions{?cursor,limit,order}", - "templated": true - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations{?cursor,limit,order}", - "templated": true - }, - "payments": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects{?cursor,limit,order}", - "templated": true - } - }, - "id": "377342fc7d2d3e8e8aebcc2bd069cebce97ef59142afcf3834187e27670b69e5", - "paging_token": "214305588031520768", - "hash": "377342fc7d2d3e8e8aebcc2bd069cebce97ef59142afcf3834187e27670b69e5", - "prev_hash": "64b283aa8f123102b27334c9b0b4d0ba7baca635bc0fdee2471762755185fc8d", - "sequence": 49896908, - "successful_transaction_count": 122, - "failed_transaction_count": 16, - "operation_count": 422, - "tx_set_operation_count": 444, - "closed_at": "2024-01-13T08:44:04Z", - "total_coins": "105443902087.3472865", - "fee_pool": "4352705.3880757", - "base_fee_in_stroops": 100, - "base_reserve_in_stroops": 5000000, - "max_tx_set_size": 1000, - "protocol_version": 19, - "header_xdr": "AAAAE2Syg6qPEjECsnM0ybC00Lp7rKY1vA/e4kcXYnVRhfyNp1FbP/TkMcsgPzxpkwmSanCPlHIkEEdIUluDz3RuOMAAAAAAZaJNVAAAAAAAAAABAAAAAJnoMfsa4vmDNtUy8T76WXcr2up7H7MouQjkXcMmro3YAAAAQOWiXUUgvk9prIYO2MowcNsSmp7gJ2pDeKstCpOS1JDvEGry7E0EIA2uNNuQicQkF0LPkzibuNqFIrRAlS3qwQt2V4R3dnRsy/hBIt5wz7oIBqVZNDN+w21lovTVBGxHHh5McTecKdm6+JSPeLr+qWjW8QFh7Z8+TOcgCjAtJkI1AvldzA6iHrPseVthAAAnlm6VrbUAAAEWAAAAAFZtQfcAAABkAExLQAAAA+jlo5p0S2VRLG/2qoS2AHIAqWpkozbDmPnGixgTrfRM4EhakDMvJGA2NlrXaNdrDghS8gBVmir/lvjB5aIM8CqaNZ3+bNIMjENN35Wl0SqvmRPHm1ba+rIkuDOUxRhPT5cTHtTJQ8xzm+/8UT+eTL84VX2S5mxKeyMkTW+VYnrVPwAAAAA=" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgereffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgereffects.md deleted file mode 100644 index d1f1eeaa..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgereffects.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: "getLedgerEffects" -slug: "rpc-stellar-getledgereffects" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define the ledger sequence number and optional parameters (Replace placeholders with actual values and remove redundant) -const params = { - sequence: "YOUR_LEDGER_SEQUENCE", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// Retrieve effects related to a specific ledger -const ledgerEffects = await tatum.rpc.getLedgersEffects(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLedgersEffects` method allows you to retrieve the effects of a specific Stellar ledger. - -### Example use cases: - -1. **Transaction Analysis:** Developers and applications can use this method to analyze the effects related to transactions and operations within a specific ledger. -2. **Transaction Tracking:** Tracking and monitoring the effects of operations within a specific ledger for auditing or analysis purposes. -3. **Historical Data Retrieval:** Researchers and analysts can retrieve effect-related data for historical analysis and record-keeping. - -### Request Parameters - -The `getLedgersEffects` method requires the following parameters: - -- `sequence` (string, required): The sequence number of the ledger for which you want to retrieve effects. -- `cursor` (string, optional): An optional cursor to start listing effects from a specific point within the ledger. -- `order` (string, optional): An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. -- `limit` (number, optional): An optional parameter to specify the maximum number of effects to return. The limit can range from 1 to 200. - -### Return Object - -The `getLedgersEffects` method returns an array of effects related to the specified ledger. Each effect includes details such as the type, account, operation, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects?cursor=214305588031623169-6&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects?cursor=214305588031610881-1&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "operation": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031610881" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031610881-1" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031610881-1" - } - }, - "id": "0214305588031610881-0000000001", - "paging_token": "214305588031610881-1", - "account": "GC2ATEL4K2O5BJO7Z76MYSV6TKHCROKV5GXEOU7NO2TUEOOMFDDIPWID", - "type": "trustline_flags_updated", - "type_i": 26, - "created_at": "2024-01-13T08:44:04Z", - "asset_type": "credit_alphanum4", - "asset_code": "USD", - "asset_issuer": "GC2ATEL4K2O5BJO7Z76MYSV6TKHCROKV5GXEOU7NO2TUEOOMFDDIPWID", - "trustor": "GDFQ5USFBAUR2XEKCC7Z6VBEN5TJJH7TZPFKNHR47RCW36NCO3RQ5U5T", - "authorized_flag": true - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgeroperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgeroperations.md deleted file mode 100644 index 3729c3f9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgeroperations.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: "getLedgerOperations" -slug: "rpc-stellar-getledgeroperations" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define the ledger sequence number and optional parameters (Replace placeholders with actual values and remove redundant) -const params = { - sequence: "YOUR_LEDGER_SEQUENCE", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, - includeFailed: true, - join: "inner", -}; - -// Retrieve successful operations related to a specific ledger -const ledgerOperations = await tatum.rpc.getLedgersOperations(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLedgersOperations` method allows you to retrieve successful operations in a specific Stellar ledger. - -### Example use cases: - -1. **Transaction Analysis:** - Developers and applications can use this method to analyze successful operations within a specific ledger, including operations like payments, account creation, and more. - -2. **Transaction Tracking:** - Tracking and monitoring successful operations made within a specific ledger for auditing or analysis purposes. - -3. **Historical Data Retrieval:** - Researchers and analysts can retrieve operation-related data for historical analysis and record-keeping. - -### Request Parameters - -The `getLedgersOperations` method requires the following parameters: - -- `sequence` (string, required): - The sequence number of the ledger for which you want to retrieve successful operations. - -- `cursor` (string, optional): - An optional cursor to start listing operations from a specific point within the ledger. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of operations to return. The limit can range from 1 to 200. - -- `includeFailed` (boolean, optional): - An optional parameter to include failed operations in the results (true or false). If not provided, it defaults to 'false'. - -- `join` (string, optional): - An optional parameter to specify the join type (inner or left). If not provided, it defaults to 'inner'. - -### Return Object - -The `getLedgersOperations` method returns an array of successful operations within the specified ledger. Each operation includes details such as the source account, operation type, asset, amount, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations?cursor=214305588031541254&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations?cursor=214305588031524865&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031524865" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031524865/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031524865" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031524865" - } - }, - "id": "214305588031524865", - "paging_token": "214305588031524865", - "transaction_successful": true, - "source_account": "GAZCCHIATB5Z6ATORF46EDXRUKVDNGHOFL3NKG7Y577NBTSOWMJX2DOS", - "type": "manage_buy_offer", - "type_i": 12, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4", - "amount": "105606.5780934", - "price": "0.0094863", - "price_r": { - "n": 94863, - "d": 10000000 - }, - "buying_asset_type": "credit_alphanum4", - "buying_asset_code": "SSLX", - "buying_asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", - "selling_asset_type": "native", - "offer_id": "1449752262" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgerpayments.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgerpayments.md deleted file mode 100644 index d378b520..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgerpayments.md +++ /dev/null @@ -1,467 +0,0 @@ ---- -title: "getLedgerPayments" -slug: "rpc-stellar-getledgerpayments" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define the ledger sequence number and optional parameters (Replace placeholders with actual values and remove redundant) -const params = { - sequence: 'YOUR_LEDGER_SEQUENCE', - cursor: 'YOUR_CURSOR', - order: 'asc', - limit: 10, - includeFailed: true - join: 'inner', -}; - -// Retrieve payments related to a specific ledger -const ledgerPayments = await tatum.rpc.getLedgersPayments(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLedgersPayments` method allows you to retrieve all payment-related operations in a specific Stellar ledger. This includes operations such as `create_account`, `payment`, `path_payment`, and `account_merge`. - -### Example use cases: - -1. **Payment Analysis:** Developers and applications can use this method to analyze payment-related operations within a specific ledger. -2. **Transaction Tracking:** Tracking and monitoring payments made within a specific ledger for auditing or analysis purposes. -3. **Historical Data Retrieval:** Researchers and analysts can retrieve payment-related data for historical analysis and record-keeping. - -### Request Parameters - -The `getLedgersPayments` method requires the following parameters: - -- `sequence` (string, required): The sequence number of the ledger for which you want to retrieve payment-related operations. -- `cursor` (string, optional): An optional cursor to start listing payments from a specific point within the ledger. -- `order` (string, optional): An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. -- `limit` (number, optional): An optional parameter to specify the maximum number of payments to return. The limit can range from 1 to 200. -- `includeFailed` (boolean, optional): An optional parameter to include failed payments in the results (true or false). If not provided, it defaults to 'false'. -- `join` (string, optional): An optional parameter to specify the join type (inner or left). If not provided, it defaults to 'inner'. - -### Return Object - -The `getLedgersPayments` method returns an array of payment-related operations within the specified ledger. Each operation includes details such as the sender, receiver, asset, amount, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments?cursor=214305588031754246&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments?cursor=214305588031623169&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031623169" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/97181f9964085703256e88c1e093fb28b329b7d0dfcf727221b2e957c33301ba" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031623169/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031623169" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031623169" - } - }, - "id": "214305588031623169", - "paging_token": "214305588031623169", - "transaction_successful": true, - "source_account": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", - "type": "path_payment_strict_receive", - "type_i": 2, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "97181f9964085703256e88c1e093fb28b329b7d0dfcf727221b2e957c33301ba", - "asset_type": "native", - "from": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", - "to": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", - "amount": "0.0961919", - "path": [ - { - "asset_type": "credit_alphanum4", - "asset_code": "MOBI", - "asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH" - }, - { - "asset_type": "credit_alphanum12", - "asset_code": "DOGET", - "asset_issuer": "GDOEVDDBU6OBWKL7VHDAOKD77UP4DKHQYKOKJJT5PR3WRDBTX35HUEUX" - }, - { - "asset_type": "credit_alphanum4", - "asset_code": "HODL", - "asset_issuer": "GAQEDFS2JK6JSQO53DWT23TGOLH5ZUZG4O3MNLF3CFUZWEJ6M7MMGJAV" - } - ], - "source_amount": "0.0959902", - "source_max": "0.0961919", - "source_asset_type": "native" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031696897" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/3047186e18a70351c5ec795a33fb97f4c466773df72d0540f0b5bc0332402153" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031696897/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031696897" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031696897" - } - }, - "id": "214305588031696897", - "paging_token": "214305588031696897", - "transaction_successful": true, - "source_account": "GAT7RNROHRNZG7RVOU4G6ODYP7C7QSV7N64BBFVB5U3J2RCZOGAUPBKO", - "type": "path_payment_strict_receive", - "type_i": 2, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "3047186e18a70351c5ec795a33fb97f4c466773df72d0540f0b5bc0332402153", - "asset_type": "credit_alphanum4", - "asset_code": "MOBI", - "asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH", - "from": "GAT7RNROHRNZG7RVOU4G6ODYP7C7QSV7N64BBFVB5U3J2RCZOGAUPBKO", - "to": "GAT7RNROHRNZG7RVOU4G6ODYP7C7QSV7N64BBFVB5U3J2RCZOGAUPBKO", - "amount": "4.6175312", - "path": [ - { - "asset_type": "credit_alphanum4", - "asset_code": "USDC", - "asset_issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN" - }, - { - "asset_type": "native" - } - ], - "source_amount": "4.6142496", - "source_max": "4.6175304", - "source_asset_type": "credit_alphanum4", - "source_asset_code": "MOBI", - "source_asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031709185" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/53dad14d0f7cd496edf2b5f6fb66e6aa423f8b79637f8f2558c954cc0a03f942" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031709185/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031709185" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031709185" - } - }, - "id": "214305588031709185", - "paging_token": "214305588031709185", - "transaction_successful": true, - "source_account": "GBDFUEX5ULIO54S5IYRNNORXI265GVYXXXEYUAEHCVQF2XWA7WJONRJT", - "type": "payment", - "type_i": 1, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "53dad14d0f7cd496edf2b5f6fb66e6aa423f8b79637f8f2558c954cc0a03f942", - "asset_type": "native", - "from": "GBDFUEX5ULIO54S5IYRNNORXI265GVYXXXEYUAEHCVQF2XWA7WJONRJT", - "to": "GC5SCPJLHX6WFLUG2GF2W57R4LQ4QUEJEXFOXSZTBSGNUD6RJW2ZX4D3", - "amount": "50.0000000" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031721473" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/1097e158b818ee82dc358ee88f7428b81590546aefd78904ee57bf49cdcbbe41" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031721473/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031721473" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031721473" - } - }, - "id": "214305588031721473", - "paging_token": "214305588031721473", - "transaction_successful": true, - "source_account": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", - "type": "path_payment_strict_receive", - "type_i": 2, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "1097e158b818ee82dc358ee88f7428b81590546aefd78904ee57bf49cdcbbe41", - "asset_type": "native", - "from": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", - "to": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", - "amount": "0.0509312", - "path": [ - { - "asset_type": "credit_alphanum4", - "asset_code": "MOBI", - "asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH" - }, - { - "asset_type": "credit_alphanum12", - "asset_code": "LIBRE", - "asset_issuer": "GAYCCWKECNGDRHYU3UTREBD2XLC3CUQN6FV22TKM4WCQER3IWR7TF5CY" - }, - { - "asset_type": "credit_alphanum4", - "asset_code": "NLT", - "asset_issuer": "GAX25ZVO4JVPEDK3R7EUFCGVI5XCOQGMVGQNZVFLGY2RWTBIQBW2ZNLT" - } - ], - "source_amount": "0.0506995", - "source_max": "0.0509312", - "source_asset_type": "native" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754241" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754241/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754241" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754241" - } - }, - "id": "214305588031754241", - "paging_token": "214305588031754241", - "transaction_successful": true, - "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "type": "payment", - "type_i": 1, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", - "asset_type": "credit_alphanum4", - "asset_code": "SSLX", - "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", - "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "to": "GCP4FHBWMDMV73LUOENECG6HYR3SXZ4KUB2S4FIGCAWZL7ZQDA27PSYC", - "amount": "0.0100000" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754242" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754242/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754242" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754242" - } - }, - "id": "214305588031754242", - "paging_token": "214305588031754242", - "transaction_successful": true, - "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "type": "payment", - "type_i": 1, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", - "asset_type": "credit_alphanum4", - "asset_code": "SSLX", - "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", - "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "to": "GCP4DTPJ346VZDN3WMKZVGVTW73Q5J4SOCYHE23SBI3XSYMMPWZLGCTP", - "amount": "0.0100000" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754243" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754243/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754243" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754243" - } - }, - "id": "214305588031754243", - "paging_token": "214305588031754243", - "transaction_successful": true, - "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "type": "payment", - "type_i": 1, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", - "asset_type": "credit_alphanum4", - "asset_code": "SSLX", - "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", - "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "to": "GCP4BVXCBHJJNZ3F6N7CSGZ6TMXAKKGENFSGLWFP7BRSCS77X3XI6RTN", - "amount": "0.0100000" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754244" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754244/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754244" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754244" - } - }, - "id": "214305588031754244", - "paging_token": "214305588031754244", - "transaction_successful": true, - "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "type": "payment", - "type_i": 1, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", - "asset_type": "credit_alphanum4", - "asset_code": "SSLX", - "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", - "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "to": "GCP4AQ2H5R2ZPL6VZMD5UTXIBALY47SE2TWE4LOIUPZEDYTSHCQXWQB6", - "amount": "0.0100000" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754245" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754245/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754245" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754245" - } - }, - "id": "214305588031754245", - "paging_token": "214305588031754245", - "transaction_successful": true, - "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "type": "payment", - "type_i": 1, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", - "asset_type": "credit_alphanum4", - "asset_code": "SSLX", - "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", - "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "to": "GCP3WXBZOCDFUXLRHY27EYAFQXLJ4NNWV7HBHBL56IPFKOJQGPBOTNSN", - "amount": "0.0100000" - }, - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754246" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754246/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754246" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754246" - } - }, - "id": "214305588031754246", - "paging_token": "214305588031754246", - "transaction_successful": true, - "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "type": "payment", - "type_i": 1, - "created_at": "2024-01-13T08:44:04Z", - "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", - "asset_type": "credit_alphanum4", - "asset_code": "SSLX", - "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", - "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", - "to": "GCP3URZ5H3L77QOJ2G44OCOFTVKXXR34CUUWG3IDDKPX3GRPRCMDSJAW", - "amount": "0.0100000" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgers.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgers.md deleted file mode 100644 index b269b0de..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgers.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: "getLedgers" -slug: "rpc-stellar-getledgers" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define optional parameters for listing ledgers (Replace placeholders with actual values and remove redundant) -const params = { - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// List all ledgers or stream new ledgers as they close -const ledgers = await tatum.rpc.getLedgers(params); - -// Log the list of ledgers -console.log("Ledgers:", ledgers); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLedgers` method allows you to retrieve a list of all ledgers on the Stellar blockchain. You can use this endpoint to either list all existing ledgers or stream new ledgers as they are created. - -### Request Parameters - -The `getLedgers` method supports the following optional request parameters: - -- `cursor` (string, optional): - Set the cursor to start listing ledgers from a specific ledger. If not specified, it starts from the earliest known ledger. - -- `order` (string, optional): - Set the order of listing, which can be either 'asc' (ascending) or 'desc' (descending). If not specified, it defaults to 'asc'. - -- `limit` (integer, optional): - Set the maximum number of ledgers to return in a single request. The limit can range from 1 to an upper limit hardcoded in Horizon for performance reasons. If not specified, it defaults to 10. - -### Return Object - -The `getLedgers` method returns a JSON object representing a list of ledgers on the Stellar blockchain. Each ledger entry includes various properties describing the ledger's characteristics, such as its sequence number, transaction count, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers?cursor=209252254065098752&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers?cursor=214305626686226432&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers?cursor=214305588031520768&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908" - }, - "transactions": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions{?cursor,limit,order}", - "templated": true - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations{?cursor,limit,order}", - "templated": true - }, - "payments": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects{?cursor,limit,order}", - "templated": true - } - }, - "id": "377342fc7d2d3e8e8aebcc2bd069cebce97ef59142afcf3834187e27670b69e5", - "paging_token": "214305588031520768", - "hash": "377342fc7d2d3e8e8aebcc2bd069cebce97ef59142afcf3834187e27670b69e5", - "prev_hash": "64b283aa8f123102b27334c9b0b4d0ba7baca635bc0fdee2471762755185fc8d", - "sequence": 49896908, - "successful_transaction_count": 122, - "failed_transaction_count": 16, - "operation_count": 422, - "tx_set_operation_count": 444, - "closed_at": "2024-01-13T08:44:04Z", - "total_coins": "105443902087.3472865", - "fee_pool": "4352705.3880757", - "base_fee_in_stroops": 100, - "base_reserve_in_stroops": 5000000, - "max_tx_set_size": 1000, - "protocol_version": 19, - "header_xdr": "AAAAE2Syg6qPEjECsnM0ybC00Lp7rKY1vA/e4kcXYnVRhfyNp1FbP/TkMcsgPzxpkwmSanCPlHIkEEdIUluDz3RuOMAAAAAAZaJNVAAAAAAAAAABAAAAAJnoMfsa4vmDNtUy8T76WXcr2up7H7MouQjkXcMmro3YAAAAQOWiXUUgvk9prIYO2MowcNsSmp7gJ2pDeKstCpOS1JDvEGry7E0EIA2uNNuQicQkF0LPkzibuNqFIrRAlS3qwQt2V4R3dnRsy/hBIt5wz7oIBqVZNDN+w21lovTVBGxHHh5McTecKdm6+JSPeLr+qWjW8QFh7Z8+TOcgCjAtJkI1AvldzA6iHrPseVthAAAnlm6VrbUAAAEWAAAAAFZtQfcAAABkAExLQAAAA+jlo5p0S2VRLG/2qoS2AHIAqWpkozbDmPnGixgTrfRM4EhakDMvJGA2NlrXaNdrDghS8gBVmir/lvjB5aIM8CqaNZ3+bNIMjENN35Wl0SqvmRPHm1ba+rIkuDOUxRhPT5cTHtTJQ8xzm+/8UT+eTL84VX2S5mxKeyMkTW+VYnrVPwAAAAA=" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgertransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgertransactions.md deleted file mode 100644 index 2e5875e7..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgertransactions.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: "getLedgerTransactions" -slug: "rpc-stellar-getledgertransactions" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define the ledger sequence number and optional parameters (Replace placeholders with actual values and remove redundant) -const params = { - sequence: "YOUR_LEDGER_SEQUENCE", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, - includeFailed: true, -}; - -// Retrieve transactions for a specific ledger -const ledgerTransactions = await tatum.rpc.getLedgersTransactions(params); - -// Log the list of ledger transactions -console.log("Ledger Transactions:", ledgerTransactions); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLedgersTransactions` method allows you to retrieve a list of successful transactions associated with a specific ledger on the Stellar blockchain. You can specify the ledger's sequence number and use optional parameters to customize the result. - -### Request Parameters - -The `getLedgersTransactions` method requires the following parameters: - -- `sequence` (string, required): Specify the sequence number of the ledger for which you want to retrieve transactions. -- `cursor` (string, optional): Set the cursor to start listing transactions from a specific transaction within the ledger. If not specified, it starts from the beginning. -- `order` (string, optional): Set the order of listing, which can be either 'asc' (ascending) or 'desc' (descending). If not specified, it defaults to 'asc'. -- `limit` (integer, optional): Set the maximum number of transactions to return in a single request. The limit can range from 1 to an upper limit hardcoded in Horizon for performance reasons. If not specified, it defaults to 10. -- `includeFailed` (boolean, optional): Specify whether to include failed transactions in the results. Set to `true` to include failed transactions, or `false` to exclude them. If not specified, it defaults to `false`. - -### Return Object - -The `getLedgersTransactions` method returns a JSON object representing a list of successful transactions associated with the specified ledger. Each transaction entry includes various properties describing the transaction, such as its transaction hash, source account, operation details, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions?cursor=214305588031565824&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions?cursor=214305588031524864&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4" - }, - "account": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GAZCCHIATB5Z6ATORF46EDXRUKVDNGHOFL3NKG7Y577NBTSOWMJX2DOS" - }, - "ledger": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908" - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4/operations{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4/effects{?cursor,limit,order}", - "templated": true - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=asc&cursor=214305588031524864" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=desc&cursor=214305588031524864" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4" - } - }, - "id": "83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4", - "paging_token": "214305588031524864", - "successful": true, - "hash": "83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4", - "ledger": 49896908, - "created_at": "2024-01-13T08:44:04Z", - "source_account": "GAZCCHIATB5Z6ATORF46EDXRUKVDNGHOFL3NKG7Y577NBTSOWMJX2DOS", - "source_account_sequence": "157780425393618577", - "fee_account": "GAZCCHIATB5Z6ATORF46EDXRUKVDNGHOFL3NKG7Y577NBTSOWMJX2DOS", - "fee_charged": "100", - "max_fee": "100", - "operation_count": 1, - "envelope_xdr": "AAAAAgAAAAAyIR0AmHufAm6JeeIO8aKqNpjuKvbVG/jv/tDOTrMTfQAAAGQCMIx2ABi+kQAAAAEAAAAAAAAAAAAAAABlok1uAAAAAAAAAAEAAAAAAAAADAAAAAAAAAABU1NMWAAAAABOU2N5aRNltdxYaKXhwiK5X5GkCkz4nPf6ac+axwxIfQAAAPXibPzGAAFyjwCYloAAAAAAVml2xgAAAAAAAAABTrMTfQAAAEDf1H9htFjhgBsmeu+wg7k0wWJzTsX0bPmUuulWF2cW6A83T0Dc/iea50iARBqCjlF0u7ANpEmOWdhK2CW3/UAF", - "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAMAAAAAAAAAAAAAAABAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAAFZpdsYAAAAAAAAAAVNTTFgAAAAATlNjeWkTZbXcWGil4cIiuV+RpApM+Jz3+mnPmscMSH0AAAACVSDxEQCYloAAAXKPAAAAAAAAAAAAAAAA", - "result_meta_xdr": "AAAAAgAAAAIAAAADAvldzAAAAAAAAAAAMiEdAJh7nwJuiXniDvGiqjaY7ir21Rv47/7Qzk6zE30AAAAW0Mp5WAIwjHYAGL6QAAAAJgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAQAAACJBvvGgAAAAFba2mA4AAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAC+V3LAAAAAGWiTU4AAAAAAAAAAQL5XcwAAAAAAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAFtDKeVgCMIx2ABi+kQAAACYAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAiQb7xoAAAABW2tpgOAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAAvldzAAAAABlok1UAAAAAAAAAAEAAAAGAAAAAwL5XOYAAAACAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAAFZpdsYAAAAAAAAAAVNTTFgAAAAATlNjeWkTZbXcWGil4cIiuV+RpApM+Jz3+mnPmscMSH0AAAACVSF7XwCYloAAAXKPAAAAAAAAAAAAAAAAAAAAAQL5XcwAAAACAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAAFZpdsYAAAAAAAAAAVNTTFgAAAAATlNjeWkTZbXcWGil4cIiuV+RpApM+Jz3+mnPmscMSH0AAAACVSDxEQCYloAAAXKPAAAAAAAAAAAAAAAAAAAAAwL5XcsAAAABAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAAVNTTFgAAAAATlNjeWkTZbXcWGil4cIiuV+RpApM+Jz3+mnPmscMSH0AAAEkapBph3zmbFDihAAAAAAAAQAAAAEAAAOQdGO06wAAAPIDPIERAAAAAAAAAAAAAAABAvldzAAAAAEAAAAAMiEdAJh7nwJuiXniDvGiqjaY7ir21Rv47/7Qzk6zE30AAAABU1NMWAAAAABOU2N5aRNltdxYaKXhwiK5X5GkCkz4nPf6ac+axwxIfQAAASRqkGmHfOZsUOKEAAAAAAABAAAAAQAAA5B0KsGBAAAA8gM8gREAAAAAAAAAAAAAAAMC+V3MAAAAAAAAAAAyIR0AmHufAm6JeeIO8aKqNpjuKvbVG/jv/tDOTrMTfQAAABbQynlYAjCMdgAYvpEAAAAmAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAIkG+8aAAAAAVtraYDgAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAL5XcwAAAAAZaJNVAAAAAAAAAABAvldzAAAAAAAAAAAMiEdAJh7nwJuiXniDvGiqjaY7ir21Rv47/7Qzk6zE30AAAAW0Mp5WAIwjHYAGL6RAAAAJgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAQAAACJBvvGgAAAAFba2DcAAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAC+V3MAAAAAGWiTVQAAAAAAAAAAA==", - "fee_meta_xdr": "AAAAAgAAAAMC+V3LAAAAAAAAAAAyIR0AmHufAm6JeeIO8aKqNpjuKvbVG/jv/tDOTrMTfQAAABbQynm8AjCMdgAYvpAAAAAmAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAIkG+8aAAAAAVtraYDgAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAL5XcsAAAAAZaJNTgAAAAAAAAABAvldzAAAAAAAAAAAMiEdAJh7nwJuiXniDvGiqjaY7ir21Rv47/7Qzk6zE30AAAAW0Mp5WAIwjHYAGL6QAAAAJgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAQAAACJBvvGgAAAAFba2mA4AAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAC+V3LAAAAAGWiTU4AAAAA", - "memo_type": "none", - "signatures": [ - "39R/YbRY4YAbJnrvsIO5NMFic07F9Gz5lLrpVhdnFugPN09A3P4nmudIgEQago5RdLuwDaRJjlnYStglt/1ABQ==" - ], - "valid_after": "1970-01-01T00:00:00Z", - "valid_before": "2024-01-13T08:44:30Z", - "preconditions": { - "timebounds": { - "min_time": "0", - "max_time": "1705135470" - } - } - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypool.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypool.md deleted file mode 100644 index 0dd8bb41..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypool.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: "getLiquidityPool" -slug: "rpc-stellar-getliquiditypool" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Replace 'YOUR_LIQUIDITY_POOL_ID' with the actual Liquidity Pool ID -const liquidityPoolId = "YOUR_LIQUIDITY_POOL_ID"; - -// Retrieve information about a specific liquidity pool -const liquidityPool = await tatum.rpc.getLiquidityPool(liquidityPoolId); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLiquidityPool` method allows you to retrieve information about a specific liquidity pool on the Stellar blockchain. - -### Example use cases: - -1. **Liquidity Pool Analysis:** - Developers and applications can use this method to analyze and retrieve detailed information about a specific liquidity pool. - -2. **Liquidity Pool Management:** - Platform administrators can access information about a liquidity pool for management purposes. - -3. **Liquidity Pool Exploration:** - Researchers and analysts can explore and study the characteristics of individual liquidity pools. - -### Request Parameters - -The `getLiquidityPool` method requires the following parameter: - -- `liquidityPoolId` (string): - The unique identifier of the liquidity pool you want to retrieve information about. - -### Return Object - -The `getLiquidityPool` method returns an object containing detailed information about the specified liquidity pool. This information may include the liquidity pool ID, reserve assets, total value, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a" - }, - "transactions": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions{?cursor,limit,order}", - "templated": true - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations{?cursor,limit,order}", - "templated": true - } - }, - "id": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", - "paging_token": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", - "fee_bp": 30, - "type": "constant_product", - "total_trustlines": "1", - "total_shares": "5494.2144063", - "reserves": [ - { - "asset": "native", - "amount": "3.5287238" - }, - { - "asset": "GOLDBANK001:GDEUQ2MX3YXMITFOTC3CO3GW5V3XE3IVG7JKLZZAOZ7WFYIN256INDUS", - "amount": "11669718.3952703" - } - ], - "last_modified_ledger": 50744249, - "last_modified_time": "2024-03-11T13:02:15Z" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooleffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooleffects.md deleted file mode 100644 index d97e215c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooleffects.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "getLiquidityPoolEffects" -slug: "rpc-stellar-getliquiditypooleffects" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Replace 'YOUR_LIQUIDITY_POOL_ID' with the actual Liquidity Pool ID -const liquidityPoolId = "YOUR_LIQUIDITY_POOL_ID"; - -// Retrieve effects related to a specific liquidity pool -const effects = await tatum.rpc.liquidityPoolEffects(liquidityPoolId); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `liquidityPoolEffects` method allows you to retrieve effects related to a specific liquidity pool on the Stellar blockchain. Effects represent various events or changes that occur within the Stellar network, such as trades, payments, and more. - -### Example use cases: - -1. **Monitoring Liquidity Pool Activity:** - Developers and applications can use this method to monitor and track events related to a particular liquidity pool. - -2. **Transaction Analysis:** - Researchers and analysts can analyze the effects of liquidity pool transactions for reporting and insights. - -3. **Real-time Updates:** - Applications can subscribe to streaming updates to receive real-time notifications of new effects associated with the liquidity pool. - -### Request Parameters - -The `liquidityPoolEffects` method requires the following parameters: - -- `liquidityPoolId` (string): - The unique identifier of the liquidity pool for which you want to retrieve related effects. - - ```json - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/effects?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/effects?cursor=214312580239376385-2&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/effects?cursor=214312571649462273-1&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "operation": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214312571649462273" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214312571649462273-1" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214312571649462273-1" - } - }, - "id": "0214312571649462273-0000000001", - "paging_token": "214312571649462273-1", - "account": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", - "type": "account_credited", - "type_i": 2, - "created_at": "2024-01-13T11:19:52Z", - "asset_type": "native", - "amount": "0.0252872" - } - ] - } - } - ``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooloperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooloperations.md deleted file mode 100644 index e8d3fa3c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooloperations.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: "getLiquidityPoolOperations" -slug: "rpc-stellar-getliquiditypooloperations" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - liquidityPoolId: "YOUR_LIQUIDITY_POOL_ID", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, - includeFailed: true, - join: true, -}; - -// Retrieve operations related to a liquidity pool -const liquidityPoolOperations = await tatum.rpc.getLiquidityPoolOperations( - params -); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLiquidityPoolOperations` method allows you to retrieve a list of operations related to a specific liquidity pool on the Stellar blockchain. - -### Example use cases: - -1. **Liquidity Pool Operation Analysis:** - Developers and applications can use this method to analyze and retrieve information about operations associated with a liquidity pool. - -2. **Liquidity Pool Operation Monitoring:** - Platform administrators can monitor and track operations related to liquidity pools for auditing and management purposes. - -3. **Liquidity Pool Operation Exploration:** - Researchers and analysts can explore and analyze the characteristics of operations involving liquidity pools on the Stellar network. - -### Request Parameters - -The `getLiquidityPoolOperations` method accepts the following optional parameters: - -- `liquidityPoolId` (string, required): - The unique identifier of the liquidity pool for which you want to retrieve operations. - -- `cursor` (string, optional): - An optional cursor to start listing operations from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of operations to return. The limit can range from 1 to 200. - -- `includeFailed` (boolean, optional): - An optional parameter to include failed operations. If set to true, failed operations will be included in the results. Defaults to false. - -- `join` (boolean, optional): - An optional parameter to join results. If set to true, results will be joined. Defaults to false. - -### Return Object - -The `getLiquidityPoolOperations` method returns an array of operations related to the specified liquidity pool on the Stellar blockchain. Each operation object contains information such as the operation ID, source account, type of operation, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations?cursor=215379467295031297&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations?cursor=215280038803128321&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215280038803128321" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215280038803128321/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215280038803128321" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215280038803128321" - } - }, - "id": "215280038803128321", - "paging_token": "215280038803128321", - "transaction_successful": true, - "source_account": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", - "type": "path_payment_strict_receive", - "type_i": 2, - "created_at": "2024-01-28T17:10:34Z", - "transaction_hash": "91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56", - "asset_type": "native", - "from": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", - "to": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", - "amount": "0.0149988", - "path": [ - { - "asset_type": "credit_alphanum12", - "asset_code": "XRPBANK003", - "asset_issuer": "GAUCPLSPBJKOSN7WZK6SDD2BYPQMC3YSWMLX4XXY7S4JPQFLJXEINDUS" - }, - { - "asset_type": "credit_alphanum12", - "asset_code": "XRPGOLD", - "asset_issuer": "GAUCPLSPBJKOSN7WZK6SDD2BYPQMC3YSWMLX4XXY7S4JPQFLJXEINDUS" - }, - { - "asset_type": "credit_alphanum12", - "asset_code": "BRICSGOLD", - "asset_issuer": "GAUCPLSPBJKOSN7WZK6SDD2BYPQMC3YSWMLX4XXY7S4JPQFLJXEINDUS" - }, - { - "asset_type": "credit_alphanum12", - "asset_code": "RUGOLDBRIDGE", - "asset_issuer": "GAUCPLSPBJKOSN7WZK6SDD2BYPQMC3YSWMLX4XXY7S4JPQFLJXEINDUS" - }, - { - "asset_type": "credit_alphanum12", - "asset_code": "GOLDBANK001", - "asset_issuer": "GDEUQ2MX3YXMITFOTC3CO3GW5V3XE3IVG7JKLZZAOZ7WFYIN256INDUS" - } - ], - "source_amount": "0.0145987", - "source_max": "0.0149988", - "source_asset_type": "native" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypools.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypools.md deleted file mode 100644 index e8189b34..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypools.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: "getLiquidityPools" -slug: "rpc-stellar-getliquiditypools" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define optional parameters (Replace placeholders with actual values and remove redundant) -const params = { - reserve: "YOUR_RESERVE", - account: "YOUR_ACCOUNT", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// List all available liquidity pools -const liquidityPools = await tatum.rpc.getLiquidityPools(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLiquidityPools` method allows you to retrieve a list of all available liquidity pools on the Stellar blockchain. - -### Example use cases: - -1. **Liquidity Pool Analysis:** - Developers and applications can use this method to analyze and retrieve information about existing liquidity pools. - -2. **Liquidity Pool Management:** - Platform administrators can manage liquidity pools by listing and tracking their status. - -3. **Liquidity Pool Exploration:** - Researchers and analysts can explore and analyze the characteristics of liquidity pools on the Stellar network. - -### Request Parameters - -The `getLiquidityPools` method accepts the following optional parameters: - -- `reserve` (string, optional): - Filter liquidity pools by the reserve asset. Provide the asset code of the reserve asset. - -- `account` (string, optional): - Filter liquidity pools by account ID. Provide the account ID associated with the liquidity pool. - -- `cursor` (string, optional): - An optional cursor to start listing liquidity pools from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of liquidity pools to return. The limit can range from 1 to 200. - -### Return Object - -The `getLiquidityPools` method returns an array of liquidity pools on the Stellar blockchain. Each liquidity pool object contains information such as the liquidity pool ID, reserve asset, total value, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools?cursor=00293f3a22c8ef5561de7cefc98f9286ac688cb8abf6b1c29a1dabbb63f265ce&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools?cursor=0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a" - }, - "transactions": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions{?cursor,limit,order}", - "templated": true - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations{?cursor,limit,order}", - "templated": true - } - }, - "id": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", - "paging_token": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", - "fee_bp": 30, - "type": "constant_product", - "total_trustlines": "1", - "total_shares": "5494.2144063", - "reserves": [ - { - "asset": "native", - "amount": "3.5287238" - }, - { - "asset": "GOLDBANK001:GDEUQ2MX3YXMITFOTC3CO3GW5V3XE3IVG7JKLZZAOZ7WFYIN256INDUS", - "amount": "11669718.3952703" - } - ], - "last_modified_ledger": 50744249, - "last_modified_time": "2024-03-11T13:02:15Z" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltrades.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltrades.md deleted file mode 100644 index 7a96c0c4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltrades.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: "getLiquidityPoolTrades" -slug: "rpc-stellar-getliquiditypooltrades" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - liquidityPoolId: "YOUR_LIQUIDITY_POOL_ID", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// Retrieve trades related to a liquidity pool -const liquidityPoolTrades = await tatum.rpc.getLiquidityPoolTrades(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLiquidityPoolTrades` method allows you to retrieve successful trades fulfilled by a specific liquidity pool on the Stellar blockchain. - -### Example use cases: - -1. **Liquidity Pool Monitoring:** - Developers and applications can use this method to monitor and retrieve successful trades related to liquidity pools. - -2. **Liquidity Pool Analysis:** - Researchers and analysts can analyze the trade history of liquidity pools to gain insights into their performance. - -### Request Parameters - -The `getLiquidityPoolTrades` method accepts the following parameters: - -- `liquidityPoolId` (string): - The ID of the liquidity pool for which you want to retrieve related trades. - -- `cursor` (string, optional): - An optional cursor to start listing liquidity pool trades from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of trades to return. The limit can range from 1 to 200. - -### Return Object - -The `getLiquidityPoolTrades` method returns an array of trades related to the specified liquidity pool on the Stellar blockchain. Each trade object contains information such as the trade ID, asset details, timestamp, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/trades?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/trades?cursor=214318047732097026-0&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/trades?cursor=214312571649462273-0&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "" - }, - "base": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742" - }, - "counter": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a" - }, - "operation": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214312571649462273" - } - }, - "id": "214312571649462273-0", - "paging_token": "214312571649462273-0", - "ledger_close_time": "2024-01-13T11:19:52Z", - "trade_type": "liquidity_pool", - "liquidity_pool_fee_bp": 30, - "base_offer_id": "4825998590076850177", - "base_account": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", - "base_amount": "0.0242091", - "base_asset_type": "native", - "counter_liquidity_pool_id": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", - "counter_amount": "23250.7124160", - "counter_asset_type": "credit_alphanum12", - "counter_asset_code": "GOLDBANK001", - "counter_asset_issuer": "GDEUQ2MX3YXMITFOTC3CO3GW5V3XE3IVG7JKLZZAOZ7WFYIN256INDUS", - "base_is_seller": false, - "price": { - "n": "232507124160", - "d": "242091" - } - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltransactions.md deleted file mode 100644 index 776d01a2..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltransactions.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: "getLiquidityPoolTransactions" -slug: "rpc-stellar-getliquiditypooltransactions" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - liquidityPoolId: "YOUR_LIQUIDITY_POOL_ID", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, - includeFailed: true, -}; - -// Retrieve transactions related to a liquidity pool -const liquidityPoolTransactions = await tatum.rpc.getLiquidityPoolsTransactions( - params -); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLiquidityPoolsTransactions` method allows you to retrieve a list of transactions related to a specific liquidity pool on the Stellar blockchain. - -### Example use cases: - -1. **Liquidity Pool Transaction Analysis:** - Developers and applications can use this method to analyze and retrieve information about transactions associated with a liquidity pool. - -2. **Liquidity Pool Transaction Monitoring:** - Platform administrators can monitor and track transactions related to liquidity pools for auditing and management purposes. - -3. **Liquidity Pool Transaction Exploration:** - Researchers and analysts can explore and analyze the characteristics of transactions involving liquidity pools on the Stellar network. - -### Request Parameters - -The `getLiquidityPoolsTransactions` method accepts the following optional parameters: - -- `liquidityPoolId` (string, required): - The unique identifier of the liquidity pool for which you want to retrieve transactions. - -- `cursor` (string, optional): - An optional cursor to start listing transactions from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of transactions to return. The limit can range from 1 to 200. - -- `includeFailed` (boolean, optional): - An optional parameter to include failed transactions. If set to true, failed transactions will be included in the results. Defaults to false. - -### Return Object - -The `getLiquidityPoolsTransactions` method returns an array of transactions related to the specified liquidity pool on the Stellar blockchain. Each transaction object contains information such as the transaction ID, source account, destination account, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions?cursor=215379467295031296&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions?cursor=215280038803128320&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56" - }, - "account": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA4OGQSH75L2BBUEBRI4R56BP7ONJIJPGPSZXZYFCKQGXICPOXWFAU4H" - }, - "ledger": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/50123790" - }, - "operations": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56/operations{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56/effects{?cursor,limit,order}", - "templated": true - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=asc&cursor=215280038803128320" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=desc&cursor=215280038803128320" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56" - } - }, - "id": "91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56", - "paging_token": "215280038803128320", - "successful": true, - "hash": "91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56", - "ledger": 50123790, - "created_at": "2024-01-28T17:10:34Z", - "source_account": "GA4OGQSH75L2BBUEBRI4R56BP7ONJIJPGPSZXZYFCKQGXICPOXWFAU4H", - "account_muxed": "MA4OGQSH75L2BBUEBRI4R56BP7ONJIJPGPSZXZYFCKQGXICPOXWFAAAACJ4MHP7NAT4JQ", - "account_muxed_id": "20309889510660", - "source_account_sequence": "169911040828572928", - "fee_account": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", - "fee_charged": "200", - "max_fee": "2000", - "operation_count": 1, - "envelope_xdr": "", - "result_xdr": "", - "result_meta_xdr": "", - "memo_type": "none", - "signatures": [ - "qJxrEWQTd6cpHZyTgN4Ms+OwcE2rg+AqDlhUP5a450NlP8R4Vd6mgIxHR7ituxy9GS2W7Rl1XmqpgNCVup0kCw==" - ], - "valid_after": "1970-01-01T00:00:00Z", - "preconditions": { - "timebounds": { - "min_time": "0" - } - }, - "fee_bump_transaction": { - "hash": "91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56", - "signatures": [ - "qJxrEWQTd6cpHZyTgN4Ms+OwcE2rg+AqDlhUP5a450NlP8R4Vd6mgIxHR7ituxy9GS2W7Rl1XmqpgNCVup0kCw==" - ] - }, - "inner_transaction": { - "hash": "a87a96da677ed8c7e079ac7e920399c864bfc811299d351fc4cf7b5588b1ddbd", - "signatures": [ - "EK3OcLKkmFFHZaM75DkXF2OrSB3hc57kmUvqTA85yVKCu4WWAjQuDXSUJUczBiwKj3XMOTBUrDAJt+tYiB/YAA==", - "Qu/5Py1qmxLO3zo1qB0kFfTithuGiv+mGfiVh1/IkN1PAuHNZPJkLMpzxgYiAYHj9vJnsgqG7IIfU5+23E1kCA==" - ], - "max_fee": "500" - } - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffer.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffer.md deleted file mode 100644 index 6691decf..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffer.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "getOffer" -slug: "rpc-stellar-getoffer" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const offerId = "OFFER_ID"; - -// Retrieve information on a specific offer -const offerInfo = await tatum.rpc.getOffer(offerId); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getOffer` method allows you to retrieve information on a specific offer by providing the offer's unique identifier. - -### Example use cases: - -1. **Offer Information Retrieval:** - Developers and applications can use this method to retrieve detailed information about a specific offer on the Stellar network. - -2. **Offer Verification:** - Users can verify the details of an offer, including the asset types, issuer, code, and other relevant information. - -### Request Parameters - -The `getOffer` method accepts the following parameter: - -- `offerId` (string, required): - The unique identifier of the offer for which you want to retrieve information. - -### Return Object - -The `getOffer` method returns detailed information about the specified offer on the Stellar blockchain. The response includes data such as the offer ID, sponsor, seller, buying asset, selling asset, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/offers/2" - }, - "offer_maker": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GBPO4N6XOLOLW2EV6X2AEQMLKOBH3WF2IJCZEQU65SVVSN4JD44WORKD" - } - }, - "id": "2", - "paging_token": "2", - "seller": "GBPO4N6XOLOLW2EV6X2AEQMLKOBH3WF2IJCZEQU65SVVSN4JD44WORKD", - "selling": { - "asset_type": "credit_alphanum4", - "asset_code": "CHP", - "asset_issuer": "GDW3CNKSP5AOTDQ2YCKNGC6L65CE4JDX3JS5BV427OB54HCF2J4PUEVG" - }, - "buying": { - "asset_type": "credit_alphanum4", - "asset_code": "BEER", - "asset_issuer": "GDW3CNKSP5AOTDQ2YCKNGC6L65CE4JDX3JS5BV427OB54HCF2J4PUEVG" - }, - "amount": "1.9991292", - "price_r": { - "n": 1903, - "d": 20 - }, - "price": "95.1500000", - "last_modified_ledger": 50044488, - "last_modified_time": null -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffers.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffers.md deleted file mode 100644 index fb8400f8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffers.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "getOffers" -slug: "rpc-stellar-getoffers" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - sponsor: "SPONSOR_ADDRESS", - seller: "SELLER_ADDRESS", - sellingAssetType: "ASSET_TYPE", - sellingAssetIssuer: "ASSET_ISSUER", - sellingAssetCode: "ASSET_CODE", - buyingAssetType: "ASSET_TYPE", - buyingAssetIssuer: "ASSET_ISSUER", - buyingAssetCode: "ASSET_CODE", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// List all open offers -const allOffers = await tatum.rpc.getOffers(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getOffers` method allows you to list all currently open offers on the Stellar blockchain. - -### Example use cases: - -1. **Offer Monitoring:** - Developers and applications can use this method to monitor and retrieve information about all open offers on the Stellar network. - -2. **Offer Filtering:** - Platform administrators can filter and search for specific offers based on various criteria, such as asset type, issuer, code, seller, and more. - -3. **Streaming Offers:** - Users can use streaming mode to listen for new offers as they are added to the Stellar ledger. - -### Request Parameters - -The `getOffers` method accepts the following optional parameters: - -- `sponsor` (string, optional): - Filter by the sponsor of the offer. - -- `seller` (string, optional): - Filter by the seller of the offer. - -- `sellingAssetType` (string, optional): - Filter by the selling asset type. - -- `sellingAssetIssuer` (string, optional): - Filter by the selling asset issuer. - -- `sellingAssetCode` (string, optional): - Filter by the selling asset code. - -- `buyingAssetType` (string, optional): - Filter by the buying asset type. - -- `buyingAssetIssuer` (string, optional): - Filter by the buying asset issuer. - -- `buyingAssetCode` (string, optional): - Filter by the buying asset code. - -- `cursor` (string, optional): - An optional cursor to start listing offers from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of offers to return. The limit can range from 1 to 200. - -### Return Object - -The `getOffers` method returns an array of open offers on the Stellar blockchain. Each offer object contains information such as the offer ID, sponsor, seller, buying asset, selling asset, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/offers?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/offers?cursor=1848&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/offers?cursor=2&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/offers/2" - }, - "offer_maker": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GBPO4N6XOLOLW2EV6X2AEQMLKOBH3WF2IJCZEQU65SVVSN4JD44WORKD" - } - }, - "id": "2", - "paging_token": "2", - "seller": "GBPO4N6XOLOLW2EV6X2AEQMLKOBH3WF2IJCZEQU65SVVSN4JD44WORKD", - "selling": { - "asset_type": "credit_alphanum4", - "asset_code": "CHP", - "asset_issuer": "GDW3CNKSP5AOTDQ2YCKNGC6L65CE4JDX3JS5BV427OB54HCF2J4PUEVG" - }, - "buying": { - "asset_type": "credit_alphanum4", - "asset_code": "BEER", - "asset_issuer": "GDW3CNKSP5AOTDQ2YCKNGC6L65CE4JDX3JS5BV427OB54HCF2J4PUEVG" - }, - "amount": "1.9991292", - "price_r": { - "n": 1903, - "d": 20 - }, - "price": "95.1500000", - "last_modified_ledger": 50044488, - "last_modified_time": null - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffertrades.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffertrades.md deleted file mode 100644 index 106dc1cb..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffertrades.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: "getOfferTrades" -slug: "rpc-stellar-getoffertrades" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - offerId = 'OFFER_ID'; - cursor = 'YOUR_CURSOR'; - order = 'asc'; - limit = 10; -} - -// Retrieve trades for a specific offer -const offerTrades = await tatum.rpc.getOfferTrades(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getOfferTrades` method allows you to retrieve all trades associated with a specific offer by providing the offer's unique identifier. - -### Example use cases: - -1. **Trade Analysis:** - Developers and applications can use this method to analyze and retrieve information about trades related to a specific offer on the Stellar network. - -2. **Trade Monitoring:** - Platform administrators can monitor and track trades associated with offers for auditing and management purposes. - -3. **Streaming Trades:** - Users can use streaming mode to listen for new trades related to the offer as they are added to the Stellar ledger. - -### Request Parameters - -The `getOfferTrades` method accepts the following optional parameters: - -- `offerId` (string, required): - The unique identifier of the offer for which you want to retrieve trades. - -- `cursor` (string, optional): - An optional cursor to start listing trades from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of trades to return. The limit can range from 1 to 200. - -### Return Object - -The `getOfferTrades` method returns an array of trades related to the specified offer on the Stellar blockchain. Each trade object contains information such as the trade ID, seller, buyer, price, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_links": { - "self": { - "href": "https://horizon.stellar.org/offers/104078276/trades?cursor=&limit=3&order=asc" - }, - "next": { - "href": "https://horizon.stellar.org/offers/104078276/trades?cursor=107449584845914113-0&limit=3&order=asc" - }, - "prev": { - "href": "https://horizon.stellar.org/offers/104078276/trades?cursor=107449468881756161-0&limit=3&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "" - }, - "base": { - "href": "https://horizon.stellar.org/accounts/GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX" - }, - "counter": { - "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" - }, - "operation": { - "href": "https://horizon.stellar.org/operations/107449468881756161" - } - }, - "id": "107449468881756161-0", - "paging_token": "107449468881756161-0", - "ledger_close_time": "2019-07-26T09:17:02Z", - "offer_id": "104078276", - "base_offer_id": "104078276", - "base_account": "GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX", - "base_amount": "4433.2000000", - "base_asset_type": "native", - "counter_offer_id": "4719135487309144065", - "counter_account": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K", - "counter_amount": "443.3200000", - "counter_asset_type": "credit_alphanum4", - "counter_asset_code": "BB1", - "counter_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "base_is_seller": true, - "price": { - "n": "1", - "d": 10 - } - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperation.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperation.md deleted file mode 100644 index 489dfcdd..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperation.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: "getOperation" -slug: "rpc-stellar-getoperation" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - operationId: "OPERATION_ID", - join: true, -}; - -// Retrieve information about a specific operation -const operationInfo = await tatum.rpc.getOperation(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getOperation` method allows you to retrieve detailed information about a specific operation on the Stellar blockchain by providing the operation's unique identifier. - -### Example use cases: - -1. **Operation Information Retrieval:** - Developers and applications can use this method to retrieve detailed information about a specific operation on the Stellar network. - -2. **Operation Verification:** - Users can verify the details of an operation, including its type, source account, destination account, and other relevant information. - -### Request Parameters - -The `getOperation` method accepts the following parameters: - -- `operationId` (string, required): - The unique identifier of the operation for which you want to retrieve information. - -- `join` (boolean, optional): - An optional parameter to join results. If set to true, results will be joined. Defaults to false. - -### Return Object - -The `getOperation` method returns detailed information about the specified operation on the Stellar blockchain. The response includes data such as the operation ID, source account, destination account, type of operation, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=215271955673231361&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=215271955673128961&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673128961" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/bf3e8c575c463bff1c23c1a7113b38d1cb79c983be62bf696dc96632ef00af47" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673128961/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673128961" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673128961" - } - }, - "id": "215271955673128961", - "paging_token": "215271955673128961", - "transaction_successful": true, - "source_account": "GBARZTOSSCH3XDC7NMRIHQVOWEYX7VOBQ4TZTR4HZRBZS3UO7QID242H", - "type": "manage_sell_offer", - "type_i": 3, - "created_at": "2024-01-28T14:07:11Z", - "transaction_hash": "bf3e8c575c463bff1c23c1a7113b38d1cb79c983be62bf696dc96632ef00af47", - "amount": "0.1833209", - "price": "5.4578916", - "price_r": { - "n": 545789163, - "d": 100000000 - }, - "buying_asset_type": "native", - "selling_asset_type": "credit_alphanum4", - "selling_asset_code": "RIO", - "selling_asset_issuer": "GBNLJIYH34UWO5YZFA3A3HD3N76R6DOI33N4JONUOHEEYZYCAYTEJ5AK", - "offer_id": "1461815697" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperationeffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperationeffects.md deleted file mode 100644 index b252da54..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperationeffects.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "getOperationEffects" -slug: "rpc-stellar-getoperationeffects" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - operationId: "OPERATION_ID", - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// Retrieve effects of a specific operation -const operationEffects = await tatum.rpc.getOperationEffects(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getOperationEffects` method allows you to retrieve the effects of a specific operation on the Stellar blockchain by providing the operation's unique identifier. - -### Example use cases: - -1. **Effect Information Retrieval:** - Developers and applications can use this method to retrieve detailed information about the effects of a specific operation on the Stellar network. - -2. **Effect Analysis:** - Users can analyze the effects of an operation, which may include details about changes to account balances, trustlines, data entries, and more. - -### Request Parameters - -The `getOperationEffects` method accepts a single `params` object with the following properties: - -- `operationId` (string, required): - The unique identifier of the operation for which you want to retrieve effects. - -- `cursor` (string, optional): - An optional cursor to start listing effects from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of effects to return. The limit can range from 1 to 200. - -### Return Object - -The `getOperationEffects` method returns an array of effects related to the specified operation on the Stellar blockchain. Each effect object contains information about the changes that occurred as a result of the operation. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations//effects?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations//effects?cursor=215271955673288705-1&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations//effects?cursor=215271955673169921-1&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "operation": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673169921" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673169921-1" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673169921-1" - } - }, - "id": "0215271955673169921-0000000001", - "paging_token": "215271955673169921-1", - "account": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", - "type": "account_credited", - "type_i": 2, - "created_at": "2024-01-28T14:07:11Z", - "asset_type": "credit_alphanum4", - "asset_code": "yXLM", - "asset_issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55", - "amount": "1.0291984" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperations.md deleted file mode 100644 index 7c9fcfe6..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperations.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: "getOperations" -slug: "rpc-stellar-getoperations" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, - includeFailed: true, - join: true, -}; - -// List all successful operations -const allOperations = await tatum.rpc.listAllOperations(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `listAllOperations` method allows you to list all successful operations on the Stellar blockchain. - -### Example use cases: - -1. **Operation Monitoring:** - Developers and applications can use this method to monitor and retrieve information about all successful operations on the Stellar network. - -2. **Operation Filtering:** - Platform administrators can filter and search for specific operations based on various criteria, such as cursor, order, and more. - -3. **Streaming Operations:** - Users can use streaming mode to listen for new operations as they are added to the Stellar ledger. - -### Request Parameters - -The `listAllOperations` method accepts a single `params` object with the following properties: - -- `cursor` (string, optional): - An optional cursor to start listing operations from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of operations to return. The limit can range from 1 to 200. - -- `includeFailed` (boolean, optional): - An optional parameter to include failed operations. If set to true, failed operations will be included in the results. Defaults to false. - -- `join` (boolean, optional): - An optional parameter to join results. If set to true, results will be joined. Defaults to false. - -### Return Object - -The `listAllOperations` method returns an array of successful operations on the Stellar blockchain. Each operation object contains information such as the operation ID, source account, destination account, type of operation, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=215271955673231361&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=215271955673128961&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673128961" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/bf3e8c575c463bff1c23c1a7113b38d1cb79c983be62bf696dc96632ef00af47" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673128961/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673128961" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673128961" - } - }, - "id": "215271955673128961", - "paging_token": "215271955673128961", - "transaction_successful": true, - "source_account": "GBARZTOSSCH3XDC7NMRIHQVOWEYX7VOBQ4TZTR4HZRBZS3UO7QID242H", - "type": "manage_sell_offer", - "type_i": 3, - "created_at": "2024-01-28T14:07:11Z", - "transaction_hash": "bf3e8c575c463bff1c23c1a7113b38d1cb79c983be62bf696dc96632ef00af47", - "amount": "0.1833209", - "price": "5.4578916", - "price_r": { - "n": 545789163, - "d": 100000000 - }, - "buying_asset_type": "native", - "selling_asset_type": "credit_alphanum4", - "selling_asset_code": "RIO", - "selling_asset_issuer": "GBNLJIYH34UWO5YZFA3A3HD3N76R6DOI33N4JONUOHEEYZYCAYTEJ5AK", - "offer_id": "1461815697" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getorderbook.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getorderbook.md deleted file mode 100644 index 5cec131a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getorderbook.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: "getOrderBook" -slug: "rpc-stellar-getorderbook" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - sellingAssetType: "SELLING_ASSET_TYPE", - sellingAssetIssuer: "SELLING_ASSET_ISSUER", - sellingAssetCode: "SELLING_ASSET_CODE", - buyingAssetType: "BUYING_ASSET_TYPE", - buyingAssetIssuer: "BUYING_ASSET_ISSUER", - buyingAssetCode: "BUYING_ASSET_CODE", - limit: 10, -}; - -// Retrieve an order book -const orderBook = await tatum.rpc.getOrderBook(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getOrderBook` method allows you to retrieve an order book for a specific trading pair on the Stellar blockchain. The order book provides information about the current bids and asks for the specified assets. - -### Example use cases: - -1. **Order Book Data Retrieval:** - Developers and applications can use this method to retrieve order book data for trading pairs on the Stellar network. - -2. **Trading Pair Analysis:** - Traders and investors can analyze the current order book to make informed decisions about buying or selling assets. - -3. **Streaming Order Book:** - Users can use streaming mode to listen for updates to the order book in real-time. - -### Request Parameters - -The `getOrderBook` method accepts a single `params` object with the following properties: - -- `sellingAssetType` (string, required): - The asset type of the selling asset (e.g., "native" or "credit_alphanum4" or "credit_alphanum12"). - -- `sellingAssetIssuer` (string, optional): - The issuer account of the selling asset (required if the selling asset type is not "native"). - -- `sellingAssetCode` (string, optional): - The asset code of the selling asset (required if the selling asset type is not "native"). - -- `buyingAssetType` (string, required): - The asset type of the buying asset (e.g., "native" or "credit_alphanum4" or "credit_alphanum12"). - -- `buyingAssetIssuer` (string, optional): - The issuer account of the buying asset (required if the buying asset type is not "native"). - -- `buyingAssetCode` (string, optional): - The asset code of the buying asset (required if the buying asset type is not "native"). - -- `limit` (number, optional): - An optional parameter to specify the maximum number of bids and asks to return. The limit can range from 1 to 200. - -### Return Object - -The `getOrderBook` method returns an order book for the specified trading pair on the Stellar blockchain. The order book includes a list of bids (buy orders) and asks (sell orders) with details such as price and quantity. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "bids": [ - { - "price_r": { - "n": "10000000", - "d": "139999999" - }, - "price": "0.0714286", - "amount": "24.9999990" - }, - { - "price_r": { - "n": "1", - "d": "14" - }, - "price": "0.0714286", - "amount": "188.0000000" - }, - { - "price_r": { - "n": "1", - "d": "15" - }, - "price": "0.0666667", - "amount": "230.3200000" - }, - { - "price_r": { - "n": "1", - "d": "16" - }, - "price": "0.0625000", - "amount": "50.0000000" - } - ], - "asks": [ - { - "price_r": { - "n": "5000000", - "d": "62500001" - }, - "price": "0.0800000", - "amount": "4.9400001" - }, - { - "price_r": { - "n": "10000000", - "d": "125000001" - }, - "price": "0.0800000", - "amount": "2516.5154327" - }, - { - "price_r": { - "n": "2", - "d": "25" - }, - "price": "0.0800000", - "amount": "3125.0000000" - }, - { - "price_r": { - "n": "4", - "d": "49" - }, - "price": "0.0816327", - "amount": "4593.7500000" - } - ], - "base": { - "asset_type": "native" - }, - "counter": { - "asset_type": "credit_alphanum4", - "asset_code": "BB1", - "asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getpayments.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getpayments.md deleted file mode 100644 index 165080e7..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getpayments.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: "getPayments" -slug: "rpc-stellar-getpayments" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, - includeFailed: true, - join: true, -}; - -// List all successful payment-related operations -const allPayments = await tatum.rpc.listAllPayments(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `listAllPayments` method allows you to list all successful payment-related operations on the Stellar blockchain. - -### Example use cases: - -1. **Payment Monitoring:** - Developers and applications can use this method to monitor and retrieve information about all successful payment-related operations on the Stellar network. - -2. **Payment Filtering:** - Platform administrators can filter and search for specific payments based on various criteria, such as cursor, order, and more. - -3. **Streaming Payments:** - Users can use streaming mode to listen for new payments as they are added to the Stellar ledger. - -### Request Parameters - -The `listAllPayments` method accepts a single `params` object with the following properties: - -- `cursor` (string, optional): - An optional cursor to start listing payments from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of payments to return. The limit can range from 1 to 200. - -- `includeFailed` (boolean, optional): - An optional parameter to include failed payments. If set to true, failed payments will be included in the results. Defaults to false. - -- `join` (boolean, optional): - An optional parameter to join results. If set to true, results will be joined. Defaults to false. - -### Return Object - -The `listAllPayments` method returns an array of successful payment-related operations on the Stellar blockchain. Each operation object corresponds to a payment operation, and it contains information such as the operation ID, source account, destination account, amount, asset, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/payments?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/payments?cursor=215271955673706503&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/payments?cursor=215271955673169921&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673169921" - }, - "transaction": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/c2b52adc99766007cf1cb1f218b2c40b9771123450282e0d6e3c0be69159880d" - }, - "effects": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673169921/effects" - }, - "succeeds": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673169921" - }, - "precedes": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673169921" - } - }, - "id": "215271955673169921", - "paging_token": "215271955673169921", - "transaction_successful": true, - "source_account": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", - "type": "path_payment_strict_send", - "type_i": 13, - "created_at": "2024-01-28T14:07:11Z", - "transaction_hash": "c2b52adc99766007cf1cb1f218b2c40b9771123450282e0d6e3c0be69159880d", - "asset_type": "credit_alphanum4", - "asset_code": "yXLM", - "asset_issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55", - "from": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", - "to": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", - "amount": "1.0291984", - "path": [ - { - "asset_type": "credit_alphanum4", - "asset_code": "PL", - "asset_issuer": "GBV34DLSYPWQYJTWGC6AYDRNSU7YM244SD4NLPBLDR7D74PZMFEL5OMG" - }, - { - "asset_type": "credit_alphanum4", - "asset_code": "XRP", - "asset_issuer": "GCNSGHUCG5VMGLT5RIYYZSO7VQULQKAJ62QA33DBC5PPBSO57LFWVV6P" - }, - { - "asset_type": "credit_alphanum4", - "asset_code": "XRP", - "asset_issuer": "GBXRPL45NPHCVMFFAYZVUVFFVKSIZ362ZXFP7I2ETNQ3QKZMFLPRDTD5" - }, - { - "asset_type": "credit_alphanum4", - "asset_code": "SHX", - "asset_issuer": "GDSTRSHXHGJ7ZIVRBXEYE5Q74XUVCUSEKEBR7UCHEUUEK72N7I7KJ6JH" - } - ], - "source_amount": "1.0000000", - "destination_min": "1.0000000", - "source_asset_type": "native" - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictreceivepaymentpaths.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictreceivepaymentpaths.md deleted file mode 100644 index 1dd9829b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictreceivepaymentpaths.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -title: "getStrictReceivePaymentPaths" -slug: "rpc-stellar-getstrictreceivepaymentpaths" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - sourceAccount: "SOURCE_ACCOUNT", - sourceAssets: ["CODE:ISSUER_ACCOUNT", "CODE:ISSUER_ACCOUNT2"], - destinationAssetType: "DESTINATION_ASSET_TYPE", - destinationAssetIssuer: "DESTINATION_ASSET_ISSUER", - destinationAssetCode: "DESTINATION_ASSET_CODE", - destinationAmount: "DESTINATION_AMOUNT", -}; - -// List strict receive payment paths -const paymentPaths = await tatum.rpc.listStrictReceivePaymentPaths(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `listStrictReceivePaymentPaths` method allows you to list the payment paths a payment can take based on the amount of an asset you want the recipient to receive. The destination asset amount remains constant, and the type and amount of the source asset sent varies based on offers in the order books. The methods requires either a list of source assets or a source account. Both fields cannot be present. - -### Example use cases: - -1. **Payment Path Analysis:** - Developers and applications can use this method to analyze and retrieve payment paths based on specific destination amounts and assets. - -2. **Payment Path Selection:** - Users can select the optimal payment path to ensure that a recipient receives a specific amount of a destination asset. - -3. **Streaming Payment Paths:** - Users can use streaming mode to listen for updates to payment paths in real-time. - -### Request Parameters - -The `listStrictReceivePaymentPaths` method accepts a `params` object with the following properties: - -- `sourceAccount` (string, required if sourceAssets are not selected): - The source account from which to start the payment path search. - -- `sourceAssets` (array of strings, required if sourceAccount is not selected): - An array of source assets that are available to the sender. A comma-separated list of assets available to the sender. Any returned path must start with an asset in this list. Each asset is formatted as CODE:ISSUER_ACCOUNT. For example: USD:GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX. Using either source_account or source_assets as an argument is required for strict receive path payments. - -- `destinationAssetType` (string, required): - The asset type of the destination asset (e.g., "native" or "credit_alphanum4" or "credit_alphanum12"). - -- `destinationAssetIssuer` (string, optional): - The issuer account of the destination asset (required if the destination asset type is not "native"). - -- `destinationAssetCode` (string, optional): - The asset code of the destination asset (required if the destination asset type is not "native"). - -- `destinationAmount` (string, required): - The amount of the destination asset that the recipient should receive. - -### Return Object - -The `listStrictReceivePaymentPaths` method returns a list of payment paths from the source assets to the destination asset that satisfy the specified destination amount. Each path includes details about the source and destination assets, as well as the offers in the order books that make up the path. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_embedded": { - "records": [ - { - "source_asset_type": "credit_alphanum4", - "source_asset_code": "CNY", - "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", - "source_amount": "28.9871131", - "destination_asset_type": "credit_alphanum4", - "destination_asset_code": "BB1", - "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "destination_amount": "5.0000000", - "path": [ - { - "asset_type": "credit_alphanum4", - "asset_code": "XCN", - "asset_issuer": "GCNY5OXYSY4FKHOPT2SPOQZAOEIGXB5LBYW3HVU3OWSTQITS65M5RCNY" - }, - { - "asset_type": "native" - } - ] - }, - { - "source_asset_type": "credit_alphanum4", - "source_asset_code": "CNY", - "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", - "source_amount": "29.0722784", - "destination_asset_type": "credit_alphanum4", - "destination_asset_code": "BB1", - "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "destination_amount": "5.0000000", - "path": [ - { - "asset_type": "credit_alphanum4", - "asset_code": "ULT", - "asset_issuer": "GC76RMFNNXBFDSJRBXCABWLHXDK4ITVQSMI56DC2ZJVC3YOLLPCKKULT" - }, - { - "asset_type": "native" - } - ] - }, - { - "source_asset_type": "credit_alphanum4", - "source_asset_code": "CNY", - "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", - "source_amount": "29.4000002", - "destination_asset_type": "credit_alphanum4", - "destination_asset_code": "BB1", - "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "destination_amount": "5.0000000", - "path": [ - { - "asset_type": "native" - } - ] - }, - { - "source_asset_type": "credit_alphanum4", - "source_asset_code": "CNY", - "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", - "source_amount": "31.8955888", - "destination_asset_type": "credit_alphanum4", - "destination_asset_code": "BB1", - "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "destination_amount": "5.0000000", - "path": [ - { - "asset_type": "credit_alphanum4", - "asset_code": "USD", - "asset_issuer": "GBUYUAI75XXWDZEKLY66CFYKQPET5JR4EENXZBUZ3YXZ7DS56Z4OKOFU" - }, - { - "asset_type": "native" - } - ] - }, - { - "source_asset_type": "credit_alphanum4", - "source_asset_code": "CNY", - "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", - "source_amount": "34.7086084", - "destination_asset_type": "credit_alphanum4", - "destination_asset_code": "BB1", - "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "destination_amount": "5.0000000", - "path": [ - { - "asset_type": "credit_alphanum4", - "asset_code": "USD", - "asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX" - }, - { - "asset_type": "native" - } - ] - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictsendpaymentpaths.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictsendpaymentpaths.md deleted file mode 100644 index 73f2f930..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictsendpaymentpaths.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: "getStrictSendPaymentPaths" -slug: "rpc-stellar-getstrictsendpaymentpaths" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - sourceAccount: "SOURCE_ACCOUNT", - sourceAssets: ["SOURCE_ASSET_1", "SOURCE_ASSET_2"], - sourceAssetType: "SOURCE_ASSET_TYPE", - sourceAssetIssuer: "SOURCE_ASSET_ISSUER", - sourceAssetCode: "SOURCE_ASSET_CODE", - sourceAmount: "SOURCE_AMOUNT", - destinationAccount: "DESTINATION_ACCOUNT", - destinationAssets: ["DESTINATION_ASSET_1", "DESTINATION_ASSET_2"], -}; - -// List strict send payment paths -const paymentPaths = await tatum.rpc.getStrictSendPaymentPaths(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getStrictSendPaymentPaths` method allows you to list the payment paths a payment can take based on the amount of a source asset you want to send. The source asset amount remains constant, and the type and amount of the asset received vary based on offers in the order books. - -### Example use cases: - -1. **Payment Path Analysis:** - Developers and applications can use this method to analyze and retrieve payment paths based on specific source amounts and assets. - -2. **Payment Path Selection:** - Users can select the optimal payment path to send a specific source amount and receive a variable amount of a destination asset. - -3. **Streaming Payment Paths:** - Users can use streaming mode to listen for updates to payment paths in real-time. - -### Request Parameters - -The `getStrictSendPaymentPaths` method accepts a `params` object with the following properties: - -- `sourceAccount` (string, optional): - The source account from which to start the payment path search. - -- `sourceAssets` (array of strings, optional): - An array of source assets that the sender wants to send. - -- `sourceAssetType` (string, required): - The asset type of the source asset (e.g., "native" or "credit_alphanum4" or "credit_alphanum12"). - -- `sourceAssetIssuer` (string, optional): - The issuer account of the source asset (required if the source asset type is not "native"). - -- `sourceAssetCode` (string, optional): - The asset code of the source asset (required if the source asset type is not "native"). - -- `sourceAmount` (string, required): - The constant amount of the source asset that the sender wants to send. - -- `destinationAccount` (string, required if destinationAssets are not present): - The destination account to which the recipient can receive the assets. - -- `destinationAssets` (array of strings, required if destinationAccount is not present): - An array of destination assets that the recipient can receive. - -### Return Object - -The `getStrictSendPaymentPaths` method returns a list of payment paths from the source assets to the destination asset that satisfy the specified source amount. Each path includes details about the source and destination assets, as well as the offers in the order books that make up the path. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_embedded": { - "records": [ - { - "source_asset_type": "credit_alphanum4", - "source_asset_code": "BRL", - "source_asset_issuer": "GDVKY2GU2DRXWTBEYJJWSFXIGBZV6AZNBVVSUHEPZI54LIS6BA7DVVSP", - "source_amount": "400.0000000", - "destination_asset_type": "credit_alphanum4", - "destination_asset_code": "BB1", - "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "destination_amount": "87.6373649", - "path": [ - { - "asset_type": "native" - } - ] - }, - { - "source_asset_type": "credit_alphanum4", - "source_asset_code": "BRL", - "source_asset_issuer": "GDVKY2GU2DRXWTBEYJJWSFXIGBZV6AZNBVVSUHEPZI54LIS6BA7DVVSP", - "source_amount": "400.0000000", - "destination_asset_type": "credit_alphanum4", - "destination_asset_code": "BB1", - "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", - "destination_amount": "36.0841597", - "path": [ - { - "asset_type": "native" - }, - { - "asset_type": "credit_alphanum4", - "asset_code": "EURT", - "asset_issuer": "GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" - } - ] - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettradeaggregations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettradeaggregations.md deleted file mode 100644 index 3047e934..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettradeaggregations.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: "getTradeAggregations" -slug: "rpc-stellar-gettradeaggregations" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - startTime: "START_TIME", - endTime: "END_TIME", - resolution: "RESOLUTION", - offset: "OFFSET", - baseAssetType: "BASE_ASSET_TYPE", - baseAssetIssuer: "BASE_ASSET_ISSUER", - baseAssetCode: "BASE_ASSET_CODE", - counterAssetType: "COUNTER_ASSET_TYPE", - counterAssetIssuer: "COUNTER_ASSET_ISSUER", - counterAssetCode: "COUNTER_ASSET_CODE", - order: "asc", - limit: 10, -}; - -// List trade aggregations -const tradeAggregations = await tatum.rpc.getTradeAggregations(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getTradeAggregations` method allows you to list trade data based on filters set in the arguments. It divides a given time range into segments and aggregates statistics for a given asset pair (base, counter) over each of these segments. The duration of the segments is specified with the `resolution` parameter. The `startTime` and `endTime` parameters define the start and end of the time range, which are both rounded to the nearest multiple of `resolution` since epoch. The individual segments are also aligned with multiples of `resolution` since epoch. If you want to change this alignment, the segments can be offset by specifying the `offset` parameter. - -### Example use cases: - -1. **Trade Data Analysis:** - Developers and applications can use this method to analyze and retrieve aggregated trade data for specific asset pairs over a specified time range. - -2. **Historical Trade Statistics:** - Users can request historical trade statistics for asset pairs to gain insights into trading activity. - -3. **Trade Data Visualization:** - Data visualization tools can use this method to generate charts and graphs of trade data over time. - -### Request Parameters - -The `getTradeAggregations` method accepts a `params` object with the following properties: - -- `startTime` (string, optional): - The start time of the time range for trade aggregations. - -- `endTime` (string, optional): - The end time of the time range for trade aggregations. - -- `resolution` (string, optional): - The duration of each aggregation segment (e.g., '1d' for one day, '1h' for one hour). - -- `offset` (string, optional): - An optional parameter to offset the segments from multiples of `resolution` since epoch. - -- `baseAssetType` (string, required): - The asset type of the base asset (e.g., 'native' or 'credit_alphanum4' or 'credit_alphanum12'). - -- `baseAssetIssuer` (string, optional): - The issuer account of the base asset (required if the base asset type is not 'native'). - -- `baseAssetCode` (string, optional): - The asset code of the base asset (required if the base asset type is not 'native'). - -- `counterAssetType` (string, required): - The asset type of the counter asset (e.g., 'native' or 'credit_alphanum4' or 'credit_alphanum12'). - -- `counterAssetIssuer` (string, optional): - The issuer account of the counter asset (required if the counter asset type is not 'native'). - -- `counterAssetCode` (string, optional): - The asset code of the counter asset (required if the counter asset type is not 'native'). - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of trade aggregations to return. The limit can range from 1 to 200. - -### Return Object - -The `getTradeAggregations` method returns an array of trade aggregations based on the specified parameters. Each trade aggregation object contains statistics and data for a specific time segment and asset pair. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_links": { - "self": { - "href": "https://horizon.stellar.org/trade_aggregations?base_asset_type=native&counter_asset_code=EURT&counter_asset_issuer=GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S&counter_asset_type=credit_alphanum4&resolution=3600000&start_time=1582156800000&end_time=1582178400001" - }, - "next": { - "href": "https://horizon.stellar.org/trade_aggregations?base_asset_type=native&counter_asset_code=EURT&counter_asset_issuer=GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S&counter_asset_type=credit_alphanum4&end_time=1582178400001&resolution=3600000&start_time=1582171200000" - }, - "prev": { - "href": "" - } - }, - "_embedded": { - "records": [ - { - "timestamp": 1582164000000, - "trade_count": 3, - "base_volume": "399.3873200", - "counter_volume": "25.5368082", - "avg": "0.0639400", - "high": "0.0652169", - "high_r": { - "N": 652169, - "D": 10000000 - }, - "low": "0.0638338", - "low_r": { - "N": 8107550, - "D": 127010393 - }, - "open": "0.0652169", - "open_r": { - "N": 652169, - "D": 10000000 - }, - "close": "0.0638338", - "close_r": { - "N": 8107550, - "D": 127010393 - } - }, - { - "timestamp": 1582167600000, - "trade_count": 1, - "base_volume": "149.8415320", - "counter_volume": "9.7149804", - "avg": "0.0648350", - "high": "0.0648350", - "high_r": { - "N": 5000000, - "D": 77118803 - }, - "low": "0.0648350", - "low_r": { - "N": 5000000, - "D": 77118803 - }, - "open": "0.0648350", - "open_r": { - "N": 5000000, - "D": 77118803 - }, - "close": "0.0648350", - "close_r": { - "N": 5000000, - "D": 77118803 - } - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettrades.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettrades.md deleted file mode 100644 index ca4f11fc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettrades.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: "getTrades" -slug: "rpc-stellar-gettrades" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define input parameters as an object (Replace placeholders with actual values and remove redundant) -const params = { - offerId: "YOUR_OFFER_ID", - baseAssetType: "YOUR_BASE_ASSET_TYPE", - baseAssetIssuer: "YOUR_BASE_ASSET_ISSUER", - baseAssetCode: "YOUR_BASE_ASSET_CODE", - counterAssetType: "YOUR_COUNTER_ASSET_TYPE", - counterAssetIssuer: "YOUR_COUNTER_ASSET_ISSUER", - counterAssetCode: "YOUR_COUNTER_ASSET_CODE", - tradeType: "YOUR_TRADE_TYPE", - cursor: "YOUR_CURSOR", - order: "YOUR_ORDER", - limit: 10, -}; - -// List all trades or use streaming mode to listen for new trades -const trades = await tatum.rpc.listTrades(params); - -// Log the list of trades -console.log("Trades:", trades); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `listTrades` method allows you to list all trades on the Stellar blockchain. You can also use streaming mode to listen for new trades as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known trade unless a cursor is set, in which case it will start from that cursor. - -### Request Parameters - -The `listTrades` method accepts the following request parameters: - -- `offerId` (string, optional): - The identifier of the offer to filter trades. Use this parameter to list trades for a specific offer. - -- `baseAssetType` (string, optional): - The asset type of the base asset to filter trades. Use this parameter to filter trades by the base asset type. - -- `baseAssetIssuer` (string, optional): - The issuer account of the base asset to filter trades. Use this parameter to filter trades by the base asset issuer. - -- `baseAssetCode` (string, optional): - The asset code of the base asset to filter trades. Use this parameter to filter trades by the base asset code. - -- `counterAssetType` (string, optional): - The asset type of the counter asset to filter trades. Use this parameter to filter trades by the counter asset type. - -- `counterAssetIssuer` (string, optional): - The issuer account of the counter asset to filter trades. Use this parameter to filter trades by the counter asset issuer. - -- `counterAssetCode` (string, optional): - The asset code of the counter asset to filter trades. Use this parameter to filter trades by the counter asset code. - -- `tradeType` (string, optional): - The type of trade to filter. Use this parameter to filter trades by trade type. - -- `cursor` (string, optional): - A cursor value that determines the starting point for pagination. Use this parameter to retrieve trades from a specific point in the list. - -- `order` (string, optional): - A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. - -- `limit` (number, optional): - The maximum number of records returned. It defines the number of trades to fetch in a single request. - -### Response - -The `listTrades` method returns a JSON object containing the list of trades that match the specified criteria. Each trade is represented as an object with various properties describing its characteristics. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "_links": { - "self": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/trades?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/trades?cursor=214305588031721473-2&limit=10&order=asc" - }, - "prev": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/trades?cursor=214305588031623169-0&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "" - }, - "base": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GBZVMDOMNU5ZNDAUVHCSZXFJ6FJRBNXFL6NTY2BBANBVNM6NWPGTFUCV" - }, - "counter": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ" - }, - "operation": { - "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031623169" - } - }, - "id": "214305588031623169-0", - "paging_token": "214305588031623169-0", - "ledger_close_time": "2024-01-13T08:44:04Z", - "trade_type": "orderbook", - "base_offer_id": "1449996661", - "base_account": "GBZVMDOMNU5ZNDAUVHCSZXFJ6FJRBNXFL6NTY2BBANBVNM6NWPGTFUCV", - "base_amount": "1.0756875", - "base_asset_type": "credit_alphanum4", - "base_asset_code": "MOBI", - "base_asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH", - "counter_offer_id": "4825991606459011073", - "counter_account": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", - "counter_amount": "0.0959902", - "counter_asset_type": "native", - "base_is_seller": true, - "price": { - "n": "10000000", - "d": "112062267" - } - } - ] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransaction.md deleted file mode 100644 index f3a83464..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransaction.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "getTransaction" -slug: "rpc-stellar-gettransaction" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const transactionHash = "YOUR_TRANSACTION_HASH"; - -// Retrieve a specific transaction by its hash -const transaction = await tatum.rpc.getTransaction(transactionHash); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getTransaction` method allows you to retrieve information about a specific transaction on the Stellar blockchain. You can specify the transaction you want to retrieve by providing its unique transaction hash. - -### Example use cases: - -1. **Transaction Details:** - Developers and applications can use this method to fetch detailed information about a specific transaction, including its source, destination, amount, and other transaction-specific data. - -2. **Transaction Verification:** - Users can use this method to verify and validate specific transactions on the Stellar network. - -3. **Auditing and Reporting:** - Platform administrators can access transaction data for auditing and reporting purposes. - -### Request Parameters - -The `getTransaction` method accepts a `transactionHash` parameter, which is a string representing the unique hash of the transaction you want to retrieve. - -- `transactionHash` (string, required): - The unique hash of the transaction you want to retrieve. - -### Return Object - -The `getTransaction` method returns detailed information about the specified transaction on the Stellar blockchain. The response includes data such as the transaction ID, source account, destination account, amount, fee, and other transaction-specific details. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_links": { - "self": { - "href": "https://horizon.stellar.org/transactions/5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc" - }, - "account": { - "href": "https://horizon.stellar.org/accounts/GDI5EK4HNMBHJJQGP3GUXQJIIOHU2CJO3LABPWD6WYSPJZP5NP67TMNN" - }, - "ledger": { - "href": "https://horizon.stellar.org/ledgers/27963785" - }, - "operations": { - "href": "https://horizon.stellar.org/transactions/5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc/operations{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://horizon.stellar.org/transactions/5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc/effects{?cursor,limit,order}", - "templated": true - }, - "precedes": { - "href": "https://horizon.stellar.org/transactions?order=asc&cursor=120103542047408128" - }, - "succeeds": { - "href": "https://horizon.stellar.org/transactions?order=desc&cursor=120103542047408128" - } - }, - "id": "5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc", - "paging_token": "120103542047408128", - "successful": true, - "hash": "5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc", - "ledger": 27963785, - "created_at": "2020-01-28T10:03:33Z", - "source_account": "GDI5EK4HNMBHJJQGP3GUXQJIIOHU2CJO3LABPWD6WYSPJZP5NP67TMNN", - "source_account_sequence": "65046128646685383", - "fee_charged": 100, - "max_fee": 100, - "operation_count": 1, - "envelope_xdr": "hex data", - "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=", - "result_meta_xdr": "hex data", - "fee_meta_xdr": "hex data" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactioneffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactioneffects.md deleted file mode 100644 index 666339bb..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactioneffects.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: "getTransactionEffects" -slug: "rpc-stellar-gettransactioneffects" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - hash: "YOUR_TRANSACTION_HASH", // Replace with the actual transaction hash - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, -}; - -// Get effects for a specific transaction -const transactionEffects = await tatum.rpc.getTransactionsEffects(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `Retrieve a Transaction's Effects` method allows you to retrieve the effects of a specific transaction on the Stellar blockchain. You can use this method to view the various effects produced by the transaction, such as offers created, payments made, and more. - -### Example use cases: - -1. **Transaction Analysis:** - Developers and applications can use this method to analyze the effects of a particular transaction, including its impact on the Stellar network. - -2. **Auditing and Reporting:** - Users can retrieve the effects of a transaction for auditing and reporting purposes. - -### Request Parameters - -The `Retrieve a Transaction's Effects` method accepts the following parameters: - -- `hash` (string, required): - The hash of the transaction for which you want to retrieve effects. - -- `cursor` (string, optional): - An optional cursor to start listing effects from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of effects to return. The limit can range from 1 to 200. - -### Return Object - -The `Retrieve a Transaction's Effects` method returns an array of effects associated with the specified transaction on the Stellar blockchain. Each effect object contains information such as the effect type, asset details, and other relevant data. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -Feel free to replace `'YOUR_TRANSACTION_HASH'` with the actual hash of the transaction you want to retrieve effects for. - -```json -{ - "value": { - "_links": { - "self": { - "href": "https://horizon.stellar.org/transactions/512a9946bc7ff4a363299f14f79e0beb9b9cdbd0103e3a69a44446a0aa6471a8/effects?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://horizon.stellar.org/transactions/512a9946bc7ff4a363299f14f79e0beb9b9cdbd0103e3a69a44446a0aa6471a8/effects?cursor=121628667754319873-2&limit=10&order=asc" - }, - "prev": { - "href": "https://horizon.stellar.org/transactions/512a9946bc7ff4a363299f14f79e0beb9b9cdbd0103e3a69a44446a0aa6471a8/effects?cursor=121628667754319873-1&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "operation": { - "href": "https://horizon.stellar.org/operations/121628667754319873" - }, - "succeeds": { - "href": "https://horizon.stellar.org/effects?order=desc&cursor=121628667754319873-1" - }, - "precedes": { - "href": "https://horizon.stellar.org/effects?order=asc&cursor=121628667754319873-1" - } - }, - "id": "0121628667754319873-0000000001", - "paging_token": "121628667754319873-1", - "account": "GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A", - "type": "account_credited", - "type_i": 2, - "created_at": "2020-02-20T21:18:33Z", - "asset_type": "native", - "amount": "1573.5112616" - }, - { - "_links": { - "operation": { - "href": "https://horizon.stellar.org/operations/121628667754319873" - }, - "succeeds": { - "href": "https://horizon.stellar.org/effects?order=desc&cursor=121628667754319873-2" - }, - "precedes": { - "href": "https://horizon.stellar.org/effects?order=asc&cursor=121628667754319873-2" - } - }, - "id": "0121628667754319873-0000000002", - "paging_token": "121628667754319873-2", - "account": "GA2XP4KMY4KWNPW4KUCUKYUF2J7Y6HO5HLPUEA3VPVSMYCM3TGNEZP5S", - "type": "account_debited", - "type_i": 3, - "created_at": "2020-02-20T21:18:33Z", - "asset_type": "native", - "amount": "1573.5112616" - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactionoperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactionoperations.md deleted file mode 100644 index cd9ef42e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactionoperations.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: "getTransactionOperations" -slug: "rpc-stellar-gettransactionoperations" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - transactionHash: 'TRANSACTION_HASH' - cursor: 'YOUR_CURSOR', - order: 'asc', - limit: 10, - includeFailed: true, - join: true -}; - -// Get operations for a specific transaction -const transactionOperations = await tatum.rpc.getTransactionsOperations(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getTransactionsOperations` method allows you to retrieve Successful operations for a specific transaction on the Stellar blockchain. You can use this method to fetch the operations associated with a particular transaction. - -### Example use cases: - -1. **Transaction Analysis:** - Users can retrieve the operations related to a specific transaction for analysis and auditing purposes. - -2. **Transaction History:** - Developers can use this method to obtain the operations performed within a specific transaction. - -### Request Parameters - -The `getTransactionsOperations` method accepts the following optional parameters: - -- `transaction_hash` (string, required): - The hash of the transaction for which you want to retrieve operations. - -- `cursor` (string, optional): - An optional cursor to start listing operations from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of operations to return. The limit can range from 1 to 200. - -- `includeFailed` (boolean, optional): - An optional parameter to include failed operations. If set to true, failed operations will be included in the results. Defaults to false. - -- `join` (boolean, optional): - Set to transactions to include the transactions which created each of the operations in the response. - -### Response Object - -The `getTransactionsOperations` method returns an array of Successful operations related to the specified transaction. Each operation object contains information such as the operation type, source account, destination account, amount, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_links": { - "self": { - "href": "https://horizon.stellar.org/transactions/6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a/operations?cursor=&limit=10&order=asc" - }, - "next": { - "href": "https://horizon.stellar.org/transactions/6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a/operations?cursor=120133379185221636&limit=10&order=asc" - }, - "prev": { - "href": "https://horizon.stellar.org/transactions/6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a/operations?cursor=120133379185221633&limit=10&order=desc" - } - }, - "_embedded": { - "records": [ - { - "_links": { - "self": { - "href": "https://horizon.stellar.org/operations/120133379185221633" - }, - "transaction": { - "href": "https://horizon.stellar.org/transactions/6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a" - }, - "effects": { - "href": "https://horizon.stellar.org/operations/120133379185221633/effects" - }, - "succeeds": { - "href": "https://horizon.stellar.org/effects?order=desc&cursor=120133379185221633" - }, - "precedes": { - "href": "https://horizon.stellar.org/effects?order=asc&cursor=120133379185221633" - } - }, - "id": "120133379185221633", - "paging_token": "120133379185221633", - "transaction_successful": true, - "source_account": "GDJX67SFY2N73H72TWMKKBQP5UPBNKBNUMNE2IGFKNES43S4327X6DHG", - "type": "manage_buy_offer", - "type_i": 12, - "created_at": "2020-01-28T21:14:59Z", - "transaction_hash": "6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a", - "amount": "0.0000000", - "price": "0.0001000", - "price_r": { - "n": 1, - "d": 10000 - }, - "buying_asset_type": "native", - "selling_asset_type": "credit_alphanum4", - "selling_asset_code": "ETH", - "selling_asset_issuer": "GBDEVU63Y6NTHJQQZIKVTC23NWLQVP3WJ2RI2OTSJTNYOIGICST6DUXR", - "offer_id": 149983118 - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactions.md deleted file mode 100644 index 9a06aae2..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactions.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: "getTransactions" -slug: "rpc-stellar-gettransactions" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const params = { - cursor: "YOUR_CURSOR", - order: "asc", - limit: 10, - includeFailed: true, -}; - -// Get a list of transactions -const transactions = await tatum.rpc.getTransactions(params); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getTransactions` method allows you to retrieve a list of transactions on the Stellar blockchain. You can use this method in streaming mode to listen for new transactions as they are added to the Stellar ledger. When used in streaming mode, Horizon will start at the earliest known transaction unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream transactions created since your request time. - -### Example use cases: - -1. **Transaction Monitoring:** - Developers and applications can use this method to monitor and track all transactions on the Stellar network in real-time. - -2. **Transaction Data Analysis:** - Users can retrieve a list of transactions for analysis, reporting, and auditing purposes. - -3. **Stream Transactions:** - You can use streaming mode to receive real-time updates of new transactions on the Stellar ledger. - -### Request Parameters - -The `getTransactions` method accepts the following optional parameters: - -- `cursor` (string, optional): - An optional cursor to start listing transactions from a specific point. - -- `order` (string, optional): - An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. - -- `limit` (number, optional): - An optional parameter to specify the maximum number of transactions to return. The limit can range from 1 to 200. - -- `includeFailed` (boolean, optional): - An optional parameter to include failed transactions. If set to true, failed transactions will be included in the results. Defaults to false. - -### Return Object - -The `getTransactions` method returns an array of transactions on the Stellar blockchain. Each transaction object contains information such as the transaction ID, source account, destination account, amount, fee, and more. - -(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) - -```json -{ - "value": { - "_links": { - "self": { - "href": "https://horizon.stellar.org/transactions?cursor=&limit=3&order=asc" - }, - "next": { - "href": "https://horizon.stellar.org/transactions?cursor=33736968114176&limit=3&order=asc" - }, - "prev": { - "href": "https://horizon.stellar.org/transactions?cursor=12884905984&limit=3&order=desc" - } - }, - "_embedded": { - "records": [ - { - "memo": "hello world", - "_links": { - "self": { - "href": "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889" - }, - "account": { - "href": "https://horizon.stellar.org/accounts/GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7" - }, - "ledger": { - "href": "https://horizon.stellar.org/ledgers/3" - }, - "operations": { - "href": "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889/operations{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889/effects{?cursor,limit,order}", - "templated": true - }, - "precedes": { - "href": "https://horizon.stellar.org/transactions?order=asc&cursor=12884905984" - }, - "succeeds": { - "href": "https://horizon.stellar.org/transactions?order=desc&cursor=12884905984" - } - }, - "id": "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889", - "paging_token": "12884905984", - "successful": true, - "hash": "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889", - "ledger": 3, - "created_at": "2015-09-30T17:15:54Z", - "source_account": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7", - "source_account_sequence": "1", - "fee_charged": 300, - "max_fee": 300, - "operation_count": 3, - "envelope_xdr": "AAAAAAAGUcmKO5465JxTSLQOQljwk2SfqAJmZSG6JH6wtqpwhAAABLAAAAAAAAAABAAAAAAAAAAEAAAALaGVsbG8gd29ybGQAAAAAAwAAAAAAAAAAAAAAABbxCy3mLg3hiTqX4VUEEp60pFOrJNxYM1JtxXTwXhY2AAAAAAvrwgAAAAAAAAAAAQAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNgAAAAAN4Lazj4x61AAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLaqcIQAAAEBKwqWy3TaOxoGnfm9eUjfTRBvPf34dvDA0Nf+B8z4zBob90UXtuCqmQqwMCyH+okOI3c05br3khkH0yP4kCwcE", - "result_xdr": "AAAAAAAAASwAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAA=", - "result_meta_xdr": "AAAAAAAAAAMAAAACAAAAAAAAAAMAAAAAAAAAABbxCy3mLg3hiTqX4VUEEp60pFOrJNxYM1JtxXTwXhY2AAAAAAvrwgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAGUcmKO5465JxTSLQOQljwk2SfqAJmZSG6JH6wtqpwhDeC2s5t4PNQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAADAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQAAAAAL68IAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNgAAAAAL68IAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNg3gtrObeDzUAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAwAAAAAAAAAAAZRyYo7njrknFNItA5CWPCTZJ+oAmZlIbokfrC2qnCEAAAAAC+vCAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "fee_meta_xdr": "AAAAAgAAAAMAAAABAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQ3gtrOnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQ3gtrOnY/7UAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", - "memo_type": "text", - "signatures": [ - "SsKlst02jsaBp35vXlI300Qbz39+HbwwNDX/gfM+MwaG/dFF7bgqpkKsDAsh/qJDiN3NOW695IZB9Mj+JAsHBA==" - ] - } - ] - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-submittransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-submittransaction.md deleted file mode 100644 index 90d64140..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-submittransaction.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "submitTransaction" -slug: "rpc-stellar-submittransaction" -excerpt: "Stellar RPC" -hidden: false -metadata: - description: "Stellar RPC" - image: [] - keywords: "stellar, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; - -// Initialize the Tatum SDK for Stellar -const tatum = await TatumSDK.init({ network: Network.STELLAR }); - -// Define parameters (Replace placeholders with actual values and remove redundant) -const tx = "BASE64_ENCODED_TRANSACTION_XDR"; - -// Submit a transaction -const result = await tatum.rpc.submitTransaction(tx); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `submitTransaction` method allows you to submit a transaction to the Stellar network. It takes a single, required parameter, which is the base64-encoded XDR of the transaction. If you submit a transaction that has already been included in a ledger, this endpoint will return the same response as would have been returned for the original transaction submission. This allows for safe resubmission of transactions in error scenarios, as highlighted in the error-handling guide. - -### Example use cases: - -1. **Transaction Submission:** - Developers and applications can use this method to submit transactions to the Stellar network. - -### Request Parameters - -The `submitTransaction` method accepts the following parameters: - -- `tx` (string, required): - The base64-encoded XDR of the transaction to be submitted. - -### Response Object - -The `submitTransaction` method returns the result of the transaction submission. The exact response object may vary based on the Stellar blockchain's implementation and version. - -```json -{ - "value": { - "memo": "Test Transaction", - "memo_bytes": "VGVzdCBUcmFuc2FjdGlvbg==", - "_links": { - "self": { - "href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124" - }, - "account": { - "href": "https://horizon-testnet.stellar.org/accounts/GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN" - }, - "ledger": { - "href": "https://horizon-testnet.stellar.org/ledgers/139575" - }, - "operations": { - "href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124/operations{?cursor,limit,order}", - "templated": true - }, - "effects": { - "href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124/effects{?cursor,limit,order}", - "templated": true - }, - "precedes": { - "href": "https://horizon-testnet.stellar.org/transactions?order=asc&cursor=599470060347392" - }, - "succeeds": { - "href": "https://horizon-testnet.stellar.org/transactions?order=desc&cursor=599470060347392" - }, - "transaction": { - "href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124" - } - }, - "id": "8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124", - "paging_token": "599470060347392", - "successful": true, - "hash": "8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124", - "ledger": 139575, - "created_at": "2021-03-25T21:14:11Z", - "source_account": "GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN", - "source_account_sequence": "599336916353025", - "fee_account": "GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN", - "fee_charged": "100", - "max_fee": "100", - "operation_count": 1, - "envelope_xdr": "AAAAAgAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAAGQAAiEYAAAAAQAAAAEAAAAAAAAAAAAAAABgXP3QAAAAAQAAABBUZXN0IFRyYW5zYWN0aW9uAAAAAQAAAAAAAAABAAAAAJBwQrbJ9AD0Ietf7ZQyREhv/XDOW0qoelt0hwlun5v9AAAAAAAAAAAF9eEAAAAAAAAAAAFun5v9AAAAQKdJnG8QRiv9xGp1Oq7ACv/xR2BnNqjfUHrGNua7m4tWbrun3+GmAj6ca3xz+4ZppWRTbvTUcCxvpbHERZ85QgY=", - "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=", - "result_meta_xdr": "AAAAAgAAAAIAAAADAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAABAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAA=", - "fee_meta_xdr": "AAAAAgAAAAMAAiEYAAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIdugAAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAiE3AAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIduecAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", - "memo_type": "text", - "max_fee": "100", - "operation_count": 1, - "envelope_xdr": "AAAAAgAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAAGQAAiEYAAAAAQAAAAEAAAAAAAAAAAAAAABgXP3QAAAAAQAAABBUZXN0IFRyYW5zYWN0aW9uAAAAAQAAAAAAAAABAAAAAJBwQrbJ9AD0Ietf7ZQyREhv/XDOW0qoelt0hwlun5v9AAAAAAAAAAAF9eEAAAAAAAAAAAFun5v9AAAAQKdJnG8QRiv9xGp1Oq7ACv/xR2BnNqjfUHrGNua7m4tWbrun3+GmAj6ca3xz+4ZppWRTbvTUcCxvpbHERZ85QgY=", - "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=", - "result_meta_xdr": "AAAAAgAAAAIAAAADAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAABAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAA=", - "fee_meta_xdr": "AAAAAgAAAAMAAiEYAAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIdugAAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAiE3AAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIduecAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", - "memo_type": "text", - "signatures": [ - "p0mcbxBGK/3EanU6rsAK//FHYGc2qN9QesY25rubi1Zuu6ff4aYCPpxrfHP7hmmlZFNu9NRwLG+lscRFnzlCBg==" - ], - "valid_after": "1970-01-01T00:00:00Z", - "valid_before": "2021-03-25T21:17:04Z" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos.md deleted file mode 100644 index 0e483760..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Tezos" -slug: "rpc-tezos" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Wed Mar 06 2024 13:09:53 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getbigmapvalue.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getbigmapvalue.md deleted file mode 100644 index f4027381..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getbigmapvalue.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: "getBigMapValue" -slug: "rpc-tezos-getbigmapvalue" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the contract ID -const contractId = { contractId: 'YOUR_CONTRACT_ID' }; - -// Retrieve the value from a big map associated with a Tezos smart contract -const bigMapValue = await tatum.rpc.getBigMapValue(contractId); - -// Log the value from the big map -console.log(`Value from Big Map for Contract ${contractId.contractId}:`, bigMapValue); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBigMapValue` method is used to retrieve the value associated with a specific key from a big map associated with a Tezos smart contract. Big maps are used to store and retrieve key-value pairs within smart contracts. - -### Example Use Cases: - -1. **Data Retrieval:** Developers and users can use this method to query and retrieve specific data stored in a big map within a Tezos smart contract. This is particularly useful for accessing relevant information within decentralized applications. - -2. **Contract Interaction:** Smart contracts may use big maps to store and manage data. Developers interacting with such contracts can use this method to access the data they need for contract interactions. - -### Request Parameters - -The `getBigMapValue` method requires the following parameter: - -- `contractId` (string, required): A contract identifier encoded in b58check, representing the Tezos smart contract that contains the big map. - -### Return Object - -The method returns an object containing the following properties: - -- `key` (string): The key used to query the big map and retrieve the associated value. - -- `type` (string): The type of the value associated with the specified key in the big map. - -Users can use this method to access and utilize data stored within big maps in Tezos smart contracts. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblock.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblock.md deleted file mode 100644 index d3bbef92..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblock.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getBlock" -slug: "rpc-tezos-getblock" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the chain ID and block ID (Replace placeholders with actual values) -const params = { - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID (hash) -}; - -// Fetch details of a specific block by its ID -const blockDetails = await tatum.rpc.getBlock(params); - -// Log the block details -console.log('Block Details:', blockDetails); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlock` method allows you to retrieve detailed information about a specific block within a Tezos chain. By providing the chain ID and block ID as parameters, you can access various data associated with the chosen block, including its hash, timestamp, operations, and more. - -### Example use cases: - -1. **Block Inspection:** - Developers and analysts can use this method to inspect and verify the details of a specific block on the Tezos blockchain. This can be useful for auditing purposes. - -2. **Transaction Confirmation:** - Applications built on Tezos may use this method to confirm the inclusion of specific transactions in a block, ensuring their execution. - -3. **Historical Data Retrieval:** - Researchers may need to retrieve historical data from specific blocks for data analysis, historical record-keeping, or statistical analysis. - -### Request Parameters - -The `getBlock` method requires the following parameters: - -- `chainId` (string, required): - The identifier of the Tezos chain from which to retrieve the block. - -- `blockId` (string, required): - The unique identifier (hash) of the block for which you want to retrieve details. - -### Return Object - -The `getBlock` method returns an object containing various details about the requested block: - -- `protocol` (string): The protocol identifier, e.g., "PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf". -- `chain_id` (string): The chain's unique identifier, e.g., "NetXdQprcVkpaWU". -- `hash` (string): The hash of the block, e.g., "BLVRfBFc8Mb7s4PUacDfaeQTPj9HtzTNEArM1Ni1YbxRuK73htp". -- `level` (integer): The level (block number) of the block, e.g., 4456790. -- `proto` (integer): The protocol version, e.g., 17. -- `predecessor` (string): The hash of the block's predecessor. -- `timestamp` (string): The block's timestamp, e.g., "2023-10-24T11:21:30Z". -- `validation_pass` (integer): The number of validation passes, e.g., 4. -- `operations_hash` (string): The hash of the operations included in this block. - -(Note: There are additional fields in the response not covered in this list, such as `fitness`, `context`, and `signature` which provide further information about the block.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockhash.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockhash.md deleted file mode 100644 index 285ee5f4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockhash.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "getBlockHash" -slug: "rpc-tezos-getblockhash" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the chain ID and block ID (Replace placeholders with actual values) -const params = { - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID (hash) -}; - -// Fetch the hash of a specific block by its ID -const blockHash = await tatum.rpc.getBlockHash(params); - -// Log the block hash -console.log('Block Hash:', blockHash); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlockHash` method allows you to retrieve the hash of a specific block within a Tezos chain. By providing the chain ID and block ID as parameters, you can access the unique hash associated with the chosen block. - -### Example use cases: - -1. **Block Identification:** - Developers and applications can use this method to identify and reference a specific block on the Tezos blockchain using its hash. - -2. **Transaction Verification:** - When verifying transactions or interactions with smart contracts, you may need the block hash as part of the verification process. - -3. **Historical Data Retrieval:** - Researchers and analysts can retrieve block hashes for historical data analysis and record-keeping. - -### Request Parameters - -The `getBlockHash` method requires the following parameters: - -- `chainId` (string, required): - The identifier of the Tezos chain from which to retrieve the block hash. - -- `block` (string, required): - The unique identifier (hash) of the block for which you want to retrieve the hash. - -### Return Object - -The `getBlockHash` method returns a string representing the hash of the requested block. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockhashes.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockhashes.md deleted file mode 100644 index b7d27ff1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockhashes.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "getBlockHashes" -slug: "rpc-tezos-getblockhashes" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch block hashes from a specific chain in Tezos using the getBlockHashes method -const blockHashes = await tatum.rpc.getBlockHashes({ - chainId: 'main', // Specify the Tezos chain ID (usually 'main' for mainnet) - length: 5, // Optional: Number of predecessor blocks to return - head: 'BLockHashHere', // Optional: Specify a block hash to fetch specific fragments of the chain - minDate: '2023-10-01' // Optional: Filter out blocks before this date -}); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlockHashes` method retrieves block hashes from a specified chain in Tezos, sorted by decreasing fitness. Without arguments, it returns the head of the chain. Optional arguments enable the return of the list of predecessors of a specified block or set of blocks. - -### Example use cases: - -1. **Chain Inspection:** - Quickly identify and inspect the most recent blocks in the chain by their hash, aiding in network monitoring and analysis. -2. **Historical Data Analysis:** - Fetch specific sections of the blockchain for in-depth study or to construct a localized view of the chain's history. -3. **Data Validation:** - Validators and node operators can use this method to cross-check and validate their local chain's state against the broader network. - -### Request Parameters - -The `getBlockHashes` method supports several optional parameters: - -- `chainId` (string, required): - The unique identifier of the Tezos chain for which block hashes are being requested. - -- `length` (uint, optional): - The number of predecessor blocks to return. - -- `head` (block_hash, optional): - An empty argument requests blocks starting from the current head. Specifying block hashes allows fetching specific fragments of the chain. - -- `minDate` (date, optional): - Blocks with a timestamp before this date will be filtered out. If `length` is also provided, up to that number of predecessors will be returned regardless of their date. - -### Return Object - -The `getBlockHashes` method returns an array of block hashes included in the specified chain: - -- An array of block hashes, sorted by decreasing fitness. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockheader.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockheader.md deleted file mode 100644 index 932974a9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockheader.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getBlockHeader" -slug: "rpc-tezos-getblockheader" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the chain ID (For this example, we use "NetXdQprcVkpaWU" as a placeholder) -const params = { - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID (hash) -}; - -// Fetch the header of a specific block by its ID -const blockHeader = await tatum.rpc.getBlockHeader(params); - -// Log the block header details -console.log('Block Header:', blockHeader); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlockHeader` method allows you to retrieve the header of a specific block within a Tezos chain. You can use this method to fetch essential information about a particular block, such as its hash, timestamp, and other metadata. - -### Example use cases: - -1. **Block Analysis:** - Researchers and analysts can use this method to access detailed information about a specific block, enabling them to perform in-depth analysis and investigation. - -2. **Transaction Confirmation:** - Developers building applications on Tezos may need to confirm the details of a specific block to ensure the validity of transactions or smart contract interactions. - -3. **Historical Data Retrieval:** - This method is valuable for retrieving historical block data for auditing, compliance, or historical record-keeping purposes. - -### Request Parameters - -The `getBlockHeader` method requires the following parameters: - -- `chainId` (string, required): - The identifier of the Tezos chain from which to retrieve the block header. - -- `blockId` (string, required): - The unique identifier (hash) of the block for which you want to retrieve the header. - -### Return Object - -The `getBlockHeader` method returns an object with details of the block's header: - -- `protocol` (string): The protocol identifier, e.g., "PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf". -- `chain_id` (string): The chain's unique identifier, e.g., "NetXdQprcVkpaWU". -- `hash` (string): The hash of the block, e.g., "BLVRfBFc8Mb7s4PUacDfaeQTPj9HtzTNEArM1Ni1YbxRuK73htp". -- `level` (integer): The level (block number) of the block, e.g., 4456790. -- `proto` (integer): The protocol version, e.g., 17. -- `predecessor` (string): The hash of the block's predecessor. -- `timestamp` (string): The block's timestamp, e.g., "2023-10-24T11:21:30Z". -- `validation_pass` (integer): The number of validation passes, e.g., 4. -- `operations_hash` (string): The hash of the operations included in this block. - -(Note: There are additional fields in the response not covered in this list, such as `fitness`, `context`, and `signature` which provide further information about the block. The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockshead.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockshead.md deleted file mode 100644 index 46515191..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockshead.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "getBlocksHead" -slug: "rpc-tezos-getblockshead" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -## How to Use - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the chain ID -const chainId = { chainId : 'CHAIN_ID'}; - -// Fetch the details of the latest (head) block on the specified Tezos chain -const latestBlockDetails = await tatum.rpc.getBlocksHead(chainId); - -// Log the latest block details -console.log('Latest Block Details:', latestBlockDetails); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getBlocksHead` method allows you to retrieve details about the latest (head) block on a specific Tezos chain. You can use this method to access key information about the most recent block, such as its hash, level, timestamp, and more. - -### Example Use Cases - -1. **Real-Time Data Display:** - Developers can use this method to display real-time information about the latest block on a blockchain explorer or monitoring dashboard. - -2. **Transaction Monitoring:** - Applications monitoring the Tezos blockchain can utilize this method to keep track of incoming transactions and their details. - -3. **Network Analytics:** - Researchers and analysts can gather data from the latest block for network performance analysis and reporting. - -### Request Parameters - -The `getBlocksHead` method requires the following parameter: - -- `chainId` (string, required): - The identifier of the Tezos chain for which you want to retrieve the latest block details. - -### Return Object - -The `getBlocksHead` method returns an object with details of the latest (head) block: - -- `protocol` (string): The protocol identifier, e.g., "PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf". -- `chain_id` (string): The chain's unique identifier, e.g., "NetXdQprcVkpaWU". -- `hash` (string): The hash of the latest block, e.g., "BLVRfBFc8Mb7s4PUacDfaeQTPj9HtzTNEArM1Ni1YbxRuK73htp". -- `level` (integer): The level (block number) of the latest block, e.g., 4456790. -- `proto` (integer): The protocol version, e.g., 17. -- `predecessor` (string): The hash of the block's predecessor. -- `timestamp` (string): The timestamp of the latest block, e.g., "2023-10-24T11:21:30Z". -- `validation_pass` (integer): The number of validation passes, e.g., 4. -- `operations_hash` (string): The hash of the operations included in the latest block. - -(Note: There are additional fields in the response not covered in this list, such as `fitness`, `context`, and `signature` which provide further information about the block. The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockshell.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockshell.md deleted file mode 100644 index 203c5666..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getblockshell.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "getBlockShell" -slug: "rpc-tezos-getblockshell" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Tezos blockchain -import { TatumSDK, Network, Tezos } from '@tatumio/tatum'; - -// Initializing SDK for Tezos blockchain -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define parameters for the query -const params = { - chainId: 'YOUR_CHAIN_ID', // Required - blockId: 'YOUR_BLOCK_ID' // Required -}; - -// Fetching the block header shell -const blockHeaderShell = await tatum.rpc.getBlockShell(params); -console.log(blockHeaderShell); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `getBlockShell` method is used to retrieve the shell header of a specific block on the Tezos blockchain. - -### Request Parameters - -- `chainId` (string, required): The ID of the chain. -- `blockId` (string, required): The unique identifier (hash) of the block for which you want to retrieve the shell header. - -### Return Object - -The method returns an object representing the shell header of the specified block on the Tezos blockchain. - -- `level` (integer): The level (block number) of the block, e.g., 4000000. -- `proto` (integer): The protocol version of the block, e.g., 17. -- `predecessor` (string): The hash of the block's predecessor, e.g., "BMR5RnbukbbDw3ZXN1RbKEPYg6aFvLQuCgxPBhRLg3vmdVLbLJv". -- `timestamp` (string): The timestamp of the block, e.g., "2023-08-05T07:23:15Z". -- `validation_pass` (integer): The number of validation passes, e.g., 4. -- `operations_hash` (string): The hash of the operations included in this block, e.g., "LLoaEA9PAMVP7HGpdb4nKLM8oyVnSMy5gJBEwyftjCsyk7EhnvSm7". -- `fitness` (array): An array of fitness values, e.g., -- `context` (string): The context hash of the block, e.g., "CoW4EjrMzokDdz8v8qBPMXhrjStzuQU9bSGNFHsyej6mNkY89g7f". - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getchainid.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getchainid.md deleted file mode 100644 index cf308009..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getchainid.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "getChainId" -slug: "rpc-tezos-getchainid" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch the unique chain identifier for a specific Tezos chain using the getChainId method -const chainIdentifier = await tatum.rpc.getChainId({ - chainId: 'main' // Specify the Tezos chain ID (usually 'main' for mainnet) -}); - -console.log(`The unique identifier for the chain is: ${chainIdentifier}`); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getChainId` method retrieves the unique identifier of a specified chain in Tezos. - -### Example use cases: - -1. **Chain Verification:** - To ensure that interactions and transactions are occurring on the intended Tezos chain, developers and users can validate the chain's unique identifier. - -2. **Multi-chain Environments:** - In setups where multiple Tezos chains might be in use, this method can differentiate and identify each chain uniquely. - -3. **Dynamic Chain Configuration:** - For applications that adapt to multiple chain environments, the method provides a way to fetch and set the active chain based on its identifier. - -### Request Parameters - -The `getChainId` method requires: - -- `chainId` (string, required): - The identifier of the Tezos chain from which the unique chain identifier is being requested. - -### Return Object - -The `getChainId` method returns a string: - -- The unique identifier of the specified chain. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconfig.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconfig.md deleted file mode 100644 index c80aeba4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconfig.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "getConfig" -slug: "rpc-tezos-getconfig" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch Tezos configuration information -const configInfo = await tatum.rpc.config(); - -// Log the Tezos configuration information -console.log(`Tezos Configuration:`, configInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `config` method is used to retrieve configuration information about the Tezos blockchain. - -### Request Parameters - -The `config` method doesn't require specific parameters in the request body. - -### Return Object - -The method returns an object containing various configuration parameters and settings related to the Tezos blockchain. Here's a description of the top-level objects within the returned object: - -- `data-dir` (string): The data directory path for the Tezos node. - -- `rpc` (object): An object with RPC (Remote Procedure Call) related configuration details. - -- `p2p` (object): An object with peer-to-peer (P2P) related configuration details. - -- `shell` (object): An object with shell-related configuration details. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconracttickets.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconracttickets.md deleted file mode 100644 index cc352eb8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconracttickets.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "getConractTickets" -slug: "rpc-tezos-getconracttickets" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the contract ID -const params = { - contractId: 'YOUR_CONTRACT_ID', - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID if needed -}; - -// Retrieve all ticket balances for a specific Tezos smart contract -const ticketBalances = await tatum.rpc.getConractTickets(params); - -// Log the ticket balances -console.log(`All Ticket Balances for Contract ${contractId}:`, ticketBalances); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getConractTickets` method is used to retrieve the balances of all tickets associated with a specific Tezos smart contract. Tickets represent assets or tokens held within a smart contract, and this method provides information about those assets' balances. - -### Example Use Cases: - -1. **Asset Management:** Developers and users can use this method to query the balances of all tickets held within a Tezos smart contract. This is particularly useful for asset management and tracking within decentralized applications. - -2. **Audit and Verification:** Auditors and verifiers can check the ticket balances within a smart contract to ensure that the contract behaves as expected and that all assets are accounted for. - -### Request Parameters - -The `getConractTickets` method requires the following parameter: - -- `contractId` (string, required): The contract ID (address) of the Tezos smart contract for which you want to retrieve the ticket balances. -- `chainId` (string, required): The ID of the chain where the block is located. -- `blockId` (string, required): The unique identifier (hash) of the block. - -### Return Object - -The method returns an array of objects, each representing a ticket balance within the specified Tezos smart contract. Each object includes the following properties: - -- `ticketer` (string): The ticketer associated with the ticket balance. - -- `content_type` (string): The content type of the ticket. - -- `content` (string): The content associated with the ticket. - -- `amount` (string): The amount or balance of the ticket. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconstants.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconstants.md deleted file mode 100644 index 6a4bcd4f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getconstants.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: "getConstants" -slug: "rpc-tezos-getconstants" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch the constants from the Tezos blockchain -const constants = await tatum.rpc.getConstants(); - -// Log the constants -console.log('Tezos Constants:', constants); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getConstants` method allows you to retrieve all the constants from the Tezos blockchain. These constants include various operational parameters like proof of work nonce size, max operation data length, and others that are crucial for understanding the blockchain's current configuration. - -### Example use cases: - -1. **Blockchain Configuration Analysis:** - Developers and researchers can use this method to obtain detailed information about the Tezos blockchain's current configuration, aiding in development and analysis. - -2. **Smart Contract Development:** - Smart contract developers can use these constants to better understand the operational parameters of the Tezos blockchain, ensuring their contracts are optimized for the current environment. - -3. **Operational Monitoring:** - This method can be used for monitoring the blockchain's parameters, which can be crucial for applications that depend on these constants for their operation. - -### Request Parameters - -The `getConstants` method does not require any parameters. - -### Return Object - -The `getConstants` method returns an object containing various constants from the Tezos blockchain. These constants include, but are not limited to: - -- `proof_of_work_nonce_size` (number): Size of the nonce in proof of work. -- `nonce_length` (number): Length of the nonce. -- `max_anon_ops_per_block` (number): Maximum anonymous operations per block. -- `max_operation_data_length` (number): Maximum data length for operations. -- `max_proposals_per_delegate` (number): Max proposals per delegate. -- `max_micheline_node_count` (number): Max node count in Micheline. -- `max_micheline_bytes_limit` (number): Max byte size for Micheline. -- `max_allowed_global_constants_depth` (number): Max depth for global constants. -- `cache_layout_size` (number): Size of cache layout. -- `michelson_maximum_type_size` (number): Maximum size for Michelson types. -- `smart_rollup_max_wrapped_proof_binary_size` (number): Max size for wrapped proof binaries in smart rollups. -- `smart_rollup_message_size_limit` (number): Message size limit in smart rollups. -- `smart_rollup_max_number_of_messages_per_level` (number): Max messages per level in smart rollups. -- `preserved_cycles` (number): Number of cycles to preserve. -- `blocks_per_cycle` (number): Number of blocks per cycle. -- `blocks_per_commitment` (number): Blocks per commitment. -- `nonce_revelation_threshold` (number): Threshold for nonce revelation. -- `blocks_per_stake_snapshot` (number): Blocks per stake snapshot. -- `cycles_per_voting_period` (number): Cycles per voting period. -- `hard_gas_limit_per_operation` (number): Hard gas limit per operation. -- `hard_gas_limit_per_block` (number): Hard gas limit per block. -- `proof_of_work_threshold` (number): Threshold for proof of work. -- `minimal_stake` (number): Minimal stake requirement. -- `vdf_difficulty` (number): Difficulty for VDF. -- `seed_nonce_revelation_tip` (number): Tip for seed nonce revelation. -- `origination_size` (number): Size of origination. -- `baking_reward_fixed_portion` (number): Fixed portion of baking reward. -- `baking_reward_bonus_per_slot` (number): Bonus reward per slot for baking. -- `endorsing_reward_per_slot` (number): Reward per slot for endorsing. -- `cost_per_byte` (number): Cost per byte. -- `hard_storage_limit_per_operation` (number): Hard storage limit per operation. -- `quorum_min` (number): Minimum quorum. -- `quorum_max` (number): Maximum quorum. -- `min_proposal_quorum` (number): Minimum proposal quorum. -- `liquidity_baking_subsidy` (number): Subsidy for liquidity baking. -- `liquidity_baking_toggle_ema_threshold` (number): EMA threshold for liquidity baking toggle. -- `max_operations_time_to_live` (number): Max TTL for operations. -- `minimal_block_delay` (number): Minimum delay between blocks. -- `delay_increment_per_round` (number): Delay increment per round. -- `consensus_committee_size` (number): Size of the consensus committee. -- `consensus_threshold` (number): Threshold for consensus. -- `minimal_participation_ratio` (number): Minimum participation ratio. -- `max_slashing_period` (number): Maximum slashing period. -- `frozen_deposits_percentage` (number): Percentage of frozen deposits. -- `double_baking_punishment` (number): Punishment for double baking. -- `ratio_of_frozen_deposits_slashed_per_double_endorsement` (number): Ratio of frozen deposits slashed per double endorsement. -- `cache_script_size` (number): Size limit for cached scripts. -- `cache_stake_distribution_cycles` (number): Number of cycles for caching stake distribution. -- `cache_sampler_state_cycles` (number): Cycles for caching sampler state. -- `tx_rollup_enable` (boolean): Flag to enable transaction rollups. -- `tx_rollup_origination_size` (number): Size limit for origination in transaction rollups. -- `tx_rollup_hard_size_limit_per_inbox` (number): Hard size limit per inbox in transaction rollups. -- `tx_rollup_hard_size_limit_per_message` (number): Hard size limit per message in transaction rollups. -- `tx_rollup_max_withdrawals_per_batch` (number): Maximum withdrawals allowed per batch in transaction rollups. -- `tx_rollup_commitment_bond` (mutez): Bond required for commitment in transaction rollups. -- `tx_rollup_finality_period` (number): Finality period for transaction rollups. -- `tx_rollup_withdraw_period` (number): Withdrawal period for transaction rollups. -- `tx_rollup_max_inboxes_count` (number): Maximum inboxes count for transaction rollups. -- `tx_rollup_max_messages_per_inbox` (number): Maximum messages per inbox in transaction rollups. -- `tx_rollup_max_commitments_count` (number): Maximum commitments count in transaction rollups. -- `tx_rollup_cost_per_byte_ema_factor` (number): EMA factor for cost per byte in transaction rollups. -- `tx_rollup_max_ticket_payload_size` (number): Maximum ticket payload size in transaction rollups. -- `tx_rollup_rejection_max_proof_size` (number): Maximum proof size for rejection in transaction rollups. -- `tx_rollup_sunset_level` (number): Sunset level for transaction rollups. -- `dal_parametric` (object): Parameters for Data Availability Layer. -- `smart_rollup_enable` (boolean): Flag to enable smart rollups. -- `smart_rollup_arith_pvm_enable` (boolean): Enable arithmetic proof verification mechanism in smart rollups. -- `smart_rollup_origination_size` (number): Origination size limit for smart rollups. -- `smart_rollup_challenge_window_in_blocks` (number): Challenge window in blocks for smart rollups. -- `smart_rollup_stake_amount` (mutez): Stake amount required for smart rollups. -- `smart_rollup_commitment_period_in_blocks` (number): Commitment period in blocks for smart rollups. -- `smart_rollup_max_lookahead_in_blocks` (number): Maximum lookahead in blocks for smart rollups. -- `smart_rollup_max_active_outbox_levels` (number): Maximum active outbox levels in smart rollups. -- `smart_rollup_max_outbox_messages_per_level` (number): Maximum outbox messages per level in smart rollups. -- `smart_rollup_number_of_sections_in_dissection` (number): Number of sections in dissection for smart rollups. -- `smart_rollup_timeout_period_in_blocks` (number): Timeout period in blocks for smart rollups. -- `smart_rollup_max_number_of_cemented_commitments` (number): Max number of cemented commitments in smart rollups. -- `smart_rollup_max_number_of_parallel_games` (number): Max number of parallel games in smart rollups. -- `zk_rollup_enable` (boolean): Flag to enable zero-knowledge rollups. -- `zk_rollup_origination_size` (number): Origination size for zero-knowledge rollups. -- `zk_rollup_min_pending_to_process` (number): Minimum pending transactions to process in zero-knowledge rollups. - -(Note: The actual return object will contain a comprehensive list of all Tezos constants, and the fields might vary based on the blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontract.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontract.md deleted file mode 100644 index ba4e34e7..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontract.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "getContract" -slug: "rpc-tezos-getcontract" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the input parameters as a dictionary object -const params = { - contractId: 'YOUR_CONTRACT_ID', // Specify the contract ID - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID if needed - normalizeTypes: false // Optional: Set to true if you want to normalize types -}; - -// Access the complete status of a contract -const contractStatus = await tatum.rpc.getContract(params); - -// Log the contract status -console.log(`Status of Contract ${params.contractId}:`, contractStatus); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getContract` method allows you to access the complete status of a contract in the Tezos blockchain. This includes information about the contract's balance, delegate, script, and counter. - -### Example Use Cases: - -1. **Contract Analysis:** Developers and auditors can use this method to retrieve detailed information about a specific contract, including its balance, delegate, script, and counter. - -2. **Contract Interaction:** Users may want to examine the status of a contract to verify its current balance or delegate. - -### Request Parameters - -The `getContract` method requires the following parameters, all included in the `params` dictionary object: - -- `contractId` (string, required): A contract identifier encoded in b58check, representing the contract for which you want to access the status. - -- `chainId` (string, required): The network identifier (chain ID) for the Tezos blockchain. - -- `blockId` (string, optional): The unique identifier (hash) of the block. This parameter is optional, and if not provided, the method will retrieve the status from the latest block. - -- `normalizeTypes` (boolean, optional): Whether types should be normalized (annotations removed, combs flattened) or kept as they appeared in the original script. Set to `true` for normalization or `false` to keep original types. - -### Return Object - -The method returns an object representing the complete status of the specified contract, including the following properties: - -- `balance` (positive big number): The balance of the contract, represented as a positive big number. - -- `delegate` (public key hash): The delegate of the contract, represented as a Tezos public key hash (Base58Check-encoded). - -- `script` (scripted contract): The script associated with the contract, represented as a scripted contract object. - -- `counter` (positive big number): The counter of the contract, represented as a positive big number. - -Users can utilize this information for various purposes, such as contract analysis and verification. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractbalance.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractbalance.md deleted file mode 100644 index 55e2930d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractbalance.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "getContractBalance" -slug: "rpc-tezos-getcontractbalance" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Tezos blockchain -import { TatumSDK, Network, Tezos } from '@tatumio/tatum'; - -// Initializing SDK for Tezos blockchain -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define your chain ID and contract address -const params = { - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID - contractId: 'YOUR_CONTRACT_ID' // Specify the contract ID -}; - -// Fetching contract balance -const contractBalance = await tatum.rpc.getContractBalance(params); -console.log(contractBalance); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `getContractBalance` method retrieves the balance of a specific smart contract on the Tezos blockchain. - -### Parameters - -- `chainId` (string, required): The ID of the chain where the smart contract is deployed. -- `blockId` (string, required): The unique identifier (hash) of the block. -- `contractAddress` (string, required): The address of the smart contract - -### Return Object - -The method returns an object containing the `balance` of the specified smart contract. The structure of the return object may include various fields depending on the contract's status and balance. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractbalanceandfrozenbonds.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractbalanceandfrozenbonds.md deleted file mode 100644 index b58a4df0..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractbalanceandfrozenbonds.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getContractBalanceAndFrozenBonds" -slug: "rpc-tezos-getcontractbalanceandfrozenbonds" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the contract ID -const params = { - contractId: 'YOUR_CONTRACT_ID', // Spoecify the contract ID - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID -}; - -// Retrieve the sum of the spendable balance and frozen bonds for a specific Tezos smart contract -const contractBalance = await tatum.rpc.getContractBalanceAndFrozenBonds(params); - -// Log the contract's balance -console.log(`Sum of Spendable Balance and Frozen Bonds for Contract ${contractId.contractId}:`, contractBalance); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getContractBalanceAndFrozenBonds` method is used to retrieve the sum of the spendable balance and frozen bonds associated with a specific Tezos smart contract. This sum is considered part of the contract's stake, and it represents the contract's stake value if the contract is not a delegate. - -### Example Use Cases: - -1. **Contract Financial Analysis:** Developers and users can use this method to obtain the sum of the spendable balance and frozen bonds of a Tezos smart contract. This information is essential for financial analysis and decision-making within decentralized applications. - -2. **Audit and Verification:** Auditors and verifiers can review the financial status of a smart contract, including its stake value, to ensure that it has the required funds for operations. - -### Request Parameters - -The `getContractBalanceAndFrozenBonds` method requires the following parameter: - -- `contractId` (string, required): A contract identifier encoded in b58check, representing the Tezos smart contract for which you want to retrieve the sum of spendable balance and frozen bonds. -- `chainId` (string, required): The ID of the chain where the block is located. -- `blockId` (string, required): The unique identifier (hash) of the block. - -### Return Object - -The method returns a string representing the sum of the spendable balance and frozen bonds of the specified Tezos smart contract. This sum is considered part of the contract's stake and can be used to assess the contract's financial health. - -Users can use this information to understand the contract's stake value, which is particularly relevant when the contract is not a delegate. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractcounter.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractcounter.md deleted file mode 100644 index cc127001..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractcounter.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: "getContractCounter" -slug: "rpc-tezos-getcontractcounter" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the contract ID -const params = { - contractId: 'YOUR_CONTRACT_ID', // Specify tthe contract ID - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID (hash) -}; - -// Retrieve the contract's counter value -const contractCounter = await tatum.rpc.getContractCounter(params); - -// Log the contract's counter value -console.log(`Contract Counter Value for Contract ${contractId.contractId}:`, contractCounter); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getContractCounter` method is used to retrieve the current counter value of a specific Tezos smart contract. The counter value represents the number of transactions or operations that have been performed on the contract. - -### Example Use Cases: - -1. **Transaction Verification:** Developers and users can use this method to verify the current counter value of a contract before initiating a transaction. This can help prevent accidental double-spending or ensure transaction order. - -2. **Contract Interaction:** When interacting with a Tezos smart contract, it's important to be aware of the contract's counter value to ensure proper sequencing and prevent conflicts. - -### Request Parameters - -The `getContractCounter` method requires the following parameter: - -- `contractId` (string, required): A contract identifier encoded in b58check, representing the Tezos smart contract for which you want to retrieve the counter value. -- `chainId` (string, required): The ID of the chain where the block is located. -- `blockId` (string, required): The unique identifier (hash) of the block. - -### Return Object - -The method returns an positive big number string representing the current counter value of the specified Tezos smart contract. This counter value reflects the number of transactions or operations that have been performed on the contract. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractdelegate.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractdelegate.md deleted file mode 100644 index 18580fcf..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractdelegate.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getContractDelegate" -slug: "rpc-tezos-getcontractdelegate" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the contract ID -const params = { - contractId: 'YOUR_CONTRACT_ID', // Specify tthe contract ID - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID' // Optional: Specify the block ID - }; - -// Retrieve the delegate of a Tezos smart contract, if any -const contractDelegate = await tatum.rpc.getContractDelegate(params); - -// Log the contract's delegate, if available -console.log(`Delegate of Contract ${contractId.contractId}:`, contractDelegate); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getContractDelegate` method is used to access the delegate, if any, associated with a specific Tezos smart contract. In Tezos, a delegate is an entity that can participate in the consensus mechanism and represent other stakeholders' interests. - -### Example Use Cases: - -1. **Delegate Information:** Developers and users can use this method to retrieve information about the delegate associated with a smart contract. This information may include the delegate's public key hash and other relevant details. - -2. **Stakeholder Interactions:** When interacting with Tezos smart contracts, it's important to know if a contract has a delegate, as delegates can influence various aspects of the network. - -### Request Parameters - -The `getContractDelegate` method requires the following parameter: - -- `contract_id` (string, required): A contract identifier encoded in b58check, representing the Tezos smart contract for which you want to retrieve the delegate, if any. -- `chainId` (string, required): The ID of the chain where the block is located. -- `blockId` (string, required): The unique identifier (hash) of the block. - -### Return Object - -The method returns a string representing the delegate associated with the specified Tezos smart contract, if a delegate exists. The delegate is represented as an Ed25519, Secp256k1, P256, or BLS public key hash encoded in Base58Check format. - -If the contract does not have a delegate, the method returns `null`. Users can check for the presence of a delegate by examining the response value. - -This information can be useful for understanding the role and influence of delegates in the Tezos network. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractentrypoint.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractentrypoint.md deleted file mode 100644 index 9fc0e736..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractentrypoint.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "getContractEntrypoint" -slug: "rpc-tezos-getcontractentrypoint" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the input params -const params = { - contractId: 'YOUR_CONTRACT_ID', // Specify the contract ID - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID if needed - entrypoint: 'YOUR_ENTRYPOINT_NAME', // Specify the desired entrypoint name - normalizeTypes: false // Optional: Set to true if you want to normalize types -}; - -const entrypoint = 'YOUR_ENTRYPOINT_NAME'; // Replace with the name of the desired entrypoint - -// Retrieve the type of the specified entrypoint of the Tezos smart contract -const entrypointType = await tatum.rpc.getContractEntryPointType(params); - -// Log the type of the specified entrypoint -console.log(`Type of Entrypoint ${entrypoint} in Contract ${contractId.contractId}:`, entrypointType); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getContractEntryPointType` method is used to return the type of a specific entrypoint within a Tezos smart contract. An entrypoint represents a callable function or method exposed by the contract. - -### Example Use Cases: - -1. **Entrypoint Type Inquiry:** Developers and users can use this method to retrieve the type information of a specific entrypoint within a smart contract. This information is essential for understanding how to interact with and invoke the entrypoint. - -2. **Contract Analysis:** Analysts and auditors may use this method to examine the types associated with contract entrypoints and ensure they align with the intended functionality. - -### Request Parameters - -The `getContractEntryPointType` method requires the following parameters: - -- `contract_id` (string, required): A contract identifier encoded in b58check, representing the Tezos smart contract for which you want to retrieve the entrypoint type. -- `chainId` (string, required): The ID of the chain where the block is located. -- `blockId` (string, required): The unique identifier (hash) of the block. -- `entrypoint` (string, required): A Michelson entrypoint name (string of length \< 32), specifying the entrypoint for which you want to retrieve the type. -- `normalize_types` (boolean, optional): Indicates whether types should be normalized. If set to `true`, types will be normalized (annotations removed, combs flattened); if set to `false`, types will be kept as they appeared in the original script. - -### Return Object - -The method returns a Micheline expression representing the type of the specified entrypoint within the contract. This type information describes the structure and expected data for interacting with the entrypoint. - -Users can use this information to ensure proper data handling and validation when invoking contract entrypoints. - -Please note that the `normalize_types` parameter can affect the structure of the returned type based on whether types are normalized or kept as they appeared in the original script. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractentrypoints.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractentrypoints.md deleted file mode 100644 index 7fe2bd97..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractentrypoints.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "getContractEntrypoints" -slug: "rpc-tezos-getcontractentrypoints" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -const params = { - contractId: 'YOUR_CONTRACT_ID', // Specify the contract ID - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID', // Optional: Specify the block ID if needed - normalizeTypes: false // Optional: Set to true if you want to normalize types -}; - -// Retrieve the list of entrypoints of the Tezos smart contract -const entrypoints = await tatum.rpc.getContractEntrypoints(params); - -// Log the list of entrypoints -console.log(`Entry Points of Contract ${params.contractId}:`, entrypoints); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getContractEntrypoints` method is used to return the list of entrypoints available in a specific Tezos smart contract. Entrypoints represent the callable functions or methods that can be invoked on the contract. - -### Example Use Cases: - -1. **Contract Interaction:** Developers and users can use this method to discover the available entrypoints of a smart contract. This information is essential for interacting with and invoking specific contract functions. - -2. **Contract Analysis:** Analysts and auditors may use this method to examine the contract's exposed functions and ensure that they align with the intended functionality. - -### Request Parameters - -The `getContractEntrypoints` method requires the following parameters: - -- `contract_id` (string, required): A contract identifier encoded in b58check, representing the Tezos smart contract for which you want to retrieve the list of entrypoints. -- `chainId` (string, required): The ID of the chain where the block is located. -- `blockId` (string, required): The unique identifier (hash) of the block. -- `normalize_types` (boolean, optional): Indicates whether types should be normalized. If set to `true`, types will be normalized (annotations removed, combs flattened); if set to `false`, types will be kept as they appeared in the original script. - -### Return Object - -The method returns an object containing the following properties: - -- `unreachable` (array of objects): An array of unreachable entrypoints. Each object in the array contains a `path` property, which is an array of Michelson primitives. - -- `entrypoints` (object): An object containing the available entrypoints of the contract. Each entrypoint is represented as a property, and its value is a Micheline expression describing the entrypoint's type. - -Users can use this information to understand the contract's callable functions and types. - -Please note that the `normalize_types` parameter can affect the structure of the returned entrypoints based on whether types are normalized or kept as they appeared in the original script. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractmanagerkey.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractmanagerkey.md deleted file mode 100644 index 0704b498..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontractmanagerkey.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "getContractManagerKey" -slug: "rpc-tezos-getcontractmanagerkey" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the input parameters as a dictionary object -const params = { - contractId: 'YOUR_CONTRACT_ID', // Specify the contract ID - chainId: 'YOUR_CHAIN_ID', // Specify the chain ID (Network identifier) - blockId: 'YOUR_BLOCK_ID' // Optional: Specify the block ID if needed -}; - -// Retrieve the manager key of the implicit contract -const managerKey = await tatum.rpc.getContractManagerKey(params); - -// Log the manager key -console.log(`Manager Key of Contract ${params.contractId}:`, managerKey); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getContractManagerKey` method is used to access the manager of an implicit contract in the Tezos blockchain. The manager key represents the entity responsible for managing the contract's operations. - -### Example Use Cases: - -1. **Contract Analysis:** Developers and auditors can use this method to retrieve the manager key of an implicit contract, providing insights into the contract's ownership and management. - -2. **Contract Interaction:** Users may use this method to verify the manager's public key of a contract to ensure the validity of transactions. - -### Request Parameters - -The `getContractManagerKey` method requires the following parameters, all included in the `params` dictionary object: - -- `contractId` (string, required): A contract identifier encoded in b58check, representing the implicit contract for which you want to access the manager key. -- `chainId` (string, required): The network identifier (chain ID) for the Tezos blockchain. -- `blockId` (string, required): The unique identifier (hash) of the block. - -### Return Object - -The method returns an object representing the manager key of the implicit contract. The manager key is a nullable field, and it can be one of the following: - -- If a manager key exists, it is represented as a Tezos public key hash (Base58Check-encoded). - -- If there is no manager key, the response is nullable, indicating that no manager key is associated with the contract. - -Users can use this information to verify the ownership and management of the contract. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontracttickets.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontracttickets.md deleted file mode 100644 index bd66b5aa..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getcontracttickets.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "getcontracttickets" -slug: "rpc-tezos-getcontracttickets" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-geterrorsschema.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-geterrorsschema.md deleted file mode 100644 index b7da0bc9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-geterrorsschema.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "getErrorsSchema" -slug: "rpc-tezos-geterrorsschema" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch a list of errors -const errors = await tatum.rpc.getErrorsSchema(); - -// Log the list of errors -console.log('Errors:', errors); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getErrorsSchema` method allows you to retrieve a list of errors with a status code of 200 from the Tezos network. These errors can provide insights into various aspects of the network, including smart contract execution, transaction failures, or other operational issues. - -### Example use cases: - -1. **Error Monitoring:** - Developers and node operators can use this method to fetch error information to monitor the health and performance of the Tezos network. This information can help diagnose and address issues promptly. - -2. **Troubleshooting:** - When encountering issues with transactions or smart contract interactions, developers can use this method to obtain detailed error messages, aiding in troubleshooting and debugging. - -3. **Network Analysis:** - Blockchain analysts and researchers can analyze error data to gain insights into network activity, identify patterns, and assess the overall health of the Tezos blockchain. - -### Request Parameters - -The `getErrorsSchema` method does not require any specific parameters. - -### Return Object - -The endpoint returns an array of errors from the Tezos blockchain. Each error is an object containing details about the error. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-gethistorymode.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-gethistorymode.md deleted file mode 100644 index a83d082c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-gethistorymode.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "getHistoryMode" -slug: "rpc-tezos-gethistorymode" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch the history mode of the node's underlying storage -const historyMode = await tatum.rpc.getHistoryMode(); - -// Log the history mode -console.log(`Node's history mode:`, historyMode.historyMode); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getHistoryMode` method is utilized to retrieve the history mode of the node's underlying storage in the Tezos network. The history mode determines the extent of the historical data retained by the node, influencing storage requirements, the ability to query historical data, and recovery mechanisms. - -### Example use cases: - -1. **Storage Optimization:** - Node operators can use the `getHistoryMode` method to understand the storage mode of their node. Depending on the mode, they might decide to adjust storage resources or transition to a different mode to meet their operational needs. - -2. **Data Query and Analytics:** - Developers and analysts can check the history mode to ensure they can query the historical data they need. For instance, a node in `rolling` mode might not retain the entire history of the blockchain. - -3. **Node Configuration and Setup:** - When setting up new nodes or performing maintenance tasks, operators might need to check the history mode to ensure consistency across different nodes or to optimize for specific use cases. - -### Request Parameters - -The `getHistoryMode` method doesn't require specific parameters in the request body. - -### Return Object - -The `getHistoryMode` method returns an object indicating the history mode of the node's underlying storage: - -- `historyMode` (string): - Can be one of the following values: - - `archive`: The node retains the entire history of the chain. - - `full`: The node retains the full history but may prune some data. - - `rolling`: The node retains only a limited history, maintaining the most recent blocks and pruning older ones. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getinvalidblocks.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getinvalidblocks.md deleted file mode 100644 index 1ce9b6fc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getinvalidblocks.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getInvalidBlocks" -slug: "rpc-tezos-getinvalidblocks" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch the list of invalid blocks for a specific Tezos chain using the listInvalidBlocks method -const invalidBlocks = await tatum.rpc.listInvalidBlocks({ - chainId: 'main' // Specify the Tezos chain ID (usually 'main' for mainnet) -}); - -console.log(`The list of invalid blocks:`, invalidBlocks); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getInvalidBlocks` method retrieves blocks from a specified chain in Tezos that have been declared invalid. Alongside these blocks, the method provides details on the errors that led to their invalidation. - -### Example use cases: - -1. **Chain Audit & Monitoring:** - By identifying and studying invalid blocks, developers and network monitors can gain insights into potential issues or attacks on the Tezos network. -2. **Network Health Analysis:** - Regularly checking for invalid blocks can be part of a routine health check of the Tezos blockchain, ensuring the network's integrity and robustness. -3. **Error Handling:** - For developers building on Tezos, understanding why certain blocks were invalidated can aid in improving their applications and handling potential future errors. - -### Request Parameters - -The `getInvalidBlocks` method requires: - -- `chainId` (string, required): - The identifier of the Tezos chain from which the list of invalid blocks is being requested. - -### Return Object - -The `getInvalidBlocks` method returns an array of objects, where each object provides: - -- Block details and the associated errors that led to its invalidation. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelscaboose.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelscaboose.md deleted file mode 100644 index 28592a81..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelscaboose.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: "getLevelsCaboose" -slug: "rpc-tezos-getlevelscaboose" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch the caboose level for a specific Tezos chain -const cabooseLevel = await tatum.rpc.getLevelsCaboose({ - chainId: 'NetXdQprcVkpaWU' // Specify the Tezos chain ID (e.g., 'NetXdQprcVkpaWU' for mainnet) -}); - -// Log the caboose level -console.log(`Current caboose level:`, cabooseLevel.level); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLevelsCaboose` method is used to retrieve the current caboose level of a specified chain on the Tezos network. The caboose is the earliest block still retained in the chain's rolling history, meaning it represents the oldest block in the chain's limited history when running in `rolling` mode. - -### Example use cases: - -1. **Monitoring Chain History:** - Developers and node operators can use the `getLevelsCaboose` method to monitor the extent of the rolling history maintained by their node, especially when running in `rolling` mode. - -2. **Data Pruning Decisions:** - By understanding the current caboose level, services can make informed decisions about pruning or archiving historical blockchain data that falls outside the rolling history. - -3. **Synchronization and Backup:** - Node operators might use the caboose level to synchronize or backup specific segments of the blockchain, ensuring they retain the desired portion of the chain's history. - -### Request Parameters - -The `getLevelsCaboose` method requires the following parameter: - -- `chainId` (string, required): - The identifier of the Tezos chain for which the caboose level is being requested. - -### Return Object - -The `getLevelsCaboose` method returns an object containing the specific level number of the caboose: - -- `level` (integer): - Represents the block number of the current caboose for the specified Tezos chain. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelscheckpoint.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelscheckpoint.md deleted file mode 100644 index 5d2c5a83..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelscheckpoint.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "getLevelsCheckpoint" -slug: "rpc-tezos-getlevelscheckpoint" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch the checkpoint for a specific Tezos chain using the deprecated getLevelsCheckpoint method -const checkpoint = await tatum.rpc.getLevelsCheckpoint({ - chainId: 'main' // Specify the Tezos chain ID (usually 'main' for mainnet) -}); - -console.log(`The checkpoint for the chain is:`, checkpoint); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -**DEPRECATED**: This method is deprecated. It is recommended to use `../levels/{checkpoint, savepoint, caboose, history_mode}` instead. The `getLevelsCheckpoint` method provides information about the current checkpoint for a specified chain in Tezos. - -### Example use cases: - -1. **Legacy System Support:** - While this method is deprecated, it may still be relevant for legacy systems or applications that have not transitioned to newer endpoints. -2. **Checkpoint Retrieval:** - Checkpoints are crucial for validating the blockchain's integrity. The method allows for quick retrieval of the current checkpoint for audit or validation purposes. - -### Request Parameters - -The `getLevelsCheckpoint` method requires: - -- `chainId` (string, required): - The identifier of the Tezos chain from which the checkpoint information is being requested. - -### Return Object - -The `getLevelsCheckpoint` method returns an object containing details about the current checkpoint for the specified chain. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelssavepoint.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelssavepoint.md deleted file mode 100644 index 806b2d54..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getlevelssavepoint.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: "getLevelsSavepoint" -slug: "rpc-tezos-getlevelssavepoint" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the chain ID (For this example, we use "NetXdQprcVkpaWU" as a placeholder) -const chainId = { chainId: 'NetXdQprcVkpaWU' }; - -// Fetch a list of savepoint levels for the specified chain -const savepointLevels = await tatum.rpc.getLevelsSavepoint(chainId); - -// Log the list of savepoint levels -console.log('Savepoint levels:', savepointLevels); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getLevelsSavepoint` method allows you to retrieve a list of savepoint levels for a specific chain in the Tezos network. Savepoints are specific levels in the blockchain's history that can be used for various purposes, such as optimizing synchronization or rolling back to a specific point. - -### Example use cases: - -1. **Blockchain Optimization:** - Node operators and developers can use this method to obtain a list of savepoint levels to optimize their Tezos node's synchronization process by starting from a known savepoint. - -2. **Rollback Capability:** - Savepoints provide the ability to roll back the blockchain to a specific point in time. This can be helpful for handling issues or anomalies by reverting to a previous state. - -3. **Historical Data Retrieval:** - Researchers and analysts may use savepoints to fetch historical data for analysis and research purposes, ensuring consistent and accurate data retrieval. - -### Request Parameters - -The `getLevelsSavepoint` method requires the following parameter: - -- `chainId` (string, required): - The identifier of the Tezos chain for which to retrieve the savepoint levels. - -### Return Object - -The `getLevelsSavepoint` method returns an array of savepoint level objects, each containing relevant information about the savepoint level: - -- `block_hash` (string): The hash of the block at the savepoint level, e.g., "BLockGenesisGenesisGenesisGenesisGenesisf79b5d1CoW2". -- `level` (integer): The level (block number) of the savepoint, e.g., 0. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getnetworkdal.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getnetworkdal.md deleted file mode 100644 index a3a2d8cc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getnetworkdal.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: "getNetworkDal" -slug: "rpc-tezos-getnetworkdal" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Get the configuration for the DAL (Data Access Layer) -const dalConfig = await tatum.rpc.getNetworkDal(); - -// Log the DAL configuration -console.log(`DAL Configuration:`, dalConfig); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getNetworkDal` method allows you to retrieve the configuration for the Data Access Layer (DAL) on the Tezos blockchain network. The DAL configuration includes various parameters related to network settings. - -### Example Use Cases: - -1. **Network Configuration:** Developers and node operators can use this method to access and review the current network configuration, including parameters like redundancy factor, page size, slot size, and the number of shards. - -2. **Testing Environments:** The `use_mock_srs_for_testing` parameter can be used in testing environments to simulate certain network settings. - -### Return Object - -The method returns an object that represents the configuration for the DAL: - -- `activated` (boolean): Indicates whether the DAL is activated. - -- `use_mock_srs_for_testing` (object or null): An optional object used for testing purposes. This object includes the following properties: - - `redundancy_factor` (integer, 0-255): The redundancy factor for testing. - - `page_size` (integer, 0-65535): The page size for testing. - - `slot_size` (integer, -1073741824 to 1073741823): The slot size for testing. - - `number_of_shards` (integer, 0-65535): The number of shards for testing. - -- `bootstrap_peers` (array of strings): An array of bootstrap peers for the DAL. - -Please note that the presence and structure of the `use_mock_srs_for_testing` object may vary based on the network's configuration. - -You can use this information to understand and configure the DAL settings on the Tezos network. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getnodeversion.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getnodeversion.md deleted file mode 100644 index e37077f6..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getnodeversion.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "getNodeVersion" -slug: "rpc-tezos-getnodeversion" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Tezos blockchain -import { TatumSDK, Network, Tezos } from '@tatumio/tatum'; - -// Initializing SDK for Tezos blockchain -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetching the version information -const versionInfo = await tatum.rpc.version(); -console.log(versionInfo); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `version` method is used to retrieve version information about the Tezos blockchain. - -### Request Parameters - -The `version` method doesn't require specific parameters in the request body. - -### Return Object - -The method returns an object with version information. Here are descriptions for the top-level objects within the returned object: - -- `version` (object): An object with version details. -- `network_version` (object): An object with network version details. -- `commit_info` (object): An object with commit information. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getoperationhashes.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getoperationhashes.md deleted file mode 100644 index 5b9d5868..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getoperationhashes.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "getOperationHashes" -slug: "rpc-tezos-getoperationhashes" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:36 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Tezos blockchain -import { TatumSDK, Network, Tezos } from '@tatumio/tatum'; - -// Initializing SDK for Tezos blockchain -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define parameters for the query -const params = { - chainId: 'YOUR_CHAIN_ID', - blockId: 'YOUR_BLOCK_ID' -}; - -// Fetching list of operation hashes -const operationHashes = await tatum.rpc.getOperationHashes(params); -console.log(operationHashes); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `getOperationHashes` method is used to retrieve a list of operation hashes from a specific block on the Tezos blockchain. - -### Request Parameters - -- `chainId` (string, required): The ID of the chain. -- `blockId` (string, required): The unique identifier (hash) of the block. - -### Return Object - -The method returns an array of strings, each representing an operation hash from the specified block on the Tezos blockchain. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getoperations.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getoperations.md deleted file mode 100644 index 87fadf9f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getoperations.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "getOperations" -slug: "rpc-tezos-getoperations" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Importing Tatum SDK for Tezos blockchain -import { TatumSDK, Network, Tezos } from '@tatumio/tatum'; - -// Initializing SDK for Tezos blockchain -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define parameters for the query -const params = { - chainId: 'YOUR_CHAIN_ID', - blockId: 'YOUR_BLOCK_ID' -}; - -// Fetching the operations -const operations = await tatum.rpc.getOperations(params); -console.log(operations); - -// Cleaning up resources used by Tatum SDK -await tatum.destroy(); -``` - -### Overview - -The `getOperations` method is used to retrieve a list of operations included in a specific block on the Tezos blockchain. - -### Request Parameters - -- `chainId` (string, required): The ID of the chain. -- `blockId` (string, required): The unique identifier (hash) of the block. - -### Return Object - -The method returns an array of operations from the specified block on the Tezos blockchain. Each operation is an object containing details about the operation. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocol.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocol.md deleted file mode 100644 index 5053b960..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocol.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "getProtocol" -slug: "rpc-tezos-getprotocol" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `getProtocolByHash` method retrieves information about a specific Tezos protocol based on its protocol hash. You can use this method to obtain details about the environment the protocol relies on and its components. - -### How to use it - -Here's a sample code snippet in TypeScript to call the `getProtocolByHash` method using the Tatum SDK: - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the protocol hash for the protocol you want to retrieve information about -const protocolHash = { protocolHash: 'YOUR_PROTOCOL_HASH' }; - -// Call the getProtocolByHash method to retrieve information about the protocol -const protocolInfo = await tatum.rpc.getProtocolByHash(protocolHash); - -// Log the protocol information -console.log('Protocol Information:', protocolInfo); - -// Always destroy the Tatum SDK instance when done to stop any background processes -tatum.destroy(); -``` - -### Example Use Cases - -1. **Protocol Version Information:** - Developers can use this method to fetch details about a specific Tezos protocol version based on its protocol hash. - -2. **Protocol Analysis:** - Researchers and analysts can use this method to study the environment and components of a particular protocol for research or auditing purposes. - -### Request Parameters - -- `Protocol_hash` (string, required): - The protocol hash of the Tezos protocol you want to retrieve information about. - -### Return Object - -The `getProtocolByHash` method returns an object with the following properties: - -- `expected_env_version` (string): The expected environment version of the protocol. -- `components` (array of objects): An array of components that make up the protocol, where each component has the following properties: - - - `name` (string): The name of the component. - - `interface` (string): The interface of the component. - - `implementation` (string): The implementation of the component. - - (Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocolenvironment.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocolenvironment.md deleted file mode 100644 index e804e3c9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocolenvironment.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "getProtocolEnvironment" -slug: "rpc-tezos-getprotocolenvironment" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use - -```typescript -// Importing Tatum SDK for Tezos blockchain -import { TatumSDK, Network, Tezos } from '@tatumio/tatum'; - -// Initializing SDK for Tezos blockchain -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define parameters for the query -const params = { protocolHash: 'YOUR_PROTOCOL_HASH' }; - -// Fetching the protocol environment -const environmentVersion = await tatum.rpc.getProtocolEnvironmentByHash(params); -console.log(environmentVersion); - -// Cleaning up resources used by Tatum SDK -tatum.destroy(); -``` - -### Overview - -The `getProtocolEnvironmentByHash` method retrieves information about the environment version of a specific Tezos protocol based on its protocol hash. You can use this method to obtain details about the environment version, which is represented as an integer. - -### Request Parameters - -- `Protocol_hash` (string, required): The protocol hash (Base58Check-encoded) for which you want to retrieve environment information. - -### Return Object - -The method returns an integer representing the environment version of the specified Tezos protocol based on its protocol hash. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocols.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocols.md deleted file mode 100644 index 515d0fd6..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getprotocols.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "getProtocols" -slug: "rpc-tezos-getprotocols" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### Overview - -The `getProtocols` method retrieves a list of protocol hashes for the Tezos blockchain. These protocol hashes represent different versions of the Tezos protocol that have been used or are available on the blockchain. - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Call the getProtocols method to retrieve a list of protocol hashes -const protocols = await tatum.rpc.getProtocols(); - -// Log the list of protocol hashes -console.log('Protocols:', protocols); - -// Always destroy the Tatum SDK instance when done to stop any background processes -tatum.destroy(); -``` - -### Example Use Cases - -1. **Protocol Version Information:** - Developers can use this method to obtain a list of protocol hashes to understand the available protocol versions on the Tezos network. - -2. **Historical Analysis:** - Researchers and analysts can use this method to gather historical data on protocol versions used in the Tezos blockchain. - -### Request Parameters - -This method does not require any specific request parameters. - -### Return Object - -The `getProtocols` method returns an array of protocol hashes. Each protocol hash is represented as a string. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getuseractivatedprotocoloverrides.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getuseractivatedprotocoloverrides.md deleted file mode 100644 index b137e440..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getuseractivatedprotocoloverrides.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "getUserActivatedProtocolOverrides" -slug: "rpc-tezos-getuseractivatedprotocoloverrides" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch user-activated protocol overrides in the Tezos network configuration -const overrides = await tatum.rpc.getUserActivatedProtocolOverrides(); - -// Log the user-activated protocol overrides -console.log(`User-Activated Protocol Overrides:`, overrides); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getUserActivatedProtocolOverrides` method is used to retrieve user-activated protocol overrides in the Tezos network configuration. These overrides may include specific settings or modifications to the protocol activated by the network's users. - -### Example Use Cases: - -1. **Protocol Customization:** Developers and node operators can use this method to check if there are any user-activated protocol overrides that affect the behavior of the Tezos network. This information can be crucial when customizing or interacting with the protocol. - -2. **Protocol Compliance:** Users and service providers can ensure that their actions on the Tezos network comply with any user-activated protocol overrides that may be in effect. - -### Request Parameters - -The `getUserActivatedProtocolOverrides` method doesn't require specific parameters in the request body. - -### Return Object - -The method returns an object containing information about user-activated protocol overrides in the Tezos network configuration. - -These user-activated protocol overrides may include settings, parameters, or rules that deviate from the standard protocol behavior, allowing users to collectively influence the network's operation. - -Here's the updated structure of the return object, with descriptions: - -- `replaced_protocol` (string): A Tezos protocol ID (Base58Check-encoded) representing the protocol that has been replaced or modified by the user-activated override. - -- `replacement_protocol` (string): A Tezos protocol ID (Base58Check-encoded) representing the protocol that serves as the replacement or modification in the user-activated override. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getuseractivatedupgrades.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getuseractivatedupgrades.md deleted file mode 100644 index 233e94f8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-getuseractivatedupgrades.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: "getUserActivatedUpgrades" -slug: "rpc-tezos-getuseractivatedupgrades" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch user-activated upgrades in the Tezos network configuration -const upgrades = await tatum.rpc.getUserActivatedUpgrades(); - -// Log the user-activated upgrades -console.log(`User-Activated Upgrades:`, upgrades); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `getUserActivatedUpgrades` method is used to retrieve information about user-activated upgrades in the Tezos network configuration. These upgrades represent changes to the Tezos protocol that have been activated by the network's users. - -### Example Use Cases: - -1. **Protocol Analysis:** Developers, analysts, and researchers can use this method to access information about user-activated upgrades in the Tezos network. This information can be valuable for understanding protocol changes and their implications. - -2. **Node Configuration:** Node operators and service providers can ensure that their Tezos nodes are configured to support user-activated upgrades to stay compatible with the network. - -### Request Parameters - -The `getUserActivatedUpgrades` method doesn't require specific parameters in the request body. - -### Return Object - -The method returns an array of objects, each containing information about user-activated upgrades in the Tezos network configuration. Here's the updated structure of the return object with descriptions: - -- `level` (integer, required): An integer representing the level at which the user-activated upgrade takes effect. The level can vary within the range from -2147483648 to 2147483647. - -- `replacement_protocol` (string, required): A Tezos protocol ID (Base58Check-encoded) representing the protocol that serves as the replacement or modification in the user-activated upgrade. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectblock.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectblock.md deleted file mode 100644 index 431ae0c0..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectblock.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: "injectBlock" -slug: "rpc-tezos-injectblock" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the block data and operations -const blockData = { - async: false, // Optional: Set to 'true' for asynchronous injection - force: false, // Optional: Set to 'true' to inject even on non-strictly increasing fitness - chain: 'main', // Optional: Specify the chain identifier (Replace with 'test' for test chain) - data: 'YOUR_BLOCK_DATA', // Replace with the block data as a string - operations: [ - // Define your operations here as an array - // Example: - [ - { - // Define the operation details here - } - ] - ] -}; - -// Inject a block in the node and broadcast it -const blockId = await tatum.rpc.injectBlock(blockData); - -// Log the block ID -console.log('Block ID:', blockId); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `injectBlock` method allows you to inject a block into the Tezos node and broadcast it. You can embed operations within the `blockData` parameter, which may be pre-validated using contextual RPCs from the latest block. This method returns the ID of the injected block. By default, the RPC waits for the block to be validated before responding. You can set the `async` parameter to 'true' for an immediate response. Additionally, you can use the `force` parameter to inject the block even on non-strictly increasing fitness. An optional `chain` parameter allows you to specify whether to inject on the main chain or the test chain. - -### Example Use Cases - -1. **Broadcast Custom Blocks:** - Developers can use this method to inject custom blocks into the Tezos network. This is useful for testing and development purposes, as well as for broadcasting custom transactions. - -2. **Advanced Testing:** - Test scenarios that involve specific block conditions or custom data can be simulated and injected into the Tezos network for validation. - -3. **Custom Operation Injections:** - When working with custom smart contracts or complex transactions, you can create custom blocks with specific operations and inject them using this method. - -### Request Parameters - -The `injectBlock` method accepts the following parameters: - -- `data` (string, required): - The block data as a string. - -- `operations` (array, required): - An array of operations to be included in the block. Each operation should be an array with the operation details. - -- `async` (boolean, optional): - Set to 'true' to receive an asynchronous response. Default is 'false'. - -- `force` (boolean, optional): - Set to 'true' to inject the block even on non-strictly increasing fitness. Default is 'false'. - -- `chain` (string, optional): - The chain identifier, which can be a chain hash in Base58Check notation or one of the predefined aliases: 'main' or 'test'. Default is 'main'. - -### Return Object - -The `injectBlock` method returns an object containing the ID of the injected block: - -- `blockId` (string): - A block identifier in Base58Check-encoded format. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectoperation.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectoperation.md deleted file mode 100644 index a97a60a8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectoperation.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "injectOperation" -slug: "rpc-tezos-injectoperation" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript code example -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the parameters for injecting an operation (Replace placeholders with actual values) -const params = { - operationBytes: 'OUR_SIGNED_OPERATION_CONTENTS' // Required: peration contents as a string - async: false, // Optional: Set to 'true' for asynchronous injection - chain: 'main' // Optional: Specify the chain identifier (Replace with 'test' for test chain) -}; - -// Inject an operation into the node and broadcast it -const operationId = await tatum.rpc.injectOperation(params); - -// Log the operation ID -console.log('Operation ID:', operationId); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `injectOperation` method allows you to inject an operation into the Tezos node and broadcast it. You should construct the `operationBytes` using contextual RPCs from the latest block and sign it with your client. The injection of the operation applies it to the current mempool context, which may change with each operation injection or reception from peers. By default, the RPC waits for the operation to be (pre-)validated before returning. However, setting `async` to 'true' makes the function return immediately. The optional `chain` parameter specifies whether to inject on the main chain or the test chain. - -### Example Use Cases - -1. **Broadcast Custom Operations:** - Developers can use this method to inject custom operations, such as transactions or smart contract interactions, into the Tezos network. - -2. **Transaction Signing and Injection:** - When building applications that require transaction signing, this method allows you to sign and inject transactions seamlessly. - -3. **Blockchain Integration:** - Service providers and blockchain integrators can use this method to facilitate the broadcast of operations from external systems. - -### Request Parameters - -The `injectOperation` method accepts the following parameters: - -- `async` (boolean, optional): - Set to 'true' to receive an asynchronous response. Default is 'false'. - -- `chain` (string, optional): - The chain identifier, which can be a chain hash in Base58Check notation or one of the predefined aliases: 'main' or 'test'. Default is 'main'. - -- `operationBytes` (string, required): - The signed operation contents as a string, constructed using contextual RPCs from the latest block and signed by the client. - -### Request Body - -The request body for `injectOperation` should be a string containing the signed operation contents. - -### Return Object - -The `injectOperation` method returns an object containing the ID of the injected operation: - -- `operationId` (string): - A Tezos operation ID in Base58Check-encoded format. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectprotocol.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectprotocol.md deleted file mode 100644 index 79784b11..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-injectprotocol.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "injectProtocol" -slug: "rpc-tezos-injectprotocol" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript code example -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the protocol information as an object -const protocolInfo = { - expected_env_version: 'YOUR_ENV_VERSION', // Replace with the expected environment version - components: [ - { - name: 'COMPONENT_NAME', // Replace with the component name - interface: 'COMPONENT_INTERFACE', // Replace with the component interface - implementation: 'COMPONENT_IMPL' // Replace with the component implementation - } - ] - async: false // Optional: Set to 'true' for asynchronous injection -}; - -// Inject a protocol into the node -const protocolId = await tatum.rpc.injectProtocol(protocolInfo); - -// Log the protocol ID -console.log('Protocol ID:', protocolId); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `injectProtocol` method allows you to inject a protocol into the Tezos node. It returns the ID of the injected protocol. By default, the RPC waits for the protocol to be validated before returning. However, setting `async` to 'true' makes the function return immediately. - -### Example Use Cases - -1. **Protocol Upgrade:** - Developers can use this method to inject protocol upgrades and improvements into the Tezos network. - -2. **Network Maintenance:** - Validators and administrators can inject protocol updates to perform network maintenance and ensure the stability and security of the blockchain. - -### Request Parameters - -The `injectProtocol` method accepts the following parameter: - -- `expected_env_version` (string, required): - The expected environment version of the protocol. - -- `components` (array of objects, required): - An array of components that make up the protocol. Each component should include: - - `name` (string): The name of the component. - - `interface` (string): The interface of the component. - - `implementation` (string): The implementation of the component. - -- `async` (boolean, optional): - Set to 'true' to receive an asynchronous response. Default is 'false'. - -### Return Object - -The `injectProtocol` method returns an object containing the ID of the injected protocol: - -- `protocolId` (string): - A Tezos protocol ID in Base58Check-encoded format. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-isbootstrapped.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-isbootstrapped.md deleted file mode 100644 index b28c8807..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-isbootstrapped.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "isBootstrapped" -slug: "rpc-tezos-isbootstrapped" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Fetch the bootstrap and synchronization status for a specific Tezos chain -const bootstrapStatus = await tatum.rpc.isBootstrapped({ - chainId: 'NetXdQprcVkpaWU' // Specify the Tezos chain ID (e.g., 'NetXdQprcVkpaWU' for mainnet) -}); - -// Log the status results -console.log(`Is the node bootstrapped?`, bootstrapStatus.bootstrapped); -console.log(`Current synchronization state:`, bootstrapStatus.sync_state); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `isBootstrapped` method is used to retrieve the bootstrap status of a specified chain on the Tezos network. The bootstrap status indicates whether the node has synchronized with the network (i.e., downloaded all blocks up to the network's current state). - -### Example use cases: - -1. **Network Synchronization Verification:** - This method is crucial for developers and services to verify whether a node is fully synchronized with the rest of the Tezos network, ensuring that operations and queries are executed based on the latest blockchain state. - -2. **Node Setup and Maintenance:** - During the setup or maintenance of a Tezos node, `isBootstrapped` helps in determining the synchronization status, assisting operators in making informed decisions about starting or resuming services that depend on the node. - -3. **Health Checks and Monitoring:** - Services can regularly poll the bootstrap status of their nodes, enabling timely detection of potential synchronization issues and facilitating continuous monitoring of node health. - -### Request Parameters - -The `isBootstrapped` method requires the following parameter: - -- `chainId` (string, required): - The identifier of the Tezos chain for which the bootstrap status is being requested. - -### Return Object - -The `isBootstrapped` method returns an object containing detailed information regarding the node's bootstrap and synchronization status: - -- `bootstrapped` (boolean): - Indicates whether the node has completed the bootstrapping process. `true` signifies that the node has bootstrapped, while `false` indicates otherwise. - -- `sync_state` (`$chain_status`): - Provides the current synchronization status of the node in relation to its peers. The possible values for `$chain_status` are: - - - `stuck`: The node considers itself synchronized with its peers, but from its perspective, the chain seems halted. - - `synced`: The node believes it is in sync with its peers and its current head timestamp is recent. - - `unsynced`: The node is not currently synchronized with any of its peers, likely because it is still in the bootstrapping phase and its head is lagging behind the chain's current state. - - (Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-simulateoperation.md b/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-simulateoperation.md deleted file mode 100644 index 3918af54..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tezos/rpc-tezos-simulateoperation.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "simulateOperation" -slug: "rpc-tezos-simulateoperation" -excerpt: "Tezos RPC" -hidden: false -metadata: - description: "Tezos RPC" - image: [] - keywords: "tezos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// Import required libraries and modules from Tatum SDK -import { TatumSDK, Tezos, Network } from '@tatumio/tatum'; - -// Initialize the Tatum SDK for Tezos -const tatum = await TatumSDK.init({ network: Network.TEZOS }); - -// Define the operation parameters -const operationParams = { - blocks_before_activation: 1, - operation: { - // ... (operation details) - }, - chain_id: 'YOUR_CHAIN_ID', - latency: 0, -}; - -// Simulate the Tezos operation -const simulatedResult = await tatum.rpc.simulateOperation(operationParams); - -// Log the simulated operation result -console.log(`Simulated Operation Result:`, simulatedResult); - -// Always destroy the Tatum SDK instance when done to stop any background processes -await tatum.destroy(); -``` - -### Overview - -The `simulateOperation` method allows you to simulate a Tezos operation, such as a smart contract call or transaction, without actually broadcasting it to the blockchain. This is useful for testing and verifying the outcome of an operation before committing it to the network. - -### Request Parameters - -The `simulateOperation` method requires the following parameters in the request body: - -- `blocks_before_activation` (integer, optional): An integer representing the number of blocks before the operation's activation. It should fall within the range from -2147483648 to 2147483647. - -- `operation` (object, required): The operation object to simulate. This typically includes details such as the contract method call, parameters, and gas limits. - -- `chain_id` (string, required): The network identifier (Base58Check-encoded) that specifies the Tezos network to use for the simulation. - -- `latency` (integer, optional): An integer representing the latency of the operation simulation. It should fall within the range from -32768 to 32767. - -### Response Parameters - -The method returns an object representing the result of simulating the Tezos operation. The exact structure of this object may vary based on the operation being simulated, but it typically includes the following: - -#### Operation_with_metadata (object): - -- `contents` (array): An array of operation contents. - -- `signature` (string): A signature, which can be Ed25519, Secp256k1, P256, or BLS (Base58Check-encoded). - -#### Operation_without_metadata (object): - -- `contents` (array): An array of operation contents. - -- `signature` (string): A signature, which can be Ed25519, Secp256k1, P256, or BLS (Base58Check-encoded). - -Users can use the simulated result to validate the operation's behavior and make informed decisions before proceeding with the actual operation on the Tezos blockchain. - -(Note: The exact fields in the return object might vary based on the Tezos blockchain's implementation and version.) diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron.md b/v1.0/RPC Nodes/rpc-others/rpc-tron.md deleted file mode 100644 index 500f580f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Tron" -slug: "rpc-tron" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Wed Mar 06 2024 13:09:53 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-accountpermissionupdate.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-accountpermissionupdate.md deleted file mode 100644 index aa789b83..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-accountpermissionupdate.md +++ /dev/null @@ -1,198 +0,0 @@ ---- -title: "accountpermissionupdate" -slug: "rpc-tron-accountpermissionupdate" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, TronPermission, AccountPermissionUpdateOptions } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const owner: TronPermission = { - type: 0, - permissionName: "owner", - threshold: 1, - operations: "", - keys: [ - { - address: "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - weight: 1 - } - ] -} - -const active: TronPermission = { - "type": 2, - "permission_name": "active0", - "threshold": 2, - "operations": "7fff1fc0037e0000000000000000000000000000000000000000000000000000", - "keys": [ - { - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "weight": 1 - }, - { - "address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "weight": 1 - } - ] -} - -const res = await tatum.rpc.accountPermissionUpdate('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', [active], owner, { - visible: true -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `accountPermissionUpdate` method is used to update an account's permissions on the TRON network. These permissions include the owner permission, account witness permissions, and a list of active permissions. The response is an unsigned transaction, with the transaction type being `AccountPermissionUpdateContract`. - -### Parameters - -- `ownerAddress` (string): The address of the owner. -- `actives` (TronPermission\[]): An array of active permissions for the account. -- `owner` (TronPermission): The owner permission for the account. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Optional parameter to specify whether the address is in base58 format. - -Each `TronPermission` object has the following properties: - -- `type` (number): The permission type. -- `permissionName` (string): The permission name. -- `threshold` (number): The threshold. -- `operations` (string): The operations the permission has. -- `keys` (Array\<{ address: string, weight: number }>): An array of objects that represent the addresses and their respective weights that jointly own the permission. Up to 5 keys are allowed. - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `AccountPermissionUpdateContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` (string): The owner's account address. -- `owner` (Permission): The owner permission of the account. -- `witness` (Permission): Account witness permissions. -- `actives` (Permission\[]): List of active permissions for the account. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "actives": [ - { - "type": 2, - "permission_name": "active0", - "threshold": 2, - "operations": "7fff1fc0037e0000000000000000000000000000000000000000000000000000", - "keys": [ - { - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "weight": 1 - }, - { - "address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "weight": 1 - } - ] - } - ], - "owner": { - "type": 0, - "permission_name": "owner", - "threshold": 1, - "operations": "", - "keys": [ - { - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "weight": 1 - } - ] - }, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "f0fcda10229a8e289666c4d4c8756ad86e6df84966226bd9bc98e1607a4826b0", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner": { - "keys": [ - { - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "weight": 1 - } - ], - "threshold": 1, - "permission_name": "owner" - }, - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "actives": [ - { - "operations": "7fff1fc0037e0000000000000000000000000000000000000000000000000000", - "keys": [ - { - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "weight": 1 - }, - { - "address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "weight": 1 - } - ], - "threshold": 2, - "type": "Active", - "permission_name": "active0" - } - ] - }, - "type_url": "type.googleapis.com/protocol.AccountPermissionUpdateContract" - }, - "type": "AccountPermissionUpdateContract" - } - ], - "ref_block_bytes": "aeab", - "ref_block_hash": "90861e40e6675e8e", - "expiration": 1684491273000, - "timestamp": 1684491216214 - }, - "raw_data_hex": "0a02aeab220890861e40e6675e8e40a886849c83315aea01082e12e5010a3c747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e4163636f756e745065726d697373696f6e557064617465436f6e747261637412a4010a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12241a056f776e657220013a190a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e1001226508021a0761637469766530200232207fff1fc0037e00000000000000000000000000000000000000000000000000003a190a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e10013a190a154198927ffb9f554dc4a453c64b2e553a02d6df514b100170d6ca809c8331" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-broadcasthex.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-broadcasthex.md deleted file mode 100644 index f7f4145d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-broadcasthex.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "broadcasthex" -slug: "rpc-tron-broadcasthex" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumcom/js - -import { TatumSDK, Tron, Network } from '@tatumcom/js' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.broadcastHex('transactionHex') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `broadcastHex` method is used to broadcast a signed transaction to the TRON network. This is a crucial step in performing operations on the blockchain, such as transferring TRX tokens or interacting with smart contracts. - -The method requires the signed transaction in hexadecimal format. - -### Parameters - -`transaction` (string): The signed transaction in hexadecimal format. This is a required parameter. - -### Return Object - -The response object contains the following fields: - -`result` (boolean): Whether the broadcast was successful. true - successful; false - failed, and this field will not be displayed in the returned result. - -`txid` (string): The Transaction ID of the broadcasted transaction. - -`code` (string): The error code in case the broadcast fails. - -`message` (string): Detailed error information in case the broadcast fails. - -`transaction` (Transaction): - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -### HTTP Request Example - -```json -{ - "transaction": "0A8A010A0202DB2208C89D4811359A28004098A4E0A6B52D5A730802126F0A32747970652E676F6F676C65617069732E636F6D2F70726F746F636F6C2E5472616E736665724173736574436F6E747261637412390A07313030303030311215415A523B449890854C8FC460AB602DF9F31FE4293F1A15416B0580DA195542DDABE288FEC436C7D5AF769D24206412418BF3F2E492ED443607910EA9EF0A7EF79728DAAAAC0EE2BA6CB87DA38366DF9AC4ADE54B2912C1DEB0EE6666B86A07A6C7DF68F1F9DA171EEE6A370B3CA9CBBB00" -} -``` - -### HTTP Response Example - -```json -{ - "result": false, - "code": "TAPOS_ERROR", - "txid": "38a0482d6d5a7d1439a50b848d68cafa7d904db48b82344f28765067a5773e1d", - "message": "Tapos check error.", - "transaction": "{\"raw_data\": {\"ref_block_bytes\": \"02db\",\"ref_block_hash\": \"c89d4811359a2800\",\"expiration\": 1560496575000,\"contract\": [{\"type\": \"TransferAssetContract\",\"parameter\": {\"type_url\": \"type.googleapis.com/protocol.TransferAssetContract\",\"value\": \"0a07313030303030311215415a523b449890854c8fc460ab602df9f31fe4293f1a15416b0580da195542ddabe288fec436c7d5af769d242064\"}}]},\"signature\": [\"8bf3f2e492ed443607910ea9ef0a7ef79728daaaac0ee2ba6cb87da38366df9ac4ade54b2912c1deb0ee6666b86a07a6c7df68f1f9da171eee6a370b3ca9cbbb00\"]}" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-broadcasttransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-broadcasttransaction.md deleted file mode 100644 index 14ec6975..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-broadcasttransaction.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: "broadcasttransaction" -slug: "rpc-tron-broadcasttransaction" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -Below is an example of how to use the `broadcastTransaction` method with the Tatum SDK: - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// Install Tatum SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -// Define a transaction raw body -const rawBody = { - // fill out appropriate data -} - -// Call broadcastTransaction RPC method -const res = await tatum.rpc.broadcastTransaction(rawBody); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `broadcastTransaction` method is used to broadcast a raw transaction to the TRON blockchain network. It submits the transaction for inclusion in the blockchain and returns the result of the broadcast attempt, including the transaction id and any error information. - -### Parameters - -This method accepts a single parameter, `rawBody`, which is a `TronTxRawBody` object with the following properties: - -- `txID` (string): Transaction identifier. -- `visible` (boolean): Specifies the visibility of the transaction. It can be set to either true or false. -- `raw_data` (json): Raw data of the transaction. -- `raw_data_hex` (string): Raw data of the transaction in hexadecimal format. -- `signature` (array of strings): Array of signatures for the transaction. - -### Return Object - -This method returns a Promise resolving to an object with the following parameters: - -- `result` (boolean): Indicates whether the broadcast was successful. If the broadcast failed, this field will not be displayed in the returned result. -- `txid` (string): Transaction id. -- `code` (string): Error code, present if the broadcast failed. -- `message` (string): Detailed error information, present if the broadcast failed. - -### HTTP Request Example - -JSON request body example: - -```json -{ - "raw_data": "{\"contract\":[{\"parameter\":{\"value\":{\"amount\":1000,\"owner_address\":\"41608f8da72479edc7dd921e4c30bb7e7cddbe722e\",\"to_address\":\"41e9d79cc47518930bc322d9bf7cddd260a0260a8d\"},\"type_url\":\"type.googleapis.com/protocol.TransferContract\"},\"type\":\"TransferContract\"}],\"ref_block_bytes\":\"5e4b\",\"ref_block_hash\":\"47c9dc89341b300d\",\"expiration\":1591089627000,\"timestamp\":1591089567635}", - "raw_data_hex": "<0a025e4b220847c9dc89341b300d40f8fed3a2a72e5a66080112620a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412310a1541608f8da72479edc7dd921e4c30bb7e7cddbe722e121541e9d79cc47518930bc322d9bf7cddd260a0260a8d18e8077093afd0a2a72e>" -} -``` - -### HTTP Response Example - -A successful HTTP response returns a JSON body similar to the following example: - -```json -{ - "result": true, - "txid": "77ddfa7093cc5f745c0d3a54abb89ef070f983343c05e0f89e5a52f3e5401299" -} -``` - -In case of an error, the HTTP response returns a JSON body with an error message: - -```json -{ - "code": "SIGERROR", - "txid": "77ddfa7093cc5f745c0d3a54abb89ef070f983343c05e0f89e5a52f3e5401299", - "message": "56616c6964617465207369676e6174757265206572726f723a206d69737320736967206f7220636f6e7472616374" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-clearabi.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-clearabi.md deleted file mode 100644 index 0923a9d2..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-clearabi.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "clearabi" -slug: "rpc-tron-clearabi" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, VisibleOption } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.clearAbi('TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW', 'TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs', { -visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `clearAbi` method allows clearing the ABI (Application Binary Interface) information of a smart contract on the TRON blockchain. This operation is often used when there is a need to remove outdated or incorrect ABI information from a smart contract. - -### Parameters - -- `ownerAddress` (string): The account address that owns the smart contract. It can be in base58check format if visible is true; otherwise, it should be in hex format. -- `contractAddress` (string): The address of the smart contract. It can be in base58check format if visible is true; otherwise, it should be in hex format. -- `options` (object, optional): This is an optional parameter that can include: - - `visible` (boolean, optional): Specifies whether the address is in base58 format. - -### Return Object - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `ClearABIContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` - Account address. -- `contract_address` - Contract address. - -### HTTP Request Example - -```json -{ - "owner_address": "TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "0841733f1141ecd4f932551a26db7b7a4c8077e95bfa78d28ab806d85a3114b1", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs" - }, - "type_url": "type.googleapis.com/protocol.ClearABIContract" - }, - "type": "ClearABIContract" - } - ], - "ref_block_bytes": "ee6c", - "ref_block_hash": "1819e770abbc2e4c", - "expiration": 1684770510000, - "timestamp": 1684770452476 - }, - "raw_data_hex": "0a02ee6c22081819e770abbc2e4c40b0a997a184315a630830125f0a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e436c656172414249436f6e7472616374122e0a1541b3dcf27c251da9363f1a4888257c16676cf54edf12154142a1e39aefa49290f2b3f9ed688d7cecf86cd6e070fce793a18431" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createaccount.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createaccount.md deleted file mode 100644 index 8ca1b92d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createaccount.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: "createaccount" -slug: "rpc-tron-createaccount" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -The `createAccount` method allows you to create a new TRON account by using an already activated account. Here's an example of how to use this method with the Tatum SDK: - -{% code overflow="wrap" lineNumbers="true" %} - -````typescript// yarn add @tatumcom/js - -import { TatumSDK, Tron, Network } from '@tatumcom/js' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.createAccount('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', 'TFgY1uN8buRxAtV2r6Zy5sG3ACko6pJT1y', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs - - -### Overview - -The `createAccount` method allows the creation of new accounts on the TRON blockchain network. This method utilizes an already activated account to create a new account. It is essential to note that the expiration time of the HTTP API creation transaction is one minute. This means you need to complete the signing and broadcast of the transaction within one minute after the creation. - -Use cases for this method include creating new users or creating a new account for different operations within your application. - -### Parameters - -The `createAccount` method takes the following parameters: - -* `owner_address` (string): The address of the activated account used to create the new account. It should be converted to a hex string. -* `account_address` (string): The address of the new account to be created. This should also be converted to a hex string and should be calculated in advance. -* `options` (object, optional): This optional parameter contains the following properties: - * `visible` (boolean, optional): This field indicates whether the address is in base58 format or not. - * `permission_id` (integer, optional): This field is used for multi-signature operations. - -### Return Object - -* `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -* `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -* `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -* `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -* `raw_data.data` - Transaction memo. -* `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -* `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -* `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -* `txID` - transaction id - -Since the transaction type is `TransferContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -* `owner_address` (string): The address of the transaction initiator. -* `account_address` (string): The address of the activated account. -* `type` (integer): The account type. External account type is 0 and this field will not be displayed in the return value. - -### HTTP Request Example - -Below is an example of an HTTP request for the `createAccount` method: - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "account_address": "TFgY1uN8buRxAtV2r6Zy5sG3ACko6pJT1y", - "visible": true -} -```` - -### HTTP Response Example - -The response from the `createAccount` method will return the transaction details for creating a new account. Below is an example of a successful response: - -```json -{ - "result": true, - "txid": "08a8c7d7a67f6a8a60c2020c9f22033877fa5b8877662d16f5f2c368465046fb", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "account_address": "TFgY1uN8buRxAtV2r6Zy5sG3ACko6pJT1y" - }, - "type_url": "type.googleapis.com/protocol.AccountCreateContract" - }, - "type": "AccountCreateContract" - } - ], - "ref_block_bytes": "4df2", - "ref_block_hash": "6eb26e5ebc0a6922", - "expiration": 1623332388000, - "timestamp": 1623332327858 - }, - "signature": [ - "da2d3cff56f3b43c430fe5a3e8a67a8e1e5c3402a5a64a6e1e19e45a223bd50a1a4e8c6275db608dfc6c60bc86b4b69053c5e1af37e2714d1bea716d2a66c04a00" - ], - "raw_data_hex": "0a024df2220c6eb26e5ebc0a69228c928afbef8c2d5a65080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e4163636f756e74437265617465436f6e747261637412330a1541ef67873a4a8a6154c92020ef5a102a202e6a567bd121541b9a9c9c081a8f4e2926ac24d30070f8bf8c2d" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createassetissue.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createassetissue.md deleted file mode 100644 index 97066deb..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createassetissue.md +++ /dev/null @@ -1,176 +0,0 @@ ---- -title: "createassetissue" -slug: "rpc-tron-createassetissue" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const options = { - freeAssetNetLimit: 10, - publicFreeAssetNetLimit: 10, - frozenSupply: { - frozen_amount: 1, - frozen_days: 2 - }, - precision: 2, - description: "A new token", -} - -const res = await tatum.rpc.createAssetIssue( - 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', - 'MyToken', - 'MTK', - 1000000, - 1, - 1, - 1621629260000, - 1621629860000, - 'https://www.mytoken.com', - options -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `createAssetIssue` RPC method allows you to create a new token on the TRON network. You need to specify various parameters like the name, abbreviation, total supply, and more. - -Use cases for this method include creating new tokens for ICOs or for a DeFi project. - -### Parameters - -- `ownerAddress` (string): The address of the issuer. -- `name` (string): The name of the token. -- `abbr` (string): The abbreviation of the token. -- `totalSupply` (integer): The total supply of the token. -- `trxNum` (integer): Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN). -- `num` (integer): Define the price by the ratio of trx\_num/num. -- `startTime` (integer): The ICO start time. -- `endTime` (integer): The ICO end time. -- `url` (string): The official website URL of the token. -- `options` (optional): Additional options for the transaction. - - `freeAssetNetLimit` (integer, optional): Token free asset net limit. - - `publicFreeAssetNetLimit` (integer, optional): Token public free asset net limit. - - `frozenSupply` (object, optional): Object with parameters: - - `frozen_amount` (integer): The number of tokens to be frozen. - - `frozen_days` (integer): The number of days to freeze. - - `precision` (integer, optional): The precision of the token. - - `description` (string, optional): The description of the token. - -### Return Object - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `AssetIssueContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address`: Issuer address. -- `name`: Token name. -- `abbr`: Token abbreviation. -- `total_supply`: Total supply of the token. -- `frozen_supply`: The number of tokens to be frozen as specified by the issuer when the token is issued. -- `trx_num`: Defines the price by the ratio of trx\_num/num (The unit of 'trx\_num' is SUN). -- `precision`: Precision of the token value. -- `num`: Defines the price by the ratio of trx\_num/num (The unit of 'trx\_num' is SUN). -- `start_time`: ICO start time. -- `end_time`: ICO end time. -- `description`: Description of the token. -- `url`: Official website URL of the token, default is hexString. -- `free_asset_net_limit`: Token free asset net limit. -- `public_free_asset_net_limit`: Token public free asset net limit for an account. -- `public_free_asset_net_usage`: The total number of token free bandwidth used by all token owners. -- `public_latest_free_net_time`: The timestamp of the last consumption of this token's free bandwidth. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "name": "MyToken", - "abbr": "MTK", - "description": "A new token", - "url": "https://www.mytoken.com", - "frozen_supply": { - "frozen_amount": 1, - "frozen_days": 2 - }, - "visible": true, - "total_supply": 1000000, - "trx_num": 1, - "num": 1, - "start_time": 1621629260000, - "end_time": 1621629860000 -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "1789f68952b601243e09fc851eeed547cc1c9e16b0fc2cb6bf219aa07a1a8a9c", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "start_time": 2684752341111, - "trx_num": 1, - "frozen_supply": [ - { - "frozen_amount": 1, - "frozen_days": 2 - } - ], - "total_supply": 100, - "num": 1, - "name": "asdfasdfadsf", - "end_time": 2684752345111, - "description": "0x4578616d706c654465736372697074696f6e", - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "abbr": "asdfsdf", - "url": "0x7777772e6578616d706c652e636f6d" - }, - "type_url": "type.googleapis.com/protocol.AssetIssueContract" - }, - "type": "AssetIssueContract" - } - ], - "ref_block_bytes": "e206", - "ref_block_hash": "034cf77f0ad4956a", - "expiration": 1684759677000, - "timestamp": 1684759617932 - }, - "raw_data_hex": "0a02e2062208034cf77f0ad4956a40c890829c84315acd01080612c8010a2f747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e41737365744973737565436f6e74726163741294010a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e120c6173646661736466616473661a076173646673646620642a04080110023001400148f7d0d6bd914e5097f0d6bd914ea201263078343537383631366437303663363534343635373336333732363937303734363936663665aa01203078373737373737326536353738363136643730366336353265363336663664708cc3fe9b8431" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createtransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createtransaction.md deleted file mode 100644 index fdbcfe23..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-createtransaction.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: "createtransaction" -slug: "rpc-tron-createtransaction" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use - -Example SDK code: - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumcom/js - -import { TatumSDK, Tron, Network } from '@tatumcom/js' - -const tatum = await TatumSDK.init({ network: Network.TRON }) - -const res = await tatum.rpc.createTransaction('ra5nK24KXen9AHvsdFTKHSANinZseWnPcX', 'rz6oqD16GHJmfRwK2viGm6jEM2r7QqzVvP', 1000, { visible: true }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `createTransaction` method is used to create a TRON transaction. It allows you to transfer TRX (TRON native cryptocurrency) from one address to another. - -Use cases: - -- Transfer TRX from one TRON address to another. - -### Parameters - -- `ownerAddress` (string): The initiator's address for the transaction. -- `toAddress` (string): The destination address for the transaction. -- `amount` (BigNumber): The amount of TRX to transfer, in sun (the smallest unit of TRX, where 1 TRX = 1,000,000 sun). -- `options` (optional): Additional options for the transaction. - - `visible` (boolean, optional): Specifies whether the address is in base58 format. Default: false. - - `permission_id` (number, optional): The permission ID for multi-signature use. - - `extra_data` (string, optional): Additional data for the transaction in HEX format. - -### Return Object - -`transaction` (`TransferContract`): - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `TransferContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` (string): Transaction initiator's address. -- `to_address` (string): Destination address. -- `amount` (int64): Transfer amount in sun. - -### HTTP Request Example - -Example of the JSON request body for the HTTP request: - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "to_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "amount": 1000, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "094d59ae6c22cb6f206f4b263eec54a1dbfc1d1704d0c43a31d90b8b66ee4fbb", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "amount": 1000, - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "to_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1" - }, - "type_url": "type.googleapis.com/protocol.TransferContract" - }, - "type": "TransferContract" - } - ], - "ref_block_bytes": "ab93", - "ref_block_hash": "88c6e64972349f0f", - "expiration": 1684488576000, - "timestamp": 1684488517323 - }, - "raw_data_hex": "0a02ab93220888c6e64972349f0f4080b8df9a83315a66080112620a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412310a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12154198927ffb9f554dc4a453c64b2e553a02d6df514b18e80770cbeddb9a8331" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_traceblockbyhash.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_traceblockbyhash.md deleted file mode 100644 index 43fe3a44..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_traceblockbyhash.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: "debug_traceblockbyhash" -slug: "rpc-tron-debug_traceblockbyhash" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const result = await tatum.rpc.debugTraceBlockByHash( -'0x48dfcf43404dffdb3b93a0b0d9982b642b221187bc3ed5c023bdab6c0e863e3d', -{ - tracer: 'callTracer', - tracerConfig: { - onlyTopCall: true, - timeout: '5s', - } -} -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`debug_traceBlockByHash` is an RPC method that allows developers to trace all transactions within a block using a given tracer. This is particularly useful for analyzing the behavior of all transactions in a block, investigating potential issues, and understanding the flow of execution within smart contracts. - -By using the `callTracer` tracer, developers can obtain more detailed information about the calls made during each transaction, including the input, output, and depth of the calls. - -### Parameters - -- `block_hash` (required): The hash of the block to be traced. - - Example: `"0x1dcf337a03e08a8c00e31de6f5b6d9a6e1c6f1d5e5e6c89fc5f5b5a30e6d5d0c"` -- `options` (optional): An object containing configuration options for the tracer. - - `tracer` (required, string): The tracer to use, in this case, `'callTracer'`. - - `tracerConfig` (required, string): object containing `'timeout'` and `'onlyTopCall'` paramter - - `timeout` (required, string): The maximum amount of time the tracer is allowed to run in seconds (e.g. "10s"). Default is "5s". - - `onlyTopCall` (required, boolean): Setting this to true will only trace the main (top-level) call and none of the sub-calls. This avoids extra processing for each call frame if only the top-level call info is required (useful for getting revertReason). - - Example: `{ tracer: 'callTracer', tracerConfig: { onlyTopCall: true, timeout: '5s', }}` - -### Return Object - -The return object is an array of objects, each representing the trace result of a transaction within the block. Each object contains the following fields: - -- `from`: The address the transaction was sent from. -- `gas`: The gas provided for the transaction. -- `gasUsed`: The total gas used by the transaction. -- `to`: The address the transaction was sent to. -- `input`: The input data for the transaction. -- `output`: The output data from the transaction. -- `calls`: An array of objects, each representing a call made during the transaction. Each object contains: - - `from`: The address the call was made from. - - `gas`: The gas provided for the call. - - `gasUsed`: The gas used by the call. - - `to`: The address the call was made to. - - `input`: The input data for the call. - - `output`: The output data from the call. - - `type`: The type of the call (e.g., "STATICCALL"). - -{% hint style="info" %} -This method is available only on the full archive node. -{% endhint %} - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "debug_traceBlockByHash", - "params": [ - "0x1dcf337a03e08a8c00e31de6f5b6d9a6e1c6f1d5e5e6c89fc5f5b5a30e6d5d0c", - { - "tracer": "callTracer", - "timeout": "10s" - } - ] -} - -``` - -#### Response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": [ - { - "result": { - "from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3", - "gas": "0x2d48c", - "gasUsed": "0xc7ab", - "to": "0x55d398326f99059ff775485246999027b3197955", - "input": "0xa9059cbb0000000000000000000000003b9f33b3a9d382fa60283c555bde8f78855957be00000000000000000000000000000000000000000000000d4e7f4f79da7c0000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001", - "value": "0x0", - "type": "CALL" - } - } - ] -} - -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_traceblockbynumber.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_traceblockbynumber.md deleted file mode 100644 index b05bbd1e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_traceblockbynumber.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "debug_traceblockbynumber" -slug: "rpc-tron-debug_traceblockbynumber" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const result = await tatum.rpc.debugTraceBlockByNumber('0xAD7C5E' ,{ - tracer: 'callTracer', - tracerConfig: { - onlyTopCall: true, - timeout: '5s', - } -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`debug_traceBlockByNumber` is an RPC method that allows developers to trace all transactions within a block using a given tracer. This is particularly useful for analyzing the behavior of all transactions in a block, investigating potential issues, and understanding the flow of execution within smart contracts. - -By using the `callTracer` tracer, developers can obtain more detailed information about the calls made during each transaction, including the input, output, and depth of the calls. - -### Parameters - -- `blockNumber` - `Quantity` or `String` - - The block number of the block to trace. - - Example: `"0x1"` or `"latest"` -- `options` (optional): An object containing configuration options for the tracer. - - `tracer` (required, string): The tracer to use, in this case, `'callTracer'`. - - `tracerConfig` (required, string): object containing `'timeout'` and `'onlyTopCall'` paramter - - `timeout` (required, string): The maximum amount of time the tracer is allowed to run in seconds (e.g. "10s"). Default is "5s". - - `onlyTopCall` (required, boolean): Setting this to true will only trace the main (top-level) call and none of the sub-calls. This avoids extra processing for each call frame if only the top-level call info is required (useful for getting revertReason). - - Example: `{ tracer: 'callTracer', tracerConfig: { onlyTopCall: true, timeout: '5s', }}` - -### Return Object - -The return object is an array of objects, each representing the trace result of a transaction within the block. Each object contains the following fields: - -- `from`: The address the transaction was sent from. -- `gas`: The gas provided for the transaction. -- `gasUsed`: The total gas used by the transaction. -- `to`: The address the transaction was sent to. -- `input`: The input data for the transaction. -- `output`: The output data from the transaction. -- `calls`: An array of objects, each representing a call made during the transaction. Each object contains: - - `from`: The address the call was made from. - - `gas`: The gas provided for the call. - - `gasUsed`: The gas used by the call. - - `to`: The address the call was made to. - - `input`: The input data for the call. - - `output`: The output data from the call. - - `type`: The type of the call (e.g., "STATICCALL"). - -{% hint style="info" %} -This method is available only on the full archive node. -{% endhint %} - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "debug_traceBlockByNumber", - "params": [ - "latest", - { - "tracer": "callTracer", - "timeout": "10s" - } - ] -} - -``` - -#### Response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": [ - { - "result": { - "from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3", - "gas": "0x2d48c", - "gasUsed": "0xc7ab", - "to": "0x55d398326f99059ff775485246999027b3197955", - "input": "0xa9059cbb0000000000000000000000003b9f33b3a9d382fa60283c555bde8f78855957be00000000000000000000000000000000000000000000000d4e7f4f79da7c0000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001", - "value": "0x0", - "type": "CALL" - } - } - ] -} - -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_tracecall.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_tracecall.md deleted file mode 100644 index 15ae7d96..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_tracecall.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: "debug_tracecall" -slug: "rpc-tron-debug_tracecall" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const tatum = await TatumSDK.init({network: Network.EON}) - -const result = await tatum.rpc.debugTraceCall({ - "from": "0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86", - "to": "0xa41d19F4258a388c639B7CcD938FCE3fb7D05e87", - "gas": "0x76c0", - "gasPrice": "0x9184e72a000", - "value": "0x9184e72a", - "data": "0x606060..." - }, - "0xAD7C5E", - { - tracer: 'callTracer', - tracerConfig: { - onlyTopCall: true, - timeout: '5s', - } -} -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`debug_traceCall` is an RPC method that allows you to execute a given call (message), tracing the steps of its execution. This can be helpful for developers and auditors who want to inspect and analyze the internal operations and state changes of a contract call without modifying the blockchain state. This method can assist in debugging and identifying potential issues with contract execution, as well as understanding how gas is consumed during the execution of a call. - -### Parameters - -The `debug_traceCall` method accepts the following parameters: - -- `transaction`: An object that contains the following fields: - - `from`: The address from which the call is initiated. Example: `"0xa7d9ddbe1f17865597fbd27ec712455208b6b76d"` - - `to`: The address of the contract to be called. Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` - - `gas`: (Optional) The gas limit for the call. Example: `"0x76c0"` - - `gasPrice`: (Optional) The gas price for the call. Example: `"0x9184e72a000"` - - `value`: (Optional) The value to be transferred during the call. Example: `"0x9184e72a"` - - `data`: (Optional) The input data for the call, encoded as a hexadecimal string. Example: `"0x606060..."` -- `blockNumber`: The block number as a hexadecimal string for which the call should be traced. Example: `"0x1b4"` - -### Return Object - -The return object is an object containing the following fields: - -- `output`: The output data from the call. -- `gasUsed`: The total gas used by the call. -- `calls`: An array of objects, each representing a nested call made during the call. Each object contains: - - `from`: The address the call was made from. - - `gas`: The gas provided for the call. - - `gasUsed`: The gas used by the call. - - `to`: The address the call was made to. - - `input`: The input data for the call. - - `output`: The output data from the call. - - `type`: The type of the call (e.g., "STATICCALL"). - -{% hint style="info" %} -This method is available only on the full archive node. -{% endhint %} - -### JSON-RPC Request and Response Examples - -#### Request - -
{
-  "jsonrpc": "2.0",
-  "id": 1,
-  "method": "debug_traceCall",
-  "params": [
-    {
-      "from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
-      "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
-      "gas": "0x76c0",
-      "gasPrice": "0x9184e72a000",
-      "value": "0x9184e72a",
-      "data": "0x606060..."
-    },
-    "0x1b4"
-  ]
-}
-
- -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 2, - "result": { - "from": "0x0a6d033f6628ef715732d61e059187b7330305ff", - "gas": "0x51fba", - "gasUsed": "0x41711", - "to": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", - "input": "0xcba9bc66000000000000000000000000f62ef040fb5ea7d0828ff50bced9a7720f1387c7000000000000000000000000325e343f1de602396e256b67efd1f61c3a6b38bd00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000000000000000000000000000000100a08761e1547f0000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff000000000000000000000000000000000000000000000000000000000000000300000000000000000000000055d398326f99059ff775485246999027b319795500000000000000000000000053e562b9b7e5e94b81f10e96ee70ad06df3d265700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x0000000000000000000000000000000000000000000000000102b1eda6a2682d", - "calls": [ - { - "from": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", - "gas": "0x4f638", - "gasUsed": "0x4cf", - "to": "0x55d398326f99059ff775485246999027b3197955", - "input": "0x70a082310000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff", - "output": "0x00000000000000000000000000000000000000000000002ca114a674b092dd94", - "type": "STATICCALL" - } - ], - "value": "0x0", - "type": "CALL" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_tracetransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_tracetransaction.md deleted file mode 100644 index f78ff565..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-debug_tracetransaction.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "debug_tracetransaction" -slug: "rpc-tron-debug_tracetransaction" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-delegateresource.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-delegateresource.md deleted file mode 100644 index 085b031e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-delegateresource.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: "delegateresource" -slug: "rpc-tron-delegateresource" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use It - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, BigNumber, TronStakeType } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.delegateResource('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', 'TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1', new BigNumber(1000000), TronStakeType.BANDWIDTH, false) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `delegateResource` method enables the delegation of bandwidth or energy resources to other accounts in TRON's Stake2.0. This could be useful for supporting specific operations of receiver accounts or to participate in staking and earn rewards. - -### Parameters - -Here are the parameters for the `delegateResource` method: - -- `ownerAddress` (string): The address of the account that is delegating the resources. Default format is hexString. -- `receiverAddress` (string): The address of the account that will receive the delegated resources. -- `balance` (integer): The amount of TRX staked for resources to be delegated, unit is sun. -- `resource` (string): The type of resource to delegate, either 'BANDWIDTH' or 'ENERGY'. -- `lock` (boolean): Determines whether the delegation is locked. If set to true, the delegated resources cannot be undelegated within 3 days. If the owner delegates the same type of resources using the lock to the same address, the lock time will be reset to 3 days. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Determines whether the address is in base58 format. - - `permissionId` (integer, optional): Used for multi-signature transactions. - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `DelegateResourceContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address`: The address of the account that delegated the resources. -- `resource`: The type of delegated resource. -- `receiver_address`: The address of the account that received the delegated resources. -- `balance`: The amount of TRX staked for resources that were delegated. -- `lock`: Indicates whether the delegation was locked. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "receiver_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "balance": 1000000, - "resource": "BANDWIDTH", - "lock": false, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "txID": "3d0a235547b08f9d5e1d465f6d7dc28da6436a8d9c3b768d1a989cac7e5c94cf", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "receiver_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "balance": 1000000, - "resource": "BANDWIDTH", - "lock": false, - }, - "type_url": "type.googleapis.com/protocol.DelegateResourceContract" - }, - "type": "DelegateResourceContract" - } - ], - "ref_block_bytes": "4a1b", - "ref_block_hash": "4dc3c8c4476d5d56", - "expiration": 1582208742000, - "timestamp": 1582208686873, - "fee_limit": 1000000000 - }, - "raw_data_hex": "0a024a1b22084dc3c8c4476d5d5640c8fcaf8d2d5a2e5a680801126a0a3074..." -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-deploycontract.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-deploycontract.md deleted file mode 100644 index 4a5826a3..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-deploycontract.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: "deploycontract" -slug: "rpc-tron-deploycontract" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const abi = [{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]" -const bytecode = "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029" -const ownerAddress = "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh" -const name = "SomeContract" - -const res = await tatum.rpc.deployContract( - abi, - bytecode, - ownerAddress, - name, - { visible: true } -); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `deployContract` method is used to deploy a smart contract to the TRON blockchain. This method takes the application binary interface (ABI) and bytecode of the contract, among other parameters, and returns an unsigned transaction that must be signed and sent to the blockchain to deploy the contract. - -### Parameters - -- `abi`(string): The application binary interface (ABI) of the smart contract. -- `bytecode`(string): The bytecode of the smart contract. -- `feeLimit`(BigNumber): The maximum TRX consumption, measured in SUN (1 TRX = 1,000,000 SUN). -- `parameter`(string): Parameter passed to the constructor of the contract. -- `originEnergyLimit`(BigNumber): The max energy that will be consumed by the owner during contract execution or creation. -- `ownerAddress`(string): The contract owner's address in hexadecimal format. -- `name`(string): The name of the smart contract. -- `callValue`(BigNumber): The amount of TRX transferred with this transaction, measured in SUN. -- `consumeUserResourcePercent`(integer): The percentage of resources designated for users who use this contract. Accepts integers between 0 and 100. -- `options` (optional): Additional options: - - `visible` (boolean, optional): Specifies whether the address is in base58 format. Default: false. - - `permission_id` (number, optional): The permission ID for multi-signature use. - -### Return Object - -- `txID`: String - The transaction ID. -- `raw_data`: Object - The raw data of the transaction, including the contract details. -- `signature`: Array - An array containing the signatures of the transaction. - -### HTTP Request Example - -```json -{ - "abi": "[{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]", - "bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029", - "owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh", - "name": "SomeContract", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "8e6c61ec8d6eee3685ddfde892f6d78609b30cd969f6c96ae13904dd9125afa7", - "contract_address": "41a7444de2b88e2d7a383d1a8c8d3c5c02b2939d61", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh", - "new_contract": { - "bytecode": "608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029", - "name": "SomeContract", - "origin_address": "TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh", - "abi": { - "entrys": [ - { - "inputs": [ - { - "name": "key", - "type": "uint256" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "set", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "name": "value", - "type": "uint256" - } - ], - "constant": true, - "inputs": [ - { - "name": "key", - "type": "uint256" - } - ], - "name": "get", - "stateMutability": "View", - "type": "Function" - } - ] - } - } - }, - "type_url": "type.googleapis.com/protocol.CreateSmartContract" - }, - "type": "CreateSmartContract" - } - ], - "ref_block_bytes": "e881", - "ref_block_hash": "f0d4c62907d3ad78", - "expiration": 1684765344000, - "timestamp": 1684765286344 - }, - "raw_data_hex": "0a02e8812208f0d4c62907d3ad78408082dc9e84315ad703081e12d2030a30747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e437265617465536d617274436f6e7472616374129d030a1541608f8da72479edc7dd921e4c30bb7e7cddbe722e1283030a1541608f8da72479edc7dd921e4c30bb7e7cddbe722e1a5c0a2b1a03736574220e12036b65791a0775696e743235362210120576616c75651a0775696e74323536300240030a2d10011a03676574220e12036b65791a0775696e743235362a10120576616c75651a0775696e743235363002400222fd01608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b250400293a0c536f6d65436f6e747261637470c8bfd89e8431" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-estimateenergy.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-estimateenergy.md deleted file mode 100644 index f9e8c994..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-estimateenergy.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "estimateenergy" -slug: "rpc-tron-estimateenergy" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.estimateEnergy( - 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', - 'TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs', - 'balanceOf(address)', - '000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c', - { visible: true } -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `estimateEnergy` method is used to estimate the energy required for the successful execution of smart contract transactions on the TRON blockchain. It can be used to get a more accurate estimation of the energy consumption for executing certain special contracts compared to the existing `wallet/triggerconstantcontract` API. - -This method does not generate an on-chain transaction, nor does it change the status of the current node. The `energy_required` field in the returned value is the estimated energy amount. - -### Parameters - -- `ownerAddress` (string): The owner address that triggers the contract. If `visible=true`, use base58check format, otherwise use hex format. For a constant call, you can use the all-zero address. -- `contractAddress` (string): The smart contract address. If `visible=true`, use base58check format, otherwise use hex format. -- `functionSelector` (string): The function call. It must not be left blank. -- `parameter` (string): The parameter encoding needs to be in accordance with the ABI rules. -- `options` (object, optional): This is an optional parameter that can include: - - `visible` (boolean, optional): Specifies whether the address is in base58 format. - -### Return Object - -- `result: object` - The run result. - - `result` - Indicates if the estimate is successful. - - `code` - The response code. - - `message` - The result message. -- `energy_required` - The estimated energy to run the contract. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "function_selector": "balanceOf(address)", - "parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "result": { - "result": true - }, - "energy_required": 1082 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_blocknumber.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_blocknumber.md deleted file mode 100644 index 284a66a0..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_blocknumber.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "eth_blocknumber" -slug: "rpc-tron-eth_blocknumber" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const latestBlock = await tatum.rpc.blockNumber() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_blockNumber` method returns the number of the most recent block on the blockchain. This method is commonly used to track the current state of the network, monitor for new blocks, or fetch historical data. - -Use cases for `eth_blockNumber` include: - -- Synchronising a local copy of the blockchain with the network -- Checking the status of a transaction by comparing its block number to the current block number -- Determining the current network state for smart contract interactions\\ - -### Parameters - -The `eth_blockNumber` method does not require any parameters. - -### Return Object - -The `eth_blockNumber` method returns a single field: - -- **`blockNumber`**: The number of the most recent block on the blockchain. The value is returned as a hexadecimal string. - -### JSON-RPC Request Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [] -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x4b7" // 1207 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_chainid.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_chainid.md deleted file mode 100644 index 054204a7..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_chainid.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "eth_chainid" -slug: "rpc-tron-eth_chainid" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const id = await tatum.rpc.chainId() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_chainId` method is an JSON-RPC method that allows developers to retrieve the currently configured chain ID of the network they are connected to. The chain ID is a unique identifier for different networks, such as mainnet or various testnets. - -This method is particularly useful when building applications that interact with multiple networks or need to verify the network to prevent replay attacks. By checking the chain ID, an application can ensure it is interacting with the intended network. - -### Parameters - -The `eth_chainId` method does not have any input parameters. - -### Return Object - -The return object contains a single field: - -- **`chainId`**: The hexadecimal string representation of the chain ID. - -### Example Request and Response - -JSON-RPC request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_chainId", - "params": [] -} -``` - -JSON-RPC response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0xe" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_estimategas.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_estimategas.md deleted file mode 100644 index da9d0fea..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_estimategas.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "eth_estimategas" -slug: "rpc-tron-eth_estimategas" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const estimate = await tatum.rpc.estimateGas({ - "from": "0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86", - "to": "0xa41d19F4258a388c639B7CcD938FCE3fb7D05e87", - "value": "0xde0b6b3a7640000", - "data": "0x606060" - }) - - await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_estimateGas` is an JSON-RPC method that estimates the amount of gas required to execute a given transaction. This method can be used to determine the gas cost before sending a transaction, allowing developers to better predict the gas fees and avoid issues like out-of-gas errors. - -Use cases for `eth_estimateGas` include: - -- Estimating gas costs for contract deployments -- Estimating gas costs for contract function calls -- Estimating gas costs for standard transfers - -### Parameters - -The `eth_estimateGas` method takes a single parameter, an object representing the transaction details. The fields in the transaction object include: - -- **`from`** (optional, string): The address that the transaction is sent from. - - Example: `"from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -- **`to`** (optional, string): The address the transaction is sent to. - - Example: `"to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -- **`gas`** (optional, string): The maximum amount of gas provided for the transaction. - - Example: `"gas": "0x76c0"` -- **`gasPrice`** (optional, string): The price of gas in wei. - - Example: `"gasPrice": "0x9184e72a000"` -- **`value`** (optional, string): The amount of ZEN to send in the transaction, in wei. - - Example: `"value": "0xde0b6b3a7640000"` -- **`data`** (optional, string): The data payload of the transaction, typically used for contract function calls or contract deployment. - - Example: `"data": "0x606060..."` -- **`nonce`** (optional, string): The transaction count of the `from` address. - - Example: `"nonce": "0x1"` - -### Return Object - -The return value of the `eth_estimateGas` method is a single field: - -- `gasEstimate` (string): The estimated gas cost for the transaction, represented as a hexadecimal string. - - Example: `"0x5208"` - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_estimateGas", - "params": [ - { - "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "value": "0xde0b6b3a7640000", - "data": "0x606060..." - } - ] -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0x5208" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gasprice.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gasprice.md deleted file mode 100644 index cb578678..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gasprice.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "eth_gasprice" -slug: "rpc-tron-eth_gasprice" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const gasPrice = await tatum.rpc.gasPrice() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_gasPrice` method is an JSON-RPC method used to estimate the average gas price required for transactions in the network. This method provides a suggestion for the gas price to be used in a transaction to increase the likelihood of it being mined and included in a block in a reasonable amount of time. The `eth_gasPrice` method is particularly useful for developers and users who want to create and send transactions, as it helps them estimate the appropriate gas price to ensure timely processing. - -### Parameters - -The `eth_gasPrice` method does not require any parameters. - -### Return Value - -The `eth_gasPrice` method returns a single value as a hexadecimal string: - -- `gasPrice`: The estimated average gas price in wei. Example: `"0x4a817c800"` - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_gasPrice", - "params": [] -} -``` - -#### Response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x4a817c800" -} -``` - -By using the `eth_gasPrice` method, developers and users can estimate the appropriate gas price for their transactions, improving the overall user experience and ensuring that their transactions are processed in a timely manner. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getbalance.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getbalance.md deleted file mode 100644 index 4d456fe9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getbalance.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: "eth_getbalance" -slug: "rpc-tron-eth_getbalance" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const balance = await tatum.rpc.getBalance('0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} - -{% tab title="C#" %} - -```csharp -// dotnet add ${your_project} package Tatum - -var tatumSdk = await TatumSdk.InitAsync(); - -var rpcCall = new JsonRpcCall -{ - Id = "1", - JsonRpc = "2.0", - Method = "eth_getBalance", - Params = new object[] - { - "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "latest" - } -}; - -var result = await tatumSdk.Rpc.Flare.Call(rpcCall); -``` - -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getBalance` method is an JSON-RPC method that allows you to retrieve the balance of a specified address. This method can be used to query the balance of any address, whether it is a contract or an externally owned account (EOA). A common use case for this method is to display the current balance of a user's account in a wallet application or a decentralized application (DApp). - -### Parameters - -The method requires two parameters: - -1. **`address`** (required): The address of the account or contract whose balance you want to query. - - Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -2. **`blockParameter`** (optional): The block number or block identifier to specify the point in time for which you want to query the balance. - - Example: `"latest"` or `"0x1"` - -#### Transaction Details - -For the purpose of this documentation, we'll also describe the `transactions` field of a full transaction object. The `eth_getBalance` method does not return transaction details, but we provide this information for completeness. - -A full transaction object includes the following fields: - -- **`hash`**: The transaction hash. -- **`nonce`**: The number of transactions made by the sender prior to this one. -- **`blockHash`**: The hash of the block in which the transaction was included. -- **`blockNumber`**: The block number in which the transaction was included. -- **`transactionIndex`**: The index of the transaction in the block. -- **`from`**: The sender's address. -- **`to`**: The recipient's address (or `null` for contract creation transactions). -- **`value`**: The value transferred, in wei. -- **`gasPrice`**: The gas price provided by the sender, in wei. -- **`gas`**: The maximum gas allowed for the transaction. -- **`input`**: The data sent with the transaction (typically for contract interaction). -- **`v`**, **`r`**, **`s`**: The raw signature values of the transaction. - -### Return Object - -The method returns a single field: - -- `result`: The Flare balance of the specified address in wei, as a hexadecimal string. - - Example: `"0x1a2e1a"`, which corresponds to `1,726,666` wei. - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getBalance", - "params": [ - "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "latest" - ] -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0x1a2e1a" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblockbyhash.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblockbyhash.md deleted file mode 100644 index 9bb1c1cf..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblockbyhash.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: "eth_getblockbyhash" -slug: "rpc-tron-eth_getblockbyhash" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const block = await tatum.rpc.getBlockByHash('0x48dfcf43404dffdb3b93a0b0d9982b642b221187bc3ed5c023bdab6c0e863e3d', true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getBlockByHash` is an JSON-RPC method that allows developers to query a specific block in the blockchain by its block hash. This method can be used in various scenarios, such as analyzing historical transactions, validating the state of the blockchain, or monitoring the progress of mining activities. - -### Parameters - -The `eth_getBlockByHash` method accepts two parameters: - -1. **`blockHash`**: The hash of the block you want to retrieve information about. - - Type: `String` - - Example: `"0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b"` -2. **`fullTransactionDetails`**: A boolean value indicating whether to return full transaction details or just transaction hashes. - - Type: `Boolean` - - Example: `true` - -### Return Object - -The returned block object includes the following fields: - -- **`number`** - The block number (hexadecimal string). -- **`hash`** - The block hash (32-byte string). -- **`parentHash`** - The hash of the parent block (32-byte string). -- **`nonce`** - The nonce used to generate the block (8-byte string). -- **`sha3Uncles`** - The SHA3 hash of the uncles in the block (32-byte string). -- **`logsBloom`** - The logs bloom filter of the block (256-byte string). -- **`transactionsRoot`** - The root of the transaction trie (32-byte string). -- **`stateRoot`** - The root of the state trie (32-byte string). -- **`miner`** - The address of the miner who mined the block (20-byte string). -- **`difficulty`** - The difficulty of the block (hexadecimal string). -- **`totalDifficulty`** - The total difficulty of the chain up to this block (hexadecimal string). -- **`extraData`** - Extra data included by the miner in the block (byte string). -- **`size`** - The block size in bytes (hexadecimal string). -- **`gasLimit`** - The gas limit for the block (hexadecimal string). -- **`gasUsed`** - The total gas used by all transactions in the block (hexadecimal string). -- **`timestamp`** - The block timestamp (hexadecimal string). -- **`transactions`** - An array of transaction objects or transaction hashes, depending on the `returnFullTransactionObjects` parameter. -- **`uncles`** - An array of uncle block hashes (32-byte strings). - -If `returnFullTransactionObjects` is `true`, the `transactions` field contains transaction objects with the following fields: - -- **`hash`** - The transaction hash (32-byte string). -- **`nonce`** - The number of transactions sent by the sender before this transaction (hexadecimal string). -- **`blockHash`** - The block hash where the transaction is included (32-byte string). -- **`blockNumber`** - The block number where the transaction is included (hexadecimal string). -- **`transactionIndex`** - The index of the transaction in the block (hexadecimal string). -- **`from`** - The sender address (20-byte string). -- **`to`** - The recipient address, or `null` for contract creation transactions (20-byte string). -- **`value`** - The value being transferred (hexadecimal string). -- **`gasPrice`** - The gas price in wei (hexadecimal string). -- **`gas`** - The gas provided for the transaction (hexadecimal string). -- **`input`** - The input data for the transaction (byte string). - -### JSON-RPC Request and Response Examples - -Here are examples of JSON-RPC request and response for the `eth_getBlockByNumber` method: - -#### Request - -```json -{ - "jsonrpc": "2.0", - "method": "eth_getBlockByHash", - "params": ["0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", true], - "id": 1 -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "difficulty": "0x2", - "extraData": "0xd883010114846765746888676f312e31392e36856c696e75780000008279af9a2f9343c00920c795a7abe84303ee56588946383a15d1e9ee422a7df6dcbe199e4ec93511fe1ffa3c3ab10cb5b12459e8f64553ad3a741e9562e1d5e522c336a400", - "gasLimit": "0x2faed85", - "gasUsed": "0xd81f1", - "hash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", - "logsBloom": "0x0020001000000000000001000000000000000000000000040000000000084000000004000800000000c06100800000000000000000010000200000000024008000004000000000000000001800001000a050000000040004000000000000000000000220020200000000000000400800080008000000000000001010004000400000000000010000000000000000000000002400000008000000008000000021022000000000000000000000000000000000000000000000000000000000010010180003000800000000000000000000000000800000000020000082000060000010000000001002010800000000000000020000080000800000000000000000", - "miner": "0x35552c16704d214347f29fa77f77da6d75d7c752", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "number": "0x1b5dd23", - "parentHash": "0x41f85649fa6d5e58a4631f76724a96dba8313302323f0834b9cf2b63d0308e0f", - "receiptsRoot": "0x81835f75c1f7521016ce3404f19a44f10c4d56b6ab780fad3388d490c154afbe", - "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size": "0x8e9", - "stateRoot": "0xda34eefae13e5940f564f3f6cc63c96fb9a0ee015b66552f01a14c2b002b0f7f", - "timestamp": "0x642ea5d2", - "totalDifficulty": "0x36908d2", - "transactions": [ - { - "blockHash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", - "blockNumber": "0x1b5dd23", - "from": "0xaa25aa7a19f9c426e07dee59b12f944f4d9f1dd3", - "gas": "0x5208", - "gasPrice": "0x430e23400", - "hash": "0x82544cc4cf767ec9d235f2afa72af2cf468b25c682c302b76390cf0830006174", - "input": "0x", - "nonce": "0x87bf4f", - "to": "0x2fc9076c0ebfa453dee1649721010764cbdf18fc", - "transactionIndex": "0x0", - "value": "0x16345785d8a0000", - "type": "0x0", - "v": "0xe5", - "r": "0x282c0953168acda79a7ec86be5392370bbce08441aa803be0576dfa467a46329", - "s": "0x59e528253c8fe85e72c43d84dd13d6fe724899cf3f94c4800761f2414b2b8f1e" - } - ], - "transactionsRoot": "0xc6939e1f42fa4c4a264a1c1617cc0a6ac7122f3cb5c2848e53b3fba35b33f6ad", - "uncles": [] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblockbynumber.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblockbynumber.md deleted file mode 100644 index 0bcd9806..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblockbynumber.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: "eth_getblockbynumber" -slug: "rpc-tron-eth_getblockbynumber" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -````typescript// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const block = await tatum.rpc.getBlockByNumber('latest', true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs - -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getBlockByNumber` is an JSON-RPC method that allows developers to query a specific block in the blockchain by its block number. This method can be used in various scenarios, such as analyzing historical transactions, validating the state of the blockchain, or monitoring the progress of mining activities. - -### Parameters - -There are two required parameters for this method: - -1. **`blockNumber`** - The block number of the block to be retrieved. This can be a hexadecimal string or one of the predefined aliases: `"earliest"`, `"latest"`, or `"pending"`. - - Example: `"0x1b4"` -2. **`returnFullTransactionObjects`** - A boolean value that determines whether the returned block contains complete transaction objects (`true`) or only transaction hashes (`false`). - - Example: `true` - -### Return Object - -The returned block object includes the following fields: - -* **`number`** - The block number (hexadecimal string). -* **`hash`** - The block hash (32-byte string). -* **`parentHash`** - The hash of the parent block (32-byte string). -* **`nonce`** - The nonce used to generate the block (8-byte string). -* **`sha3Uncles`** - The SHA3 hash of the uncles in the block (32-byte string). -* **`logsBloom`** - The logs bloom filter of the block (256-byte string). -* **`transactionsRoot`** - The root of the transaction trie (32-byte string). -* **`stateRoot`** - The root of the state trie (32-byte string). -* **`miner`** - The address of the miner who mined the block (20-byte string). -* **`difficulty`** - The difficulty of the block (hexadecimal string). -* **`totalDifficulty`** - The total difficulty of the chain up to this block (hexadecimal string). -* **`extraData`** - Extra data included by the miner in the block (byte string). -* **`size`** - The block size in bytes (hexadecimal string). -* **`gasLimit`** - The gas limit for the block (hexadecimal string). -* **`gasUsed`** - The total gas used by all transactions in the block (hexadecimal string). -* **`timestamp`** - The block timestamp (hexadecimal string). -* **`transactions`** - An array of transaction objects or transaction hashes, depending on the `returnFullTransactionObjects` parameter. -* **`uncles`** - An array of uncle block hashes (32-byte strings). - -If `returnFullTransactionObjects` is `true`, the `transactions` field contains transaction objects with the following fields: - -* **`hash`** - The transaction hash (32-byte string). -* **`nonce`** - The number of transactions sent by the sender before this transaction (hexadecimal string). -* **`blockHash`** - The block hash where the transaction is included (32-byte string). -* **`blockNumber`** - The block number where the transaction is included (hexadecimal string). -* **`transactionIndex`** - The index of the transaction in the block (hexadecimal string). -* **`from`** - The sender address (20-byte string). -* **`to`** - The recipient address, or `null` for contract creation transactions (20-byte string). -* **`value`** - The value being transferred (hexadecimal string). -* **`gasPrice`** - The gas price in wei (hexadecimal string). -* **`gas`** - The gas provided for the transaction (hexadecimal string). -* **`input`** - The input data for the transaction (byte string). - -### JSON-RPC Request and Response Examples - -Here are examples of JSON-RPC request and response for the `eth_getBlockByNumber` method: - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getBlockByNumber", - "params": ["latest", true] -} -```` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "difficulty": "0x2", - "extraData": "0xd883010114846765746888676f312e31392e36856c696e75780000008279af9a2f9343c00920c795a7abe84303ee56588946383a15d1e9ee422a7df6dcbe199e4ec93511fe1ffa3c3ab10cb5b12459e8f64553ad3a741e9562e1d5e522c336a400", - "gasLimit": "0x2faed85", - "gasUsed": "0xd81f1", - "hash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", - "logsBloom": "0x0020001000000000000001000000000000000000000000040000000000084000000004000800000000c06100800000000000000000010000200000000024008000004000000000000000001800001000a050000000040004000000000000000000000220020200000000000000400800080008000000000000001010004000400000000000010000000000000000000000002400000008000000008000000021022000000000000000000000000000000000000000000000000000000000010010180003000800000000000000000000000000800000000020000082000060000010000000001002010800000000000000020000080000800000000000000000", - "miner": "0x35552c16704d214347f29fa77f77da6d75d7c752", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "number": "0x1b5dd23", - "parentHash": "0x41f85649fa6d5e58a4631f76724a96dba8313302323f0834b9cf2b63d0308e0f", - "receiptsRoot": "0x81835f75c1f7521016ce3404f19a44f10c4d56b6ab780fad3388d490c154afbe", - "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size": "0x8e9", - "stateRoot": "0xda34eefae13e5940f564f3f6cc63c96fb9a0ee015b66552f01a14c2b002b0f7f", - "timestamp": "0x642ea5d2", - "totalDifficulty": "0x36908d2", - "transactions": [ - { - "blockHash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", - "blockNumber": "0x1b5dd23", - "from": "0xaa25aa7a19f9c426e07dee59b12f944f4d9f1dd3", - "gas": "0x5208", - "gasPrice": "0x430e23400", - "hash": "0x82544cc4cf767ec9d235f2afa72af2cf468b25c682c302b76390cf0830006174", - "input": "0x", - "nonce": "0x87bf4f", - "to": "0x2fc9076c0ebfa453dee1649721010764cbdf18fc", - "transactionIndex": "0x0", - "value": "0x16345785d8a0000", - "type": "0x0", - "v": "0xe5", - "r": "0x282c0953168acda79a7ec86be5392370bbce08441aa803be0576dfa467a46329", - "s": "0x59e528253c8fe85e72c43d84dd13d6fe724899cf3f94c4800761f2414b2b8f1e" - } - ], - "transactionsRoot": "0xc6939e1f42fa4c4a264a1c1617cc0a6ac7122f3cb5c2848e53b3fba35b33f6ad", - "uncles": [] - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblocktransactioncountbyhash.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblocktransactioncountbyhash.md deleted file mode 100644 index fe317822..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblocktransactioncountbyhash.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "eth_getblocktransactioncountbyhash" -slug: "rpc-tron-eth_getblocktransactioncountbyhash" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const response = await tatum.rpc.getBlockTransactionCountByHash('0x48dfcf43404dffdb3b93a0b0d9982b642b221187bc3ed5c023bdab6c0e863e3d') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getBlockTransactionCountByHash` is a RPC method used to fetch the number of transactions in a block by the block's hash. It is useful when you want to know the total number of transactions included in a specific block and don't want to retrieve the entire block data. This method can be used in various scenarios, such as monitoring the network activity or estimating transaction confirmation times. - -### Parameters - -This method requires a single parameter: - -- **`blockHash`**: The hash of the target block for which the transaction count will be retrieved. It should be a valid 32-byte hex string. - -Example of the parameter: - -- `blockHash`: `"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"` - -### Return - -The method returns a single value: - -- `transactionCount`: The total number of transactions included in the specified block. It is returned as a hexadecimal value. - -### Examples - -#### JSON-RPC request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getBlockTransactionCountByHash", - "params": [ - "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238" - ] -} -``` - -#### JSON-RPC response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0xa" -} -``` - -In this example, the block with the hash `"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"` has a total of 10 transactions (indicated by the hexadecimal value `"0xa"`). diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblocktransactioncountbynumber.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblocktransactioncountbynumber.md deleted file mode 100644 index 5cf6ff2a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getblocktransactioncountbynumber.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "eth_getblocktransactioncountbynumber" -slug: "rpc-tron-eth_getblocktransactioncountbynumber" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const response = await tatum.rpc.getBlockTransactionCountByNumber('0xAD7C5E') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getBlockTransactionCountByNumber` JSON-RPC method allows you to retrieve the number of transactions in a specified block. This method is particularly useful when you need to analyze the transaction activity of a specific block. You can use it to gain insights into network usage, analyze the impact of specific events on the network, or monitor transaction congestion in certain blocks. - -### Parameters - -1. **`blockNumber`**: The block number for which the transaction count should be retrieved. It should be a hex-encoded value representing the block number. - - Example: `"0x1b4"` (block number 436) - -### Return Object - -The return object is a hex-encoded value representing the number of transactions in the specified block. - -- Example: `"0xa"` (10 transactions) - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getBlockTransactionCountByNumber", - "params": ["0x1b4"] -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0xa" -} -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getcode.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getcode.md deleted file mode 100644 index edebc367..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getcode.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "eth_getcode" -slug: "rpc-tron-eth_getcode" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const code = await tatum.rpc.getCode('0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getCode` method is part of the JSON-RPC API, which allows users to interact with the blockchain. This method is specifically used to retrieve the contract code (bytecode) of an account at a specific block number. It is helpful when developers need to examine the bytecode of a deployed contract or validate that the contract code on the blockchain matches the intended code. - -Use cases for this method could include: - -- Debugging a smart contract -- Verifying the integrity of a deployed contract -- Analyzing contract bytecode for security vulnerabilities - -### Parameters - -The `eth_getCode` method accepts two parameters: - -1. **`address`** (string): The address of the contract whose bytecode you want to retrieve. This should be a 20-byte address, formatted as a hex string with a `0x` prefix. - - Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -2. **`block`** (string): The block number at which you want to retrieve the contract code. This can be specified as a hex string or one of the following special keywords: - - `"earliest"`: The first block in the blockchain - - `"latest"`: The most recent block in the blockchain - - `"pending"`: The upcoming block that is being mined - - Example: `"0x1"` or `"latest"` - -### Return Object - -The `eth_getCode` method returns a string representing the contract bytecode. The returned value is a hex string with a `0x` prefix. - -- If the account has contract code, the returned string will contain the bytecode. -- If the account is not a contract or does not exist, the returned string will be `0x`. - -### JSON Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getCode", - "params": [ - "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "latest" - ] -} -``` - -#### Response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x606060...code_here...3839" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getlogs.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getlogs.md deleted file mode 100644 index e6dde524..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getlogs.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: "eth_getlogs" -slug: "rpc-tron-eth_getlogs" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const logs = await tatum.rpc.getLogs({ address : '0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86'}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getLogs` method is an JSON-RPC method that allows developers to query logs generated by the network, specifically event logs emitted by smart contracts. These logs are an essential part of the ecosystem as they provide a way for developers to monitor contract events and track contract state changes. - -This method is particularly useful when building decentralized applications (dApps) that rely on events emitted by smart contracts, as it enables developers to retrieve logs based on specific filter criteria. By using `eth_getLogs`, developers can efficiently track and react to events happening on the blockchain. - -### Parameters - -The `eth_getLogs` method takes a single input parameter: an object containing the filter criteria. The filter object can have the following fields: - -- **`fromBlock`**: (optional) The starting block number for the search. Can be a block number or one of the following strings: `"earliest"`, `"latest"`, or `"pending"`. - - Example: `"fromBlock": "0x1"` -- **`toBlock`**: (optional) The ending block number for the search. Can be a block number or one of the following strings: `"earliest"`, `"latest"`, or `"pending"`. - - Example: `"toBlock": "0x2"` -- **`address`**: (optional) The address or list of addresses of the contracts to filter logs from. Can be a single address or an array of addresses. - - Example: `"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -- **`topics`**: (optional) An array of up to four 32-byte topics. Topics are order-dependent, and each topic can be an array of topic hashes or `null`. - - Example: `"topics": ["0x123..."]` -- **`blockhash`**: (optional) The block hash to filter logs from. If provided, `fromBlock` and `toBlock` are ignored. - - Example: `"blockhash": "0xc6ef9..."` - -In addition to the above fields, the `transactions` field in the filter object can be specified to include full transaction details instead of just transaction hashes. This is useful when you need more information about the transactions in which the events were emitted. - -### Return Object - -The `eth_getLogs` method returns an array of log objects. Each log object contains the following fields: - -- **`removed`**: A boolean indicating whether the log was removed due to a chain reorganization. - - Example: `"removed": false` -- **`logIndex`**: The log index position in the block. - - Example: `"logIndex": "0x1"` -- **`transactionIndex`**: The transaction index position in the block. - - Example: `"transactionIndex": "0x0"` -- **`transactionHash`**: The hash of the transaction that emitted the log. - - Example: `"transactionHash": "0x88eef..."` -- **`blockHash`**: The hash of the block containing the log. - - Example: `"blockHash": "0xc6ef9..."` -- **`blockNumber`**: The block number containing the log. - - Example: `"blockNumber": "0x1"` -- **`address`**: The address of the contract that emitted the log. - - Example: `"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -- **`data`**: The data associated with the log. - - Example: `"data":"0x0000000000000000000000000000000000000000000000000000000000000020"` -- **`topics`**: An array of topics (order-dependent) associated with the log. - - Example: `"topics": ["0x123..."]` - -## JSON-RPC Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getLogs", - "params": [ - { - "fromBlock": "0x1", - "toBlock": "0x2", - "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "topics": ["0x123..."] - } - ] -} -``` - -#### Response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": [ - { - "removed": false, - "logIndex": "0x1", - "transactionIndex": "0x0", - "transactionHash": "0x88eef...", - "blockHash": "0xc6ef9...", - "blockNumber": "0x1", - "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "data": "0x0000000000000000000000000000000000000000000000000000000000000020", - "topics": ["0x123..."] - } - ] -} -``` - -This documentation provides a comprehensive overview of the `eth_getLogs` JSON-RPC method, its parameters, return objects, and JSON-RPC examples. By using this method, developers can effectively query logs generated by the network and use the retrieved data to track and react to events happening on the blockchain. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getproof.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getproof.md deleted file mode 100644 index 5c94b76f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getproof.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: "eth_getproof" -slug: "rpc-tron-eth_getproof" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const result = await tatum.rpc.getProof("0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86", - ["0x0000000000000000000000000000000000000000000000000000000000000000"], - "latest") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getProof` is a JSON-RPC method that retrieves the Merkle-Patricia proof for an account, storage key-value pairs, and account transaction count. It allows developers to verify the state of an account or storage value at a specific block without needing the entire state trie. This method is particularly useful for light clients or off-chain applications that require proof of an account's state or specific storage values. - -### Parameters - -1. **`address`** - `Data`, 20 Bytes - - The address of the account. - - Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -2. **`keys`** - `Array` of `Data` - - An array of storage keys for which the proof should be generated. - - Example: `["0x0000000000000000000000000000000000000000000000000000000000000000"]` -3. **`blockNumber`** - `Quantity` or `String` - - The block number for which the proof should be generated. - - Example: `"0x1"` or `"latest"` - -### Return Object - -The method returns an object containing the following fields: - -1. **`accountProof`** - `Array` of `Data` - - The serialized Merkle-Patricia proof for the account. -2. **`balance`** - `Quantity` - - The balance of the account at the specified block. -3. **`codeHash`** - `Data`, 32 Bytes - - The hash of the code for the account at the specified block. -4. **`nonce`** - `Quantity` - - The transaction count of the account at the specified block. -5. **`storageProof`** - `Array` of `Object` - - An array of storage proof objects, one for each requested key, containing the following fields: - - `key` - `Data`, 32 Bytes: The storage key. - - `value` - `Quantity`: The storage value. - - `proof` - `Array` of `Data`: The serialized Merkle-Patricia proof for the key-value pair. - -### JSON-RPC Request and Response Examples - -_Request_: - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getProof", - "params": [ - "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - [ - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "latest" - ] -} -``` - -_Response_: - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": { - "accountProof": [ - "0x...", - "0x...", - "0x..." - ], - "balance": "0xde0b6b3a7640000", - "codeHash": "0x...", - "nonce": "0x1", - "storageProof": [ - { - "key": "0x0000000000000000000000000000000000000000000000000000000000000000", - "value": "0xde0b6b3a7640000", - "proof": [ - "0x...", - "0x...", - "0x..." - ] - } - ] - } -} - -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getstorageat.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getstorageat.md deleted file mode 100644 index 3e0b2f4a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getstorageat.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "eth_getstorageat" -slug: "rpc-tron-eth_getstorageat" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const response = await tatum.rpc.getStorageAt('0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86', '0x0') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getStorageAt` is an JSON-RPC method that allows you to query the storage value of a contract at a given position. It can be used to inspect the internal state of a smart contract. This method is particularly useful for developers, auditors, and analysts who want to examine contract storage values for various purposes, such as debugging, verifying contract behavior, or analyzing data. - -### Parameters - -`eth_getStorageAt` accepts three parameters: - -1. **`address`**: The address of the contract you want to query. - - Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -2. **`position`**: The storage position (slot) you want to query. - - Example: `"0x0"` -3. **`blockParameter`**: The block number, block hash, or one of the string literals (`"earliest"`, `"latest"` or `"pending"`), representing the point in the blockchain to query the storage value. - - Example: `"latest"` - -### Return Object - -The return object is a single string value, representing the storage value at the given position in the contract. - -- `result`: The storage value in a 32-byte (64 character) hexadecimal format. - -### JSON-RPC Request Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getStorageAt", - "params": [ - "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "0x0", - "latest" - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x0000000000000000000000000000000000000000000000000000000000000123" -} -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyblockhashandindex.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyblockhashandindex.md deleted file mode 100644 index 675e8be3..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyblockhashandindex.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "eth_gettransactionbyblockhashandindex" -slug: "rpc-tron-eth_gettransactionbyblockhashandindex" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:39 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const tx = await tatum.rpc.getTransactionByBlockHashAndIndex('0x48dfcf43404dffdb3b93a0b0d9982b642b221187bc3ed5c023bdab6c0e863e3d', 0) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByBlockHashAndIndex` is an JSON-RPC method that allows you to fetch the transaction details based on the block hash and the index of the transaction within that block. This method can be useful when you want to retrieve transaction details for a specific transaction without knowing its transaction hash. - -Use cases for this method may include: - -- Inspecting transaction details for debugging purposes -- Gathering data for transaction analysis -- Fetching transaction information for specific blocks in a block explorer application - -### Parameters - -The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: - -1. `blockHash` (required): The hash of the block containing the transaction. - - Example: `"0x9a9a2a0d69b4ff48f7a2a8a26d135e1dbcbd3c3be3e8a3c90de0bcb104e4c4b4"` -2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. - - Example: `"0x0"` - -### Return Object - -The method returns a JSON object containing the following fields: - -1. `hash`: The transaction hash as a 32-byte hex string. -2. `nonce`: The number of transactions made by the sender prior to this one. -3. `blockHash`: The hash of the block in which this transaction is included. -4. `blockNumber`: The block number in which this transaction is included. -5. `transactionIndex`: The index of the transaction within the block. -6. `from`: The address of the sender. -7. `to`: The address of the recipient. `null` if the transaction is a contract creation transaction. -8. `value`: The value transferred in wei. -9. `gasPrice`: The gas price provided by the sender in wei. -10. `gas`: The gas limit provided by the sender. -11. `input`: The data sent along with the transaction. - -### JSON Examples - -Request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getTransactionByBlockHashAndIndex", - "params": [ - "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "0x0" - ] -} -``` - -Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "blockNumber": "0x316624", - "from": "0x37a53636ee68f59d9346aabcfc0d36011d9d5b35", - "gas": "0x5b8d80", - "gasPrice": "0x59682f0a", - "maxFeePerGas": "0x59682f10", - "maxPriorityFeePerGas": "0x59682f00", - "hash": "0x40a0f78e346d15b05efa1861149e5999ea48197dcf104d69160d45b08b7a5118", - "input": "0xb1dc65a4000129d4314ec8c4bafb6468cc9d3c21de025fa54002558c9f76aec833406ab600000000000000000000000000000000000000000000000000000000001ccc01f18333a24416e0a0be9cdb78505c9c3c27fa42bccdbe6456cd6c1fc81bee7c0e00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003a001000000010100010100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000003d150000000000000000000000000000000000000000000000000000000000003d17325325668a08b50a9587fd4605ce02dbc5ccefc4883a41b485ff4dc4a4f86f1e0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000a8690000000000000000000000000000000000000000000000000000009d29229e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ba6547e7b549a1f180c5ad4f2e2e7104fecb8373482f3de6574ecbeefdc9be9dfd9f1934768a23584f1508adad8a7bbfbe445a27bed9f1d4538d4e4c9e458b0c5274b6f714f5aee9a8d56aeb8957b6da6b8914e445a46dcd349737b2eb7d72132e41926d07355de577b13e6ec8e55eaaf628b333197a8d1292bed1c375e891e1da1d519aabbebcc6d299b575b7bef506e2db9493de6f0cfdb0436a81597eb155edc63a8ea655a9b405a0c41c923b1734d78b5d9812f36a602ace3d8c5b22beb9519e406f32de9768e518f2b253a95364a9a2838ba5023c52d503fe8fa811c8803399679a19513671b13d4040e46be74e152d39be4f68bfecaa57d27965ba724a09464734faf7230b19e04f4aa581f10066884e2f402af36f0cdbf08de95e190f4f31fd3b718c1317b65fba9e7ea45ef6180e4861839c6395c814214ee8d56b28ba19f47b6b80f43045635432971b30f2bfb3a26a53ca502bf21fa598c5ddb934b000000000000000000000000000000000000000000000000000000000000000b3ab737e679aefe131ad3efc850fd2c50b316aabcdaa4368587d9606df84b3590541698c7c5538111187964e1b3f39fa033033bb7cab30275ea11b912089663ec43243ff37fa9d2cce04dfce25738c3a484d42f8d8a2c6be226627606f75788ee0e777481b5bd100d00d118bddd18e8726f7a54333b6228f57fa3237799079eb56e6e0ac0cb0f334d23f7284e2dcb2f463d8104fc198389e42a9d1bad1dcfe983115d3d85474db611a6e82b2f61b8d93efa77bc039bd5b3b0f02a7fc587d4a12a0daf256c21ecb9664e6c90c2bfb72a753ff008d3306f7cd4c823df6685fc4cba1514ed132d6367a8f99fba241fc6ef6917f5279ebfdd3e05a296e5c4d77a5463037d7c8180d0644d7e90123918c30fca011d710201ceabcae277924f32ff6b9d0e4d285eb59b4b56d3af8d4b2ab1a39ec2d4324e49deea661cbd43f21cbdc76a10a14055ecdd3251a5860c3bb02bcc1f21da5564fc05adbac70c7565fb5f44b8", - "nonce": "0xec0", - "to": "0x8febc74c26129c8d7e60288c6dccc75eb494aa3c", - "transactionIndex": "0x0", - "value": "0x0", - "type": "0x2", - "accessList": [], - "chainId": "0xaa36a7", - "v": "0x1", - "r": "0xccf7b8fd2d63782e651f4d9650c0ed1a430060fd947d97b6504876f8ea16b357", - "s": "0x50c56d90105b1b8aa475c9500137e9b7c4f0a331fee076bc395a695dc471dc05" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyblocknumberandindex.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyblocknumberandindex.md deleted file mode 100644 index 6835484b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyblocknumberandindex.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "eth_gettransactionbyblocknumberandindex" -slug: "rpc-tron-eth_gettransactionbyblocknumberandindex" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const tx = await tatum.rpc.getTransactionByBlockNumberAndIndex('0xAD7C5E', 0) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByBlockHashAndIndex` is an JSON-RPC method that allows you to fetch the transaction details based on the block hash and the index of the transaction within that block. This method can be useful when you want to retrieve transaction details for a specific transaction without knowing its transaction hash. - -Use cases for this method may include: - -- Inspecting transaction details for debugging purposes -- Gathering data for transaction analysis -- Fetching transaction information for specific blocks in a block explorer application - -### Parameters - -The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: - -1. `blockNumber` (required): The hash of the block containing the transaction. - - Example: `"0x316624"` -2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. - - Example: `"0x0"` - -### Return Object - -The method returns a JSON object containing the following fields: - -1. `hash`: The transaction hash as a 32-byte hex string. -2. `nonce`: The number of transactions made by the sender prior to this one. -3. `blockHash`: The hash of the block in which this transaction is included. -4. `blockNumber`: The block number in which this transaction is included. -5. `transactionIndex`: The index of the transaction within the block. -6. `from`: The address of the sender. -7. `to`: The address of the recipient. `null` if the transaction is a contract creation transaction. -8. `value`: The value transferred in wei. -9. `gasPrice`: The gas price provided by the sender in wei. -10. `gas`: The gas limit provided by the sender. -11. `input`: The data sent along with the transaction. - -### JSON Examples - -Request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getTransactionByBlockNumberAndIndex", - "params": [ - "0x316624", - "0x0" - ] -} -``` - -Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "blockNumber": "0x316624", - "from": "0x37a53636ee68f59d9346aabcfc0d36011d9d5b35", - "gas": "0x5b8d80", - "gasPrice": "0x59682f0a", - "maxFeePerGas": "0x59682f10", - "maxPriorityFeePerGas": "0x59682f00", - "hash": "0x40a0f78e346d15b05efa1861149e5999ea48197dcf104d69160d45b08b7a5118", - "input": "0xb1dc65a4000129d4314ec8c4bafb6468cc9d3c21de025fa54002558c9f76aec833406ab600000000000000000000000000000000000000000000000000000000001ccc01f18333a24416e0a0be9cdb78505c9c3c27fa42bccdbe6456cd6c1fc81bee7c0e00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003a001000000010100010100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000003d150000000000000000000000000000000000000000000000000000000000003d17325325668a08b50a9587fd4605ce02dbc5ccefc4883a41b485ff4dc4a4f86f1e0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000a8690000000000000000000000000000000000000000000000000000009d29229e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ba6547e7b549a1f180c5ad4f2e2e7104fecb8373482f3de6574ecbeefdc9be9dfd9f1934768a23584f1508adad8a7bbfbe445a27bed9f1d4538d4e4c9e458b0c5274b6f714f5aee9a8d56aeb8957b6da6b8914e445a46dcd349737b2eb7d72132e41926d07355de577b13e6ec8e55eaaf628b333197a8d1292bed1c375e891e1da1d519aabbebcc6d299b575b7bef506e2db9493de6f0cfdb0436a81597eb155edc63a8ea655a9b405a0c41c923b1734d78b5d9812f36a602ace3d8c5b22beb9519e406f32de9768e518f2b253a95364a9a2838ba5023c52d503fe8fa811c8803399679a19513671b13d4040e46be74e152d39be4f68bfecaa57d27965ba724a09464734faf7230b19e04f4aa581f10066884e2f402af36f0cdbf08de95e190f4f31fd3b718c1317b65fba9e7ea45ef6180e4861839c6395c814214ee8d56b28ba19f47b6b80f43045635432971b30f2bfb3a26a53ca502bf21fa598c5ddb934b000000000000000000000000000000000000000000000000000000000000000b3ab737e679aefe131ad3efc850fd2c50b316aabcdaa4368587d9606df84b3590541698c7c5538111187964e1b3f39fa033033bb7cab30275ea11b912089663ec43243ff37fa9d2cce04dfce25738c3a484d42f8d8a2c6be226627606f75788ee0e777481b5bd100d00d118bddd18e8726f7a54333b6228f57fa3237799079eb56e6e0ac0cb0f334d23f7284e2dcb2f463d8104fc198389e42a9d1bad1dcfe983115d3d85474db611a6e82b2f61b8d93efa77bc039bd5b3b0f02a7fc587d4a12a0daf256c21ecb9664e6c90c2bfb72a753ff008d3306f7cd4c823df6685fc4cba1514ed132d6367a8f99fba241fc6ef6917f5279ebfdd3e05a296e5c4d77a5463037d7c8180d0644d7e90123918c30fca011d710201ceabcae277924f32ff6b9d0e4d285eb59b4b56d3af8d4b2ab1a39ec2d4324e49deea661cbd43f21cbdc76a10a14055ecdd3251a5860c3bb02bcc1f21da5564fc05adbac70c7565fb5f44b8", - "nonce": "0xec0", - "to": "0x8febc74c26129c8d7e60288c6dccc75eb494aa3c", - "transactionIndex": "0x0", - "value": "0x0", - "type": "0x2", - "accessList": [], - "chainId": "0xaa36a7", - "v": "0x1", - "r": "0xccf7b8fd2d63782e651f4d9650c0ed1a430060fd947d97b6504876f8ea16b357", - "s": "0x50c56d90105b1b8aa475c9500137e9b7c4f0a331fee076bc395a695dc471dc05" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyhash.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyhash.md deleted file mode 100644 index f3346434..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionbyhash.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "eth_gettransactionbyhash" -slug: "rpc-tron-eth_gettransactionbyhash" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const tx = await tatum.rpc.getTransactionByHash('0x6aefbd1a9c9e4c310cadde3bcdd809a14da87caa8fa4f10ca04d9e357a3907e9') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByHash` is an JSON-RPC method that allows you to query transaction details based on its hash. This method is useful when you want to retrieve information about a specific transaction, such as its sender, receiver, value, and more. Common use cases include tracking transaction status, monitoring incoming transactions, or analyzing historical transaction data. - -### Parameters - -The `eth_getTransactionByHash` method takes one parameter: - -- **`transactionHash`**: The hash of the transaction you want to retrieve. This should be a 32-byte hash string with a `0x` prefix. - - Example: `"0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"` - -### Return Object - -The method returns a transaction object with the following fields: - -- **`hash`**: The hash of the transaction (32 bytes). -- **`nonce`**: The number of transactions sent by the sender prior to this one (integer). -- **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. -- **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. -- **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. -- **`from`**: The address of the sender (20 bytes). -- **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. -- **`value`**: The value transferred in the transaction, in wei. -- **`gasPrice`**: The price of gas for the transaction, in wei. -- **`maxFeePerGas`** - The maximum fee per gas set in the transaction. -- **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. -- **`gas`**: The maximum amount of gas the transaction is allowed to consume. -- **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. - -### JSON-RPC Examples - -Request: - -```json -{ - "jsonrpc": "2.0", - "method": "eth_getTransactionByHash", - "params": ["0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"], - "id": 1 -} -``` - -Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "blockNumber": "0x316624", - "from": "0x53e8577c4347c365e4e0da5b57a589cb6f2ab848", - "gas": "0x3c524", - "gasPrice": "0x306dc421e", - "hash": "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13", - "input": "0x50bb4e7f00000000000000000000000074b4551c177592a908c6ab9ce671bfe8c1b5bd40000000000000000000000000000000000000000000000000000056b990e70e000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000006068747470733a2f2f6574682d6d61696e6e65742e672e616c6368656d792e636f6d2f76322f72646f704c505054424a31536f786b2d555179306b7464676f4b45326146637a2f6765744e4654732f3f6f776e65723d766974616c696b2e657468", - "nonce": "0xc97", - "to": "0x211500d1960bdb7ba3390347ffd8ad486b897a18", - "transactionIndex": "0x4", - "value": "0x0", - "type": "0x0", - "chainId": "0xaa36a7", - "v": "0x1546d71", - "r": "0xf89098451217613aa4abbb3f8988e75e20ae948d07bf8b26c472bc9bda50c9d9", - "s": "0x15cfb5b34bcb23730aeadc28df3b66fa9cf28103ffc8b557d76f0c1df078028e" - } -} -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactioncount.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactioncount.md deleted file mode 100644 index c27fb035..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactioncount.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "eth_gettransactioncount" -slug: "rpc-tron-eth_gettransactioncount" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const result = await tatum.rpc.getTransactionCount('0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86', 'latest') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getTransactionCount` method is an JSON-RPC method that retrieves the number of transactions sent from a given address. It is a useful method for developers who need to keep track of an account's nonce value to avoid transaction collisions or incorrect order of execution. The nonce value is essential for ensuring transaction uniqueness and preventing replay attacks. - -Use cases for this method include: - -- Determining the nonce value for a new transaction to be sent from a specific address -- Monitoring the number of transactions sent by an address to observe its activity -- Troubleshooting transaction issues and verifying if a transaction was submitted successfully - -### Parameters - -The `eth_getTransactionCount` method accepts two parameters: - -1. **`address`** - The address whose transaction count will be retrieved. - - Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -2. **`blockParameter`** - A string indicating the block number or block state to consider when retrieving the transaction count. - - Possible values: `"earliest"`, `"latest"`, `"pending"`, or a specific block number in hexadecimal format - - Example: `"latest"` - -### Return Object - -The method returns a single value: - -- **`transactionCount`** - A hexadecimal representation of the number of transactions sent from the specified address. - - Example: `"0x1e"` - -### JSON-RPC Request and Response Examples - -_Request_: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getTransactionCount", - "params": [ - "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "latest" - ] -} -``` - -_Response_: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0x1e" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionreceipt.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionreceipt.md deleted file mode 100644 index 4229ee31..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_gettransactionreceipt.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: "eth_gettransactionreceipt" -slug: "rpc-tron-eth_gettransactionreceipt" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const tx = await tatum.rpc.getTransactionReceipt('0x6aefbd1a9c9e4c310cadde3bcdd809a14da87caa8fa4f10ca04d9e357a3907e9') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionReceipt` is an JSON-RPC method that retrieves the transaction receipt of a given transaction hash. This method is particularly useful when you need to obtain detailed information about a transaction's execution, such as its status (success or failure), gas usage, and logs (events). Common use cases include checking the status of a transaction after it has been mined or inspecting the events emitted by a smart contract during a specific transaction. - -### Parameters - -This method requires a single parameter: - -- **`transactionHash`**: The hash of the transaction for which you want to obtain the receipt. - - Example: `"0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"` - -### Return Object - -The method returns an object containing the following fields: - -- **`transactionHash`**: The hash of the transaction. -- **`transactionIndex`**: The transaction's index position in the block. -- **`blockHash`**: The hash of the block where this transaction was mined. -- **`blockNumber`**: The block number where this transaction was mined. -- **`from`**: The address of the sender. -- **`to`**: The address of the receiver. `null` when it's a contract creation transaction. -- **`cumulativeGasUsed`**: The total amount of gas used when this transaction was executed in the block. -- **`gasUsed`**: The amount of gas used by this specific transaction alone. -- **`contractAddress`**: The address of the contract created, if the transaction was a contract creation. Otherwise, `null`. -- **`logs`**: An array of log objects, which were emitted during the transaction. -- **`logsBloom`**: A 256-byte bloom filter, which is a compressed representation of the logs emitted during the transaction. -- **`status`**: The status of the transaction's execution. `"0x1"` indicates success, while `"0x0"` indicates failure. - -### JSON-RPC Examples - -Request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getTransactionReceipt", - "params": [ - "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13" - ] -} -``` - -Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "blockNumber": "0x316624", - "contractAddress": null, - "cumulativeGasUsed": "0x7ad81", - "effectiveGasPrice": "0x306dc421e", - "from": "0x53e8577c4347c365e4e0da5b57a589cb6f2ab848", - "gasUsed": "0x3c518", - "logs": [ - { - "address": "0x211500d1960bdb7ba3390347ffd8ad486b897a18", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000074b4551c177592a908c6ab9ce671bfe8c1b5bd40", - "0x000000000000000000000000000000000000000000000000000056b990e70e00" - ], - "data": "0x", - "blockNumber": "0x316624", - "transactionHash": "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13", - "transactionIndex": "0x4", - "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "logIndex": "0x3", - "removed": false - } - ], - "logsBloom": "0x00000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000010000000000000800000000000000000000000010000040000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000100000000000000000000000000000000002000000200000000000100000000000800000000000000000000020000000000000000000000200000000000000000000000000000000000000000000", - "status": "0x1", - "to": "0x211500d1960bdb7ba3390347ffd8ad486b897a18", - "transactionHash": "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13", - "transactionIndex": "0x4", - "type": "0x0" - } -} -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getunclecountbyblockhash.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getunclecountbyblockhash.md deleted file mode 100644 index 3240695b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getunclecountbyblockhash.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "eth_getunclecountbyblockhash" -slug: "rpc-tron-eth_getunclecountbyblockhash" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const result = await tatum.rpc.getUncleCountByBlockHash('0x48dfcf43404dffdb3b93a0b0d9982b642b221187bc3ed5c023bdab6c0e863e3d') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getUncleCountByBlockHash` method is an JSON-RPC method that returns the number of uncles in a specified block by its hash. This method can be useful for gathering information about the performance of the network and to analyze the security of the blockchain. - -Uncles are blocks that are not included in the main blockchain but are still valid, and they contribute to the overall security and decentralization of the network. The inclusion of uncles helps prevent centralization and ensures the mining process remains competitive. - -### Parameters - -The `eth_getUncleCountByBlockHash` method takes one parameter: - -- `blockHash`: The hash of the block for which you want to get the uncle count. - - Example value: `"0x3a3e528dcd6e05a614c9241b0a9296db961fa6a92e05af9f6c0d7d2f6bc92f7a"` - -### Return Object - -The return object for this method is a hex-encoded integer representing the number of uncles in the specified block. - -- Example value: `"0x1"` (1 uncle) - -### JSON-RPC Request and Response Examples - -Here is an example JSON-RPC request and response for the `eth_getUncleCountByBlockHash` method: - -**Request:** - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getUncleCountByBlockHash", - "params": [ - "0x3a3e528dcd6e05a614c9241b0a9296db961fa6a92e05af9f6c0d7d2f6bc92f7a" - ] -} -``` - -**Response:** - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x1" -} -``` - -In this example, the JSON-RPC request asks for the number of uncles in the block with the specified hash. The response indicates that there is one uncle in the block. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getunclecountbyblocknumber.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getunclecountbyblocknumber.md deleted file mode 100644 index 69142eb4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_getunclecountbyblocknumber.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "eth_getunclecountbyblocknumber" -slug: "rpc-tron-eth_getunclecountbyblocknumber" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const result = await tatum.rpc.getUncleCountByBlockNumber('0xAD7C5E') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getUncleCountByBlockHash` method is an JSON-RPC method that returns the number of uncles in a specified block by its hash. This method can be useful for gathering information about the performance of the network and to analyze the security of the blockchain. - -Uncles are blocks that are not included in the main blockchain but are still valid, and they contribute to the overall security and decentralization of the network. The inclusion of uncles helps prevent centralization and ensures the mining process remains competitive. - -### Parameters - -The `eth_getUncleCountByBlockHash` method takes one parameter: - -- `blockNumber`: The number of the block for which you want to get the uncle count. - - Example value: `"0x12345"` - -### Return Object - -The return object for this method is a hex-encoded integer representing the number of uncles in the specified block. - -- Example value: `"0x1"` (1 uncle) - -### JSON-RPC Request and Response Examples - -Here is an example JSON-RPC request and response for the `eth_getUncleCountByBlockNumber` method: - -**Request:** - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getUncleCountByBlockNumber", - "params": [ - "0x12345" - ] -} -``` - -**Response:** - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x1" -} -``` - -In this example, the JSON-RPC request asks for the number of uncles in the block with the specified hash. The response indicates that there is one uncle in the block. - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_maxpriorityfeepergas.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_maxpriorityfeepergas.md deleted file mode 100644 index f5c46d54..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_maxpriorityfeepergas.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "eth_maxpriorityfeepergas" -slug: "rpc-tron-eth_maxpriorityfeepergas" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const gasPrice = await tatum.rpc.maxPriorityFeePerGas() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_maxPriorityFeePerGas` RPC method is used to retrieve the maximum priority fee per gas set by the user for a transaction. This method can be used to determine the maximum fee that can be paid for a transaction to be included in a block quickly. - -### Use case - -This method is particularly useful when the user wants to ensure that a transaction is processed quickly, even in a congested network where transaction fees may fluctuate rapidly. By setting a high maximum priority fee per gas, the user can ensure that the transaction is processed as quickly as possible. - -### Parameters - -`None.` - -## Return Object - -- `maxPriorityFeePerGas` - The maximum priority fee per gas the user is willing to pay, in wei. - -### JSON Examples - -#### Request - -```json -{ - "jsonrpc": "2.0", - "method": "eth_maxPriorityFeePerGas", - "params": [], - "id": 1 -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0x3b9aca00" -} -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_sendrawtransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_sendrawtransaction.md deleted file mode 100644 index 60db292d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-eth_sendrawtransaction.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "eth_sendrawtransaction" -slug: "rpc-tron-eth_sendrawtransaction" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const gasPrice = await tatum.rpc.sendRawTransaction('0x0000.......') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_sendRawTransaction` RPC method is used to send a signed and serialized transaction to the network. This method is particularly useful when you want to have full control over the signing process, e.g., when using hardware wallets, cold storage, or custom signing libraries. It can be utilized in various use cases, such as transferring, interacting with smart contracts, or deploying new contracts. - -### Parameters - -The method accepts a single parameter: - -- **`data`**: The signed and serialized transaction data as a hexadecimal string. - -### Return Value - -The method returns a single value: - -- `transactionHash`: The hash of the submitted transaction as a hexadecimal string, e.g., `"0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"`. - -### JSON-RPC Request Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_sendRawTransaction", - "params": [ - "0xf86d8201...94a7bc" - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b" -} -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-freezebalance.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-freezebalance.md deleted file mode 100644 index 0e55eb15..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-freezebalance.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: "freezebalance" -slug: "rpc-tron-freezebalance" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, TronStakeType, BigNumber, FreezeAccountOptions } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const ownerAddress = 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g' -const frozenBalance = new BigNumber(10000000) -const frozenDuration = 3 -const resource = TronStakeType.ENERGY - -const res = await tatum.rpc.freezeBalance(ownerAddress, frozenBalance, frozenDuration, resource, { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `freezeBalance` method is used to stake TRX to obtain resources. The interface has been deprecated, consider using `FreezeBalanceV2` instead. The owner of the address can lock a certain amount of TRX for a certain period to gain resources such as bandwidth and energy. - -### Parameters - -- `owner_address` (string): The owner address (default in hexString format). -- `frozen_balance` (integer): The amount of TRX to stake (unit is in sun). -- `frozen_duration` (integer): The lock-up duration for this stake, currently only 3 days are accepted. -- `resource` (string): The type of TRX stake, either 'BANDWIDTH' or 'ENERGY'. -- `options` (object, optional): This optional parameter contains the following properties: - - `receiver_address` (string, optional): Optional parameter for the address that will receive the resource (default in hexString format). - - `permission_id` (integer, optional): for multi-signature use. - - `visible` (boolean, optional): Defaults to false. Whether addresses are in base58check format. - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is FreezeBalanceContract, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `frozen_duration`: The lock-up duration for this stake -- `frozen_balance`: The amount of TRX to stake (unit is in sun). -- `owner_address`: The owner address. -- `resource`: The type of TRX stake, either 'BANDWIDTH' or 'ENERGY'. - -### HTTP Request Example - -```json -{ - "owner_address": "4100776428620856AE1D71562812B734E356B68551", - "frozen_balance": 10000000, - "frozen_duration": 3, - "resource": "ENERGY" -} -``` - -### HTTP Response Example - -```json -{ - "visible": false, - "txID": "efb6ff6dba6e5998d7258a63436e4717428892f02df2adb6deea8550d36e5e34", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "resource": "ENERGY", - "frozen_duration": 3, - "frozen_balance": 10000000, - "owner_address": "4100776428620856ae1d71562812b734e356b68551" - }, - "type_url": "type.googleapis.com/protocol.FreezeBalanceContract" - }, - "type": "FreezeBalanceContract" - } - ], - "ref_block_bytes": "3041", - "ref_block_hash": "3d1b89e6c7c34b52", - "expiration": 1649176881000, - "timestamp": 1649176821557 - }, - "raw_data_hex": "0a02304122083d1b89e6c7c34b5240e8cee8d4ff2f5a5a080b12560a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e6365436f6e747261637412200a154100776428620856ae1d71562812b734e356b685511080ade2041803500170b5fee4d4ff2f" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-freezebalancev2.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-freezebalancev2.md deleted file mode 100644 index 0c4889e5..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-freezebalancev2.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "freezebalancev2" -slug: "rpc-tron-freezebalancev2" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.freezeBalanceV2('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', 10000000, 'ENERGY', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `freezeBalanceV2` method is a feature of Stake2.0 on the TRON blockchain. It allows you to stake a specific amount of TRX to obtain bandwidth or energy, and in return, you receive an equivalent amount of TRON Power (TP) according to the staked amount. This method can be useful in various use cases, such as securing network resources or participating in network governance by voting with TRON Power. - -### Parameters - -- `ownerAddress`(string): The account address in default hexString format. -- `frozenBalance`(integer): The amount of TRX to stake, in sun units. -- `resource`(string): The type of TRX stake, either 'BANDWIDTH' or 'ENERGY'. -- `options` (object, optional): This optional parameter contains the following properties: - - `permissionId`(integer, optional): This is used for multi-signature transactions. - - `visible`(string, optional):. Default is false. This parameter indicates whether addresses are in base58check format. - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is FreezeBalanceV2Contract, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address`: The account address. -- `resource`: The resource type. -- `frozen_balance`: The staked amount in sun units. - -### HTTP Request Example - -Here is an example of a CURL request to the `freezeBalanceV2` method: - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "frozenBalance": 1000000, - "resource": "BANDWIDTH", - "visible": true -} -``` - -### HTTP Response Example - -The response to a successful request is a `200 OK` status code, and it returns the transaction object. If the request fails, you will receive a `400 Bad Request` status code with an error message. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccount.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccount.md deleted file mode 100644 index e12c3fe3..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccount.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: "getaccount" -slug: "rpc-tron-getaccount" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:39 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumcom/js - -import { TatumSDK, Tron, Network } from '@tatumcom/js' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const account = await tatum.rpc.getAccount('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAccount` method is used to query information about an account on the TRON network. It provides details including TRX balance, TRC-10 balances, stake information, vote information, permissions, and more. - -{% embed url=" %} - -### Parameters - -- `address` (string): The account address to be queried. It should be converted to a hex string. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Determines whether the address is in base58 format. Default is false. - -### Return Object - -- `account_name` (string): The name of the account. The account name can be modified once through the `wallet/updateaccount` interface. -- `address` (string): Account address. -- `create_time` (int64): Account creation time, i.e. account activation time on the TRON network. -- `balance` (int64): TRX balance of the account. -- `frozen` (object): Contains two properties - `frozen_balance` (int64) which is the total amount of TRX staked by the account to obtain bandwidth in Stake 1.0, and `expire_time` (int64) which is the expiration time of the stake operation performed by the account to obtain bandwidth. The account can perform the unstake operation after this time. -- `delegated_frozen_balance_for_bandwidth` (int64): Total amount of TRX staked by the account for others to get bandwidth in Stake 1.0. -- `acquired_delegated_frozen_balance_for_bandwidth` (int64): Total amount of TRX staked by other accounts for this account to get bandwidth in Stake 1.0. -- `account_resource` (object): Contains information about the account's resources, including `frozen_balance_for_energy` (object) with `frozen_balance` (int64) and `expire_time` (int64), `delegated_frozen_balance_for_energy` (int64), `acquired_delegated_frozen_balance_for_energy` (int64), `delegated_frozenV2_balance_for_energy` (int64), `acquired_delegated_frozenV2_balance_for_energy` (int64), `energy_window_size` (int64), `energy_usage` (int64), and `latest_consume_time_for_energy` (int64). -- `delegated_frozenV2_balance_for_bandwidth` (int64): Total amount of TRX staked by the account for others to get bandwidth in Stake 2.0. -- `acquired_delegated_frozenV2_balance_for_bandwidth` (int64): Total amount of TRX staked by other accounts for this account to get bandwidth in Stake 2.0. -- `frozenV2` (FreezeV2\[]): In Stake 2.0, the total amount of TRX staked to obtain various types of resources does not include the delegated TRX. -- `unfrozenV2` (UnFreezeV2\[]): In Stake 2.0, each unstaking information. One of the unstaking information contains three fields: `type` (resource type), `unfreeze_amount` (the amount of unstaked TRX), `unfreeze_expire_time` (the start timestamp when the unstaked TRX can be withdrawn, in ms). -- `net_usage` (int64): The amount of bandwidth used by the account. -- `free_net_usage` (int64): The amount of free bandwidth used by the account. -- `net_window_size` (int64): The number of block times required for bandwidth obtained by stake to fully recover. -- `free_asset_net_usageV2` (map\): The amount of trc10's free bandwidth used by this account. -- `votes` (Vote): The number of votes for each Super Representative. -- `latest_opration_time` (int64): The last operation time. -- `latest_consume_time` (int64): The last time the account consumed bandwidth. -- `latest_consume_free_time` (int64): The last time the account consumed free bandwidth. - -### HTTP Request Example - -The HTTP request body for invoking this method is: - -```json -{ - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "visible": true -} -``` - -### HTTP Response Example - -A successful response might look like: - -```json -{ - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "balance": 2000000000, - "create_time": 1637411046000, - "net_window_size": 28800, - "account_resource": { - "energy_window_size": 28800 - }, - "owner_permission": { - "permission_name": "owner", - "threshold": 1, - "keys": [ - { - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "weight": 1 - } - ] - }, - "active_permission": [ - { - "type": "Active", - "id": 2, - "permission_name": "active", - "threshold": 1, - "operations": "7fff1fc0033e0300000000000000000000000000000000000000000000000000", - "keys": [ - { - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "weight": 1 - } - ] - } - ], - "frozenV2": [ - {}, - { - "type": "ENERGY" - }, - { - "type": "TRON_POWER" - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountbalance.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountbalance.md deleted file mode 100644 index c764ec1d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountbalance.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: "getaccountbalance" -slug: "rpc-tron-getaccountbalance" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, AccountIdentifier, BlockIdentifier, VisibleOption } from '@tatumio/tatum' -import BigNumber from "bignumber.js"; - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const accountIdentifier: AccountIdentifier = { - address: "TLLM21wteSPs4hKjbxgmH1L6poyMjeTbHm" -} - -const blockIdentifier: BlockIdentifier = { - hash: "0000000000010c4a732d1e215e87466271e425c86945783c3d3f122bfa5affd9", - number: new BigNumber(68682) -} - -const res = await tatum.rpc.getAccountBalance(accountIdentifier, blockIdentifier, { - visible: true -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAccountBalance` method is used to retrieve an account's balance at a specific block on the TRON network. This is particularly useful when you need to audit the state of an account at a particular point in time or to verify a transaction's execution result against the blockchain state at a given block. - -### Parameters - -- `accountIdentifier` (AccountIdentifier): An object that represents the account identifier which includes: - - `address` (string): The account address. -- `blockIdentifier` (BlockIdentifier): An object that represents the block identifier which includes: - - `hash` (string): The block hash. - - `number` (number): The block number. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Optional parameter to specify whether the address is in base58 format. - -### Return Object - -The method returns a JSON object that contains the following properties: - -- `balance` (integer): The balance of the account. -- `block_identifier.hash` (string): The block hash. -- `block_identifier.number` (integer): The block number. - -### HTTP Request Example - -```json -{ - "account_identifier": { - "address": "TLLM21wteSPs4hKjbxgmH1L6poyMjeTbHm" - }, - "block_identifier": { - "hash": "0000000000010c4a732d1e215e87466271e425c86945783c3d3f122bfa5affd9", - "number": 68682 - }, - "visible": true -} -``` - -### HTTP Response ExampleThe response will be a JSON object representing the balance and block information: - -```json -{ - "balance": 100000, - "block_identifier": { - "hash": "0000000000010c4a732d1e215e87466271e425c86945783c3d3f122bfa5affd9", - "number": 68682 - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountnet.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountnet.md deleted file mode 100644 index c1eafed0..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountnet.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getaccountnet" -slug: "rpc-tron-getaccountnet" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, VisibleOption } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const address = 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g' - -const res = await tatum.rpc.getAccountNet(address, { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAccountNet` method is used to query bandwidth information of a specific account on the TRON network. This method can be useful for assessing an account's remaining network capacity. - -{% embed url=" %} - -### Parameters - -- `address` (string): The address of the account whose bandwidth information is to be queried. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Optional parameter to specify whether the address is in base58 format. - -### Return Object - -The method returns a JSON object that contains the following properties: - -- `freeNetUsed` (integer): Free bandwidth used. -- `freeNetLimit` (integer): Total free bandwidth. -- `NetUsed` (integer): Used amount of bandwidth obtained by staking. -- `NetLimit` (integer): Total bandwidth obtained by staking. -- `TotalNetLimit` (integer): Total bandwidth can be obtained by staking by the whole network. -- `TotalNetWeight` (integer): Total TRX staked for bandwidth by the whole network. -- `assetNetUsed` (map\): The amount of free bandwidth of each TRC10 asset used by the account. -- `assetNetLimit` (map\): The amount of free bandwidth for each TRC10 asset in the account. - -### HTTP Request Example - -```json -{ - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "freeNetLimit": 1500, - "TotalNetLimit": 43200000000, - "TotalNetWeight": 84593524300 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountresource.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountresource.md deleted file mode 100644 index 5dadb29a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getaccountresource.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "getaccountresource" -slug: "rpc-tron-getaccountresource" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, VisibleOption } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const address = 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g' - -const res = await tatum.rpc.getAccountResources(address, { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAccountResources` method is used to query resource information (such as bandwidth, energy) of a specific account on the TRON network. This method can be useful for assessing an account's remaining computational and storage capacity. - -{% embed url=" %} - -### Parameters - -- `address` (string): The address of the account whose resources are to be queried. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Optional parameter to specify whether the address is in base58 format. - -### Return Object - -- `freeNetUsed` (integer): Free bandwidth used. -- `freeNetLimit` (integer): Total free bandwidth. -- `NetUsed` (integer): Used amount of bandwidth obtained by staking. -- `NetLimit` (integer): Total bandwidth obtained by staking. -- `TotalNetLimit` (integer): Total bandwidth can be obtained by staking by the whole network. -- `TotalNetWeight` (integer): Total TRX staked for bandwidth by the whole network. -- `totalTronPowerWeight` (integer): The total amount of voting rights obtained by the whole network. -- `tronPowerLimit` (integer): TRON Power (vote). -- `tronPowerUsed` (integer): TRON Power (vote) used. -- `EnergyUsed` (integer): Energy used. -- `EnergyLimit` (integer): Total energy obtained by staking. -- `TotalEnergyLimit` (integer): Total energy can be obtained by staking by the whole network. -- `TotalEnergyWeight` (integer): Total TRX staked for energy by the whole network. -- `assetNetUsed` (map\): The amount of free bandwidth of each TRC10 asset used by the account. -- `assetNetLimit` (map\): The amount of free bandwidth for each TRC10 asset in the account. - -### HTTP Request Example - -```json -{ - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "freeNetLimit": 1500, - "TotalNetLimit": 43200000000, - "TotalNetWeight": 84593524300, - "TotalEnergyLimit": 50000000000000, - "TotalEnergyWeight": 12189370443 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyaccount.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyaccount.md deleted file mode 100644 index 847debec..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyaccount.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: "getassetissuebyaccount" -slug: "rpc-tron-getassetissuebyaccount" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getAssetIssueByAccount('TTzC9cm1vbsyBzhC8n4z3k6eAVkryDyKU8', { -visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAssetIssueByAccount` method queries the TRC10 token information issued by a specified account. The main use case for this method is to gather information about tokens issued by a certain address on the TRON blockchain. - -### Parameters - -- `address` (string): This is the address of the Token Issuer account. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Whether the address is in base58 format. - -### Return Object - -- `assetIssue`: (array) - - `id`: (integer) token ID - - `owner_address`: (string) issuer address - - `name`: (string) token name - - `abbr`: (string) token abbreviation - - `total_supply`: (integer) total supply - - `frozen_supply`: (Array) The number of tokens to be frozen is specified by the issuer of the token when it is issued - - `trx_num`: (integer) Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN) - - `precision`: (integer) precision - - `num`: (integer) Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN) - - `start_time`: (integer) ICO start time - - `end_time`: (integer) ICO end time - - `description`: (string) token description - - `url`: (string) Token official website url, default hexString - - `free_asset_net_limit`: (integer) Token free asset net limit - - `public_free_asset_net_limit`: (integer) Token public free asset net limit for a account - - `public_free_asset_net_usage`: (integer) The total number of token free bandwidth used by all token owner - - `public_latest_free_net_time`: (integer) The timestamp of the last consumption of this token's free bandwidth - -### HTTP Request Example - -```json -{ - "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "assetIssue": [ - { - "id": 1, - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "name": "TokenName", - "abbr": "TKN", - "total_supply": 1000000, - "frozen_supply": [], - "trx_num": 1, - "precision": 6, - "num": 1, - "start_time": 1622376000000, - "end_time": 1622462400000, - "description": "This is a test token", - "url": "https://tokenwebsite.com", - "free_asset_net_limit": 5000, - "public_free_asset_net_limit": 10000, - "public_free_asset_net_usage": 0, - "public_latest_free_net_time": 0 - } - ] -} -``` - -*** diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyid.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyid.md deleted file mode 100644 index 3f68fa38..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyid.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: "getassetissuebyid" -slug: "rpc-tron-getassetissuebyid" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getAssetIssueById(1002357) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -This method is used to query a token by its token id in the TRON blockchain. Since TRON allows for duplicate token names (TRC10 tokens), tokens are identifiable by a unique Token ID. The function `getAssetIssueById` takes this Token ID and returns the token object, which includes the token name. - -### Parameters - -- `value` (string): The address of the TRON account. - -### Return Object - -The function returns a promise that resolves to an object of type `AssetIssueCapsule`. This object contains the following properties: - -- `id`: (integer) Token ID. -- `owner_address`: (string) Issuer address. -- `name`: (string) Token name. -- `abbr`: (string) Token abbreviation. -- `total_supply`: (integer) Total supply of tokens. -- `frozen_supply`: (FrozenSupply\[]) The number of tokens to be frozen as specified by the issuer when it was issued. -- `trx_num`: (integer) Defines the price by the ratio of trx\_num/num. The unit of 'trx\_num' is SUN. -- `precision`: (integer) Precision of the token. -- `num`: (integer) Defines the price by the ratio of trx\_num/num. The unit of 'trx\_num' is SUN. -- `start_time`: (integer) ICO start time. -- `end_time`: (integer) ICO end time. -- `description`: (string) Token description. -- `url`: (string) Token's official website URL, default hexString. -- `free_asset_net_limit`: (integer) Token's free asset net limit. -- `public_free_asset_net_limit`: (integer) Token's public free asset net limit for an account. -- `public_free_asset_net_usage`: (integer) The total number of token free bandwidth used by all token owner. -- `public_latest_free_net_time`: (integer) The timestamp of the last consumption of this token's free bandwidth. - -### HTTP Request Example - -```json -{ - "value":1000001 -} -``` - -### HTTP Response Example - -```json -{ - "owner_address": "412e1934759faf93497d6742208e2e521f7043e2ff", - "name": "62747474657374", - "abbr": "62747474657374", - "total_supply": 1000000000000000, - "trx_num": 1000000, - "precision": 6, - "num": 1000000, - "start_time": 1575648000000, - "end_time": 1575734400000, - "description": "62747474657374", - "url": "68747470733a2f2f62746673736f7465722e726561646d652e696f2f646f63732f686f772d746f2d6765742d737461727465642d776974682d736f746572", - "id": "1000001" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyname.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyname.md deleted file mode 100644 index 1c6cbbfb..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuebyname.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "getassetissuebyname" -slug: "rpc-tron-getassetissuebyname" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getAssetIssueByName('474d436f696e') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAssetIssueByName` method allows you to query a token by name on the TRON blockchain. This method is useful when you need to get detailed information about a specific token, such as its total supply, issuer address, precision, and other related details. - -### Parameters - -- `name` (string): The TRC 10 token name, default hexString. - -### Return Object - -- `id` (string): Token ID. -- `owner_address` (string): Issuer address. -- `name` (string): Token name. -- `abbr` (string): Token abbreviation. -- `total_supply` (integer): Total supply. -- `frozen_supply` (FrozenSupply\[]): The number of tokens to be frozen is specified by the issuer of the token when it is issued. -- `trx_num` (integer): Define the price by the ratio of trx\_num/num (The unit of 'trx\_num' is SUN). -- `precision` (integer): Precision. -- `num` (integer): Define the price by the ratio of trx\_num/num (The unit of 'trx\_num' is SUN). -- `start_time` (integer): ICO start time. -- `end_time` (integer): ICO end time. -- `description` (string): Token description. -- `url` (string): Token official website URL, default hexString. -- `free_asset_net_limit` (integer): Token free asset net limit. -- `public_free_asset_net_limit` (integer): Token public free asset net limit for an account. -- `public_free_asset_net_usage` (integer): The total number of token free bandwidth used by all token owners. -- `public_latest_free_net_time` (integer): The timestamp of the last consumption of this token's free bandwidth. - -### HTTP Request Example - -```json -{ - "value": "62747474657374" -} -``` - -### HTTP Response Example - -```json -{ - "id": "1000011", - "owner_address": "41e552f6487585c2b58bc2c9bb4492bc1f17132cd0", - "name": "62747474657374", - "abbr": "BTTS", - "total_supply": 1000000000000000, - "frozen_supply": [], - "trx_num": 1, - "num": 1, - "precision": 6, - "start_time": 1530894319000, - "end_time": 1533472719000, - "description": "BitTorrent Token", - "url": "https://www.bittorrent.com/", - "free_asset_net_limit": 0, - "public_free_asset_net_limit": 0, - "public_free_asset_net_usage": 0, - "public_latest_free_net_time": 0 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuelist.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuelist.md deleted file mode 100644 index 72eb83d7..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuelist.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "getassetissuelist" -slug: "rpc-tron-getassetissuelist" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use It - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getAssetIssueList() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAssetIssueList` RPC method allows you to query the list of all the TRC10 tokens on the TRON network. - -{% embed url=" %} - -### Parameters - -This RPC method doesn't require any parameters. - -### Return Object - -- `assetIssue`: (array) - - `id`: (integer) token ID - - `owner_address`: (string) issuer address - - `name`: (string) token name - - `abbr`: (string) token abbreviation - - `total_supply`: (integer) total supply - - `frozen_supply`: (Array) The number of tokens to be frozen is specified by the issuer of the token when it is issued - - `trx_num`: (integer) Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN) - - `precision`: (integer) precision - - `num`: (integer) Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN) - - `start_time`: (integer) ICO start time - - `end_time`: (integer) ICO end time - - `description`: (string) token description - - `url`: (string) Token official website url, default hexString - - `free_asset_net_limit`: (integer) Token free asset net limit - - `public_free_asset_net_limit`: (integer) Token public free asset net limit for a account - - `public_free_asset_net_usage`: (integer) The total number of token free bandwidth used by all token owner - - `public_latest_free_net_time`: (integer) The timestamp of the last consumption of this token's free bandwidth - -### HTTP Request Example - -Below is an example of how to use the `getAssetIssueList` RPC method with a curl HTTP request: - -```shell -curl --request GET \ - --url https://api.tatum.io/v3/blockchain/node/tron-testnet/wallet/getassetissuelist -``` - -### HTTP Response Example - -```json -{ - "assetIssue": [ - { - "owner_address": "412e1934759faf93497d6742208e2e521f7043e2ff", - "name": "62747474657374", - "abbr": "62747474657374", - "total_supply": 1000000000000000, - "trx_num": 1000000, - "precision": 6, - "num": 1000000, - "start_time": 1575648000000, - "end_time": 1575734400000, - "description": "62747474657374", - "url": "68747470733a2f2f62746673736f7465722e726561646d652e696f2f646f63732f686f772d746f2d6765742d737461727465642d776974682d736f746572", - "id": "1000001" - }, - { - "owner_address": "411e260aeff8bd61d42590d256b671c8062926ef20", - "name": "6f756363746f6b656e", - "abbr": "4f554343", - "total_supply": 10000000000, - "trx_num": 1000000, - "num": 1, - "start_time": 1575648000000, - "end_time": 1640275200000, - "description": "74657374", - "url": "687474703a2f2f7777772e62616964752e636f6d", - "id": "1000002" - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuelistbyname.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuelistbyname.md deleted file mode 100644 index 5248e7ac..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getassetissuelistbyname.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "getassetissuelistbyname" -slug: "rpc-tron-getassetissuelistbyname" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getAssetIssueListByName('62747474657374') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAssetIssueListByName` method allows users to query the list of all the TRC10 tokens by a specific name. This can be useful in various scenarios, such as when one needs to quickly identify tokens with a specific name, or for tracking purposes, where knowing the associated tokens can provide valuable insights. - -### Parameters - -- `value` (string): Name of the TRC10 token to be queried. This parameter is required. - -### Return Object - -- `assetIssue`: (array) - - `id`: (integer) token ID - - `owner_address`: (string) issuer address - - `name`: (string) token name - - `abbr`: (string) token abbreviation - - `total_supply`: (integer) total supply - - `frozen_supply`: (Array) The number of tokens to be frozen is specified by the issuer of the token when it is issued - - `trx_num`: (integer) Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN) - - `precision`: (integer) precision - - `num`: (integer) Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN) - - `start_time`: (integer) ICO start time - - `end_time`: (integer) ICO end time - - `description`: (string) token description - - `url`: (string) Token official website url, default hexString - - `free_asset_net_limit`: (integer) Token free asset net limit - - `public_free_asset_net_limit`: (integer) Token public free asset net limit for a account - - `public_free_asset_net_usage`: (integer) The total number of token free bandwidth used by all token owner - - `public_latest_free_net_time`: (integer) The timestamp of the last consumption of this token's free bandwidth - -### HTTP Request Example - -```json -{ - "value": "49504653" -} -``` - -### HTTP Response Example - -```json -{ - "assetIssue": [ - { - "owner_address": "41d13433f53fdf88820c2e530da7828ce15d6585cb", - "name": "49504653", - "abbr": "49504653", - "total_supply": 100000000000, - "trx_num": 1000000, - "num": 1, - "start_time": 1529990700000, - "end_time": 1537632000000, - "description": "4950465320636f696e", - "url": "687474703a2f2f", - "id": "1000003" - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getavailableunfreezecount.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getavailableunfreezecount.md deleted file mode 100644 index c7d8a34a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getavailableunfreezecount.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: "getavailableunfreezecount" -slug: "rpc-tron-getavailableunfreezecount" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getAvailableUnfreezeCount('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getAvailableUnfreezeCount` method is used to retrieve the remaining times of executing the unstake operation in Stake 2.0 on the TRON blockchain. Stake 2.0 supports unstaking in batches, but it imposes a limit of 32 unstake operations that can be executed simultaneously. This means that when a user initiates the first unstake operation, they can only initiate another 31 unstake operations until the TRX of the first unstaking arrives and is ready to be withdrawn to their account. This limitation is in place to prevent malicious attacks. - -{% embed url=" %} - -### Parameters - -- `ownerAddress` (string): The owner address for which to retrieve the remaining times of available unstaking. Default is in hexadecimal format. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Whether the address is in base58 format. - -### Return Object - -- `count`: The remaining times of available unstaking. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "count": 32 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getbandwidthprices.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getbandwidthprices.md deleted file mode 100644 index 6f6b2b90..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getbandwidthprices.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "getbandwidthprices" -slug: "rpc-tron-getbandwidthprices" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getBandwidthPrices() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBandwidthPrices()` method is used to retrieve historical bandwidth unit prices on the TRON blockchain. Bandwidth is an essential resource in the TRON network used for performing transactions. This method will return all historical prices, where each unit price change is separated by a comma. - -{% embed url=" %} - -### Parameters - -This method doesn't require any parameters. - -### Return Object - -- `prices`: A string that represents all historical bandwidth unit price information. Each unit price change is separated by a comma. Before the colon is the millisecond timestamp, and after the colon is the bandwidth unit price in sun. - -### HTTP Request Example - -```shell -{} -``` - -### HTTP Response Example - -```json -{ - "prices": "1613713487000:100,1613799887000:200,1613886287000:150" -} -``` - -In this example, the first bandwidth unit price change was at timestamp `1613713487000` with a price of `100` sun, the second at timestamp `1613799887000` with a price of `200` sun, and so on. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblock.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblock.md deleted file mode 100644 index 028ab740..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblock.md +++ /dev/null @@ -1,298 +0,0 @@ ---- -title: "getblock" -slug: "rpc-tron-getblock" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getBlock('1000000', { - detail: false, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlock` method allows you to query block header information or entire block information according to block height or block hash. This can be particularly useful in situations where you need to inspect the contents of a particular block in the TRON blockchain for transaction verification or data analysis. - -{% embed url=" %} - -### Parameters - -- `idOrNum` (string): This parameter can be the block height or the block hash. Not providing a value means that it will query the latest block. -- `options` (object, optional): This is an optional parameter that can include: - - `detail` (boolean, optional): If set to true, it queries the entire block information including the header and body. If false, it only queries the block header information. - -### Return Object - -The method returns a Promise that resolves to an object with the following properties: - -- `blockID` (string): The block hash. -- `block_header` (object) - - `raw_data` (object) - - `timestamp` (integer): The timestamp of the block. - - `txTrieRoot` (string): The root of the transaction merkle tree. - - `parentHash` (string): The parent block hash. - - `number` (integer): The block number. - - `witness_id` (integer): The witness id. - - `witness_address` (string): The witness address. - - `version` (integer): The version. - - `accountStateRoot` (string): The root of the account state tree. - - `witness_signature` (string): The signature of the Super Representative (SR). -- `transactions` (Array): Contains transaction information in the block. - - `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). - - `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. - - `raw_data.data` - Transaction memo. - - `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. - - `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. - - `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. - - `txID` - transaction id - -### HTTP Request Example - -```json -{ - "id_or_num": "1000000", - "detail": true -} -``` - -### HTTP Response Example - -```json -{ - "blockID": "00000000000f424013e51b18e0782a32fa079ddafdb2f4c343468cf8896dc887", - "block_header": { - "raw_data": { - "number": 1000000, - "txTrieRoot": "e2dd42daa9c853e070df1e4fc927851a7438c601fb12cf945922629d5cec187b", - "witness_address": "41f16412b9a17ee9408646e2a21e16478f72ed1e95", - "parentHash": "00000000000f423fbccd9cdb9e410eabdf9f94145cf5b71a678b8b9616619125", - "version": 9, - "timestamp": 1578594852000 - }, - "witness_signature": "179caed28b3d129dee6d553ae6761a8c8698f890e5f38e062d56e2d0d0b8c9a20317b7753b3fd1be261935d6182434a6c057f8926f25027b9859cde3da3a655300" - }, - "transactions": [ - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "95428ed2e263600933f82bf67f43e15450bc2da3b7b2987a7f46b0b9b9c4aae7ba5ea005b9297fbff5bca5fe5c9b05299433e36e10224c167f9c613b6dded39000" - ], - "txID": "7faabd22623eb53467d34b2a417262f6df75433566c104b6c6eec5a227090df6", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "ae21db6f0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000051f5e04fa0000000000000000000000000000000000000000000000000000000004a9681c0000000000000000000000000000000000000000000000000000000004a8fe400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000051f5e04f9000000000000000000000000000000000000000000000000000000051f5e04f8000000000000000000000000000000000000000000000000000000051f5e04f7000000000000000000000000000000000000000000000000000000051f5e04f6000000000000000000000000000000000000000000000000000000051f5e04f5000000000000000000000000000000000000000000000000000000051f5e04f4000000000000000000000000000000000000000000000000000000051f5e04f3", - "owner_address": "41920bb75dd5751afd68e1d55a8a0bc1bc39b32c78", - "contract_address": "417090190c41ba59f763e2cbe7d885e007e94be5d2" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423e", - "ref_block_hash": "5c35fda2f1a9a386", - "expiration": 1578594906000, - "fee_limit": 1000000000, - "timestamp": 1578594849159 - }, - "raw_data_hex": "0a02423e22085c35fda2f1a9a3864090dfdadcf82d5af003081f12eb030a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412b5030a1541920bb75dd5751afd68e1d55a8a0bc1bc39b32c781215417090190c41ba59f763e2cbe7d885e007e94be5d2228403ae21db6f0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000051f5e04fa0000000000000000000000000000000000000000000000000000000004a9681c0000000000000000000000000000000000000000000000000000000004a8fe400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000051f5e04f9000000000000000000000000000000000000000000000000000000051f5e04f8000000000000000000000000000000000000000000000000000000051f5e04f7000000000000000000000000000000000000000000000000000000051f5e04f6000000000000000000000000000000000000000000000000000000051f5e04f5000000000000000000000000000000000000000000000000000000051f5e04f4000000000000000000000000000000000000000000000000000000051f5e04f37087a3d7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "6e3f72c5d8bf433bf98ac3bbcdfbbb179d8cd8f5f6da5f1eb0466bbc80bcebee6dc0e5312796c37c3fe73d49f9b350cf61f4830deb7d846c90570f8afb3f513400" - ], - "txID": "98d0f4149bf8023a9df4d2b754f6c728a5b6d021c4497c6cd5452b97f01b0548", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "0204b01b000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa", - "owner_address": "41ed2f4270fa5a7cae1efd4706ae27a4335406921e", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "call_value": 14000000 - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423f", - "ref_block_hash": "bccd9cdb9e410eab", - "expiration": 1578594909000, - "fee_limit": 1000000000, - "timestamp": 1578594849385 - }, - "raw_data_hex": "0a02423f2208bccd9cdb9e410eab40c8f6dadcf82d5ad401081f12cf010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e74726163741299010a1541ed2f4270fa5a7cae1efd4706ae27a4335406921e1215418d9dd663cf90256fdf2faba2a1be71f8a0147f8c1880bfd60622640204b01b000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa70e9a4d7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "230b8767e8745d01f38d2b9f742f4037eb81e93bcc9c2d60bedf4bab3b9e0c16692138a112f1610b505cf3109f3a5ff00d6687c09b3c94a734dd8aedfc92d82101" - ], - "txID": "17e7321320bb08c40f027cbcca320152c2396c77a910f387849a944ee8aa0cb1", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "f6d4ef1a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000051f5e04fa", - "owner_address": "41920bb75dd5751afd68e1d55a8a0bc1bc39b32c78", - "contract_address": "4179c23a5666042e40420d6afdc1541e3926205eba" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423e", - "ref_block_hash": "5c35fda2f1a9a386", - "expiration": 1578594906000, - "fee_limit": 1000000000, - "timestamp": 1578594849187 - }, - "raw_data_hex": "0a02423e22085c35fda2f1a9a3864090dfdadcf82d5aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a1541920bb75dd5751afd68e1d55a8a0bc1bc39b32c7812154179c23a5666042e40420d6afdc1541e3926205eba2244f6d4ef1a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000051f5e04fa70a3a3d7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "55124a9bfb733a27fc193b00c9c2ce0c1f969ffd0ec59c295fea00a75501206b0d5333c16c8f6a5aa7a32a03268edd3ca903d41f386001733a7d0199bcedb8bb01" - ], - "txID": "4ef51a5760bf98dc2dd752658f48db1445e8ca75f8a6efe14d5a462a15edd3f0", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "0204b01b00000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa", - "owner_address": "41f07e117a4b5f1fda66f8fcedf44065f1dafc5ad7", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "call_value": 1982000000 - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423f", - "ref_block_hash": "bccd9cdb9e410eab", - "expiration": 1578594909000, - "fee_limit": 1000000000, - "timestamp": 1578594850315 - }, - "raw_data_hex": "0a02423f2208bccd9cdb9e410eab40c8f6dadcf82d5ad501081f12d0010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e7472616374129a010a1541f07e117a4b5f1fda66f8fcedf44065f1dafc5ad71215418d9dd663cf90256fdf2faba2a1be71f8a0147f8c1880d78bb10722640204b01b00000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa708bacd7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "153d437be2c417d88bef564a1421d2c3debb9f3828e9276a58578eb566091d6a612d3294c124ba3a5da37815d49b7cc7a91be04c0304a8e9ecee02f4d3dc420901" - ], - "txID": "80e07e3f2b92a0e9974b1398964e006288836dee82aa3a81e579a512e6581354", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "0204b01b00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa", - "owner_address": "419ac63dd8e80daf0a786bf962860e2209b7fa5fb9", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "call_value": 11000000 - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423f", - "ref_block_hash": "bccd9cdb9e410eab", - "expiration": 1578594909000, - "fee_limit": 1000000000, - "timestamp": 1578594851357 - }, - "raw_data_hex": "0a02423f2208bccd9cdb9e410eab40c8f6dadcf82d5ad401081f12cf010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e74726163741299010a15419ac63dd8e80daf0a786bf962860e2209b7fa5fb91215418d9dd663cf90256fdf2faba2a1be71f8a0147f8c18c0b19f0522640204b01b00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa709db4d7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "a2e6784005b0bd9f80dcb92de8f37133e3355a09496bd7467580805226e2ed520e48858456151dc681e423f0041ae877369a16e6d805facc7af9d27b712891bb01" - ], - "txID": "ba8e727c03d588619310d7a16a95fcfd31a516dbf8893ddd585e0bbd7e0deae4", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "8a157bf900000000000000000000000000000000000000000000000000000000000019be", - "owner_address": "4141c910d7942636ae041975616104ef253e5a8371", - "contract_address": "41174e91a57d68f5ac1bc485d03a038fe745a3b89b" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423f", - "ref_block_hash": "bccd9cdb9e410eab", - "expiration": 1578594909000, - "fee_limit": 10000000, - "timestamp": 1578594850984 - }, - "raw_data_hex": "0a02423f2208bccd9cdb9e410eab40c8f6dadcf82d5a8e01081f1289010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412540a154141c910d7942636ae041975616104ef253e5a8371121541174e91a57d68f5ac1bc485d03a038fe745a3b89b22248a157bf900000000000000000000000000000000000000000000000000000000000019be70a8b1d7dcf82d900180ade204" - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbalance.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbalance.md deleted file mode 100644 index 0582bc2c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbalance.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "getblockbalance" -slug: "rpc-tron-getblockbalance" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @@tatumio/tatum -import { TatumSDK, Tron, Network, BigNumber } from '@tatumio/tatum' -import BigNumber from "bignumber.js"; - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getBlockBalance('00000000032669d53545fc1becc4d0cc9287e6324fb3a9230103aa0922f84544', new BigNumber(52849109), { visible: true }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockBalance` RPC method retrieves all balance change operations in a specific block. This method is useful for tracking transactional changes and balances within a given block. At present, the interface data can only be queried through specific official nodes (47.241.20.47, 161.117.85.97, 161.117.224.116, 161.117.83.38). - -### Parameters - -- `hash` (string): The hash of the block for which you want to get the balance change operations. For example: '0000000001f5b9ca67c722d9263879696c92e8e383d4f0b31c15a91b8a249029'. -- `number` (integer): The number of the block for which you want to get the balance change operations. For example: 32881098. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Whether the address is in base58 format. - -### Return Object - -The method returns an object with the following properties: - -- `timestamp` (integer): The timestamp of the block. -- `block_identifier.hash` (string): The hash of the block. -- `block_identifier.number` (integer): The number of the block. -- `transaction_balance_trace` (TransactionBalanceTrace\[]): An array of transaction information with balance changes. Each TransactionBalanceTrace object contains: - - `transaction_identifier` (string): The hash of the transaction. - - `operation` (Operation\[]): An array of operations involved in the transaction. Each operation contains: - - `operation_identifier` (integer): The identifier of the operation. - - `address` (string): The address involved in the operation. - - `amount` (integer): The amount of balance increase or decrease. - - `type` (string): The type of the transaction. - - `status` (string): The result of the transaction. - -### HTTP Request Example - -```json -{ - "hash": "0000000001f5b9ca67c722d9263879696c92e8e383d4f0b31c15a91b8a249029", - "number": 32881098, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "timestamp": 1630847456000, - "block_identifier": { - "hash": "0000000001f5b9ca67c722d9263879696c92e8e383d4f0b31c15a91b8a249029", - "number": 32881098 - }, - "transaction_balance_trace": [ - { - "transaction_identifier": "ea75b733582194c3c4da8a4c962c5c5a1dfabf525e8db300678b4d18b3adc7fa", - "operation": [ - { - "operation_identifier": 0, - "address": "TKJUZBU4wFm5Vc3MJboGLp7MEeYQ9xEJGy", - "amount": -1000000 - }, - { - "operation_identifier": 1, - "address": "TAUN6FwrnwwmaEqYcckffC7wYmbaS6cBiX", - "amount": 1000000 - } - ], - "type": "TransferContract", - "status": "SUCCESS" - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbyid.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbyid.md deleted file mode 100644 index ad9ed768..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbyid.md +++ /dev/null @@ -1,288 +0,0 @@ ---- -title: "getblockbyid" -slug: "rpc-tron-getblockbyid" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getBlockById('000000000326bcabea2fa533c7080c8baf231f320d3ccdd54a59e3fcb1760364') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockById` method allows you to query a specific block on the TRON blockchain by providing the block's ID. This can be useful when you want to retrieve specific transactional or metadata about a particular block. - -### Parameters - -- `value` (string): The ID of the block to query. This is the block hash which uniquely identifies each block on the TRON blockchain. - -### Return Object - -- `blockID` (string): The block hash. -- `block_header` (object) - - `raw_data` (object) - - `timestamp` (integer): The timestamp of the block. - - `txTrieRoot` (string): The root of the transaction merkle tree. - - `parentHash` (string): The parent block hash. - - `number` (integer): The block number. - - `witness_id` (integer): The witness id. - - `witness_address` (string): The witness address. - - `version` (integer): The version. - - `accountStateRoot` (string): The root of the account state tree. - - `witness_signature` (string): The signature of the Super Representative (SR). -- `transactions` (Array): Contains transaction information in the block. - - `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). - - `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. - - `raw_data.data` - Transaction memo. - - `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. - - `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. - - `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. - - `txID` - transaction id - -### HTTP Request Example - -```json -{ - "value": "0x000000000332a91b74ac983b698b9b6ddb087631992fcf8a4cf838b8500e7767" -} -``` - -### HTTP Response Example - -```json -{ - "blockID": "00000000000f424013e51b18e0782a32fa079ddafdb2f4c343468cf8896dc887", - "block_header": { - "raw_data": { - "number": 1000000, - "txTrieRoot": "e2dd42daa9c853e070df1e4fc927851a7438c601fb12cf945922629d5cec187b", - "witness_address": "41f16412b9a17ee9408646e2a21e16478f72ed1e95", - "parentHash": "00000000000f423fbccd9cdb9e410eabdf9f94145cf5b71a678b8b9616619125", - "version": 9, - "timestamp": 1578594852000 - }, - "witness_signature": "179caed28b3d129dee6d553ae6761a8c8698f890e5f38e062d56e2d0d0b8c9a20317b7753b3fd1be261935d6182434a6c057f8926f25027b9859cde3da3a655300" - }, - "transactions": [ - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "95428ed2e263600933f82bf67f43e15450bc2da3b7b2987a7f46b0b9b9c4aae7ba5ea005b9297fbff5bca5fe5c9b05299433e36e10224c167f9c613b6dded39000" - ], - "txID": "7faabd22623eb53467d34b2a417262f6df75433566c104b6c6eec5a227090df6", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "ae21db6f0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000051f5e04fa0000000000000000000000000000000000000000000000000000000004a9681c0000000000000000000000000000000000000000000000000000000004a8fe400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000051f5e04f9000000000000000000000000000000000000000000000000000000051f5e04f8000000000000000000000000000000000000000000000000000000051f5e04f7000000000000000000000000000000000000000000000000000000051f5e04f6000000000000000000000000000000000000000000000000000000051f5e04f5000000000000000000000000000000000000000000000000000000051f5e04f4000000000000000000000000000000000000000000000000000000051f5e04f3", - "owner_address": "41920bb75dd5751afd68e1d55a8a0bc1bc39b32c78", - "contract_address": "417090190c41ba59f763e2cbe7d885e007e94be5d2" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423e", - "ref_block_hash": "5c35fda2f1a9a386", - "expiration": 1578594906000, - "fee_limit": 1000000000, - "timestamp": 1578594849159 - }, - "raw_data_hex": "0a02423e22085c35fda2f1a9a3864090dfdadcf82d5af003081f12eb030a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412b5030a1541920bb75dd5751afd68e1d55a8a0bc1bc39b32c781215417090190c41ba59f763e2cbe7d885e007e94be5d2228403ae21db6f0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000051f5e04fa0000000000000000000000000000000000000000000000000000000004a9681c0000000000000000000000000000000000000000000000000000000004a8fe400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000051f5e04f9000000000000000000000000000000000000000000000000000000051f5e04f8000000000000000000000000000000000000000000000000000000051f5e04f7000000000000000000000000000000000000000000000000000000051f5e04f6000000000000000000000000000000000000000000000000000000051f5e04f5000000000000000000000000000000000000000000000000000000051f5e04f4000000000000000000000000000000000000000000000000000000051f5e04f37087a3d7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "6e3f72c5d8bf433bf98ac3bbcdfbbb179d8cd8f5f6da5f1eb0466bbc80bcebee6dc0e5312796c37c3fe73d49f9b350cf61f4830deb7d846c90570f8afb3f513400" - ], - "txID": "98d0f4149bf8023a9df4d2b754f6c728a5b6d021c4497c6cd5452b97f01b0548", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "0204b01b000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa", - "owner_address": "41ed2f4270fa5a7cae1efd4706ae27a4335406921e", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "call_value": 14000000 - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423f", - "ref_block_hash": "bccd9cdb9e410eab", - "expiration": 1578594909000, - "fee_limit": 1000000000, - "timestamp": 1578594849385 - }, - "raw_data_hex": "0a02423f2208bccd9cdb9e410eab40c8f6dadcf82d5ad401081f12cf010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e74726163741299010a1541ed2f4270fa5a7cae1efd4706ae27a4335406921e1215418d9dd663cf90256fdf2faba2a1be71f8a0147f8c1880bfd60622640204b01b000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa70e9a4d7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "230b8767e8745d01f38d2b9f742f4037eb81e93bcc9c2d60bedf4bab3b9e0c16692138a112f1610b505cf3109f3a5ff00d6687c09b3c94a734dd8aedfc92d82101" - ], - "txID": "17e7321320bb08c40f027cbcca320152c2396c77a910f387849a944ee8aa0cb1", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "f6d4ef1a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000051f5e04fa", - "owner_address": "41920bb75dd5751afd68e1d55a8a0bc1bc39b32c78", - "contract_address": "4179c23a5666042e40420d6afdc1541e3926205eba" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423e", - "ref_block_hash": "5c35fda2f1a9a386", - "expiration": 1578594906000, - "fee_limit": 1000000000, - "timestamp": 1578594849187 - }, - "raw_data_hex": "0a02423e22085c35fda2f1a9a3864090dfdadcf82d5aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a1541920bb75dd5751afd68e1d55a8a0bc1bc39b32c7812154179c23a5666042e40420d6afdc1541e3926205eba2244f6d4ef1a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000051f5e04fa70a3a3d7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "55124a9bfb733a27fc193b00c9c2ce0c1f969ffd0ec59c295fea00a75501206b0d5333c16c8f6a5aa7a32a03268edd3ca903d41f386001733a7d0199bcedb8bb01" - ], - "txID": "4ef51a5760bf98dc2dd752658f48db1445e8ca75f8a6efe14d5a462a15edd3f0", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "0204b01b00000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa", - "owner_address": "41f07e117a4b5f1fda66f8fcedf44065f1dafc5ad7", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "call_value": 1982000000 - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423f", - "ref_block_hash": "bccd9cdb9e410eab", - "expiration": 1578594909000, - "fee_limit": 1000000000, - "timestamp": 1578594850315 - }, - "raw_data_hex": "0a02423f2208bccd9cdb9e410eab40c8f6dadcf82d5ad501081f12d0010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e7472616374129a010a1541f07e117a4b5f1fda66f8fcedf44065f1dafc5ad71215418d9dd663cf90256fdf2faba2a1be71f8a0147f8c1880d78bb10722640204b01b00000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa708bacd7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "153d437be2c417d88bef564a1421d2c3debb9f3828e9276a58578eb566091d6a612d3294c124ba3a5da37815d49b7cc7a91be04c0304a8e9ecee02f4d3dc420901" - ], - "txID": "80e07e3f2b92a0e9974b1398964e006288836dee82aa3a81e579a512e6581354", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "0204b01b00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa", - "owner_address": "419ac63dd8e80daf0a786bf962860e2209b7fa5fb9", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "call_value": 11000000 - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423f", - "ref_block_hash": "bccd9cdb9e410eab", - "expiration": 1578594909000, - "fee_limit": 1000000000, - "timestamp": 1578594851357 - }, - "raw_data_hex": "0a02423f2208bccd9cdb9e410eab40c8f6dadcf82d5ad401081f12cf010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e74726163741299010a15419ac63dd8e80daf0a786bf962860e2209b7fa5fb91215418d9dd663cf90256fdf2faba2a1be71f8a0147f8c18c0b19f0522640204b01b00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000003000000000000000000000000db4df489cf3977fbf0d06e47885f3dc85446b4aa709db4d7dcf82d90018094ebdc03" - }, - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "a2e6784005b0bd9f80dcb92de8f37133e3355a09496bd7467580805226e2ed520e48858456151dc681e423f0041ae877369a16e6d805facc7af9d27b712891bb01" - ], - "txID": "ba8e727c03d588619310d7a16a95fcfd31a516dbf8893ddd585e0bbd7e0deae4", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "8a157bf900000000000000000000000000000000000000000000000000000000000019be", - "owner_address": "4141c910d7942636ae041975616104ef253e5a8371", - "contract_address": "41174e91a57d68f5ac1bc485d03a038fe745a3b89b" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "423f", - "ref_block_hash": "bccd9cdb9e410eab", - "expiration": 1578594909000, - "fee_limit": 10000000, - "timestamp": 1578594850984 - }, - "raw_data_hex": "0a02423f2208bccd9cdb9e410eab40c8f6dadcf82d5a8e01081f1289010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412540a154141c910d7942636ae041975616104ef253e5a8371121541174e91a57d68f5ac1bc485d03a038fe745a3b89b22248a157bf900000000000000000000000000000000000000000000000000000000000019be70a8b1d7dcf82d900180ade204" - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbylatestnum.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbylatestnum.md deleted file mode 100644 index d7b1adba..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbylatestnum.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: "getblockbylatestnum" -slug: "rpc-tron-getblockbylatestnum" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getBlockByLatestNum(5) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockByLatestNum` method retrieves a specified number of the most recent blocks from the TRON blockchain. This can be helpful when you need to analyse or display recent blockchain data. - -{% embed url=" %} - -### Parameters - -- `num` (integer): The number of the most recent blocks to retrieve. - -### Return Object - -- ## `block:` Array of blocks - - `blockID` (string): The block hash. - - `block_header` (object) - - `raw_data` (object) - - `timestamp` (integer): The timestamp of the block. - - `txTrieRoot` (string): The root of the transaction merkle tree. - - `parentHash` (string): The parent block hash. - - `number` (integer): The block number. - - `witness_id` (integer): The witness id. - - `witness_address` (string): The witness address. - - `version` (integer): The version. - - `accountStateRoot` (string): The root of the account state tree. - - `witness_signature` (string): The signature of the Super Representative (SR). - - `transactions` (Array): Contains transaction information in the block. - - `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). - - `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. - - `raw_data.data` - Transaction memo. - - `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. - - `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. - - `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. - - `txID` - transaction id - -### HTTP Request Example - -```json -{ - "num": 5 -} -``` - -### HTTP Response Example - -```json -{ - "block": [ - { - "blockID": "000000000203c375c7521ef953106e9a112e1902664a91becc5f40371a7397d7", - "block_header": { - "raw_data": { - "number": 33801077, - "txTrieRoot": "30fe6502e11e110fa389d5c17e1cf53fa8df93f26297d9f27cd8c07d3558d722", - "witness_address": "41e71c365c9dbf284ca8c1eed2d7877638941b9011", - "parentHash": "000000000203c3741f9a08f594934bd26df95cc6c49b475d118e3a87aed5a4a4", - "version": 27, - "timestamp": 1684509309000 - }, - "witness_signature": "cb4845bbd745f620852a1a54a955cee0d1aecc209f2f96e9b4ea53bf3d2ceb0f665fa07a5e870fcf9c6b98110a33d5bba5f35b588cc4123394b7e9f439fe265301" - }, - "transactions": [ - { - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "95874b4774ba56125dfd7bf2a99a0652d4abda98c6977e3f417852b7ea6f2b81ff2f260df473d186be9586b6bbeb74b5382d7f058593fd72fb60da5d0f77f77100" - ], - "txID": "31370141e3345421bdb92eff72f0d69aba8d04e636317ed52745d3f97e9faabb", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "37383d0e00000000000000000000000000000000000000000000000000000188349354c9", - "owner_address": "41fcf7ab2a2fb29362babd41647a22b223f7fbedec", - "contract_address": "41c3c5115bd3f5cfe5559c634eeb250f339ae3e29c" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "c362", - "ref_block_hash": "4ddf60f936a910d9", - "expiration": 1684509366000, - "fee_limit": 150000000, - "timestamp": 1684509306936 - }, - "raw_data_hex": "0a02c36222084ddf60f936a910d940f0add4a483315a8e01081f1289010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412540a1541fcf7ab2a2fb29362babd41647a22b223f7fbedec121541c3c5115bd3f5cfe5559c634eeb250f339ae3e29c222437383d0e00000000000000000000000000000000000000000000000000000188349354c970b8e0d0a48331900180a3c347" - } - ] - }, - { - "blockID": "000000000203c376d3d45ca88309982517d69ff0ec4d9a9f9f25536cebcdd76b", - "block_header": { - "raw_data": { - "number": 33801078, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41e61626ef01662b320a8ba38372e9db9cca940a3b", - "parentHash": "000000000203c375c7521ef953106e9a112e1902664a91becc5f40371a7397d7", - "version": 27, - "timestamp": 1684509312000 - }, - "witness_signature": "f38e08044df52f0bd3314a0dc73431290c323e20a67297da8be939041a8eae484e1094ba455c78b71f198bfaf80aee68bb5e9d40f9146158e88ed776d2034e9800" - } - }, - { - "blockID": "000000000203c3772b4f36792ea4f44a6d8345ccacee8a00d6f309a206193f1c", - "block_header": { - "raw_data": { - "number": 33801079, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41e76da262ad1ca05274f74258ee18bc7fcc4987dc", - "parentHash": "000000000203c376d3d45ca88309982517d69ff0ec4d9a9f9f25536cebcdd76b", - "version": 27, - "timestamp": 1684509315000 - }, - "witness_signature": "c6413a9d83553d6243eff19c27c136436e9e2e1b2315849e71232ae473614fdf3034ce215c8695c7ca15742899dcf6c276b3be918b6b8049b74f3b81a3c695b500" - } - }, - { - "blockID": "000000000203c378d7df0f9d0edecc8b5e7edac57543e6fa421bbae6b1448e5f", - "block_header": { - "raw_data": { - "number": 33801080, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41290bf92b578a1c615ebb273aff6a285230c02f65", - "parentHash": "000000000203c3772b4f36792ea4f44a6d8345ccacee8a00d6f309a206193f1c", - "version": 27, - "timestamp": 1684509318000 - }, - "witness_signature": "122a4463f64743b90f1e0f476bd878aae576225591643972595a7bb250ddee2757287b8c8ab627ba95e027e55421160ea2b6bb543bcaa89b871427113bbab6a101" - } - }, - { - "blockID": "000000000203c3799526a98bab56861511f0e67ec65557826d7bfc0b36e17450", - "block_header": { - "raw_data": { - "number": 33801081, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41977f82c69011cf4a7db6f7339edcded85c614d45", - "parentHash": "000000000203c378d7df0f9d0edecc8b5e7edac57543e6fa421bbae6b1448e5f", - "version": 27, - "timestamp": 1684509321000 - }, - "witness_signature": "bd07babfec59340828d6d82032a0865f22391df29c43647c0e3186e21b9df43d2f78f3cb50d4a0113f08ebd7c02663ffc169352297256cce4bd62b04a4289e1d01" - } - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbylimitnext.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbylimitnext.md deleted file mode 100644 index 724bbb0c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbylimitnext.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: "getblockbylimitnext" -slug: "rpc-tron-getblockbylimitnext" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum -import { TatumSDK, Tron, Network } from '@tatumio/tatum'; - -const tatum = await TatumSDK.init({network: Network.TRON}); - -const res = await tatum.rpc.getBlockByLimitNext(1, 5); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockByLimitNext` method allows interaction with the TRON blockchain to fetch a range of blocks. The method requires the starting and ending block heights as input and returns the list of Block Objects included in the range. - -Use cases include, but are not limited to, data analysis, tracking block transactions, and network monitoring. - -### Parameters - -The method takes two parameters: - -- `startNum` (integer): The starting block height, inclusive. -- `endNum` (integer): The ending block height, exclusive. - -### Return Object - -- `block:` Array of blocks - - `blockID` (string): The block hash. - - `block_header` (object) - - `raw_data` (object) - - `timestamp` (integer): The timestamp of the block. - - `txTrieRoot` (string): The root of the transaction merkle tree. - - `parentHash` (string): The parent block hash. - - `number` (integer): The block number. - - `witness_id` (integer): The witness id. - - `witness_address` (string): The witness address. - - `version` (integer): The version. - - `accountStateRoot` (string): The root of the account state tree. - - `witness_signature` (string): The signature of the Super Representative (SR). - - `transactions` (Array): Contains transaction information in the block. - - `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). - - `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. - - `raw_data.data` - Transaction memo. - - `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. - - `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. - - `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. - - `txID` - transaction id - -### HTTP Request Example - -Here's how the request looks as a CURL command: - -```json -{ - "startNum": 1, - "endNum": 5 -} -``` - -### HTTP Response Example - -This is a general representation of a response. The actual response will contain a list of blocks based on the range specified: - -```json -{ - "block": [ - { - "blockID": "0000000000000001049f911bc1069bfd2c2225bc3cd210abd02fb219751813f0", - "block_header": { - "raw_data": { - "number": 1, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41f16412b9a17ee9408646e2a21e16478f72ed1e95", - "parentHash": "0000000000000000de1aa88295e1fcf982742f773e0419c5a9c134c994a9059e", - "version": 9, - "timestamp": 1575594015000 - }, - "witness_signature": "a3feb861edcf246bd51a447f8f91636c1d7e6868b346eb2773e24859aacceaed4aa032664c2433bce5dc58e6febe87d3a7e70841684536964670fcad05fe111601" - } - }, - { - "blockID": "00000000000000028e917e1dcf24b45bf9ba16d59d77f9a1846bc4861e7045e4", - "block_header": { - "raw_data": { - "number": 2, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41f16412b9a17ee9408646e2a21e16478f72ed1e95", - "parentHash": "0000000000000001049f911bc1069bfd2c2225bc3cd210abd02fb219751813f0", - "version": 9, - "timestamp": 1575594024000 - }, - "witness_signature": "076e8610191e5e1b010697ed40fc4a8b316010374e27add85ca117160582223559e14195c7f475020b66f6136807a96c8aaea4b8a8061a9ab50d1d19234034eb00" - } - }, - { - "blockID": "0000000000000003e7025004f6a699db79bd9d5f20bc5e363344f8b01f959394", - "block_header": { - "raw_data": { - "number": 3, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41f16412b9a17ee9408646e2a21e16478f72ed1e95", - "parentHash": "00000000000000028e917e1dcf24b45bf9ba16d59d77f9a1846bc4861e7045e4", - "version": 9, - "timestamp": 1575594027000 - }, - "witness_signature": "fa4bf8994324f816b8ad1e85ae06b93b33e24cce84255c5656415573641b01410f5e2152d328c32525b8a03ca06dc6100e26fddb2c4836e3e4357134399372a901" - } - }, - { - "blockID": "00000000000000044a56ccc0ee2c6ce0f6d1aeeeca788486ea0f6ad52853749c", - "block_header": { - "raw_data": { - "number": 4, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41f16412b9a17ee9408646e2a21e16478f72ed1e95", - "parentHash": "0000000000000003e7025004f6a699db79bd9d5f20bc5e363344f8b01f959394", - "version": 9, - "timestamp": 1575594030000 - }, - "witness_signature": "192eadd1f1ae870d0e7464a72829307e5b214e1e3be16e03f223d264acf9c2f715b4b647e836c62cb88a428752b225aa8f3c6d9c85696c8f06635091b1c1982600" - } - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbynum.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbynum.md deleted file mode 100644 index ffa0cf9e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getblockbynum.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "getblockbynum" -slug: "rpc-tron-getblockbynum" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize Tatum SDK for TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -// Get the block by number -const block = await tatum.rpc.getBlockByNum(200) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBlockByNum` method returns the block object corresponding to the block height specified (the number of blocks preceding it). This could be useful for retrieving specific block data or for validating transactions within a certain block. - -{% embed url=" %} - -### Parameters - -- `num` (integer): The height of the block to retrieve. - -### Return Object - -The method returns a promise that resolves to a block object with the following fields: - -- -- `blockID` (string): The block hash. -- `block_header` (object) - - `raw_data` (object) - - `timestamp` (integer): The timestamp of the block. - - `txTrieRoot` (string): The root of the transaction merkle tree. - - `parentHash` (string): The parent block hash. - - `number` (integer): The block number. - - `witness_id` (integer): The witness id. - - `witness_address` (string): The witness address. - - `version` (integer): The version. - - `accountStateRoot` (string): The root of the account state tree. - - `witness_signature` (string): The signature of the Super Representative (SR). -- `transactions` (Array): Contains transaction information in the block. - - `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). - - `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. - - `raw_data.data` - Transaction memo. - - `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. - - `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. - - `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. - - `txID` - transaction id - -### HTTP Request Example - -```json -{ - "num":200 -} -``` - -### HTTP Response Example - -```json -{ - "blockID": "00000000000000c86d2473411771f83db5e314c01bc8f8cf0dc2f8892be6fd7f", - "block_header": { - "raw_data": { - "number": 200, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41f16412b9a17ee9408646e2a21e16478f72ed1e95", - "parentHash": "00000000000000c7d4d47132f21fd0b74e2f8bcb0c2e9130f7cab35b5d38af9f", - "version": 9, - "timestamp": 1575594618000 - }, - "witness_signature": "97ecda5b130600d18304e02f7fd5ab9d115c5ec9c0e312c8c6fe83939771bb85505fafee598541dc902b1a7b8ca2735c83a12e640203ed4b8529d47ce4f413df00" - } -} -``` - -*** diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getburntrx.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getburntrx.md deleted file mode 100644 index 14c4e4d4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getburntrx.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "getburntrx" -slug: "rpc-tron-getburntrx" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum'; - -const tatum = await TatumSDK.init({network: Network.TRON}); - -const res = await tatum.rpc.getBurnTRX(); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getBurnTRX()` RPC method allows to query the amount of TRX burned due to on-chain transaction fees since the No. 54 Committee Proposal took effect. - -Before the No. 54 Committee Proposal takes effect, the destruction of transaction fees is completed by transferring to the black hole address TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy. After the No. 54 committee proposal takes effect, it will no longer be transferred to the black hole address, but will be directly recorded in the node database. - -Use cases of this method include monitoring the total amount of TRX burned due to transaction fees, which can be useful for data analysis and transparency purposes. - -{% embed url=" %} - -### Parameters - -The `getBurnTRX()` RPC method does not require any parameters. - -### Return Object - -- `burnTrxAmount`: This is the amount of TRX burned due to on-chain transaction fees. The amount is returned in sun (1 TRX = 1,000,000 sun). - -### HTTP Request Example - -```bash -{} -``` - -### HTTP Response Example - -```json -{ - "burnTrxAmount": 200 -} -``` - -Note that the `burnTrxAmount` is returned as an integer in sun. - -*** diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcandelegatedmaxsize.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcandelegatedmaxsize.md deleted file mode 100644 index ea02025f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcandelegatedmaxsize.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: "getcandelegatedmaxsize" -slug: "rpc-tron-getcandelegatedmaxsize" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.TRON }) - -const res = await tatum.rpc.getCanDelegatedMaxSize('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', 0, { - visible: true -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getCanDelegatedMaxSize` method is used to query the amount of delegatable resources share of the specified resource type for a given address on the TRON blockchain. The unit of measurement for the amount is sun. This method is part of the Stake2.0 functionality. - -Use cases for this method include: - -- Determining the amount of delegatable bandwidth or energy resources for an address. -- Calculating the available resources for delegation before initiating a delegation transaction. - -{% embed url=" %} - -### Parameters - -1. `ownerAddress` (string): The owner address for which the delegatable resource share needs to be queried. It should be provided as a hexadecimal string. -2. `type` (integer): The resource type to query. Use `0` for bandwidth and `1` for energy. -3. `options` (object, optional): Additional options for the method. - - `visible` (boolean, optional): Whether the address is in base58 format. Defaults to `true`. - -### Return Object - -The `getCanDelegatedMaxSize` method returns the following object: - -- `max_size`: The amount of delegatable resource share in sun. - -Note: If the delegating transaction has a memo, it would consume more bandwidth. Therefore, the actual delegatable share might be less than the value returned by this API. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "type": 0, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "max_size": 12311 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcanwithdrawunfreezeamount.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcanwithdrawunfreezeamount.md deleted file mode 100644 index e98417bb..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcanwithdrawunfreezeamount.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: "getcanwithdrawunfreezeamount" -slug: "rpc-tron-getcanwithdrawunfreezeamount" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -import { TatumSDK, Tron, Network } from '@tatumcom/js'; - -const tatum = await TatumSDK.init({ network: Network.TRON }); - -const res = await tatum.rpc.getCanWithdrawUnfreezeAmount('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', { - timestamp: 1667977444000, - visible: true, -}); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getCanWithdrawUnfreezeAmount` method allows you to retrieve the withdrawable balance for a specified owner address at a specific timestamp. This method is primarily used in the Stake 2.0 protocol on the TRON blockchain. - -{% embed url=" %} - -Use Cases: - -- Calculating the available balance that can be withdrawn by an owner address in the Stake 2.0 protocol. -- Providing real-time balance information to users or applications. - -### Parameters - -- `ownerAddress` (string): The owner address for which the withdrawable balance needs to be retrieved. (Default: hexString) -- `options` (object, optional): This optional parameter contains the following properties: - - `timestamp` (integer, optional): The query cutoff timestamp in milliseconds. - - `visible` (boolean, optional): parameter to indicate whether the address is in base58 format. - -### Return Object - -The `getCanWithdrawUnfreezeAmount` method returns the following object: - -- `amount`: The withdrawable balance in TRX, where the unit is sun. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "timestamp": 1667977444000, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "amount": 1000000 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getchainparameters.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getchainparameters.md deleted file mode 100644 index e13bf5ca..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getchainparameters.md +++ /dev/null @@ -1,305 +0,0 @@ ---- -title: "getchainparameters" -slug: "rpc-tron-getchainparameters" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const chainParameters = await tatum.rpc.getChainParameters() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getChainParameters` method retrieves all parameters that the blockchain committee can set. This method is useful for getting detailed information about the blockchain's configurable parameters. - -{% embed url=" %} - -### Parameters - -This method doesn't require any parameters. - -### Return Object - -The return object is an array of ChainParameters objects. Each ChainParameters object contains the following parameters: - -- `chainParameter (array)` - - `key` (string): The parameter name. - - `value` (integer): The parameter value. - -### HTTP Request Example - -```curl -{] -``` - -### HTTP Response Example - -```json -{ - "chainParameter": [ - { - "key": "getMaintenanceTimeInterval", - "value": 600000 - }, - { - "key": "getAccountUpgradeCost", - "value": 9999000000 - }, - { - "key": "getCreateAccountFee", - "value": 100000 - }, - { - "key": "getTransactionFee", - "value": 1000 - }, - { - "key": "getAssetIssueFee", - "value": 1024000000 - }, - { - "key": "getWitnessPayPerBlock", - "value": 100000000000 - }, - { - "key": "getWitnessStandbyAllowance", - "value": 100000000 - }, - { - "key": "getCreateNewAccountFeeInSystemContract", - "value": 1000000 - }, - { - "key": "getCreateNewAccountBandwidthRate", - "value": 1 - }, - { - "key": "getAllowCreationOfContracts", - "value": 1 - }, - { - "key": "getRemoveThePowerOfTheGr", - "value": -1 - }, - { - "key": "getEnergyFee", - "value": 420 - }, - { - "key": "getExchangeCreateFee", - "value": 1024000000 - }, - { - "key": "getMaxCpuTimeOfOneTx", - "value": 120 - }, - { - "key": "getAllowUpdateAccountName" - }, - { - "key": "getAllowSameTokenName", - "value": 1 - }, - { - "key": "getAllowDelegateResource", - "value": 1 - }, - { - "key": "getTotalEnergyLimit", - "value": 50000000000 - }, - { - "key": "getAllowTvmTransferTrc10", - "value": 1 - }, - { - "key": "getTotalEnergyCurrentLimit", - "value": 50000000000000 - }, - { - "key": "getAllowMultiSign", - "value": 1 - }, - { - "key": "getAllowAdaptiveEnergy", - "value": 1 - }, - { - "key": "getTotalEnergyTargetLimit", - "value": 3472222 - }, - { - "key": "getTotalEnergyAverageUsage", - "value": 8384 - }, - { - "key": "getUpdateAccountPermissionFee", - "value": 100000000 - }, - { - "key": "getMultiSignFee", - "value": 1000000 - }, - { - "key": "getAllowAccountStateRoot" - }, - { - "key": "getAllowProtoFilterNum" - }, - { - "key": "getAllowTvmConstantinople", - "value": 1 - }, - { - "key": "getAllowTvmSolidity059", - "value": 1 - }, - { - "key": "getAllowTvmIstanbul", - "value": 1 - }, - { - "key": "getAllowShieldedTRC20Transaction", - "value": 1 - }, - { - "key": "getForbidTransferToContract" - }, - { - "key": "getAdaptiveResourceLimitTargetRatio", - "value": 10 - }, - { - "key": "getAdaptiveResourceLimitMultiplier", - "value": 1000 - }, - { - "key": "getChangeDelegation", - "value": 1 - }, - { - "key": "getWitness127PayPerBlock", - "value": 10000000 - }, - { - "key": "getAllowMarketTransaction" - }, - { - "key": "getMarketSellFee" - }, - { - "key": "getMarketCancelFee" - }, - { - "key": "getAllowPBFT" - }, - { - "key": "getAllowTransactionFeePool" - }, - { - "key": "getMaxFeeLimit", - "value": 15000000000 - }, - { - "key": "getAllowOptimizeBlackHole", - "value": 1 - }, - { - "key": "getAllowNewResourceModel" - }, - { - "key": "getAllowTvmFreeze" - }, - { - "key": "getAllowTvmVote", - "value": 1 - }, - { - "key": "getAllowTvmLondon", - "value": 1 - }, - { - "key": "getAllowTvmCompatibleEvm" - }, - { - "key": "getAllowAccountAssetOptimization" - }, - { - "key": "getFreeNetLimit", - "value": 1500 - }, - { - "key": "getTotalNetLimit", - "value": 43200000000 - }, - { - "key": "getAllowHigherLimitForMaxCpuTimeOfOneTx", - "value": 1 - }, - { - "key": "getAllowAssetOptimization", - "value": 1 - }, - { - "key": "getAllowNewReward", - "value": 1 - }, - { - "key": "getMemoFee", - "value": 1000000 - }, - { - "key": "getAllowDelegateOptimization", - "value": 1 - }, - { - "key": "getUnfreezeDelayDays", - "value": 14 - }, - { - "key": "getAllowOptimizedReturnValueOfChainId", - "value": 1 - }, - { - "key": "getAllowDynamicEnergy", - "value": 1 - }, - { - "key": "getDynamicEnergyThreshold", - "value": 3000000000 - }, - { - "key": "getDynamicEnergyIncreaseFactor", - "value": 2000 - }, - { - "key": "getDynamicEnergyMaxFactor", - "value": 12000 - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcontract.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcontract.md deleted file mode 100644 index e25a9903..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcontract.md +++ /dev/null @@ -1,319 +0,0 @@ ---- -title: "getcontract" -slug: "rpc-tron-getcontract" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getContract('TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getContract` method allows you to query a contract's information from the TRON blockchain. This includes the bytecode of the contract, ABI, configuration parameters, and more. This can be useful in a variety of use-cases such as contract verification, auditing, and debugging. - -{% embed url=" %} - -### Parameters - -- `value` (string): The contract address, as a string. -- `options` (optional): Additional options. - - `visible` (boolean, optional): Whether the address is in visible format(base58check) or hex. - -### Return Object - -The method returns an object with the following properties: - -- `origin_address` (string): Contract creator address. -- `contract_address` (string): Contract address. -- `abi` (ABI): ABI of the contract. -- `bytecode` (string): Bytecode of the contract. -- `call_value` (integer): The amount of TRX passed into the contract when deploying the contract. -- `consume_user_resource_percent` (integer): Proportion of user energy consumption. -- `name` (string): Contract name. -- `origin_energy_limit` (integer): Each transaction is allowed to consume the maximum energy of the contract creator, the unit is sun. -- `code_hash` (string): Code hash of the contract. - -### HTTP Request Example - -```json -{ - "value": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "bytecode": "608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50604080518082018252600b81526a2a32ba3432b92a37b5b2b760a91b6020808301918252835180850190945260048452631554d11560e21b90840152815191929160069161007c9160039190610236565b508151610090906004906020850190610236565b506005805460ff191660ff92909216919091179055506100cc9050336100b46100d1565b60ff16600a0a6402540be400026100db60201b60201c565b6102ce565b60055460ff165b90565b6001600160a01b038216610136576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61014f816002546101d560201b61078c1790919060201c565b6002556001600160a01b0382166000908152602081815260409091205461017f91839061078c6101d5821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561022f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061027757805160ff19168380011785556102a4565b828001600101855582156102a4579182015b828111156102a4578251825591602001919060010190610289565b506102b09291506102b4565b5090565b6100d891905b808211156102b057600081556001016102ba565b6108ad806102dd6000396000f3fe608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50600436106100b35760003560e01c806306fdde03146100b8578063095ea7b31461013557806318160ddd1461017557806323b872dd1461018f578063313ce567146101c557806339509351146101e357806370a082311461020f57806395d89b4114610235578063a457c2d71461023d578063a9059cbb14610269578063dd62ed3e14610295575b600080fd5b6100c06102c3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fa5781810151838201526020016100e2565b50505050905090810190601f1680156101275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101616004803603604081101561014b57600080fd5b506001600160a01b038135169060200135610359565b604080519115158252519081900360200190f35b61017d61036f565b60408051918252519081900360200190f35b610161600480360360608110156101a557600080fd5b506001600160a01b03813581169160208101359091169060400135610375565b6101cd6103cc565b6040805160ff9092168252519081900360200190f35b610161600480360360408110156101f957600080fd5b506001600160a01b0381351690602001356103d5565b61017d6004803603602081101561022557600080fd5b50356001600160a01b0316610411565b6100c061042c565b6101616004803603604081101561025357600080fd5b506001600160a01b03813516906020013561048d565b6101616004803603604081101561027f57600080fd5b506001600160a01b0381351690602001356104c9565b61017d600480360360408110156102ab57600080fd5b506001600160a01b03813581169160200135166104d6565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561034f5780601f106103245761010080835404028352916020019161034f565b820191906000526020600020905b81548152906001019060200180831161033257829003601f168201915b5050505050905090565b6000610366338484610501565b50600192915050565b60025490565b60006103828484846105ed565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546103c29186916103bd908663ffffffff61072f16565b610501565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103669185906103bd908663ffffffff61078c16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561034f5780601f106103245761010080835404028352916020019161034f565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103669185906103bd908663ffffffff61072f16565b60006103663384846105ed565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166105465760405162461bcd60e51b81526004018080602001828103825260248152602001806108566024913960400191505060405180910390fd5b6001600160a01b03821661058b5760405162461bcd60e51b815260040180806020018281038252602281526020018061080f6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106325760405162461bcd60e51b81526004018080602001828103825260258152602001806108316025913960400191505060405180910390fd5b6001600160a01b0382166106775760405162461bcd60e51b81526004018080602001828103825260238152602001806107ec6023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546106a0908263ffffffff61072f16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106d5908263ffffffff61078c16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610786576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156107e4576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26474726f6e58205ad8bd992125d73612e695872f74ea2d6951c0410b7633d79c611eec48000cf864736f6c63430005120031", - "name": "Token", - "origin_address": "TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW", - "abi": { - "entrys": [ - { - "stateMutability": "Nonpayable", - "type": "Constructor" - }, - { - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "Event" - }, - { - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "Event" - }, - { - "outputs": [ - { - "type": "uint256" - } - ], - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "type": "uint256" - } - ], - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "uint8" - } - ], - "constant": true, - "name": "decimals", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "type": "string" - } - ], - "constant": true, - "name": "name", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "string" - } - ], - "constant": true, - "name": "symbol", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "uint256" - } - ], - "constant": true, - "name": "totalSupply", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "recipient", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "sender", - "type": "address" - }, - { - "name": "recipient", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "stateMutability": "Nonpayable", - "type": "Function" - } - ] - }, - "origin_energy_limit": 10000000, - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "code_hash": "5933c5f6804befa730c18e6bf1b14393d9e062b466c2a772f81a6bfa932a8d46" -} -``` - -*** diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcontractinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcontractinfo.md deleted file mode 100644 index 836f79b8..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getcontractinfo.md +++ /dev/null @@ -1,329 +0,0 @@ ---- -title: "getcontractinfo" -slug: "rpc-tron-getcontractinfo" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getContractInfo('TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs', { -visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getContractInfo` method allows you to query a contract's information from the blockchain. This interface returns not only the bytecode but also the runtime bytecode of the contract. Unlike bytecode, runtime bytecode does not contain constructor and constructor parameter information. - -{% embed url=" %} - -### Parameters - -- `value`: (string) The contract address, converted to a hex string. -- `options` (optional): Additional options for the transaction. - - `visible`: (boolean, optional) Whether the address is in visible format (base58check) or hex. - -### Return Object - -The `getContractInfo` method returns an object containing the following fields: - -- `runtimecode`: (String) The contract's runtime code. -- `smart_contract`: (SmartContract) A smart contract object. - - `origin_address` (string): Contract creator address. - - `contract_address` (string): Contract address. - - `abi` (ABI): ABI of the contract. - - `bytecode` (string): Bytecode of the contract. - - `call_value` (integer): The amount of TRX passed into the contract when deploying the contract. - - `consume_user_resource_percent` (integer): Proportion of user energy consumption. - - `name` (string): Contract name. - - `origin_energy_limit` (integer): Each transaction is allowed to consume the maximum energy of the contract creator, the unit is sun. - - `code_hash` (string): Code hash of the contract. -- `contract_state`: (ContractState) The contract's state, which includes: - - `contract_state.energy_usage`: (Integer) The total amount of basic energy usage of the contract in the current maintenance cycle. - - `contract_state.energy_factor`: (Integer) The contract's energy factor. - - `contract_state.update_cycle`: (Integer) The current maintenance cycle number. - -### HTTP Request Example - -```json -{ - "value": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "runtimecode": "608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50600436106100b35760003560e01c806306fdde03146100b8578063095ea7b31461013557806318160ddd1461017557806323b872dd1461018f578063313ce567146101c557806339509351146101e357806370a082311461020f57806395d89b4114610235578063a457c2d71461023d578063a9059cbb14610269578063dd62ed3e14610295575b600080fd5b6100c06102c3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fa5781810151838201526020016100e2565b50505050905090810190601f1680156101275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101616004803603604081101561014b57600080fd5b506001600160a01b038135169060200135610359565b604080519115158252519081900360200190f35b61017d61036f565b60408051918252519081900360200190f35b610161600480360360608110156101a557600080fd5b506001600160a01b03813581169160208101359091169060400135610375565b6101cd6103cc565b6040805160ff9092168252519081900360200190f35b610161600480360360408110156101f957600080fd5b506001600160a01b0381351690602001356103d5565b61017d6004803603602081101561022557600080fd5b50356001600160a01b0316610411565b6100c061042c565b6101616004803603604081101561025357600080fd5b506001600160a01b03813516906020013561048d565b6101616004803603604081101561027f57600080fd5b506001600160a01b0381351690602001356104c9565b61017d600480360360408110156102ab57600080fd5b506001600160a01b03813581169160200135166104d6565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561034f5780601f106103245761010080835404028352916020019161034f565b820191906000526020600020905b81548152906001019060200180831161033257829003601f168201915b5050505050905090565b6000610366338484610501565b50600192915050565b60025490565b60006103828484846105ed565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546103c29186916103bd908663ffffffff61072f16565b610501565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103669185906103bd908663ffffffff61078c16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561034f5780601f106103245761010080835404028352916020019161034f565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103669185906103bd908663ffffffff61072f16565b60006103663384846105ed565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166105465760405162461bcd60e51b81526004018080602001828103825260248152602001806108566024913960400191505060405180910390fd5b6001600160a01b03821661058b5760405162461bcd60e51b815260040180806020018281038252602281526020018061080f6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106325760405162461bcd60e51b81526004018080602001828103825260258152602001806108316025913960400191505060405180910390fd5b6001600160a01b0382166106775760405162461bcd60e51b81526004018080602001828103825260238152602001806107ec6023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546106a0908263ffffffff61072f16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106d5908263ffffffff61078c16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610786576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156107e4576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26474726f6e58205ad8bd992125d73612e695872f74ea2d6951c0410b7633d79c611eec48000cf864736f6c63430005120031", - "smart_contract": { - "bytecode": "608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50604080518082018252600b81526a2a32ba3432b92a37b5b2b760a91b6020808301918252835180850190945260048452631554d11560e21b90840152815191929160069161007c9160039190610236565b508151610090906004906020850190610236565b506005805460ff191660ff92909216919091179055506100cc9050336100b46100d1565b60ff16600a0a6402540be400026100db60201b60201c565b6102ce565b60055460ff165b90565b6001600160a01b038216610136576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61014f816002546101d560201b61078c1790919060201c565b6002556001600160a01b0382166000908152602081815260409091205461017f91839061078c6101d5821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561022f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061027757805160ff19168380011785556102a4565b828001600101855582156102a4579182015b828111156102a4578251825591602001919060010190610289565b506102b09291506102b4565b5090565b6100d891905b808211156102b057600081556001016102ba565b6108ad806102dd6000396000f3fe608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50600436106100b35760003560e01c806306fdde03146100b8578063095ea7b31461013557806318160ddd1461017557806323b872dd1461018f578063313ce567146101c557806339509351146101e357806370a082311461020f57806395d89b4114610235578063a457c2d71461023d578063a9059cbb14610269578063dd62ed3e14610295575b600080fd5b6100c06102c3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fa5781810151838201526020016100e2565b50505050905090810190601f1680156101275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101616004803603604081101561014b57600080fd5b506001600160a01b038135169060200135610359565b604080519115158252519081900360200190f35b61017d61036f565b60408051918252519081900360200190f35b610161600480360360608110156101a557600080fd5b506001600160a01b03813581169160208101359091169060400135610375565b6101cd6103cc565b6040805160ff9092168252519081900360200190f35b610161600480360360408110156101f957600080fd5b506001600160a01b0381351690602001356103d5565b61017d6004803603602081101561022557600080fd5b50356001600160a01b0316610411565b6100c061042c565b6101616004803603604081101561025357600080fd5b506001600160a01b03813516906020013561048d565b6101616004803603604081101561027f57600080fd5b506001600160a01b0381351690602001356104c9565b61017d600480360360408110156102ab57600080fd5b506001600160a01b03813581169160200135166104d6565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561034f5780601f106103245761010080835404028352916020019161034f565b820191906000526020600020905b81548152906001019060200180831161033257829003601f168201915b5050505050905090565b6000610366338484610501565b50600192915050565b60025490565b60006103828484846105ed565b6001600160a01b0384166000908152600160209081526040808320338085529252909120546103c29186916103bd908663ffffffff61072f16565b610501565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103669185906103bd908663ffffffff61078c16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561034f5780601f106103245761010080835404028352916020019161034f565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103669185906103bd908663ffffffff61072f16565b60006103663384846105ed565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166105465760405162461bcd60e51b81526004018080602001828103825260248152602001806108566024913960400191505060405180910390fd5b6001600160a01b03821661058b5760405162461bcd60e51b815260040180806020018281038252602281526020018061080f6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106325760405162461bcd60e51b81526004018080602001828103825260258152602001806108316025913960400191505060405180910390fd5b6001600160a01b0382166106775760405162461bcd60e51b81526004018080602001828103825260238152602001806107ec6023913960400191505060405180910390fd5b6001600160a01b0383166000908152602081905260409020546106a0908263ffffffff61072f16565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106d5908263ffffffff61078c16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610786576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828201838110156107e4576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26474726f6e58205ad8bd992125d73612e695872f74ea2d6951c0410b7633d79c611eec48000cf864736f6c63430005120031", - "name": "Token", - "origin_address": "TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW", - "abi": { - "entrys": [ - { - "stateMutability": "Nonpayable", - "type": "Constructor" - }, - { - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "Event" - }, - { - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "Event" - }, - { - "outputs": [ - { - "type": "uint256" - } - ], - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "type": "uint256" - } - ], - "constant": true, - "inputs": [ - { - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "uint8" - } - ], - "constant": true, - "name": "decimals", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "type": "string" - } - ], - "constant": true, - "name": "name", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "string" - } - ], - "constant": true, - "name": "symbol", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "uint256" - } - ], - "constant": true, - "name": "totalSupply", - "stateMutability": "View", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "recipient", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "stateMutability": "Nonpayable", - "type": "Function" - }, - { - "outputs": [ - { - "type": "bool" - } - ], - "inputs": [ - { - "name": "sender", - "type": "address" - }, - { - "name": "recipient", - "type": "address" - }, - { - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "stateMutability": "Nonpayable", - "type": "Function" - } - ] - }, - "origin_energy_limit": 10000000, - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "code_hash": "5933c5f6804befa730c18e6bf1b14393d9e062b466c2a772f81a6bfa932a8d46" - }, - "contract_state": { - "update_cycle": 146215 - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresource.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresource.md deleted file mode 100644 index bc83a755..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresource.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "getdelegatedresource" -slug: "rpc-tron-getdelegatedresource" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, VisibleOption } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getDelegatedResource('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', 'TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getDelegatedResource` method retrieves all resources delegations during the stake1.0 phase from one account to another. It is useful when you need to assess the resources that an address delegates to a target address. The `fromAddress` parameter can be retrieved from the GetDelegatedResourceAccountIndex API. - -{% embed url=" %} - -### Parameters - -- `fromAddress` (string, required): The energy from address. Default is hexString. -- `toAddress` (string, required): The target address for the energy delegation information. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Defaults to false. Whether addresses are in base58 format. - -### Return Object - -The return object is a list of `DelegatedResource` objects. Each `DelegatedResource` object contains: - -- `from` (string): Delegate account -- `to` (string): Resource receiving account -- `frozen_balance_for_bandwidth` (integer): Bandwidth delegate share -- `frozen_balance_for_energy` (integer): Energy delegate share -- `expire_time_for_bandwidth` (integer): Deadline of this delegate bandwidth's lock period -- `expire_time_for_energy` (integer): Deadline of this delegate energy's lock period - -### HTTP Request Example - -```json -{ - "fromAddress": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "toAddress": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "visible": true -} -``` - -### HTTP Response Example - -```json -[ - { - "from": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "to": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "frozen_balance_for_bandwidth": 2000, - "frozen_balance_for_energy": 3000, - "expire_time_for_bandwidth": 1672448400000, - "expire_time_for_energy": 1675040400000 - } -] -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourceaccountindex.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourceaccountindex.md deleted file mode 100644 index ce631328..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourceaccountindex.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "getdelegatedresourceaccountindex" -slug: "rpc-tron-getdelegatedresourceaccountindex" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getDelegatedResourceAccountIndex('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -`getDelegatedResourceAccountIndex` is a method provided by TRON RPC allowing you to query the resource delegation by an account during stake1.0 phase. Essentially, this allows you to list all addresses that have delegated resources to a specific account. - -{% embed url=" %} - -### Parameters - -- `value` (string): Address, default hexString. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional) - Whether the address is in base58 format. - -### Return Object - -- `account` (string) - account address. -- `fromAccounts` (string\[]) - A list of account addresses which delegate resource to this account. -- `toAccounts` (string\[]) - A list of account addresses which receive resources delegated by this account. - -### HTTP Request Example - -```json -{ - "value": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "account": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g" -} -``` - -Please note that the addresses in `fromAccounts` and `toAccounts` will vary based on the resources delegated to and from the account. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourceaccountindexv2.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourceaccountindexv2.md deleted file mode 100644 index f269fcaa..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourceaccountindexv2.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "getdelegatedresourceaccountindexv2" -slug: "rpc-tron-getdelegatedresourceaccountindexv2" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -## TRON RPC Method: getDelegatedResourceAccountIndexV2 - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const result = await tatum.rpc.getDelegatedResourceAccountIndexV2('TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1', { -visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -`getDelegatedResourceAccountIndexV2` is an RPC method provided by TRON's API. It is used in the context of TRON's Stake2.0 system to query the resource delegation index by an account. It returns two lists: one is the list of addresses the account has delegated its resources to (`toAccounts`), and the other is the list of addresses that have delegated resources to the account (`fromAccounts`). - -Some potential use cases include: - -1. Checking the status of resource delegations for a specific account. -2. Understanding the delegation relationships of an account. - -{% embed url=" %} - -### Parameters - -- `value:` (string): The account address. By default, it is in hexString format. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Optional parameter to specify whether the address is in base58 format. - -### Return Object - -The returned object includes the following fields: - -- `account` - The account address. -- `fromAccounts` - The list of addresses that have delegated resources to the account. -- `toAccounts` - The list of addresses the account has delegated its resources to. - -### HTTP Request Example - -```json -{ - "value": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "account": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourcev2.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourcev2.md deleted file mode 100644 index 86b2de95..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getdelegatedresourcev2.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "getdelegatedresourcev2" -slug: "rpc-tron-getdelegatedresourcev2" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const result = await tatum.rpc.getDelegatedResourceV2('fromAddress', 'toAddress', { -visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -`getDelegatedResourceV2` is an RPC method provided by TRON's API. In the context of TRON's Stake2.0 system, it is used to query detailed information about the resource share delegated from one address to another. - -Some potential use cases might include: - -1. Checking the status of resource sharing between addresses. -2. Assessing the delegation history between two addresses. - -{% embed url=" %} - -### Parameters - -- `fromAddress` (string): - The address from which resources are delegated. By default, it is in hexString format. -- `toAddress` (string): - The address to which resources are delegated. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Optional parameter to specify whether the address is in base58 format. - -### Return Object - -The returned object includes a `delegatedResource` list. Each item in the list includes the following fields: - -- `from` (string): The owner's address. -- `to` (string): The recipient's address. -- `frozen_balance_for_bandwidth` (integer): The amount of TRX staked for bandwidth delegated from the `from` address to the `to` address. -- `frozen_balance_for_energy` (integer): The amount of TRX staked for energy delegated from the `from` address to the `to` address. -- `expire_time_for_bandwidth` (integer): The lock-up period deadline for bandwidth delegation. If no lock is specified when delegating resources, this field will not be displayed in the returned result and the value will be 0. -- `expire_time_for_energy` (integer): The lock-up period deadline for energy delegation. If no lock is specified when delegating resources, this field will not be displayed in the returned result and the value will be 0. - -### HTTP Request Example - -
{
-  "fromAddress": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
-  "toAddress": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1",
-  "visible": true
-}
-
- -### HTTP Response Example - -```json -[ - { - "from": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "to": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "frozen_balance_for_bandwidth": 1000, - "frozen_balance_for_energy": 1000, - "expire_time_for_bandwidth": 1597463006000, - "expire_time_for_energy": 1597463006000 - } -] -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getenergyprices.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getenergyprices.md deleted file mode 100644 index aea0521a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getenergyprices.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "getenergyprices" -slug: "rpc-tron-getenergyprices" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum'; - -const tatum = await TatumSDK.init({network: Network.TRON}); - -const res = await tatum.rpc.getEnergyPrices(); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getEnergyPrices` method is used to query historical energy unit price on the TRON network. The energy unit price is the cost of performing operations on the TRON network, measured in "sun" units. The historical data can be useful in various situations like estimating future energy costs based on historical data or analysing network activity over time. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -- `prices` - string: All historical energy unit price information. Each unit price change is separated by a comma. Before the colon is the millisecond timestamp, and after the colon is the energy unit price in sun. - -### HTTP Request Example - -```bash -{} -``` - -### HTTP Response Example - -```json -{ - "prices": "1614227200000:15,1614313600000:20,1614400000000:25" -} -``` - -In this example response, three price changes are listed: on the timestamp `1614227200000`, the price was `15` sun; on `1614313600000`, the price changed to `20` sun; and on `1614400000000`, the price was `25` sun. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getnodeinfo.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getnodeinfo.md deleted file mode 100644 index 01948dbf..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getnodeinfo.md +++ /dev/null @@ -1,295 +0,0 @@ ---- -title: "getnodeinfo" -slug: "rpc-tron-getnodeinfo" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const nodeInfo = await tatum.rpc.getNodeInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getNodeInfo` method is used to query information about the current state of the TRON node. This includes details about the latest block information, the number of active and passive connections, the total TCP flow, and other vital node details. This information is critical for monitoring the health and status of the TRON network. - -{% embed url=" %} - -### Parameters - -This method doesn't require any parameters. - -### Return Object - -- `beginSyncNum` (integer): The begin sync block number. -- `block` (string): The latest block information, including block height and block id. -- `solidityBlock` (string): The latest solidified block information, including block height and block id. -- `currentConnectCount` (integer): The current connect count. -- `activeConnectCount` (integer): Active node connection count. -- `passiveConnectCount` (integer): Passive node connection count. -- `totalFlow` (integer): Total TCP flow. -- `peerInfoList` (PeerInfo\[]): Peer node information. -- `configNodeInfo` (ConfigNodeInfo): Node configuration information. -- `machineInfo` (MachineInfo): The information of the machine where the node is located. -- `cheatWitnessInfoMap` (map\): SR information that may be suspected of cheating. - -### HTTP Request Example - -```curl -{} -``` - -### HTTP Response Example - -```json -{ - "activeConnectCount": 2, - "beginSyncNum": 33868394, - "block": "Num:33868413,ID:000000000204ca7d21eec047b7bd9659e633f27eabe7133aa8ae1f35c7800835", - "cheatWitnessInfoMap": {}, - "configNodeInfo": { - "activeNodeSize": 2, - "allowAdaptiveEnergy": 1, - "allowCreationOfContracts": 1, - "backupListenPort": 10001, - "backupMemberSize": 0, - "backupPriority": 6, - "codeVersion": "4.7.1.1", - "dbVersion": 2, - "discoverEnable": true, - "listenPort": 16666, - "maxConnectCount": 30, - "maxTimeRatio": 5, - "minParticipationRate": 0, - "minTimeRatio": 0, - "p2pVersion": "1", - "passiveNodeSize": 2, - "sameIpMaxConnectCount": 2, - "sendNodeSize": 3, - "supportConstant": true, - "versionNum": "17686" - }, - "currentConnectCount": 5, - "machineInfo": { - "cpuCount": 4, - "cpuRate": 0.012658227848101266, - "deadLockThreadCount": 0, - "deadLockThreadInfoList": [], - "freeMemory": 391487488, - "javaVersion": "1.8.0_291", - "jvmFreeMemory": 11439582784, - "jvmTotalMemory": 12850036736, - "memoryDescInfoList": [ - { - "initSize": 2555904, - "maxSize": 268435456, - "name": "Code Cache", - "useRate": 0.2647867202758789, - "useSize": 71078144 - }, - { - "initSize": 0, - "maxSize": -1, - "name": "Metaspace", - "useRate": 0.9261336443443698, - "useSize": 78023544 - }, - { - "initSize": 0, - "maxSize": 1073741824, - "name": "Compressed Class Space", - "useRate": 0.007893860340118408, - "useSize": 8475968 - }, - { - "initSize": 68222976, - "maxSize": 279183360, - "name": "Par Eden Space", - "useRate": 0.13357790378337736, - "useSize": 37292728 - }, - { - "initSize": 8519680, - "maxSize": 34865152, - "name": "Par Survivor Space", - "useRate": 0.16272110329534775, - "useSize": 5673296 - }, - { - "initSize": 170590208, - "maxSize": 12535988224, - "name": "CMS Old Gen", - "useRate": 0.10908497228658533, - "useSize": 1367487928 - } - ], - "osName": "Linux 3.10.0-1160.49.1.el7.x86_64", - "processCpuRate": 0.012658227848101266, - "threadCount": 185, - "totalMemory": 16260251648 - }, - "passiveConnectCount": 3, - "peerList": [ - { - "active": true, - "avgLatency": 0, - "blockInPorcSize": 0, - "connectTime": 1681960376733, - "disconnectTimes": 0, - "headBlockTimeWeBothHave": 0, - "headBlockWeBothHave": "Num:33868390,ID:000000000204ca664c3e79e480b435591d53e0bcd7d8697a0b11e51ece052e84", - "host": "/54.186.12.211", - "inFlow": 0, - "lastBlockUpdateTime": 1684738920033, - "lastSyncBlock": "", - "localDisconnectReason": "", - "needSyncFromPeer": false, - "needSyncFromUs": false, - "nodeCount": 4, - "nodeId": "2e278e5e01e48a4da86d0ee547447917cbf08433fdb438e22cf0f2362d09ee33412a7f035e53931efed83f22e72b705044384db2a09e59885310574d06b33f8d", - "port": 16666, - "remainNum": 0, - "remoteDisconnectReason": "", - "score": 0, - "syncBlockRequestedSize": 0, - "syncFlag": false, - "syncToFetchSize": 0, - "syncToFetchSizePeekNum": -1, - "unFetchSynNum": 0 - }, - { - "active": true, - "avgLatency": 0, - "blockInPorcSize": 0, - "connectTime": 1681960358724, - "disconnectTimes": 0, - "headBlockTimeWeBothHave": 0, - "headBlockWeBothHave": "Num:33824159,ID:0000000002041d9f47331f314d2e124dde87180cae606f005d8c26023a1c2e21", - "host": "/54.69.254.172", - "inFlow": 0, - "lastBlockUpdateTime": 1684588047076, - "lastSyncBlock": "Num:33217176,ID:0000000001fada9882d944c94f79b01305e0bfdc43536fc9530eecc16ae1ac49", - "localDisconnectReason": "", - "needSyncFromPeer": false, - "needSyncFromUs": false, - "nodeCount": 4, - "nodeId": "2e278e5e01e48a4da86d0ee547447917cbf08433fdb438e22cf0f2362d09ee33412a7f035e53931efed83f22e72b705044384db2a09e59885310574d06b33f8d", - "port": 16666, - "remainNum": 0, - "remoteDisconnectReason": "", - "score": 0, - "syncBlockRequestedSize": 0, - "syncFlag": false, - "syncToFetchSize": 0, - "syncToFetchSizePeekNum": -1, - "unFetchSynNum": 0 - }, - { - "active": false, - "avgLatency": 0, - "blockInPorcSize": 0, - "connectTime": 1682772783216, - "disconnectTimes": 0, - "headBlockTimeWeBothHave": 0, - "headBlockWeBothHave": "Num:33868413,ID:000000000204ca7d21eec047b7bd9659e633f27eabe7133aa8ae1f35c7800835", - "host": "/54.69.105.245", - "inFlow": 0, - "lastBlockUpdateTime": 1684738998026, - "lastSyncBlock": "Num:33524301,ID:0000000001ff8a4dd686ace89310555cacfdaa929ea24de2bff34369fce82a64", - "localDisconnectReason": "", - "needSyncFromPeer": false, - "needSyncFromUs": false, - "nodeCount": 4, - "nodeId": "2e278e5e01e48a4da86d0ee547447917cbf08433fdb438e22cf0f2362d09ee33412a7f035e53931efed83f22e72b705044384db2a09e59885310574d06b33f8d", - "port": 16666, - "remainNum": 0, - "remoteDisconnectReason": "", - "score": 0, - "syncBlockRequestedSize": 0, - "syncFlag": false, - "syncToFetchSize": 0, - "syncToFetchSizePeekNum": -1, - "unFetchSynNum": 0 - }, - { - "active": false, - "avgLatency": 71, - "blockInPorcSize": 0, - "connectTime": 1681961633946, - "disconnectTimes": 0, - "headBlockTimeWeBothHave": 0, - "headBlockWeBothHave": "Num:33868413,ID:000000000204ca7d21eec047b7bd9659e633f27eabe7133aa8ae1f35c7800835", - "host": "/47.90.207.227", - "inFlow": 0, - "lastBlockUpdateTime": 1684738998108, - "lastSyncBlock": "Num:33156658,ID:0000000001f9ee326f10e9b927216b5459579e57b781b9f6702a4d76e205ef7b", - "localDisconnectReason": "", - "needSyncFromPeer": false, - "needSyncFromUs": false, - "nodeCount": 4, - "nodeId": "2e278e5e01e48a4da86d0ee547447917cbf08433fdb438e22cf0f2362d09ee33412a7f035e53931efed83f22e72b705044384db2a09e59885310574d06b33f8d", - "port": 16666, - "remainNum": 0, - "remoteDisconnectReason": "", - "score": 0, - "syncBlockRequestedSize": 0, - "syncFlag": false, - "syncToFetchSize": 0, - "syncToFetchSizePeekNum": -1, - "unFetchSynNum": 0 - }, - { - "active": false, - "avgLatency": 75, - "blockInPorcSize": 0, - "connectTime": 1682398959068, - "disconnectTimes": 1, - "headBlockTimeWeBothHave": 0, - "headBlockWeBothHave": "Num:33868050,ID:000000000204c91264aedf926cd8f53e9d67ec2e1ccf6d0da98fbf3ab12ed27f", - "host": "/47.89.186.34", - "inFlow": 0, - "lastBlockUpdateTime": 1684737768295, - "lastSyncBlock": "", - "localDisconnectReason": "", - "needSyncFromPeer": false, - "needSyncFromUs": false, - "nodeCount": 4, - "nodeId": "2e278e5e01e48a4da86d0ee547447917cbf08433fdb438e22cf0f2362d09ee33412a7f035e53931efed83f22e72b705044384db2a09e59885310574d06b33f8d", - "port": 16666, - "remainNum": 0, - "remoteDisconnectReason": "TIME_OUT", - "score": 0, - "syncBlockRequestedSize": 0, - "syncFlag": false, - "syncToFetchSize": 0, - "syncToFetchSizePeekNum": -1, - "unFetchSynNum": 0 - } - ], - "solidityBlock": "Num:33868395,ID:000000000204ca6bce66b0a2b5694dffbb37eb2ff3f83040457f4c88115c0ee3", - "totalFlow": 0 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getnowblock.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getnowblock.md deleted file mode 100644 index 82f53744..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getnowblock.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "getnowblock" -slug: "rpc-tron-getnowblock" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum'; - -const tatum = await TatumSDK.init({ network: Network.TRON }); - -const res = await tatum.rpc.getNowBlock(); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getNowBlock()` method is used to query the latest block information on the TRON network. It interacts with the TRON RPC to fetch the data, making it a crucial function for applications needing real-time information about the TRON blockchain. Examples of such applications include blockchain explorers, cryptocurrency wallets, or decentralised applications. - -{% embed url=" %} - -### Parameters - -This method doesn't require any parameters. - -### Return Object - -- `blockID` (string): The block hash. -- `block_header` (object) - - `raw_data` (object) - - `timestamp` (integer): The timestamp of the block. - - `txTrieRoot` (string): The root of the transaction merkle tree. - - `parentHash` (string): The parent block hash. - - `number` (integer): The block number. - - `witness_id` (integer): The witness id. - - `witness_address` (string): The witness address. - - `version` (integer): The version. - - `accountStateRoot` (string): The root of the account state tree. - - `witness_signature` (string): The signature of the Super Representative (SR). -- `transactions` (Array): Contains transaction information in the block. - - `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). - - `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. - - `raw_data.data` - Transaction memo. - - `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. - - `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. - - `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. - - `txID` - transaction id - -### HTTP Request Example - -```bash -{} -``` - -### HTTP Response Example - -The HTTP response for the `getNowBlock()` function is a JSON object representing the latest block data. The exact fields can vary due to the dynamic nature of the blockchain data. Here is an example of how the HTTP response could look like: - -```json -{ - "blockID": "000000000203c44fb29c8b78d653607e5b7c210a9b415c0daa1f84f00c8fa9af", - "block_header": { - "raw_data": { - "number": 33801295, - "txTrieRoot": "0000000000000000000000000000000000000000000000000000000000000000", - "witness_address": "41977f82c69011cf4a7db6f7339edcded85c614d45", - "parentHash": "000000000203c44e82ebe5332248e40efa68a5243458dc398628b1ce05db0d36", - "version": 27, - "timestamp": 1684510050000 - }, - "witness_signature": "05cd4c14889dc39a0465fc6c769fb6c39f986c90cfe0ef8cbf4be6402f7b25b613b97c4c7ee2e411b908d53658752102a7292a4965002609a50e075f171c151e01" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getpaginatedassetissuelist.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getpaginatedassetissuelist.md deleted file mode 100644 index 73072f34..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-getpaginatedassetissuelist.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: "getpaginatedassetissuelist" -slug: "rpc-tron-getpaginatedassetissuelist" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:45 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -Use the Tatum SDK to access the TRON network as follows: - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.getPaginatedAssetIssueList(0, 20) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -- `assetIssue`: (array) - - `id`: (integer) token ID - - `owner_address`: (string) issuer address - - `name`: (string) token name - - `abbr`: (string) token abbreviation - - `total_supply`: (integer) total supply - - `frozen_supply`: (Array) The number of tokens to be frozen is specified by the issuer of the token when it is issued - - `trx_num`: (integer) Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN) - - `precision`: (integer) precision - - `num`: (integer) Define the price by the ratio of trx\_num/num(The unit of 'trx\_num' is SUN) - - `start_time`: (integer) ICO start time - - `end_time`: (integer) ICO end time - - `description`: (string) token description - - `url`: (string) Token official website url, default hexString - - `free_asset_net_limit`: (integer) Token free asset net limit - - `public_free_asset_net_limit`: (integer) Token public free asset net limit for a account - - `public_free_asset_net_usage`: (integer) The total number of token free bandwidth used by all token owner - - `public_latest_free_net_time`: (integer) The timestamp of the last consumption of this token's free bandwidth - -{% embed url=" %} - -### Parameters - -1. `offset` (integer) - The index of the start token. This parameter allows you to specify the starting point in the list of tokens. -2. `limit` (integer) - The amount of tokens per page. This parameter allows you to limit the number of tokens returned in a single request. - -### Return Object - -This method returns a promise that resolves to an array of `AssetIssueCapsule` objects. Each `AssetIssueCapsule` object represents a TRC10 token and includes detailed fields as described in the `GetAssetIssueByAccount` method. - -### HTTP Request Example - -A typical HTTP request using this method looks like this: - -```json -{ - "offset": 0, - "limit": 20 -} -``` - -### HTTP Response Example - -```json -{ - "assetIssue": [ - { - "owner_address": "41f3642e1824d654fed5e71f850fd82d24ed8545ed", - "name": "2e6874616363657373", - "abbr": "74657374", - "total_supply": 1000000000, - "trx_num": 1, - "precision": 6, - "num": 1, - "start_time": 1629878133455, - "end_time": 1629978123454, - "description": "74657374", - "url": "68747470733a2f2f73757065726d61747269782e696f", - "id": "1000942" - }, - { - "owner_address": "411fafb1e96dfe4f609e2259bfaf8c77b60c535b93", - "name": "303734363537333734", - "abbr": "36353738363136643730366336353631363236323732", - "total_supply": 100000000, - "frozen_supply": [ - { - "frozen_amount": 1, - "frozen_days": 2 - } - ], - "trx_num": 1, - "num": 1, - "start_time": 1576684800000, - "end_time": 1576728000000, - "description": "3635373836313664373036633635323036343635373336333732363937303734363936663665", - "url": "373737373737326536353738363136643730366336353265363336663664", - "free_asset_net_limit": 10000, - "public_free_asset_net_limit": 10000, - "id": "1000030" - }, - { - "owner_address": "414f10065476e61054dad85d1c9a32cf429a6bc8cd", - "name": "3077426974636f696e", - "abbr": "57425443", - "total_supply": 100000000000000, - "trx_num": 6000000, - "precision": 4, - "num": 10000, - "start_time": 1609023600000, - "end_time": 1609110000000, - "description": "426974636f696e20546f6b656e", - "url": "68747470733a2f2f7368617374612e74726f6e7363616e2e6f72672f232f", - "id": "1000507" - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactionbyid.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactionbyid.md deleted file mode 100644 index efa3f8b2..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactionbyid.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: "gettransactionbyid" -slug: "rpc-tron-gettransactionbyid" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const transaction = await tatum.rpc.getTransactionById('7c2d4206c03a883dd9066d620335dc1be272a8dc733cfa3f6d10308faa37facc', { -visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTransactionById` method is used to query transaction information using a transaction ID on the TRON network. This can be beneficial in several use cases, such as retrieving details about a specific transaction, verifying the transaction status, and checking the transaction content. - -{% embed url=" %} - -### Parameters - -- `value` (string): ID of the transaction to be queried. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Whether the address is in base58 format. - -### Return Object - -The method returns a Promise resolving to a Transaction object containing: - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -### HTTP Request Example - -```json -{ - "value": "0x94eea63bb6774c1565a5a5adc37cc8b73bb5292c63f7829231e195314d338b98", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "ret": [ - { - "contractRet": "SUCCESS" - } - ], - "signature": [ - "90f1b82fecfef333afc338d243bfd7e6506fc400f5cbb74034d2eff58ba04d520b5d12ab34f8dfd4d29e999ca1f86184670df41e0aa6131b38e52289acb6499000" - ], - "txID": "7c2d4206c03a883dd9066d620335dc1be272a8dc733cfa3f6d10308faa37facc", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "amount": 2000000, - "owner_address": "TMmYhZ5XyjWwkPSLizzMoqyQLVrwqDdH5Y", - "to_address": "TEouV6gdGqZvFDde6dDKHBJgbVFV2NW48T" - }, - "type_url": "type.googleapis.com/protocol.TransferContract" - }, - "type": "TransferContract" - } - ], - "ref_block_bytes": "b663", - "ref_block_hash": "fb1feb948ee9fff2", - "expiration": 1681403964000, - "fee_limit": 500000, - "timestamp": 1681368025716 - }, - "raw_data_hex": "0a02b6632208fb1feb948ee9fff240e0d4f1dbf7305a67080112630a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412320a1541816cf60987aa124eed29db9a057e476861b8d8dc1215413516435fb1e706c51efff614c7e14ce2625f28e51880897a70f494e0caf7309001a0c21e" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactioninfobyblocknum.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactioninfobyblocknum.md deleted file mode 100644 index 6e03ff52..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactioninfobyblocknum.md +++ /dev/null @@ -1,352 +0,0 @@ ---- -title: "gettransactioninfobyblocknum" -slug: "rpc-tron-gettransactioninfobyblocknum" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -You can use the `getTransactionInfoByBlockNum` method with Tatum SDK by following the below example: - -
// yarn add @tatumio/tatum
-
-import { TatumSDK, Tron, Network } from '@@tatumio/tatum'
-
-const tatum = await TatumSDK.init({network: Network.TRON})
-
-const transactionInfo = await tatum.rpc.getTransactionInfoByBlockNum(1000000)
-
-await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
-
- -Replace `1000000` with the actual block height that you want to get information about. - -### Overview - -The `getTransactionInfoByBlockNum` method allows you to query the TransactionInfo data of all transactions contained in the block of a specified height. This can be particularly useful when you need to track the status of all transactions within a particular block or analyse the transactions for auditing purposes. - -{% embed url=" %} - -### Parameters - -The `getTransactionInfoByBlockNum` method requires the following parameter: - -- `num`: The block height you want to get transaction information about. It should be an integer. - -### Return Object - -Array of: - -- `id`: The transaction ID (string) -- `fee`: The total number of TRX burned in this transaction, represented as an integer. -- `blockNumber`: The block number (integer) -- `blockTimeStamp`: The block timestamp, in milliseconds (integer) -- `contractResult`: Transaction execution results (string array) -- `contract_address`: Contract address (string) -- `receipt`: Transaction receipt, including transaction execution result and transaction fee details. It contains the following fields: - - `energy_usage`: The amount of energy consumed in the caller's account - - `energy_fee`: The amount of TRX burned to pay for energy - - `origin_energy_usage`: The amount of energy consumed in the contract deployer's account - - `energy_usage_total`: The total amount of energy consumed by the transaction - - `net_usage`: The amount of bandwidth consumed - - `net_fee`: The amount of TRX burned to pay for the bandwidth - - `result`: Transaction execution result - - `energy_penalty_total`: The amount of extra energy that needs to be paid for calling a few popular contracts -- `log`: The log of events triggered during the smart contract call. -- `result`: Execution results. If the execution is successful, the field will not be displayed in the returned value, if the execution fails, the field will be "FAILED" -- `resMessage`: When the transaction execution fails, the details of the failure will be returned through this field. Hex format, you can convert it to a string to get plaintext information. -- `withdraw_amount`: For the withdrawal reward transaction, unfreeze transaction, they will withdraw the vote reward to account. The number of rewards withdrawn to the account is returned through this field, and the unit is sun. -- `unfreeze_amount`: In the Stake1.0 stage, for unstaking transactions, this field returns the amount of unstaked TRX, the unit is sun. -- `internal_transactions`: Internal transaction -- `withdraw_expire_amount`: In the Stake2.0 stage, for unstaking transactions and withdrawing unfrozen balance transactions, this field returns the amount of unfrozen TRX withdrawn to the account in this transaction, the unit is sun. - -### HTTP Request Example - -```json -{ - "num": 1000000 -} -``` - -### HTTP Response Example - -```json -[ - { - "log": [ - { - "address": "7090190c41ba59f763e2cbe7d885e007e94be5d2", - "data": "000000000000000000000000000000000000000000000000000000051f5e04fa0000000000000000000000000000000000000000000000000000000004a9681c0000000000000000000000000000000000000000000000000000000004a8fe4001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000", - "topics": [ - "baca790fd027b9b7f36b90c3084718a3a039693cdf83844342f5f1edc839c3af" - ] - } - ], - "blockNumber": 1000000, - "contractResult": [ - "" - ], - "blockTimeStamp": 1578594852000, - "receipt": { - "result": "SUCCESS", - "energy_usage": 124980, - "energy_usage_total": 124980, - "net_usage": 668 - }, - "id": "7faabd22623eb53467d34b2a417262f6df75433566c104b6c6eec5a227090df6", - "contract_address": "417090190c41ba59f763e2cbe7d885e007e94be5d2" - }, - { - "log": [ - { - "address": "8d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "data": "0000000000000000000000000000000000000000000000000000000001c890cf00000000000000000000000000000000000000000000000000000000000000150000000000000000000000000000000000000000000000000000000000000002", - "topics": [ - "50b0fde04a05002ee4ba3c03973059b7d8af741148bf53ff213e39d2867a7930", - "000000000000000000000000ed2f4270fa5a7cae1efd4706ae27a4335406921e" - ] - }, - { - "address": "8d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "data": "0000000000000000000000000000000000000000000000000000000001cef96f", - "topics": [ - "6a965f98da6f13a2ccafa10fd99074eb59617607c5c8153ceded5713e33c2cc1" - ] - }, - { - "address": "8d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "data": "000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000d59f800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000290000000000000000000000000000000000000000000000000000000000000000", - "topics": [ - "df1b2fae932fd98400d3d19f3d68900102b199899050d106565310ffd640c594", - "000000000000000000000000ed2f4270fa5a7cae1efd4706ae27a4335406921e" - ] - } - ], - "fee": 433850, - "blockNumber": 1000000, - "contractResult": [ - "0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000001cef96f00000000000000000000000000000000000000000000000000000000000000290000000000000000000000000000000000000000000000000000000000000000" - ], - "blockTimeStamp": 1578594852000, - "receipt": { - "result": "SUCCESS", - "energy_fee": 433850, - "energy_usage_total": 43385, - "net_usage": 384 - }, - "id": "98d0f4149bf8023a9df4d2b754f6c728a5b6d021c4497c6cd5452b97f01b0548", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "internal_transactions": [ - { - "caller_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "note": "63616c6c", - "transferTo_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "callValueInfo": [ - {} - ], - "hash": "ef89ade61942aa3371a3f006e6406fd4758ef648ee38c04f70a57b296668d3ed" - }, - { - "caller_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "note": "63616c6c", - "transferTo_address": "413a5bfb715d2086ec513b64e98531e2f58154c44c", - "callValueInfo": [ - { - "callValue": 700000 - } - ], - "hash": "a630ff6999c4762637d5cecf109c55e225064bd11afcbb1ae301fbaa21cf3a78" - } - ] - }, - { - "log": [ - { - "address": "79c23a5666042e40420d6afdc1541e3926205eba", - "data": "000000000000000000000000000000000000000000000000000000051f5e04fa", - "topics": [ - "678ae61fcbde3426947a5076f2541a6705fa78577e819a420c826e9c722ff792" - ] - } - ], - "blockNumber": 1000000, - "contractResult": [ - "" - ], - "blockTimeStamp": 1578594852000, - "receipt": { - "result": "SUCCESS", - "energy_usage": 28643, - "energy_usage_total": 28643, - "net_usage": 346 - }, - "id": "17e7321320bb08c40f027cbcca320152c2396c77a910f387849a944ee8aa0cb1", - "contract_address": "4179c23a5666042e40420d6afdc1541e3926205eba", - "internal_transactions": [ - { - "caller_address": "4179c23a5666042e40420d6afdc1541e3926205eba", - "note": "63616c6c", - "transferTo_address": "4179c23a5666042e40420d6afdc1541e3926205eba", - "callValueInfo": [ - {} - ], - "hash": "60b85ea10861cd2352f34de84fe72792fa9f02165f215f4432a54b152a30eb8e" - } - ] - }, - { - "log": [ - { - "address": "8d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "data": "0000000000000000000000000000000000000000000000000000000001cef96f00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001", - "topics": [ - "50b0fde04a05002ee4ba3c03973059b7d8af741148bf53ff213e39d2867a7930", - "000000000000000000000000f07e117a4b5f1fda66f8fcedf44065f1dafc5ad7" - ] - }, - { - "address": "8d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "data": "00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000007622eb8000000000000000000000000000000000000000000000000000000000a9aba44200000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000001f0000000000000000000000000000000000000000000000000000000000000000", - "topics": [ - "df1b2fae932fd98400d3d19f3d68900102b199899050d106565310ffd640c594", - "000000000000000000000000f07e117a4b5f1fda66f8fcedf44065f1dafc5ad7" - ] - } - ], - "fee": 376380, - "blockNumber": 1000000, - "contractResult": [ - "0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000a9aba4420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000001cef96f000000000000000000000000000000000000000000000000000000000000001f0000000000000000000000000000000000000000000000000000000000000000" - ], - "blockTimeStamp": 1578594852000, - "receipt": { - "result": "SUCCESS", - "energy_fee": 376380, - "energy_usage_total": 37638, - "net_usage": 385 - }, - "id": "4ef51a5760bf98dc2dd752658f48db1445e8ca75f8a6efe14d5a462a15edd3f0", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "internal_transactions": [ - { - "caller_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "note": "63616c6c", - "transferTo_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "callValueInfo": [ - {} - ], - "hash": "ebd48b28e91e23a0f190b2ef898c6c89d0723759eb17ceb9203fcd6a4b0b313e" - }, - { - "caller_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "note": "63616c6c", - "transferTo_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "callValueInfo": [ - {} - ], - "hash": "4369d49d09a1d17cbff6a3c69e3bcd081f4c1d10fc176cab53371908e03819f1" - }, - { - "caller_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "note": "63616c6c", - "transferTo_address": "41f07e117a4b5f1fda66f8fcedf44065f1dafc5ad7", - "callValueInfo": [ - { - "callValue": 2457950000 - } - ], - "hash": "b31eeb5d614133be49ff5be526d8bd258583b478c5daad9713b68591141b5f10" - } - ] - }, - { - "log": [ - { - "address": "8d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "data": "0000000000000000000000000000000000000000000000000000000001cef96f000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000002", - "topics": [ - "50b0fde04a05002ee4ba3c03973059b7d8af741148bf53ff213e39d2867a7930", - "0000000000000000000000009ac63dd8e80daf0a786bf962860e2209b7fa5fb9" - ] - }, - { - "address": "8d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "data": "0000000000000000000000000000000000000000000000000000000001d4027f", - "topics": [ - "6a965f98da6f13a2ccafa10fd99074eb59617607c5c8153ceded5713e33c2cc1" - ] - }, - { - "address": "8d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "data": "000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000a7d8c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000", - "topics": [ - "df1b2fae932fd98400d3d19f3d68900102b199899050d106565310ffd640c594", - "0000000000000000000000009ac63dd8e80daf0a786bf962860e2209b7fa5fb9" - ] - } - ], - "fee": 433850, - "blockNumber": 1000000, - "contractResult": [ - "0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000001d4027f00000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000" - ], - "blockTimeStamp": 1578594852000, - "receipt": { - "result": "SUCCESS", - "energy_fee": 433850, - "energy_usage_total": 43385, - "net_usage": 384 - }, - "id": "80e07e3f2b92a0e9974b1398964e006288836dee82aa3a81e579a512e6581354", - "contract_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "internal_transactions": [ - { - "caller_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "note": "63616c6c", - "transferTo_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "callValueInfo": [ - {} - ], - "hash": "3e32e3a6ef17975e8d2ac842a520cef987bf9d93d7c2538857b06d1c792da36e" - }, - { - "caller_address": "418d9dd663cf90256fdf2faba2a1be71f8a0147f8c", - "note": "63616c6c", - "transferTo_address": "413a5bfb715d2086ec513b64e98531e2f58154c44c", - "callValueInfo": [ - { - "callValue": 550000 - } - ], - "hash": "bc9897f79e4eaa5f795626b853a29baacb132283f5d0e6f94c0462894683cf9b" - } - ] - }, - { - "fee": 3130, - "blockNumber": 1000000, - "contractResult": [ - "" - ], - "blockTimeStamp": 1578594852000, - "receipt": { - "result": "SUCCESS", - "net_fee": 3130, - "energy_usage": 328466, - "energy_usage_total": 328466 - }, - "id": "ba8e727c03d588619310d7a16a95fcfd31a516dbf8893ddd585e0bbd7e0deae4", - "contract_address": "41174e91a57d68f5ac1bc485d03a038fe745a3b89b" - } -] -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactioninfobyid.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactioninfobyid.md deleted file mode 100644 index b1b75bbf..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-gettransactioninfobyid.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "gettransactioninfobyid" -slug: "rpc-tron-gettransactioninfobyid" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const transactionInfo = await tatum.rpc.getTransactionInfoById('7c2d4206c03a883dd9066d920335dc1be272a8dc733cfa3f6d10308faa37facc') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `getTransactionInfoById` method allows you to query the transaction fee, block height, and other related information by a transaction id. This can be particularly useful when you need to track the status of specific transactions or analyse the transactions for auditing purposes. - -{% embed url=" %} - -### Parameters - -- `value`: The transaction hash, or transaction ID, you want to get information about. It should be a string. - -### Return Object - -- `id`: The transaction ID (string) -- `fee`: The total number of TRX burned in this transaction, represented as an integer. -- `blockNumber`: The block number (integer) -- `blockTimeStamp`: The block timestamp, in milliseconds (integer) -- `contractResult`: Transaction execution results (string array) -- `contract_address`: Contract address (string) -- `receipt`: Transaction receipt, including transaction execution result and transaction fee details. It contains the following fields: - - `energy_usage`: The amount of energy consumed in the caller's account - - `energy_fee`: The amount of TRX burned to pay for energy - - `origin_energy_usage`: The amount of energy consumed in the contract deployer's account - - `energy_usage_total`: The total amount of energy consumed by the transaction - - `net_usage`: The amount of bandwidth consumed - - `net_fee`: The amount of TRX burned to pay for the bandwidth - - `result`: Transaction execution result - - `energy_penalty_total`: The amount of extra energy that needs to be paid for calling a few popular contracts -- `log`: The log of events triggered during the smart contract call. -- `result`: Execution results. If the execution is successful, the field will not be displayed in the returned value, if the execution fails, the field will be "FAILED" -- `resMessage`: When the transaction execution fails, the details of the failure will be returned through this field. Hex format, you can convert it to a string to get plaintext information. -- `withdraw_amount`: For the withdrawal reward transaction, unfreeze transaction, they will withdraw the vote reward to account. The number of rewards withdrawn to the account is returned through this field, and the unit is sun. -- `unfreeze_amount`: In the Stake1.0 stage, for unstaking transactions, this field returns the amount of unstaked TRX, the unit is sun. -- `internal_transactions`: Internal transaction -- `withdraw_expire_amount`: In the Stake2.0 stage, for unstaking transactions and withdrawing unfrozen balance transactions, this field returns the amount of unfrozen TRX withdrawn to the account in this transaction, the unit is sun. - -### HTTP Request Example - -```json -{ - "value": "0x94eea63bb6774c1565a5a5adc37cc8b73bb5292c63f7829231e195314d338b98", -} -``` - -### HTTP Response Example - -```json -{ - "id": "7c2d4206c03a883dd9066d620335dc1be272a8dc733cfa3f6d10308faa37facc", - "fee": 1100000, - "blockNumber": 32880248, - "blockTimeStamp": 1681368027000, - "contractResult": [ - "" - ], - "receipt": { - "net_fee": 100000 - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-listnodes.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-listnodes.md deleted file mode 100644 index f9f54a46..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-listnodes.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "listnodes" -slug: "rpc-tron-listnodes" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -You can interact with the TRON blockchain by using the `listNodes` method in the Tatum SDK. Here's an example: - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// Import necessary components from the SDK -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({ network: Network.TRON }) - -// Use the RPC method -const nodeList = await tatum.rpc.listNodes() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `listNodes` method is an RPC method provided by the TRON blockchain. It returns a list of nodes connected to the TRON network, including their host addresses and ports. This information can be used for various purposes, such as network analysis, node performance assessment, or setting up a new node connection. - -{% embed url=" %} - -### Parameters - -The `listNodes` method does not accept any parameters. - -### Return Object - -- `nodes` (array) - - `address` (object) - - `host` (string): The host address of the node. - - `port` (integer): The port number of the node. - -### HTTP Request Example - -```bash -{} -``` - -### HTTP Response Example - -```json -{ - "nodes": [ - { - "address": { - "host": "34372e38392e3138362e3334", - "port": 16666 - } - }, - { - "address": { - "host": "35322e31312e34322e3439", - "port": 16666 - } - }, - { - "address": { - "host": "34372e39302e3230372e323237", - "port": 16666 - } - }, - { - "address": { - "host": "34372e39302e3230362e313439", - "port": 16666 - } - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-participateassetissue.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-participateassetissue.md deleted file mode 100644 index 8302b06f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-participateassetissue.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: "participateassetissue" -slug: "rpc-tron-participateassetissue" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use It - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.participateAssetIssue( - 'TPswDDCAWhJAZG5nEf8TkNToDX1', - 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', - '1000001031303030303031', - 100000, - { - visible: true, - } -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `participateAssetIssue` method allows an account to participate in a token issuance on the TRON blockchain. This participation involves purchasing the issued tokens with TRX, the native currency of TRON. The method returns an unsigned transaction object which contains the details of the ParticipateAssetIssueContract. - -### Parameters - -- `toAddress` (string): The issuer's address. -- `ownerAddress` (string): The account address participating in the token issuance. -- `assetName` (string): The token ID. -- `amount` (integer): The amount of TRX used to purchase the issued token. The unit is in sun. -- `options` (object, optional): Additional options, which include: - - `visible` (boolean, optional): Specifies whether the address is in base58 format. - -### Return Object - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `ParticipateAssetIssueContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` - Account address participating in the token issuance. (Type: string) -- `to_address` - The issuer's address. (Type: string) -- `asset_name` - Token ID. (Type: string) -- `amount` - The amount of TRX used to purchase the issued token. Unit is in sun. (Type: integer - -### HTTP Request Example - -```json -{ - "to_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "asset_name": "1000001031303030303031", - "amount": 100000, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "1789f68952b601243e09fc851eeed547cc1c9e16b0fc2cb6bf219aa07a1a8a9c", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "start_time": 2684752341111, - "trx_num": 1, - "frozen_supply": [ - { - "frozen_amount": 1, - "frozen_days": 2 - } - ], - "total_supply": 100, - "num": 1, - "name": "asdfasdfadsf", - "end_time": 2684752345111, - "description": "0x4578616d706c654465736372697074696f6e", - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "abbr": "asdfsdf", - "url": "0x7777772e6578616d706c652e636f6d" - }, - "type_url": "type.googleapis.com/protocol.ParticipateAssetIssueContract" - }, - "type": "ParticipateAssetIssueContract" - } - ], - "ref_block_bytes": "e206", - "ref_block_hash": "034cf77f0ad4956a", - "expiration": 1684759677000, - "timestamp": 1684759617932 - }, - "raw_data_hex": "0a02e2062208034cf77f0ad4956a40c890829c84315acd01080612c8010a2f747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e41737365744973737565436f6e74726163741294010a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e120c6173646661736466616473661a076173646673646620642a04080110023001400148f7d0d6bd914e5097f0d6bd914ea201263078343537383631366437303663363534343635373336333732363937303734363936663665aa01203078373737373737326536353738363136643730366336353265363336663664708cc3fe9b8431" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-transferasset.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-transferasset.md deleted file mode 100644 index 4d5557bb..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-transferasset.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "transferasset" -slug: "rpc-tron-transferasset" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, TransferAssetIssueByAccountOptions } from '@tatumio/tatum' -import { BigNumber } from 'bignumber.js'; - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const options: TransferAssetIssueByAccountOptions = { - // optional parameters -}; - -const ownerAddress = "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g"; -const toAddress = "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1"; -const assetName = "31303030303031"; -const amount = new BigNumber(1); - -const res = await tatum.rpc.transferAsset(ownerAddress, toAddress, assetName, amount, options); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `transferAsset` method is used to transfer TRC10 tokens from one address to another on the TRON network. This could be used in a variety of situations, such as transferring tokens to a user's account after they've made a purchase, or redistributing tokens between accounts as part of a dApp's internal logic. - -### Parameters - -- `ownerAddress` (string) - The account address from which the tokens are transferred. -- `toAddress` (string) - The target address to receive the transferred tokens. -- `assetName` (string) - The token ID to transfer. -- `amount` (BigNumber) - The amount of token to transfer. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean) - Whether the address is in base58 format. - - `extraData` (string) - Notes on the transaction, HEX format. - -### Return Object - -`transaction` (`TransferContract`): - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `TransferAssetContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` (string): Transaction initiator's address. -- `asset_name` (string): The token id to transfer -- `to_address` (string): The target address to transfer -- `amount` (integer): The amount of token to transfer. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "to_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "asset_name": "31303030303031", - "amount": 1, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "094d59ae6c22cb6f206f4b263eec54a1dbfc1d1704d0c43a31d90b8b66ee4fbb", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "amount": 1000, - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "to_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "asset_name: "62747474657374" - }, - "type_url": "type.googleapis.com/protocol.TransferContract" - }, - "type": "TransferContract" - } - ], - "ref_block_bytes": "ab93", - "ref_block_hash": "88c6e64972349f0f", - "expiration": 1684488576000, - "timestamp": 1684488517323 - }, - "raw_data_hex": "0a02ab93220888c6e64972349f0f4080b8df9a83315a66080112620a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412310a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12154198927ffb9f554dc4a453c64b2e553a02d6df514b18e80770cbeddb9a8331" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-triggerconstantcontract.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-triggerconstantcontract.md deleted file mode 100644 index cb179763..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-triggerconstantcontract.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: "triggerconstantcontract" -slug: "rpc-tron-triggerconstantcontract" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.triggerConstantContract( - 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', - 'TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs', - 'balanceOf(address)', - '000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c', - { - visible: true, - } -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `triggerConstantContract` method is used to interact with smart contracts on the TRON blockchain. It allows you to invoke either readonly (view or pure) or non-readonly functions of a contract for contract data queries or estimating energy consumption. Notably, this operation does not generate an on-chain transaction and does not change the status of the current node. - -### Parameters - -- `ownerAddress` (string): The owner's address that triggers the contract. Use base58check format if visible=true, otherwise use hex format. -- `contractAddress` (string): The smart contract address. Use base58check format if visible=true, otherwise use hex format. -- `functionSelector` (string): The function call; must not be left blank. -- `parameter` (string): The parameter encoding must be in accordance with the ABI rules. -- `options` (object, optional): Optional settings for the contract trigger, including: - - `callValue` (integer, optional): The amount of TRX transferred to the contract with this transaction, in sun. This field may be used when estimating energy consumption. - - `visible` (boolean, optional): Optional. Whether the address is in base58 format. - -### Return Object - -- `result` - - `result` - When error ocuurs, this is empty, otherwise true. - - `code` - Error code. - - `message -` Error message. -- `energy_used` (integer): The estimated energy consumption. -- `constant_result` (array of strings): The result list of triggered functions. -- `transaction`: Transaction information. For details, refer to GetTransactionByID. - - `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). - - `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. - - `raw_data.data` - Transaction memo. - - `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. - - `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. - - `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. - - `txID` - transaction id - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "function_selector": "balanceOf(address)", - "parameter": "000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "result": { - "result": true - }, - "energy_used": 541, - "constant_result": [ - "00000000000000000000000000000000000000000000000000000000000186a0" - ], - "transaction": { - "ret": [ - {} - ], - "visible": true, - "txID": "342791a4015feba921cea6e7c3e3d5ba4d1ede50f3508a686e643709b14abce2", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "70a08231000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c", - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "e80d", - "ref_block_hash": "7547cc93d09e65de", - "expiration": 1684764945000, - "timestamp": 1684764885358 - }, - "raw_data_hex": "0a02e80d22087547cc93d09e65de40e8d4c39e84315a8e01081f1289010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412540a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12154142a1e39aefa49290f2b3f9ed688d7cecf86cd6e0222470a08231000000000000000000000000a614f803b6fd780986a42c78ec9c7f77e6ded13c70ee82c09e8431" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-triggersmartcontract.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-triggersmartcontract.md deleted file mode 100644 index d2149da1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-triggersmartcontract.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: "triggersmartcontract" -slug: "rpc-tron-triggersmartcontract" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -Here is an example of how you can use the `triggerSmartContract` method with the Tatum SDK. - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const options = { - feeLimit: 1000000000, - callValue: 0, -} - -const result = await tatum.rpc.triggerSmartContract( - 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', - 'TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs', - 'transfer(address,uint256)', - '00000000000000000000004115208EF33A926919ED270E2FA61367B2DA3753DA0000000000000000000000000000000000000000000000000000000000000032', - options -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `triggerSmartContract` method is used to call a smart contract function on the TRON network. The function parameters are encoded according to the ABI rules and the method returns an unsigned transaction, ready to be signed and broadcasted to the network. This method can be used for interacting with deployed smart contracts and triggering their functions. - -### Parameters - -- `ownerAddress`(string): Account address triggering the contract, converted to a hex string. -- `contractAddress`(string): Smart contract address, converted to a hex string. -- `functionSelector`(string): Function call from the smart contract. Must not be left blank. -- `parameter`(string): Function parameters, encoded according to the ABI rules. -- `options`: (object, optional): Additional options for the contract triggering. - - `feeLimit`(integer, optional): Maximum TRX consumption, measured in SUN (1 TRX = 1,000,000 SUN). - - `callValue`(integer, optional): Amount of TRX transferred with this transaction, measured in SUN. - - `permission_id`(integer, optional): For multi-signature. - - `visible`(boolean, optional): Whether the address is in base58check format. - -### Return Object - -- `result` - - `result` - When error ocuurs, this is empty, otherwise true. - - `code` - Error code. - - `message -` Error message. -- `transaction` - - `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). - - `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. - - `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. - - `raw_data.data` - Transaction memo. - - `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. - - `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. - - `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. - - `txID` - transaction id - -Since the transaction type is `TriggerSmartContract`, the fields contained in `transaction.raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address`: string. Account address. -- `contract_address`: string. Contract address. -- `call_value`: integer. The amount of TRX passed into the contract. -- `data`: string. Operating parameters. -- `call_token_value`: integer. The amount of TRC-10 transferred into the contract. -- `token_id`: integer. TRC-10 token id. - -### HTTP Request Example - -Here is an example of an HTTP request to trigger a smart contract: - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "function_selector": "transfer(address,uint256)", - "parameter": "00000000000000000000004115208EF33A926919ED270E2FA61367B2DA3753DA0000000000000000000000000000000000000000000000000000000000000032", - "fee_limit": 1000000000, - "call_value": 0, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "result": { - "result": true - }, - "transaction": { - "visible": true, - "txID": "27318af0aca1e748919c9f28a40c66776d468d06ec936cad1f56130df7704db7", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "data": "a9059cbb00000000000000000000004115208ef33a926919ed270e2fa61367b2da3753da0000000000000000000000000000000000000000000000000000000000000032", - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs" - }, - "type_url": "type.googleapis.com/protocol.TriggerSmartContract" - }, - "type": "TriggerSmartContract" - } - ], - "ref_block_bytes": "e70f", - "ref_block_hash": "bde2c956cedbf2ae", - "expiration": 1684764078000, - "fee_limit": 1000000000, - "timestamp": 1684764019325 - }, - "raw_data_hex": "0a02e70f2208bde2c956cedbf2ae40b0df8e9e84315aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12154142a1e39aefa49290f2b3f9ed688d7cecf86cd6e02244a9059cbb00000000000000000000004115208ef33a926919ed270e2fa61367b2da3753da000000000000000000000000000000000000000000000000000000000000003270fd948b9e843190018094ebdc03" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_content.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_content.md deleted file mode 100644 index a41952af..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_content.md +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: "txpool_content" -slug: "rpc-tron-txpool_content" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const content = await tatum.rpc.txPoolContent() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `txpool_content` method provides information about the transactions currently pending in the transaction pool of the Flare node. It can be helpful for developers and node operators to monitor and manage the transaction pool, especially in scenarios where it's necessary to analyze transaction congestion or prioritize specific transactions. - -Use cases for the `txpool_content` method include: - -- Analyzing network congestion by inspecting the transaction pool -- Prioritizing transactions by gas price -- Monitoring transactions from specific addresses -- Debugging and troubleshooting pending transactions - -### Parameters - -This method does not require any parameters. - -### Return Object - -The `txpool_content` method returns an object with two fields: `pending` and `queued`. Each field contains a nested object with addresses as keys and their respective transactions as values. - -- **`pending`**: An object containing transactions that are currently pending for inclusion in the next block(s). -- **`queued`**: An object containing transactions that are currently queued (i.e., transactions that do not meet certain criteria for inclusion in the next block, like low gas price or nonce gaps). - -Each transaction object includes the following information: - -- **`hash`**: The hash of the transaction (32 bytes). -- **`nonce`**: The number of transactions sent by the sender prior to this one (integer). -- **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. -- **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. -- **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. -- **`from`**: The address of the sender (20 bytes). -- **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. -- **`value`**: The value transferred in the transaction, in wei. -- **`gasPrice`**: The price of gas for the transaction, in wei. -- **`maxFeePerGas`** - The maximum fee per gas set in the transaction. -- **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. -- **`gas`**: The maximum amount of gas the transaction is allowed to consume. -- **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. - -### JSON-RPC Request Example - -```json -jsonCopy code{ - "id": 1, - "jsonrpc": "2.0", - "method": "txpool_content", - "params": [] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "pending": { - "0x01d3B93AaADE8A4066DAaBc8fd8482173A6aD120": { - "197": { - "blockHash": null, - "blockNumber": null, - "from": "0x01d3b93aaade8a4066daabc8fd8482173a6ad120", - "gas": "0x1c9c380", - "gasPrice": "0x16cf917", - "maxFeePerGas": "0x16cf917", - "maxPriorityFeePerGas": "0x16cf917", - "hash": "0x1da9c2a8f0787bac4747c5ed1035e81f6a6745aeea43943e63635fc367b817f7", - "input": "0x00000000", - "nonce": "0xc5", - "to": "0x4f023eb8c6bc3116e35b67e03bf2c17f2e4f7e7e", - "transactionIndex": null, - "value": "0x0", - "type": "0x2", - "accessList": [], - "chainId": "0xaa36a7", - "v": "0x1", - "r": "0x14f7578b57fd9f87acf5bbceb0a47f2d2d3f39b49169357457618c9634c45e8a", - "s": "0x775fa9976c571751a79f069f8c96f6489f286246e157a31fa99b33062631b46d" - } - } - }, - "queued": { - "0x03321406635a04D37Cf9211F2ea3AFc83a87e777": { - "5096281": { - "blockHash": null, - "blockNumber": null, - "from": "0x03321406635a04d37cf9211f2ea3afc83a87e777", - "gas": "0x5208", - "gasPrice": "0xc570bd200", - "hash": "0x05f5fb8e46793fafdc924917c0afdd0afb4a53cb562542d5399234bc1eff759b", - "input": "0x", - "nonce": "0x4dc359", - "to": "0x77b1c86ab0aa9066803ed567e1f00973976638f6", - "transactionIndex": null, - "value": "0xb1a2b96602aa20", - "type": "0x0", - "chainId": "0xaa36a7", - "v": "0x1546d72", - "r": "0x62bd220b95ec13827c0d9b643b9beaf6f4c66d4a8ef08bb10f93d5e5c7ae0068", - "s": "0x467f76847cfdf43a002defe054030c1a88a9e6f56539c051c3cba46b2dd2cc89" - } - } - } - } -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_inspect.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_inspect.md deleted file mode 100644 index beba5641..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_inspect.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "txpool_inspect" -slug: "rpc-tron-txpool_inspect" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const inspect = await tatum.rpc.txPoolInspect() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `txpool_inspect` method is a JSON-RPC method used to inspect the current transaction pool of a running node. The method allows you to view all pending transactions and their details, including transaction hashes, gas prices, and transaction data. This method is useful for developers who want to monitor the status of pending transactions or debug transaction-related issues. - -### Parameters - -The `txpool_inspect` method takes one optional parameter: - -- **`include`**: A string specifying the type of transactions to include in the response. Possible values are **`pending`** (default) and **`queued`**. - -### Return Object - -The `txpool_inspect` method returns an object with the following fields: - -- **`pending`**: An array of transaction objects, with textual data -- **`queued`**: An array of transaction objects, with textual data - -## Example Request: - -```json -{ - "jsonrpc": "2.0", - "method": "txpool_inspect", - "params": [ - "pending" - ], - "id": 1 -} -``` - -## Example Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "pending": { - "0x01d3B93AaADE8A4066DAaBc8fd8482173A6aD120": { - "197": "0x4f023eB8C6BC3116E35B67E03bf2C17f2e4f7e7e: 0 wei + 30000000 gas × 23918871 wei" - } - }, - "queued": { - "0x03321406635a04D37Cf9211F2ea3AFc83a87e777": { - "5096281": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 49999988041886240 wei + 21000 gas × 53000000000 wei", - "8308536": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 100000000000000000 wei + 21000 gas × 53000000000 wei", - "231211221": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 1000000000000000 wei + 21000 gas × 11958113760 wei" - } - } - } -} -``` - -\\ diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_status.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_status.md deleted file mode 100644 index 86bbf5ea..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-txpool_status.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "txpool_status" -slug: "rpc-tron-txpool_status" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const status = await tatum.rpc.txPoolStatus() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `txpool_status` method returns statistics about the current state of the transaction pool. The transaction pool is a queue of pending transactions waiting to be included in the next block by miners. - -This method can be useful for monitoring the health of the network and analyzing the behavior of the miners. It can also be used to estimate the time it will take for a transaction to be processed, as well as to determine the gas price necessary to ensure prompt inclusion of a transaction in the next block. - -### Parameters - -This method does not take any parameters. - -### Return Object - -The `txpool_status` method returns an object with the following fields: - -- **`pending`**: Number of pending transactions in the pool -- **`queued`**: Number of queued transactions in the pool - -### Example Request - -```json -{ - "jsonrpc":"2.0", - "method":"txpool_status", - "params":[], - "id":1 -} -``` - -### Example Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "pending": 4, - "queued": 10 - } -} -``` - -In this example response, there are currently 4 pending transactions and 10 queued transactions waiting to be processed by miners. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-undelegateresource.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-undelegateresource.md deleted file mode 100644 index 6f496a61..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-undelegateresource.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "undelegateresource" -slug: "rpc-tron-undelegateresource" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -You can interact with the `unDelegateResource` method using the Tatum SDK. Here is an example on how you can do it: - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, BigNumber, TronStakeType, VisibleAndPermissionIdOptions } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.unDelegateResource('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', 'TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1', new BigNumber(1000000), TronStakeType.BANDWIDTH, true, { -visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `unDelegateResource` method allows for cancelling the delegation of bandwidth or energy resources to other accounts in Stake2.0 on the TRON blockchain. This could be useful in scenarios where the original owner needs to reclaim staked resources. - -### Parameters - -The `unDelegateResource` method accepts the following parameters: - -- `ownerAddress` (string): The account address of the owner. By default, it should be in the hexString format. -- `receiverAddress` (string): The address of the account that is receiving the resource. -- `balance` (integer): The amount of TRX staked for resources to be delegated. The unit is sun. Example: 1000000 -- `resource` (TronStakeType): The type of resource, can either be 'BANDWIDTH' or 'ENERGY' -- `lock` (boolean): This parameter signifies whether the resources should be locked or not. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): This parameter signifies whether the address is in base58 format. - - `permissionId` (integer, optional): This parameter is used for multi-signature purpose. - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `UnDelegateResourceContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address`: The address of the account that delegated the resources. -- `resource`: The type of delegated resource. -- `receiver_address`: The address of the account that received the delegated resources. -- `balance`: The amount of TRX staked for resources that were delegated. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "receiver_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "balance": 1000000, - "resource": "BANDWIDTH", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "txID": "3d0a235547b08f9d5e1d465f6d7dc28da6436a8d9c3b768d1a989cac7e5c94cf", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "receiver_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "balance": 1000000, - "resource": "BANDWIDTH", - "lock": false, - }, - "type_url": "type.googleapis.com/protocol.UnDelegateResource" - }, - "type": "UnDelegateResource" - } - ], - "ref_block_bytes": "4a1b", - "ref_block_hash": "4dc3c8c4476d5d56", - "expiration": 1582208742000, - "timestamp": 1582208686873, - "fee_limit": 1000000000 - }, - "raw_data_hex": "0a024a1b22084dc3c8c4476d5d5640c8fcaf8d2d5a2e5a680801126a0a3074..." -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezeasset.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezeasset.md deleted file mode 100644 index 3fa687c0..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezeasset.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "unfreezeasset" -slug: "rpc-tron-unfreezeasset" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -
// yarn add @tatumio/tatum
-
-import { TatumSDK, Tron, Network } from '@tatumio/tatum'
-
-const tatum = await TatumSDK.init({network: Network.TRON})
-
-const res = await tatum.rpc.unfreezeAsset('TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1', {
-visible: true,
-})
-
-await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
-
- -### Overview - -The `unfreezeAsset` method allows the unstaking of a token that has passed the minimum freeze duration on the TRON blockchain. - -### Parameters - -This method accepts the following parameters: - -- `ownerAddress` (string): Account address. The address of the owner of the assets. This must be a hexString. -- `options` (optional): Additional options for the transaction. - - `permission_id` (integer, optional): This is optional and mainly used for multi-signature transactions. - - `visible` (boolean, optional): Indicates whether the address is in base58 format. This is also optional. Default value is true. - -### Return Object - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `UnfreezeAssetContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` (string): Account address - -### HTTP Request Example - -```json -{ - "owner_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "094d59ae6c22cb6f206f4b263eec54a1dbfc1d1704d0c43a31d90b8b66ee4fbb", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g" - }, - "type_url": "type.googleapis.com/protocol.UnfreezeAssetContract" - }, - "type": "UnfreezeAssetContract" - } - ], - "ref_block_bytes": "ab93", - "ref_block_hash": "88c6e64972349f0f", - "expiration": 1684488576000, - "timestamp": 1684488517323 - }, - "raw_data_hex": "0a02ab93220888c6e64972349f0f4080b8df9a83315a66080112620a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412310a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12154198927ffb9f554dc4a453c64b2e553a02d6df514b18e80770cbeddb9a8331" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezebalance.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezebalance.md deleted file mode 100644 index 14cedcfb..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezebalance.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "unfreezebalance" -slug: "rpc-tron-unfreezebalance" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, TronStakeType, UnFreezeAccountOptions } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const ownerAddress = 'TZZyXU3pYgKkcc6RBVYHzY1JRLyPeN5BWy' - -const res = await tatum.rpc.unfreezeBalance(ownerAddress, TronStakeType.ENERGY, { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `unfreezeBalance` method is used to unstake previously staked TRX and release the obtained bandwidth or energy and TP. This operation will automatically cancel all votes. - -### Parameters - -- `owner_address` (string): The owner address (default in hexString format). -- `resource` (string): The type of TRX stake, either 'BANDWIDTH' or 'ENERGY'. -- `options` (object, optional): This optional parameter contains the following properties: - - `receiver_address` (string, optional): Optional parameter for the address that will lose the resource (default in hexString format). - - `permission_id` (integer, optional): For multi-signature use. - - `visible` (boolean, optional): Defaults to false. Whether addresses are in base58 format. - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulentl -- `txID` - transaction id - -Since the transaction type is `UnfreezeBalanceContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address`: The owner address. -- `resource`: The type of TRX stake, either 'BANDWIDTH' or 'ENERGY'. -- `receiver_address`: The address that will lose the resource. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "resource": "BANDWIDTH", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": false, - "txID": "efb6ff6dba6e5998d7258a63436e4717428892f02df2adb6deea8550d36e5e34", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "resource": "BANDWIDTH", - "owner_address": "4100776428620856ae1d71562812b734e356b68551" - }, - "type_url": "type.googleapis.com/protocol.UnfreezeBalanceContract" - }, - "type": "UnfreezeBalanceContract" - } - ], - "ref_block_bytes": "3041", - "ref_block_hash": "3d1b89e6c7c34b52", - "expiration": 1649176881000, - "timestamp": 1649176821557 - }, - "raw_data_hex": "0a02304122083d1b89e6c7c34b5240e8cee8d4ff2f5a5a080b12560a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e6365436f6e747" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezebalancev2.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezebalancev2.md deleted file mode 100644 index dabf49fe..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-unfreezebalancev2.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: "unfreezebalancev2" -slug: "rpc-tron-unfreezebalancev2" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' -import { BigNumber } from 'bignumber.js' -import { TronStakeType } from '@tatumio/tatum/dist/src/blockchain' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.unfreezeBalanceV2( - 'TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', - new BigNumber(1000000), - TronStakeType.BANDWIDTH, - { visible: true } -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `unfreezeBalanceV2` method is used to unlock TRX staked at the Stake 2.0 stage. After unstaking, the user needs to wait for 14 days before they can withdraw the funds. The method also withdraws any unclaimed voting rewards to the account, and if previously unstaked funds have passed the lock-up period, it also withdraws them at the same time. The voting reward withdrawn and the amount of funds withdrawn can be queried through the `gettransactioninfobyid` API. - -### Parameters - -The `unfreezeBalanceV2` method accepts the following parameters: - -- `ownerAddress` (string): The account address -- `unfreeze_balance` (BigNumber): The amount of TRX to unstake, in sun -- `resource` (string): The resource type: 'BANDWIDTH' or 'ENERGY' -- `options` (object, optional): An object that can have the following properties: - - `visible` (boolean): Whether the address is in base58 format - - `permissionId` (integer): For multi-signature use, optional - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is UnFreezeBalanceV2Contract, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address`: The account address -- `resource`: The resource type -- `unfreeze_balance`: The unstake amount, unit is sun - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "unfreeze_balance": 1000000, - "resource": "BANDWIDTH", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "txID": "3d0a235547b08f9d5e1d465f6d7dc28da6436a8d9c3b768d1a989cac7e5c94cf", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "unfreeze_balance": 1000000, - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "resource": "BANDWIDTH" - }, - "type_url": "type.googleapis.com/protocol.UnfreezeBalanceContract" - }, - "type": "UnfreezeBalanceContract" - } - ], - "ref_block_bytes": "4a1b", - "ref_block_hash": "4dc3c8c4476d5d56", - "expiration": 1582208742000, - "timestamp": 1582208686873, - "fee_limit": 1000000000 - }, - "raw_data_hex": "0a024a1b22084dc3c8c4476d5d5640c8fcaf8d2d5a2e5a680801126a0a3074..." -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateaccount.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateaccount.md deleted file mode 100644 index 1acf9f61..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateaccount.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: "updateaccount" -slug: "rpc-tron-updateaccount" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, VisibleAndPermissionIdOptions } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.updateAccount('TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g', '0x7570646174654e616d6531353330383933343635353139', { - visible: true, - permissionId: 1 -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `updateAccount` method is used to modify the name of a TRON account. It's a powerful feature for personalizing and organizing accounts. After successfully updating, the response would be an unsigned transaction JSON object. The transaction type is `AccountUpdateContract`. - -### Parameters - -- `ownerAddress` (string): The account address to be modified. It should be converted to a hex string. -- `accountName` (string): The name of the account. It should be converted to a hex string. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Optional parameter to specify whether the address is in base58 format. - - `permissionId` (integer, optional): Optional parameter used for multi-signature accounts. - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `AccountUpdateContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` (string): The address of the transaction initiator. -- `account_name` (string): The account name. - -### HTTP Request Example - -```json -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "account_name": "0x7570646174654e616d6531353330383933343635353139", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "a00fd4a6fbb6dd42061b184cfd9bbbcd4faae5cf94c06dedb1c55c7b168c37cb", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "account_name": "0x7570646174654e616d6531353330383933343635353139", - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g" - }, - "type_url": "type.googleapis.com/protocol.AccountUpdateContract" - }, - "type": "AccountUpdateContract" - } - ], - "ref_block_bytes": "ad91", - "ref_block_hash": "c7f32299fd0bae0e", - "expiration": 1684490307000, - "timestamp": 1684490248394 - }, - "raw_data_hex": "0a02ad912208c7f32299fd0bae0e40b88bc99b83315a8301080a127f0a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e4163636f756e74557064617465436f6e747261637412490a30307837353730363436313734363534653631366436353331333533333330333833393333333433363335333533313339121541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e70cac1c59b8331" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateasset.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateasset.md deleted file mode 100644 index bae060b4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateasset.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "updateasset" -slug: "rpc-tron-updateasset" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to Use It - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.updateAsset('TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1', 'https://mytokenwebsite.com', { - description: 'My Token Description', - new_limit: 10000, - new_public_limit: 50000, - permission_id: 1, - visible: true -}); - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `updateAsset` method is used to update basic information about a TRC10 token on the TRON network. This method could be useful when the information of a TRC10 token needs to be updated, for instance, if the token's website URL changes or the bandwidth limits for the token are adjusted. - -### Parameters - -- `ownerAddress`(string): The issuer's address of the token in hexString format. -- `url`(string): The token's website url in hexString format. -- `options` (optional): An object containing additional parameters: - - `description`(string, optional): The description of the token in hexString format. - - `new_limit`(integer, optional): Each token holder's free bandwidth limit. - - `new_public_limit`(integer, optional): The total free bandwidth limit of the token. - - `permission_id`(integer, optional): Used for multi-signature purposes. - - `visible`(boolean, optional): A boolean value indicating whether the address is in base58 format. - -### Return Object - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `UpdateAssetContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address`: Account address -- `description`: Description -- `url`: Token's website Url -- `new_limit`: The limit of Bandwidth point which each caller can consume -- `new_public_limit`: The limit of Bandwidth point which all callers can consume - -### HTTP Request Example - -```json -{ - "owner_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "description": "My Token Description", - "url": "https://mytokenwebsite.com", - "new_limit": 10000, - "new_public_limit": 50000, - "permission_id": 1, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "transaction": { - "txID": "b5e7e6e7908d295feb3e91784c68ddd0640830a27c465a4e8ee4ad87e7aff263", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1", - "description": "My Token Description", - "url": "https://mytokenwebsite.com", - "new_limit": 10000, - "new_public_limit": 50000 - }, - "type_url": "type.googleapis.com/protocol.UpdateAssetContract" - }, - "type": "UpdateAssetContract" - } - ], - "ref_block_bytes": "09f6", - "ref_block_hash": "fec5e58087511d2a", - "expiration": 1570676090000, - "timestamp": 1570676035768 - }, - "raw_data_hex": "0a0209f62202..." - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateenergylimit.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateenergylimit.md deleted file mode 100644 index c611f882..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updateenergylimit.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: "updateenergylimit" -slug: "rpc-tron-updateenergylimit" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const res = await tatum.rpc.updateEnergyLimit('TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW', 'TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs', 100000000, { -visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -`updateEnergyLimit` is a TRON RPC method used to update the `origin_energy_limit` parameter of a smart contract. The `origin_energy_limit` is a required parameter for deploying new contracts with a value larger than 0. - -Use cases: - -- Deploying new smart contracts -- Updating the energy limit for existing smart contracts - -### Parameters - -- `ownerAddress` (string): Account address of the transaction creator, in hex string format. -- `contractAddress` (string): Address of the contract to be modified, in hex string format. -- `originEnergyLimit` (integer): The maximum energy set by the creator. This refers to the greatest amount of energy the creator consumes during contract execution or creation process. -- `options` (object, optional): Additional options. - - `visible` (boolean, optional): Specifies if the address is in base58 format. - - `permission_id` (integer, optional): Used for multi-signature. - -### Return Object - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `UpdateEnergyLimitContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` (string): Account address. -- `contract_address` (string): Contract address. -- `origin_energy_limit` (string): Adjusted upper limit of energy provided by smart contract deployers in one transaction. - -### HTTP Request Example - -```json -{ - "owner_address": "TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "origin_energy_limit": 100000000, - "visible": true -} -``` - -### HTTP Response Example - -A successful response will return a `200` status code. - -```json -{ - "visible": true, - "txID": "158a188799ab507e9a4a5d673250c5e1b3ab3f8722ae9778be87c3087fc36453", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW", - "origin_energy_limit": 100000000, - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs" - }, - "type_url": "type.googleapis.com/protocol.UpdateEnergyLimitContract" - }, - "type": "UpdateEnergyLimitContract" - } - ], - "ref_block_bytes": "ee2f", - "ref_block_hash": "f408ae3f40e49e07", - "expiration": 1684770300000, - "timestamp": 1684770243112 - }, - "raw_data_hex": "0a02ee2f2208f408ae3f40e49e0740e0c08aa184315a71082d126d0a36747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e557064617465456e657267794c696d6974436f6e747261637412330a1541b3dcf27c251da9363f1a4888257c16676cf54edf12154142a1e39aefa49290f2b3f9ed688d7cecf86cd6e01880c2d72f70a88487a18431" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updatesetting.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updatesetting.md deleted file mode 100644 index c43d64c0..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-updatesetting.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: "updatesetting" -slug: "rpc-tron-updatesetting" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network, VisibleAndPermissionIdOptions } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.TRON}) - -const ownerAddress = 'TSNEe5Tf4rnc9zPMNXfaTFKHSANinZseWnPcX' -const contractAddress = 'TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs' -const consumeUserResourcePercent = 10 -const options: VisibleAndPermissionIdOptions = { - visible: true, -} - -const res = await tatum.rpc.updateSetting(ownerAddress, contractAddress, consumeUserResourcePercent, options) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `updateSetting` method is used to update the `consume_user_resource_percent` parameter of a smart contract on the TRON blockchain. This setting controls how much of a user's resource balance is consumed when they interact with the contract. - -### Parameters - -The following parameters are required for the `updateSetting` method: - -- `ownerAddress` (string): Account address. Transaction creator's address, in hex string format. -- `contractAddress` (string): Contract address. The address of the contract to be modified, in hex string format. -- `consumeUserResourcePercent` (integer): User Energy Proportion. Consume user's resource percentage. It should be an integer between \[0, 100]. if 0, means it does not consume user's resource until the developer's resource has been used up. -- `options` (optional): Additional options - - `visible` (boolean, optional): Whether the address is in base58 format. - - `permission_id` (integer, optional): For multi-signature use. - -### Return Object - -- `raw_data.contract` - The main content of the transaction,`contract` is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is `UpdateSettingContract`, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` (string): Account address. -- `contract_address` (string): Contract address. -- `consume_user_resource_percent` (integer): User energy proportion. - -### HTTP Request Example - -```json -{ - "owner_address": "TSNEe5Tf4rnc9zPMNXfaTFKHSANinZseWnPcX", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "consume_user_resource_percent": 10, - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "visible": true, - "txID": "1bdf05c55b6034743aef2a02906b3a1bfd98832bf0dc35caa96ccf701de972a0", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "consume_user_resource_percent": 10, - "owner_address": "TSNEe5Tf4rnc9zPMNXfaTF5fZfHDDH8oyW", - "contract_address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs" - }, - "type_url": "type.googleapis.com/protocol.UpdateSettingContract" - }, - "type": "UpdateSettingContract" - } - ], - "ref_block_bytes": "ea5d", - "ref_block_hash": "049f1eb82a28ee3d", - "expiration": 1684766970000, - "timestamp": 1684766911523 - }, - "raw_data_hex": "0a02ea5d2208049f1eb82a28ee3d4090a1bf9f84315a6a082112660a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e55706461746553657474696e67436f6e747261637412300a1541b3dcf27c251da9363f1a4888257c16676cf54edf12154142a1e39aefa49290f2b3f9ed688d7cecf86cd6e0180a70a3d8bb9f8431" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-validateaddress.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-validateaddress.md deleted file mode 100644 index e51b4964..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-validateaddress.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "validateaddress" -slug: "rpc-tron-validateaddress" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -Below is an example of how to use the `validateAddress` method with the Tatum SDK: - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -// Call validateAddress RPC method -const res = await tatum.rpc.validateAddress('TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -The `validateAddress` method is used to validate the format of a given TRON blockchain address. It verifies if the address is in the correct format, i.e., base58checksum, hexString, or base64 format, and returns a result indicating whether the format is correct or not, along with a message specifying the address format type or an error message. - -### Try the call - -{% embed url=" %} - -### Parameters - -This method accepts the following parameters: - -- `address` (string): This is a required parameter. The address should be in base58checksum, hexString, or base64 format. -- `visible` (boolean): Specifies the visibility of the address. It can be set to either true or false. (Optional) - -### Return Object - -This method returns an object with the following parameters: - -- `result` (boolean): Indicates whether the address format is correct. -- `message` (string): Provides the address format type or an error message if the format is incorrect. - -### HTTP Request Example - -```bash -{ - "address": "TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs", - "visible": true -} -``` - -### HTTP Response Example - -A successful HTTP response returns a status code of 200 and a JSON body similar to the following example: - -```json -{ - "result": true, - "message": "Base58check format" -} -``` - -In case of an error, the HTTP response returns a status code of 400 with a body containing an error message. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-web3_clientversion.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-web3_clientversion.md deleted file mode 100644 index c286407d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-web3_clientversion.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "web3_clientversion" -slug: "rpc-tron-web3_clientversion" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -// Initialize the SDK for the TRON network -const tatum = await TatumSDK.init({network: Network.TRON}) - -const version = await tatum.rpc.clientVersion() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`web3_clientVersion` is a method of the JSON-RPC API that allows the client to retrieve the current version of the client software being used by the node. - -This method is read-only and does not require authentication. The `web3_clientVersion` method can be used by developers to confirm the version of the client software they are using and ensure that it is compatible with their application. - -### Parameters - -This method has no parameters. It only retrieves the current version of the client software. - -### Return Object - -The `web3_clientVersion` method returns a string representing the version of the client software being used. The string includes the client name, version number, and build information. - -- `String` - Version string of the client software being used. - -### Example Request - -#### JSON Request - -```json -{ - "jsonrpc": "2.0", - "method": "web3_clientVersion", - "params": [], - "id": 1 -} -``` - -### Example Response - -#### JSON Response - -```json -{ - "jsonrpc": "2.0", - "id": 67, - "result": "v0.9.0" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-withdrawexpireunfreeze.md b/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-withdrawexpireunfreeze.md deleted file mode 100644 index bcae4ae5..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-tron/rpc-tron-withdrawexpireunfreeze.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: "withdrawexpireunfreeze" -slug: "rpc-tron-withdrawexpireunfreeze" -excerpt: "Tron RPC" -hidden: false -metadata: - description: "Tron RPC" - image: [] - keywords: "tron, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Tron, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({ network: Network.TRON }) - -const res = await tatum.rpc.withdrawExpireUnfreeze('ra5nK24KXen9AHvsdFTKHSANinZseWnPcX', { - visible: true, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} - -### Overview - -Withdraw unfrozen balance in Stake 2.0. This method allows users to retrieve their funds after executing the `/wallet/unfreezebalancev2` transaction and waiting for a certain number of days. The number of days is determined by a network parameter. - -Note: Stake 2.0 supports multiple partial unstakes. When calling this API, all unstaked funds that have passed the lock-up period will be withdrawn at once. - -### Parameters - -- `ownerAddress` (string): Owner address in hexadecimal format. -- `options` (object, optional): This optional parameter contains the following properties: - - `visible` (boolean, optional): Specifies whether the address is in base58 format. - - `permissionId` (integer, optional): Used for multi-signature scenarios. - -### Return Object - -- `raw_data.contract` - The main content of the transaction, contract is a list, but only one element is used at present. Different types of transactions have different contract contents. For example, for a TRX transfer type transaction, the contract will include the transfer amount, receiver address and other information. TRON supports multiple types of contracts, please refer to the official documentation [Types of Transaction](https://developers.tron.network/docs/tron-protocol-transaction#types-of-transaction). -- `raw_data.ref_block_bytes` - The height of the transaction reference block, using the 6th to 8th (exclusive) bytes of the reference block height, a total of 2 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.ref_block_hash` - The hash of the transaction reference block, using the 8th to 16th (exclusive) bytes of the reference block hash, a total of 8 bytes. The reference block is used in the TRON TAPOS mechanism, which can prevent a replay of a transaction on forks that do not include the referenced block. Generally, the latest solidified block is used as the reference block. -- `raw_data.expiration` - Transaction expiration time, beyond which the transaction will no longer be packed. If the transaction is created by calling the java-tron API, its expiration time will be automatically set by the node to the value of adding 60 seconds to the timestamp of the node's latest block. The expiration time interval can be modified in the node's configuration file, the maximum value cannot exceed 24 hours. -- `raw_data.data` - Transaction memo. -- `raw_data.timestamp` - Transaction timestamp, set as the transaction creation time. -- `raw_data.fee_limit` - The maximum energy cost allowed for the execution of smart contract transactions. Only deploying and triggering smart contract transactions need to be set, others not. -- `signature` - The sender's signature for the transaction. This proves that the transaction could only have come from the sender and was not sent fraudulently. -- `txID` - transaction id - -Since the transaction type is WithdrawExpireUnfreezeContract, the fields contained in `raw_data.contract[0].parameter.value` in the transaction are as follows: - -- `owner_address` (string): Account address. - -### HTTP Request Example - -```bash -{ - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", - "visible": true -} -``` - -### HTTP Response Example - -```json -{ - "txID": "3d0a235547b08f9d5e1d465f6d7dc28da6436a8d9c3b768d1a989cac7e5c94cf", - "raw_data": { - "contract": [ - { - "parameter": { - "value": { - "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g" - }, - "type_url": "type.googleapis.com/protocol.WithdrawExpireUnfreezeContract" - }, - "type": "WithdrawExpireUnfreezeContract" - } - ], - "ref_block_bytes": "4a1b", - "ref_block_hash": "4dc3c8c4476d5d56", - "expiration": 1582208742000, - "timestamp": 1582208686873, - "fee_limit": 1000000000 - }, - "raw_data_hex": "0a024a1b22084dc3c8c4476d5d5640c8fcaf8d2d5a2e5a680801126a0a3074..." -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp.md deleted file mode 100644 index a1af67e7..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "XRP" -slug: "rpc-xrp" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:40 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_channels.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_channels.md deleted file mode 100644 index 72448046..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_channels.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "account_channels" -slug: "rpc-xrp-account_channels" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.accountChannels('rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn', { - destinationAccount: 'ra5nK24KXen9AHvsdFTKHSANinZseWnPcX', - ledgerIndex: 'validated', -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `account_channels` RPC method allows you to retrieve information about an account's Payment Channels on the XRP Ledger. This includes only channels where the specified account is the source (or owner) of the channel, not the destination. The information returned is relative to a particular version of the ledger. - -Use cases for `account_channels` include: - -- Tracking the status of open Payment Channels -- Auditing total outbound XRP from an account via Payment Channels -- Monitoring Payment Channel balances to determine if they need to be topped up - -{% embed url=" %} - -### Parameters - -The `account_channels` RPC method includes the following parameters: - -- `account`: The unique identifier of an account, typically the account's Address. The request returns channels where this account is the channel's owner/source. -- `destination_account` (Optional): The unique identifier of an account, typically the account's Address. If provided, filter results to payment channels whose destination is this account. -- `ledger_hash` (Optional): A 20-byte hex string for the ledger version to use. -- `ledger_index` (Optional): The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. -- `limit` (Optional): Limit the number of transactions to retrieve. Cannot be less than 10 or more than 400. The default is 200. -- `marker` (Optional): Value from a previous paginated response. Resume retrieving data where that response left off. - -### Return Object - -The response to the `account_channels` RPC call includes an array of Channel Objects, each containing the following fields: - -- `account` (String): The address of the source/owner of the payment channels. This corresponds to the account field of the request. -- `channels` (Array of Channel Objects): Payment channels owned by this account. Each Channel Object includes: - - `account` (String): The owner of the channel, as an Address. - - `amount` (String): The total amount of XRP, in drops allocated to this channel. - - `balance` (String): The total amount of XRP, in drops, paid out from this channel, as of the ledger version used. - - `channel_id` (String): A unique ID for this channel, as a 64-character hexadecimal string. This is also the ID of the channel object in the ledger's state data. - - `destination_account` (String): The destination account of the channel, as an Address. Only this account can receive the XRP in the channel while it is open. - - `settle_delay` (Unsigned Integer): The number of seconds the payment channel must stay open after the owner of the channel requests to close it. - - `public_key` (String): May be omitted. The public key for the payment channel in the XRP Ledger's base58 format. - - `public_key_hex` (String): May be omitted. The public key for the payment channel in hexadecimal format. - - `expiration` (Unsigned Integer): May be omitted. Time, in seconds since the Ripple Epoch, when this channel is set to expire. - - `cancel_after` (Unsigned Integer): May be omitted. Time, in seconds since the Ripple Epoch, of this channel's immutable expiration. - - `source_tag` (Unsigned Integer): May be omitted. A 32-bit unsigned integer to use as a source tag for payments through this payment channel. - - `destination_tag` (Unsigned Integer): May be omitted. A 32-bit unsigned integer to use as a destination tag for payments through this channel. -- `ledger_hash` (String): May be omitted. The identifying hash of the ledger version used to generate this response. -- `ledger_index` (Number): The ledger index of the ledger version used to generate this response. -- `validated` (Boolean): May be omitted. If true, this data comes from a validated ledger version. -- `limit` (Number): May be omitted. The limit to how many channel objects were actually returned by this request. -- `marker` (Marker): May be omitted. Server-defined value for pagination. Pass this to the next call to resume getting results where this call left off. - -### JSON-RPC Request Example - -```json -{ - "method": "account_channels", - "params": [{ - "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", - "ledger_index": "validated" - }] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "channels": [ - { - "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "amount": "1000", - "balance": "0", - "channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7", - "destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", - "public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw", - "public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2", - "settle_delay": 60 - } - ], - "ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D", - "ledger_index": 71766343, - "status": "success", - "validated": true - } -} -``` - -Please note, the response may contain an array of channel objects if there are multiple channels associated with the provided account. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_currencies.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_currencies.md deleted file mode 100644 index f54243a9..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_currencies.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "account_currencies" -slug: "rpc-xrp-account_currencies" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.accountCurrencies('r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', { - ledgerIndex: 'validated', - strict: true -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `accountCurrencies` method retrieves a list of currencies that an account can send or receive, based on its trust lines. This isn't a thoroughly confirmed list but can be used to populate user interfaces. - -{% embed url=" %} - -### Parameters - -The method accepts two parameters: - -- `account` (**required**): A unique identifier for the account, most commonly the account's Address. -- `options` (**optional**): An object with the following properties: - - `ledgerHash`: A 20-byte hex string for the ledger version to use. - - `ledgerIndex`: The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. - - `strict`: If true, then the `account` field only accepts a public key or XRP Ledger address. Otherwise, `account` can be a secret or passphrase (not recommended). The default is false. - -### Return Object - -The `accountCurrencies` method returns an object with following fields: - -- `ledger_hash` (String - Hash): May be omitted. The identifying hash of the ledger version used to retrieve this data, as hex. -- `ledger_index` (Integer - Ledger Index): The ledger index of the ledger version used to retrieve this data. -- `receive_currencies` (Array of Strings): Array of Currency Codes for currencies that this account can receive. -- `send_currencies` (Array of Strings): Array of Currency Codes for currencies that this account can send. -- `validated` (Boolean): If true, this data comes from a validated ledger.\\ - -### JSON-RPC Request Example - -Here's an example of how the JSON-RPC request might look like: - -```json -{ - "command": "account_currencies", - "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "strict": true, - "ledger_index": "validated" -} -``` - -### JSON-RPC Response Example - -Here's an example of how the JSON-RPC response might look like: - -```json -{ - "result": { - "ledger_index": 11775844, - "receive_currencies": ["BTC", "CNY", "DYM", "EUR", "JOE", "MXN", "USD", "015841551A748AD2C1F76FF6ECB0CCCD00000000"], - "send_currencies": ["ASP", "BTC", "CHF", "CNY", "DYM", "EUR", "JOE", "JPY", "MXN", "USD"], - "validated": true - }, - "status": "success", - "type": "response" -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_info.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_info.md deleted file mode 100644 index 1180be52..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_info.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: "account_info" -slug: "rpc-xrp-account_info" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.accountInfo('rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn', { - ledgerIndex: 'current', - strict: true, - queue: true, - signerLists: true -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `accountInfo` method retrieves information about an account, its activity, and its XRP balance. All information retrieved is relative to a particular version of the ledger. - -{% embed url=" %} - -### Parameters - -The method accepts two parameters: - -- `account` (**required**): A unique identifier for the account, most commonly the account's Address. -- `options` (**optional**): An object with the following properties: - - `ledgerHash`: A 20-byte hex string for the ledger version to use. - - `ledgerIndex`: The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. - - `queue`: If true, also returns stats about queued transactions associated with this account. Can only be used when querying for the data from the current open ledger. - - `signerLists`: If true, also returns any SignerList objects associated with this account. - - `strict`: If true, then the `account` field only accepts a public key or XRP Ledger address. Otherwise, `account` can be a secret or passphrase (not recommended). The default is false. - -### Return Object - -The `accountInfo` method returns object with following fields: - -- `account_data`: This is an object that contains the AccountRoot ledger object with this account's information, as stored in the ledger. -- `signer_lists`: This is an array of SignerList ledger objects associated with this account for Multi-Signing. This field is omitted unless the request specified signer\_lists and at least one SignerList is associated with the account. Since an account can own at most one SignerList, this array must have exactly one member if it is present. -- `ledger_current_index`: This is the ledger index of the current in-progress ledger, which was used when retrieving this information. This is omitted if ledger\_index is provided instead. -- `ledger_index`: This is the ledger index of the ledger version used when retrieving this information. The information does not contain any changes from ledger versions newer than this one. This is omitted if ledger\_current\_index is provided instead. -- `queue_data`: This is an object that contains information about queued transactions sent by this account. This information describes the state of the local rippled server, which may be different from other servers in the peer-to-peer XRP Ledger network. Some fields may be omitted because the values are calculated "lazily" by the queuing mechanism. This is omitted unless queue specified as true and querying the current open ledger. -- `validated`: This is a boolean value that is true if this data is from a validated ledger version. If omitted or set to false, this data is not final. - -The `queue_data` parameter, if present, contains the following fields: - -- `txn_count`: The number of queued transactions from this address. -- `auth_change_queued`: Whether a transaction in the queue changes this address's ways of authorizing transactions. If true, this address can queue no further transactions until that transaction has been executed or dropped from the queue. -- `lowest_sequence`: The lowest Sequence Number among transactions queued by this address. -- `highest_sequence`: The highest Sequence Number among transactions queued by this address. -- `max_spend_drops_total`: The integer amount of drops of XRP that could be debited from this address if every transaction in the queue consumes the maximum amount of XRP possible. -- `transactions`: An array containing information about each queued transaction from this address. Each object in the `transactions` array, if present, may contain any or all of the following fields: - - `auth_change`: Whether this transaction changes this address's ways of authorizing transactions. - - `fee`: The Transaction Cost of this transaction, in drops of XRP. - - `fee_level`: The transaction cost of this transaction, relative to the minimum cost for this type of transaction, in fee levels. - - `max_spend_drops`: The maximum amount of XRP, in drops, this transaction could send or destroy. - - `seq`: The Sequence Number of this transaction. - -\\ - -### JSON-RPC Request Example - -Here's an example of how the JSON-RPC request might look like: - -```json -{ - "id": 2, - "command": "account_info", - "account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn", - "strict": true, - "ledger_index": "current", - "queue": true -} -``` - -### JSON-RPC Response Example - -Here's an example of how the JSON-RPC response might look like: - -```json -{ - "id": 5, - "status": "success", - "type": "response", - "result": { - "account_data": { - "Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn", - "Balance": "999999999960", - "Flags": 8388608, - "LedgerEntryType": "AccountRoot", - "OwnerCount": 0, - "PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42", - "PreviousTxnLgrSeq": 3, - "Sequence": 6, - "index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F" - }, - "ledger_current_index": 4, - "queue_data": { - "auth_change_queued": true, - "highest_sequence": 10, - "lowest_sequence": 6, - "max_spend_drops_total": "500", - "transactions": [ - { - "auth_change": false, - "fee": "100", - "fee_level": "2560", - "max_spend_drops": "100", - "seq": 6 - }, - ... (trimmed for length) ... - { - "LastLedgerSequence": 10, - "auth_change": true, - "fee": "100", - "fee_level": "2560", - "max_spend_drops": "100", - "seq": 10 - } - ], - "txn_count": 5 - }, - "status": "success", - "validated": false - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_lines.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_lines.md deleted file mode 100644 index 747169ed..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_lines.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: "account_lines" -slug: "rpc-xrp-account_lines" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.accountLines('r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', { - ledgerIndex: 'validated', - peer: 'r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z', - limit: 10, - marker: 'example_marker', -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `account_lines` method returns information about an account's trust lines, which contain balances in all non-XRP currencies and assets. All information retrieved is relative to a particular version of the ledger. - -{% embed url=" %} - -### Parameters - -- `account`: (String) A unique identifier for the account, most commonly the account's Address. -- `options`: (AccountLinesOptions) An object with optional parameters: - - `ledgerHash`: (Optional, String) A 20-byte hex string for the ledger version to use. - - `ledgerIndex`: (Optional, LedgerIndex) The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. Can be 'validated', 'closed', 'current', or a number. - - `peer`: (Optional, String) The Address of a second account. If provided, show only lines of trust connecting the two accounts. - - `limit`: (Optional, Number) Limit the number of results to retrieve. - - `marker`: (Optional, unknown) Value from a previous paginated response. Resume retrieving data where that response left off. - -### Return Object - -The response object has the following properties: - -- `account`: (String) Unique Address of the account this request corresponds to. This is the "perspective account" for the purpose of the trust lines. -- `lines`: (Array) Array of trust line objects, as described below. If the number of trust lines is large, only returns up to the limit at a time. -- `ledger_current_index`: (Optional, Integer) The ledger index of the current open ledger, which was used when retrieving this information. -- `ledger_index`: (Optional, Integer) The ledger index of the ledger version that was used when retrieving this data. -- `ledger_hash`: (Optional, String) The identifying hash of the ledger version that was used when retrieving this data. -- `marker`: (Optional, Marker) Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. - -Each trust line object has some combination of the following fields: - -- `account`: (String) The unique Address of the counterparty to this trust line. -- `balance`: (String) Representation of the numeric balance currently held against this line. A positive balance means that the perspective account holds value; a negative balance means that the perspective account owes value. -- `currency`: (String) A Currency Code identifying what currency this trust line can hold. -- `limit`: (String) The maximum amount of the given currency that this account is willing to owe the peer account. -- `limit_peer`: (String) The maximum amount of currency that the counterparty account is willing to owe the perspective account. -- `quality_in`: (Unsigned Integer) Rate at which the account values incoming balances on this trust line, as a ratio of this value per 1 billion units. -- `quality_out`: (Unsigned Integer) Rate at which the account values outgoing balances on - -this trust line, as a ratio of this value per 1 billion units. - -- `no_ripple`: (Optional, Boolean) If true, this account has enabled the No Ripple flag for this trust line. -- `no_ripple_peer`: (Optional, Boolean) If true, the peer account has enabled the No Ripple flag for this trust line. -- `authorized`: (Optional, Boolean) If true, this account has authorized this trust line. -- `peer_authorized`: (Optional, Boolean) If true, the peer account has authorized this trust line. -- `freeze`: (Optional, Boolean) If true, this account has frozen this trust line. -- `freeze_peer`: (Optional, Boolean) If true, the peer account has frozen this trust line. - -### JSON-RPC Request Example - -```json -{ - "id": 1, - "command": "account_lines", - "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "ledger_index": "validated", - "peer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z", - "limit": 10, - "marker": "example_marker" -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": 1, - "status": "success", - "type": "response", - "result": { - "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "lines": [ - { - "account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z", - "balance": "0", - "currency": "ASP", - "limit": "0", - "limit_peer": "10", - "quality_in": 0, - "quality_out": 0 - }, - { - "account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z", - "balance": "0", - "currency": "XAU", - "limit": "0", - "limit_peer": "0", - "no_ripple": true, - "no_ripple_peer": true, - "quality_in": 0, - "quality_out": 0 - } - ], - "ledger_index": 1000000 - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_nfts.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_nfts.md deleted file mode 100644 index 67165aaa..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_nfts.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "account_nfts" -slug: "rpc-xrp-account_nfts" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.accountNfts('rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx', { - ledger_index: 'validated', - limit: 100 -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `accountNfts` method returns a list of Non-Fungible Tokens (NFTs) objects for a specific account. This method is useful when you want to retrieve all the NFTs owned by a particular account. The method is available due to the NonFungibleTokensV1\_1 amendment. - -{% embed url=" %} - -### Parameters - -#### Main Parameters - -- `account`: A unique identifier for the account, most commonly the account's Address. - -#### Optional Parameters (part of `options?: Ledger & Pagination` object) - -- `ledger_hash`: A 20-byte hex string for the ledger version to use. -- `ledger_index`: The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. -- `limit`: Limit the number of token pages to retrieve. Each page can contain up to 32 NFTs. The limit value cannot be lower than 20 or more than 400. The default is 100. -- `marker`: Value from a previous paginated response. Resume retrieving data where that response left off. - -### Return Object - -The returned object will be a successful result containing the account's address and an array of NFT objects. - -Here are the fields in the response: - -- `Flags`: This is a number that represents a bit-map of boolean flags enabled for this NFToken. This can provide additional information about the token, such as whether it's transferable, mintable, etc. The specific flags and their meanings can vary based on the implementation. -- `Issuer`: This is a string that represents the address of the account that issued this NFToken. It's the unique identifier of the account that created and originally owned this token. -- `NFTokenID`: This is a string that represents the unique identifier of this NFToken, in hexadecimal. This is typically a unique identifier that differentiates this token from all others on the ledger. -- `NFTokenTaxon`: This is a number that represents the unscrambled version of this token's taxon. Several tokens with the same taxon might represent instances of a limited series. This can be used to group similar tokens together. -- `URI`: This is a string that represents the URI data associated with this NFToken, in hexadecimal. This often points to a resource that has more information about the token, such as an image, audio file, or a webpage. -- `nft_serial`: This is a number that represents the token sequence number of this NFToken, which is unique for its issuer. This can be used to determine the order in which the tokens were created. - -### JSON-RPC Request Example - -```json -{ - "method": "account_nfts", - "params": [ - { - "account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx", - "ledger_index": "validated", - "limit": 100 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx", - "account_nfts": [ - { - "Flags": 1, - "Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm", - "NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004", - "NFTokenTaxon": 0, - "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469", - "nft_serial": 4 - }, - // More NFTs... - ], - "status": "success", - "validated": true - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_objects.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_objects.md deleted file mode 100644 index c2dfc66a..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_objects.md +++ /dev/null @@ -1,177 +0,0 @@ ---- -title: "account_objects" -slug: "rpc-xrp-account_objects" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.accountObjects('r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', { - ledger_index: 'validated', - type: 'state', - deletion_blockers_only: false, - limit: 10 -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `accountObjects` method returns the raw ledger format for all objects owned by an account. This includes Offer objects for orders that are currently live, unfunded, or expired but not yet removed, RippleState objects for trust lines where this account's side is not in the default state, the account's SignerList, if the account has multi-signing enabled, Escrow objects for held payments that have not yet been executed or canceled, PayChannel objects for open payment channels, Check objects for pending Checks, DepositPreauth objects for deposit preauthorizations, Ticket objects for Tickets, and NFTokenPage objects for collections of NFTs. - -{% embed url=" %} - -### Parameters - -#### Main Parameters - -- `account`: A unique identifier for the account, most commonly the account's Address. - -#### Optional Parameters (part of `options?: AccountObjectsOptions` object) - -- `deletion_blockers_only`: If true, the response only includes objects that would block this account from being deleted. The default is false. -- `ledger_hash`: A 20-byte hex string for the ledger version to use. -- `ledger_index`: The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. -- `limit`: The maximum number of objects to include in the results. Must be within the inclusive range 10 to 400 on non-admin connections. The default is 200. -- `marker`: Value from a previous paginated response. Resume retrieving data where that response left off. -- `type`: Filter results by a ledger entry type. The valid types are: check, deposit\_preauth, escrow, nft\_offer, offer, payment\_channel, signer\_list, state (trust line), and ticket. - -### Return Object - -The returned object will be a successful result containing the account's address and an array of objects owned by this account. - -Here are the fields in the response: - -- `account`: This is a string that represents the unique address of the account that this request corresponds to. -- `account_objects`: This is an array of objects owned by the account. Each object is in its raw ledger format. The specific fields in each object can vary depending on the type of the object. Common ledger object types include Offer, RippleState, AccountRoot, and others. -- `ledger_hash`: This is a string that may be omitted. It represents the identifying hash of the ledger that was used to generate this response. -- `ledger_index`: This is a number that may be omitted. It represents the ledger index of the ledger version that was used to generate this response. -- `ledger_current_index`: This is a number that may be omitted. It represents the ledger index of the current in-progress ledger version, which was used to generate this response. -- `limit`: This is a number that may be omitted. It represents the limit that was used in this request, if any. -- `marker`: This is a server-defined value indicating the response is paginated. You can pass this to the next call to resume where this call left off. It is omitted when there are no additional pages after this one. -- `validated`: This is a boolean. If included and set to true, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. - -### JSON-RPC Request Example - -```json -{ - "method": "account_objects", - "params": [ - { - "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "ledger_index": "validated", - "type": "state", - "deletion_blockers_only": false, - "limit": 10 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "account_objects": [ - { - "Balance": { - "currency": "ASP", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "0" - }, - "Flags": 65536, - "HighLimit": { - "currency": "ASP", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "0" - }, - "HighNode": "0000000000000000", - "LedgerEntryType": "RippleState", - "LowLimit": { - "currency": "ASP", - "issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z", - "value": "10" - }, - "LowNode": "0000000000000000", - "PreviousTxnID": "BF7555B0F018E3C5E2A3FF9437A1A5092F32903BE246202F988181B9CED0D862", - "PreviousTxnLgrSeq": 1438879, - "index": "2243B0B630EA6F7330B654EFA53E27A7609D9484E535AB11B7F946DF3D247CE9" - }, - { - "Balance": { - "currency": "XAU", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "0" - }, - "Flags": 3342336, - "HighLimit": { - "currency": "XAU", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "0" - }, - "HighNode": "0000000000000000", - "LedgerEntryType": "RippleState", - "LowLimit": { - "currency": "XAU", - "issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z", - "value": "0" - }, - "LowNode": "0000000000000000", - "PreviousTxnID": "79B26D7D34B950AC2C2F91A299A6888FABB376DD76CFF79D56E805BF439F6942", - "PreviousTxnLgrSeq": 5982530, - "index": "9ED4406351B7A511A012A9B5E7FE4059FA2F7650621379C0013492C315E25B97" - }, - { - "Balance": { - "currency": "USD", - "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", - "value": "0" - }, - "Flags": 1114112, - "HighLimit": { - "currency": "USD", - "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", - "value": "0" - }, - "HighNode": "0000000000000000", - "LedgerEntryType": "RippleState", - "LowLimit": { - "currency": "USD", - "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "value": "5" - }, - "LowNode": "0000000000000000", - "PreviousTxnID": "6FE8C824364FB1195BCFEDCB368DFEE3980F7F78D3BF4DC4174BB4C86CF8C5CE", - "PreviousTxnLgrSeq": 10555014, - "index": "2DECFAC23B77D5AEA6116C15F5C6D4669EBAEE9E7EE050A40FE2B1E47B6A9419" - } - ], - "ledger_hash": "4C99E5F63C0D0B1C2283B4F5DCE2239F80CE92E8B1A6AED1E110C198FC96E659", - "ledger_index": 14380380, - "limit": 10, - "marker": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93,94A9F05FEF9A153229E2E997E64919FD75AAE2028C8153E8EBDB4440BD3ECBB5", - "status": "success", - "validated": true - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_offers.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_offers.md deleted file mode 100644 index 781b2e43..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_offers.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: "account_offers" -slug: "rpc-xrp-account_offers" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -// Initialize the SDK for the XRP network -const tatum = await TatumSDK.init({network: Network.XRP}) - -// Use the account_offers method -const res = await tatum.rpc.accountOffers('rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM', { - ledgerIndex: 'validated', -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `account_offers` method retrieves a list of offers made by a given account that are outstanding as of a particular ledger version. It is typically used for monitoring the open offers that a particular account has made on the XRP Ledger's decentralised exchange. - -{% embed url=" %} - -### Parameters - -The `account_offers` method accepts the following parameters: - -- `account`: A unique identifier for the account, most commonly the account's Address. -- `ledger_hash` (Optional): A 20-byte hex string identifying the ledger version to use. -- `ledger_index` (Optional): The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. -- `limit` (Optional): Limit the number of Offers to retrieve. The server may return fewer than this number of results. Must be within the inclusive range 10 to 400. The default is 200. -- `marker` (Optional): Value from a previous paginated response. Resume retrieving data where that response left off. -- `strict` (Optional): If true, then the account field only accepts a public key or XRP Ledger address. Otherwise, account can be a secret or passphrase (not recommended). The default is false. - -### Return Object - -The response follows the standard format, with a successful result containing the following fields: - -- `account`: Unique Address identifying the account that made the offers -- `offers`: Array of objects, where each object represents an offer made by this account that is outstanding as of the requested ledger version. -- `ledger_current_index` (Optional): The ledger index of the current in-progress ledger version, which was used when retrieving this data. -- `ledger_index` (Optional): The ledger index of the ledger version that was used when retrieving this data, as requested. -- `ledger_hash` (Optional): The identifying hash of the ledger version that was used when retrieving this data. -- `marker` (Optional): Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. - -### JSON-RPC Request Example - -```json -{ - "method": "account_offers", - "params": [ - { - "account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM", - "ledger_current_index": 18539596, - "offers": [{ - "flags": 0, - "quality": "0.000000007599140009999998", - "seq": 6578020, - "taker_gets": "29740867287", - "taker_pays": { - "currency": "USD", - "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", - "value": "226.0050145327418" - } - }, { - "flags": 0, - "quality": "7989247009094510e-27", - "seq": 6572128, - "taker_gets": "2361918758", - "taker_pays": { - "currency": "XAU", - "issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67", - "value": "0.01886995237307572" - } - }, { - "flags": 0, - "quality": "0.00000004059594001318974", - "seq": 6576905, - "taker_gets": "3892952574", - "taker_pays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "158.0380691682966" - } - }, - - ... - - ], - "status": "success", - "validated": false - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_tx.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_tx.md deleted file mode 100644 index 5e00623e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-account_tx.md +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: "account_tx" -slug: "rpc-xrp-account_tx" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use It - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.accountTx('rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w', { - ledgerIndexMin: -1, - ledgerIndexMax: -1, - binary: false, - forward: false, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `account_tx` method is a part of the XRP Ledger's RPC API, allowing you to retrieve a list of transactions that involve a specified account. This method is useful when you need to track and analyze transactions related to a particular account, which can be necessary for various operations such as auditing, debugging or just for general monitoring purposes. - -{% embed url=" %} - -### Parameters - -The `accountTx` method accepts the following parameters: - -- `account`: A unique identifier for the account, most commonly the account's address. -- `ledgerIndexMin`: (Optional) Use to specify the earliest ledger to include transactions from. A value of -1 instructs the server to use the earliest validated ledger version available. -- `ledgerIndexMax`: (Optional) Use to specify the most recent ledger to include transactions from. A value of -1 instructs the server to use the most recent validated ledger version available. -- `binary`: (Optional) Defaults to false. If set to true, returns transactions as hex strings instead of JSON. -- `forward`: (Optional) Defaults to false. If set to true, returns values indexed with the oldest ledger first. Otherwise, the results are indexed with the newest ledger first. - -### Return Object - -The response object includes the following fields: - -- `account`: Unique Address identifying the related account. -- `ledger_index_min`: The ledger index of the earliest ledger actually searched for transactions. -- `ledger_index_max`: The ledger index of the most recent ledger actually searched for transactions. -- `limit`: The limit value used in the request. -- `marker`: Server-defined value indicating the response is paginated. -- `transactions`: Array of transactions matching the request's criteria. -- `validated`: If included and set to true, the information in this response comes from a validated ledger version. - -Each transaction object includes the following fields: - -- `ledger_index`: The ledger index of the ledger version that included this transaction. -- `meta`: If binary is True, then this is a hex string of the transaction metadata. Otherwise, the transaction metadata is included in JSON format. -- `tx`: (JSON mode only) JSON object defining the transaction. -- `validated`: Whether or not the transaction is included in a validated ledger. - -### JSON-RPC Request Example - -```json -{ - "method": "account_tx", - "params": [ - { - "account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "binary": false, - "forward": false, - "ledger_index_max": -1, - "ledger_index_min": -1, - "limit": 2 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "ledger_index_max": 57112019, - "ledger_index_min": 56248229, - "limit": 2, - "marker": { - "ledger": 57112007, - "seq": 13 - }, - "status": "success", - "transactions": [ - { - "meta": { - "AffectedNodes": [ - { - "ModifiedNode": { - "FinalFields": { - "Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "Balance": "3732290013101", - "Flags": 131072, - "OwnerCount": 0, - "Sequence": 702820 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", - "PreviousFields": { - "Balance": "3732745656171", - "Sequence": 702819 - }, - "PreviousTxnID": "7C031FD5B710E3C048EEF31254089BEEC505900BCC9A842257A0319453333998", - "PreviousTxnLgrSeq": 57112010 - } - }, - { - "ModifiedNode": { - "FinalFields": { - "Account": "raLPjTYeGezfdb6crXZzcC8RkLBEwbBHJ5", - "Balance": "4231510602153", - "Flags": 0, - "OwnerCount": 0, - "Sequence": 96486 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "39DC5D448DECEFC3CD20818788E3DA891CA943935E8D7B12FCB5B5871FCB1638", - "PreviousFields": { - "Balance": "4231054959123" - }, - "PreviousTxnID": "33D2014C832610293730028CA37857AC183BFCE3E42B9979C491FB8B82B3E9DC", - "PreviousTxnLgrSeq": 57112004 - } - } - ], - "TransactionIndex": 12, - "TransactionResult": "tesSUCCESS", - "delivered_amount": "455643030" - }, - "tx": { - "Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "Amount": "455643030", - "Destination": "raLPjTYeGezfdb6crXZzcC8RkLBEwbBHJ5", - "DestinationTag": 18240312, - "Fee": "40", - "Flags": 2147483648, - "LastLedgerSequence": 57112037, - "Sequence": 702819, - "SigningPubKey": "020A46D8D02AC780C59853ACA309EAA92E7D8E02DD72A0B6AC315A7D18A6C3276A", - "TransactionType": "Payment", - "TxnSignature": "30450221008602B2E390C0C7B65182C6DBC86292052C1961B2BEFB79C2C8431722C0ADB911022024B74DCF910A4C8C95572CF662EB7F5FF67E1AC4D7B9B7BFE2A8EE851EC16576", - "date": 649200322, - "hash": "08EF5BDA2825D7A28099219621CDBECCDECB828FEA202DEB6C7ACD5222D36C2C", - "inLedger": 57112015, - "ledger_index": 57112015 - }, - "validated": true - }, - { - "meta": { - "AffectedNodes": [ - { - "ModifiedNode": { - "FinalFields": { - "Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "Balance": "3732745656171", - "Flags": 131072, - "OwnerCount": 0, - "Sequence": 702819 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574", - "PreviousFields": { - "Balance": "3732246155784" - }, - "PreviousTxnID": "CCBCCB528F602007C937C496F0828C118E073DF180084CCD3646EC1E414844E4", - "PreviousTxnLgrSeq": 57112007 - } - }, - { - "ModifiedNode": { - "FinalFields": { - "Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg", - "Balance": "236476361", - "Flags": 131072, - "OwnerCount": 0, - "Sequence": 466335 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "CC20FEBEA6D2AF969EC46F2BD92684D9FBABC3F238E841B5E056FE4EBF4379A9", - "PreviousFields": { - "Balance": "735976788", - "Sequence": 466334 - }, - "PreviousTxnID": "C528B32DD588EFAE2FE833E8AA92E6AE2DF2C8DB3DB8C6C4F334AD37B253D72A", - "PreviousTxnLgrSeq": 57112010 - } - } - ], - "TransactionIndex": 33, - "TransactionResult": "tesSUCCESS", - "delivered_amount": "499500387" - }, - "tx": { - "Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg", - "Amount": "499500387", - "Destination": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w", - "DestinationTag": 1, - "Fee": "40", - "Flags": 2147483648, - "LastLedgerSequence": 57112032, - "Sequence": 466334, - "SigningPubKey": "0381575032E254BF4D699C3D8D6EFDB63B3A71F97475C6F6885BC7DAEEE55D9A01", - "TransactionType": "Payment", - "TxnSignature": "3045022100C7EA1701FE48C75508EEBADBC9864CD3FFEDCEB48AB99AEA960BFA360AE163ED0220453C9577502924C9E1A9A450D4B950A44016813BC70E1F16A65A402528D730B7", - "date": 649200302, - "hash": "7C031FD5B710E3C048EEF31254089BEEC505900BCC9A842257A0319453333998", - "inLedger": 57112010, - "ledger_index": 57112010 - }, - "validated": true - } - ], - "validated": true - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-book_offers.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-book_offers.md deleted file mode 100644 index 13d84907..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-book_offers.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "book_offers" -slug: "rpc-xrp-book_offers" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -
// yarn add @tatumio/tatum
-
-import { TatumSDK, Xrp, Network } from '@tatumio/tatum'
-
-const tatum = await TatumSDK.init({network: Network.XRP})
-
-const takerGets = { currency: 'XRP' }
-const takerPays = { currency: 'USD', issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' }
-
-const res = await tatum.rpc.bookOffers(takerGets, takerPays, { taker: 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', limit: 10 })
-
-await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
-
- -### Overview - -The `book_offers` method is used to fetch a list of offers between two different currencies on the XRP Ledger. This method is crucial for trading and asset management applications as it provides an in-depth view of the market depth for a specific trading pair. - -{% embed url=" %} - -### Parameters - -- `takerGets` (Object): The asset the account taking the offer would receive, as a currency without an amount. -- `takerPays` (Object): The asset the account taking the offer would pay, as a currency without an amount. -- `options` (BookOffersOptions): Optional parameters which includes ledger details, pagination, and the taker address. - -### Return Object - -The `book_offers` method returns an object that provides information about a list of offers in the order book. The object contains the following fields: - -- `ledger_current_index`: (Omitted if `ledger_index` is provided) A ledger index that represents the ledger index of the current in-progress ledger version, which was used to retrieve this information. -- `ledger_index`: (Omitted if `ledger_current_index` is provided) A ledger index that represents the ledger index of the ledger version that was used when retrieving this data, as requested. -- `ledger_hash`: (May be omitted) A hash that represents the identifying hash of the ledger version that was used when retrieving this data, as requested. -- `offers`: An array of offer objects, each of which has the fields of an Offer object. - -Each offer object in the `offers` array can include the following fields: - -- `owner_funds`: A string that represents the amount of the `TakerGets` currency the side placing the offer has available to be traded. (XRP is represented as drops; any other currency is represented as a decimal value.) If a trader has multiple offers in the same book, only the highest-ranked offer includes this field. -- `taker_gets_funded`: (Only included in partially-funded offers) A currency amount that represents the maximum amount of currency that the taker can get, given the funding status of the offer. -- `taker_pays_funded`: (Only included in partially-funded offers) A currency amount that represents the maximum amount of currency that the taker would pay, given the funding status of the offer. -- `quality`: A string that represents the exchange rate, as the ratio of `taker_pays` divided by `taker_gets`. For fairness, offers that have the same quality are automatically taken first-in, first-out. (In other words, if multiple people offer to exchange currency at the same rate, the oldest offer is taken first.) - -### JSON-RPC Request Example - -```json -{ - "method": "book_offers", - "params": [ - { - "taker": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "taker_gets": { - "currency": "XRP" - }, - "taker_pays": { - "currency": "USD", - "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B" - }, - "limit": 10 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "ledger_current_index": 8696243, - "offers": [], - "status": "success", - "validated": false - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-channel_authorize.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-channel_authorize.md deleted file mode 100644 index fe69b4f4..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-channel_authorize.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "channel_authorize" -slug: "rpc-xrp-channel_authorize" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network, Secrets } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.channelAuthorize( - '1000000', - '5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3', - { keyType: 'secp256k1', seed: 's████████████████████████████' } -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `channel_authorize` method creates a signature that can be used to redeem a specific amount of XRP from a payment channel. This method was added by the PayChan amendment and is available starting from the `rippled` 0.33.0 version. - -This method can be used when an account wants to authorize a specific amount of XRP to be redeemed from a payment channel it has created. It generates a signature for a claim, which the receiving account can use to redeem a specific amount of XRP from the channel. - -### Parameters - -The `channel_authorize` method includes the following parameters: - -- `amount`: Cumulative amount of XRP, in drops, to authorize. If the destination has already received a lesser amount of XRP from this channel, the signature created by this method can be redeemed for the difference. -- `channelId`: The unique ID of the payment channel to use. -- `options`: (Optional) An object that includes secrets for signing the claim: - - `keyType`: (Optional) The signing algorithm of the cryptographic key pair provided. Valid types are `secp256k1` or `ed25519`. The default is `secp256k1`. - - `seed`: (Optional) The secret seed to use to sign the claim. This must be the same key pair as the public key specified in the channel. Must be in the XRP Ledger's base58 format. - -### Return Object - -The `channel_authorize` method returns a result object that includes: - -- `signature`: The signature for this claim, as a hexadecimal value. To process the claim, the destination account of the payment channel must send a PaymentChannelClaim transaction with this signature, the exact Channel ID, XRP amount, and public key of the channel. - -### JSON-RPC Request Example - -```json -{ - "method": "channel_authorize", - "params": [ - { - "channel_id": "5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3", - "seed": "s████████████████████████████", - "key_type": "secp256k1", - "amount": "1000000", - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": "channel_authorize_example_id1", - "status": "success", - "result": { - "signature": "304402204EF0AFB78AC23ED1C472E74F4299C0C21F1B21D07EFC0A3838A420F76D783A400220154FB11B6F54320666E4C36CA7F686C16A3A0456800 - -BBC43746F34AF50290064", - } -} -``` - -> **Warning:** Do not send secret keys to untrusted servers or through unsecured network connections. (This includes the secret, seed, seed\_hex, or passphrase fields of this request.) You should only use this method on a secure, encrypted network connection to a server you run or fully trust with your funds. Otherwise, eavesdroppers could use your secret key to sign claims and take all the money from this payment channel and anything else using the same key pair. See Set Up Secure Signing for instructions. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-channel_verify.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-channel_verify.md deleted file mode 100644 index d124b9bc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-channel_verify.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "channel_verify" -slug: "rpc-xrp-channel_verify" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.channelVerify( - '1000000', - '5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3', - 'aB44YfzW24VDEJQ2UuLPV2PvqcPCSoLnL7y5M1EzhdW4LnK5xMS3', - '304402204EF0AFB78AC23ED1C472E74F4299C0C21F1B21D07EFC0A3838A420F76D783A400220154FB11B6F54320666E4C36CA7F686C16A3A0456800BBC43746F34AF50290064' -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `channel_verify` method is used to check the validity of a signature that can be used to redeem a specific amount of XRP from a payment channel. This method was added by the PayChan amendment and is available starting from the `rippled` 0.33.0 version. - -The main use case of this method is to confirm the validity of a claim before attempting to redeem it. This is especially useful for payment channel recipients who want to ensure they are receiving valid claims. - -### Parameters - -The `channel_verify` method includes the following parameters: - -- `amount`: The amount of XRP, in drops, the provided signature authorizes. -- `channelId`: The Channel ID of the channel that provides the XRP. This is a 64-character hexadecimal string. -- `publicKey`: The public key of the channel and the key pair that was used to create the signature, in hexadecimal or the XRP Ledger's base58 format. -- `signature`: The signature to verify, in hexadecimal. - -### Return Object - -The `channel_verify` method returns a result object that includes: - -- `signature_verified`: If true, the signature is valid for the stated amount, channel, and public key. - -> **Caution:** This does not indicate check that the channel has enough XRP allocated to it. Before considering a claim valid, you should look up the channel in the latest validated ledger and confirm that the channel is open and its amount value is equal or greater than the amount of the claim. To do so, use the `account_channels` method. - -### JSON-RPC Request Example - -```json -{ - "method": "channel_verify", - "params": [{ - "channel_id": "5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3", - "signature": "304402204EF0AFB78AC23ED1C472E74F4299C0C21F1B21D07EFC0A3838A420F76D783A400220154FB11B6F54320666E4C36CA7F686C16A3A0456800BBC43746F34AF50290064", - "public_key": "aB44YfzW24VDEJQ2U - -uLPV2PvqcPCSoLnL7y5M1EzhdW4LnK5xMS3", - "amount": "1000000" - }] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "signature_verified":true, - "status":"success" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-deposit_authorized.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-deposit_authorized.md deleted file mode 100644 index 1a479421..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-deposit_authorized.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "deposit_authorized" -slug: "rpc-xrp-deposit_authorized" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const sourceAccount = 'rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de' -const destinationAccount = 'rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8' - -const res = await tatum.rpc.depositAuthorized(sourceAccount, destinationAccount, { ledgerIndex: 'validated' }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `deposit_authorized` method is used to verify if a specific account is authorized to send payments to another account. This feature becomes particularly useful in scenarios where accounts have deposit authorization enabled, which is a setting that requires accounts to be preauthorized before they can send payments. - -### Parameters - -- `sourceAccount` (String): The sender of a possible payment. -- `destinationAccount` (String): The recipient of a possible payment. -- `options` (Ledger): Optional parameter that includes details about the ledger to use. - -### Return Object - -The `deposit_authorized` method returns an object that provides information about whether the specified source account is authorized to send payments directly to the destination account. The object contains the following fields: - -- `deposit_authorized`: A boolean indicating whether the specified source account is authorized to send payments directly to the destination account. If true, either the destination account does not require Deposit Authorization or the source account is preauthorized. -- `destination_account`: A string that represents the destination account specified in the request. -- `ledger_hash`: (May be omitted) A string that represents the identifying hash of the ledger that was used to generate this response. -- `ledger_index`: (May be omitted) A number that represents the ledger index of the ledger version that was used to generate this response. -- `ledger_current_index`: (May be omitted) A number that represents the ledger index of the current in-progress ledger version, which was used to generate this response. -- `source_account`: A string that represents the source account specified in the request. -- `validated`: (May be omitted) A boolean indicating whether the information comes from a validated ledger version. If true, the information comes from a validated ledger version. - -### JSON-RPC Request Example - -```json -{ - "method": "deposit_authorized", - "params": [ - { - "source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", - "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", - "ledger_index": "validated" - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "deposit_authorized": true, - "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", - "ledger_hash": "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322", - "ledger_index": 8, - "source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", - "status": "success", - "validated": true - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-fee.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-fee.md deleted file mode 100644 index 09b0d780..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-fee.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: "fee" -slug: "rpc-xrp-fee" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.fee() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `fee` method reports the current state of the open-ledger requirements for the transaction cost. This method requires the FeeEscalation amendment to be enabled. It was introduced in `rippled` version 0.31.0 and updated for public use in version 0.32.0. - -The `fee` method is useful for gaining insight into the current transaction costs and the state of the ledger and transaction queue. It can be used by unprivileged users to understand the fees associated with transactions at a particular point in time. - -{% embed url=" %} - -### Parameters - -The `fee` method does not take any parameters. - -### Return Object - -The `fee` method returns an object with the following fields: - -- `current_ledger_size`: Number of transactions provisionally included in the in-progress ledger. -- `current_queue_size`: Number of transactions currently queued for the next ledger. -- `drops`: Object with various information about the transaction cost, in drops of XRP. - - `base_fee`: The transaction cost required for a reference transaction to be included in a ledger under minimum load, represented in drops of XRP. - - `median_fee`: An approximation of the median transaction cost among transactions included in the previous validated ledger, represented in drops of XRP. - - `minimum_fee`: The minimum transaction cost for a reference transaction to be queued for a later ledger, represented in drops of XRP. - - `open_ledger_fee`: The minimum transaction cost that a reference transaction must pay to be included in the current open ledger, represented in drops of XRP. -- `expected_ledger_size`: The approximate number of transactions expected to be included in the current ledger. -- `ledger_current_index`: The Ledger Index of the current open ledger these stats describe. -- `levels`: Object with various information about the transaction cost, in fee levels. - - `median_level`: The median transaction cost among transactions in the previous validated ledger, represented in fee levels. - - `minimum_level`: The minimum transaction cost required to be queued for a future ledger, represented in fee levels. - - `open_ledger_level`: The minimum transaction cost required to be included in the current open ledger, represented in fee levels. - - `reference_level`: The equivalent of the minimum transaction cost, represented in fee levels. -- `max_queue_size`: The maximum number of transactions that the transaction queue can currently hold. - -### JSON-RPC Request Example - -```json -{ - "method": "fee", - "params": [{}] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "current_ledger_size": "56", - "current_queue_size": "11", - "drops": { - "base_fee": "10", - "median_fee": "10000", - "minimum_fee": "10", - "open_ledger_fee": "2653937" - }, - "expected_ledger_size": "55", - "ledger_current_index": 26575101, - "levels": { - "median_level": "256000", - "minimum_level": "256", - "open_ledger_level": "67940792", - "reference_level": "256" - }, - "max_queue_size": "1100", - "status": "success" - } - - -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger.md deleted file mode 100644 index d999b803..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -title: "ledger" -slug: "rpc-xrp-ledger" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -{% hint style="warning" %} -XRP only maintains history from ledger 32570, for more info see [onxrp.com/missing-genesis-block-xrpl/](https://onxrp.com/missing-genesis-block-xrpl/) -{% endhint %} - -### How to use it - -```javascript -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.ledger({ - ledgerIndex: 'validated', - full: false, - accounts: false, - transactions: false, - expand: false, - ownerFunds: false, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `ledger` RPC method is used to retrieve information about the public ledger in XRP. You can specify various options to customize the returned information, such as the ledger version, whether to include full information on the entire ledger, the ledger's entire state data, information on transactions in the specified ledger version, and so on. - -Use cases for this method include retrieving information about a specific ledger, examining the transactions that have occurred in a specific ledger version, examining the state data of a ledger, and more. - -{% embed url=" %} - -### Parameters - -The `ledger` method takes an optional `LedgerOptions` object. This object can contain the following fields: - -- `full` (boolean): If true, return full information on the entire ledger. -- `accounts` (boolean): If true, return the ledger's entire state data. -- `transactions` (boolean): If true, return information on transactions in the specified ledger version. -- `expand` (boolean): Provide full JSON-formatted information for transaction/account information instead of only hashes. -- `ownerFunds` (boolean): If true, include owner\_funds field in the metadata of OfferCreate transactions in the response. -- `binary` (boolean): If true, return the requested ledger object's contents as a hex string in the XRP Ledger's binary format. - -### Return Object - -The method returns a promise that resolves to an `XrpResult` object. This object contains information about the ledger, including the following fields: - -- `ledger.account_hash`: A string representing the hash of all account state information in this ledger, as hexadecimal. -- `ledger.accountState`: An array of all the account-state information in this ledger. This field is omitted unless explicitly requested. -- `ledger.close_flags`: An integer representing a bitmap of flags relating to the closing of this ledger. -- `ledger.close_time`: An integer representing the time this ledger was closed, in seconds since the Ripple Epoch. -- `ledger.close_time_human`: A string representing the time this ledger was closed, in human-readable format. Always uses the UTC time zone. -- `ledger.close_time_resolution`: An integer representing how ledger close times are rounded. Ledger close times are rounded to within this many seconds. -- `ledger.closed`: A boolean indicating whether or not this ledger has been closed. -- `ledger.ledger_hash`: A string representing the unique identifying hash of the entire ledger. -- `ledger.ledger_index`: A string representing the Ledger Index of this ledger, as a quoted integer. -- `ledger.parent_close_time`: An integer representing the time at which the previous ledger was closed. -- `ledger.parent_hash`: A string representing the unique identifying hash of the ledger that came immediately before this one. -- `ledger.total_coins`: A string representing the total number of XRP drops in the network, as a quoted integer. This decreases as transaction costs destroy XRP. -- `ledger.transaction_hash`: A string representing the hash of the transaction information included in this ledger, as hexadecimal. -- `ledger.transactions`: An array of transactions applied in this ledger version. By default, members are the transactions' identifying Hash strings. If the request specified `expand` as true, members are full representations of the transactions instead, in either JSON or binary depending on whether the request specified binary as true. - -Within the `queue_data` object, which is an array of objects describing queued transactions, you can find the following fields: - -- `account`: The Address of the sender for this queued transaction. -- `tx`: By default, this is a string containing the identifying hash of the transaction. If transactions are expanded in binary format, this is an object whose only field is `tx_blob`, containing the binary form of the transaction as a decimal string. If transactions are expanded in JSON format, this is an object containing the transaction object including the transaction's identifying hash in the `hash` field. -- `retries_remaining`: The number of times this transaction can be retried before being dropped. -- `preflight_result`: The tentative result from preliminary transaction checking. This is always `tesSUCCESS`. -- `last_result`: If this transaction was left in the queue after getting a retriable (ter) result, this is the exact ter result code it got. This field may be omitted. -- `auth_change`: Indicates whether this transaction changes this address's ways of authorizing transactions. This field may be omitted. -- `fee`: The Transaction Cost of this transaction, in drops of XRP. This field may be omitted. -- `fee_level`: The transaction cost of this transaction, relative to the minimum cost for this type of transaction, in fee levels. This field may be omitted. -- `max_spend_drops`: The maximum amount of XRP, in drops, this transaction could potentially send or destroy. This field may be omitted. - -### JSON-RPC Request Example - -Here is an example of a JSON-RPC request using the `ledger` method: - -```json -{ - "method": "ledger", - "params": [ - { - "ledger_index": "validated", - "accounts": false, - "full": false, - "transactions": false, - "expand": false, - "owner_funds": false - } - ] -} -``` - -### JSON-RPC Response Example - -Here is an example of a successful JSON-RPC response: - -```json -{ - "result": { - "ledger": { - "accepted": true, - "account_hash": "B258A8BB4743FB74CBBD6E9F67E4A56C4432EA09E5805E4CC2DA26F2DBE8F3D1", - "close_flags": 0, - "close_time": 638329271, - "close_time_human": "2020-Mar-24 01:41:11.000000000 UTC", - "close_time_resolution": 10, - "closed": true, - "hash": "3652D7FD0576BC452C0D2E9B747BDD733075971D1A9A1D98125055DEF428721A", - "ledger_hash": "3652D7FD0576BC452C0D2E9B747BDD733075971D1A9A1D98125055DEF428721A", - "ledger_index": "54300940", - "parent_close_time": 638329270, - "parent_hash": "AE996778246BC81F85D5AF051241DAA577C23BCA04C034A7074F93700194520D", - "seqNum": "54300940", - "totalCoins": "99991024049618156", - "total_coins": "99991024049618156", - "transaction_hash": "FC6FFCB71B2527DDD630EE5409D38913B4D4C026AA6C3B14A3E9D4ED45CFE30D" - }, - "ledger_hash": "3652D7FD0576BC452C0D2E9B747BDD733075971D1A9A1D98125055DEF428721A", - "ledger_index": 54300940, - "status": "success", - "validated": true - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_closed.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_closed.md deleted file mode 100644 index 755245ef..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_closed.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "ledger_closed" -slug: "rpc-xrp-ledger_closed" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.ledgerClosed() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `ledger_closed` method is used to fetch the unique identifiers of the most recently closed ledger. Note that the ledger might not be validated and immutable yet, so use this method when you need information about the latest ledger and not necessarily the final state. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The `ledger_closed` method returns an object with the following fields: - -- `ledger_hash` (String): The unique hash of this ledger version, in hexadecimal. -- `ledger_index` (Unsigned Integer): The ledger index of this ledger version. - -### JSON-RPC Request Example - -Here's an example of the `ledger_closed` method request: - -```json -{ - "id": 2, - "command": "ledger_closed" -} -``` - -### JSON-RPC Response Example - -Here's an example of a successful response: - -```json -{ - "id": 1, - "status": "success", - "type": "response", - "result": { - "ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02", - "ledger_index": 6643099 - } -} -``` - -In this response, `ledger_hash` is the unique identifier of the ledger, and `ledger_index` is the index number of this ledger version. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_data.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_data.md deleted file mode 100644 index 60033f0d..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_data.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "ledger_data" -slug: "rpc-xrp-ledger_data" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.ledgerData({ - ledger_hash: "842B57C1CC0613299A686D3E9F310EC0422C84D3911E5056389AA7E5808A93C8", - limit: 5, - binary: true -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `ledger_data` method retrieves the contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version. - -{% embed url=" %} - -### Parameters - -The `ledger_data` method takes the following parameters: - -- `ledger_hash` (Hash): A 20-byte hex string identifying the ledger version to use. (Optional) -- `ledger_index` (Ledger Index): The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. (Optional) -- `binary` (Boolean): If true, return ledger entries as hexadecimal strings instead of JSON. The default is false. (Optional) -- `limit` (Number): Limit the number of ledger entries to retrieve. The server may return fewer than this number of entries. Cannot be more than 2048 (when requesting binary) or 256 (when requesting JSON). The default is the maximum. (Optional) -- `marker` (Marker): Value from a previous paginated response. Resume retrieving data where that response left off. (Optional) -- `type` (String): Filter results to a specific type of ledger entry. Valid types include account, amendments, amm, check, deposit\_preauth, directory, escrow, fee, hashes, nft\_offer, offer, payment\_channel, signer\_list, state (trust line), and ticket. (Optional) - -### Return Object - -The `ledger_data` response provides information about the state tree of a specific ledger version. It follows the standard format and a successful result contains the following fields: - -- `ledger_index`: An unsigned integer representing the ledger index of this ledger version. -- `ledger_hash`: A string representing the unique identifying hash of this ledger version. -- `state`: An array of JSON objects containing data from the ledger's state tree. The format of these objects will depend on whether binary was set to true in the request. -- `marker`: A server-defined value indicating the response is paginated. This can be passed to the next call to resume where this call left off. - -If a type field is mentioned in the request, the state array will be empty if the first set of array objects does not match the type requested. In such cases, the marker from this response can be used to paginate and retrieve further data. - -Each object in the `state` array may include the following fields: - -- `data`: A string representing the hex representation of the requested data. This field is included only if "binary" was set to true in the request. -- `LedgerEntryType`: A string indicating what type of ledger object this object represents. This field is included only if "binary" was set to false in the request. -- Additional fields describing the object, depending on which ledger object type it is. These fields are included only if "binary" was set to false in the request. -- `index`: A string representing the unique identifier for this ledger entry, in hexadecimal format. - -### JSON-RPC Request Example - -Here's an example of the `ledger_data` method request: - -```json -{ - "id": 2, - "ledger_hash": "842B57C1CC0613299A686D3E9F310EC0422C84D3911E5056389AA7E5808A93C8", - "command": "ledger_data", - "limit": 5, - "binary": true -} -``` - -### JSON-RPC Response Example - -Here's an example of a successful response: - -```json -{ - "result": { - "ledger_hash": "842B57C1CC0613299A686D3E9F310EC0422C84D3911E5056389AA7E5808A93C8", - "ledger_index": "6885842", - "marker": "0002A590029B53BE7857EFF9985F770EC792CE483720EB5E963C4D6A607D43DF", - "state": [ - { - "data": "11006122000000002400000001250062FEA42D0000000055C204A65CF2542946289A3358C67D991B5E135FABFA89F271DBA7A150C08CA0466240000000354540208114C909F42250CFE8F12A7A1A0DFBD3CBD20F32CD79", - "index": "00001A2969BE1FC85F1D7A55282FA2E6D95C71D2E4B9C0FDD3D9994F3C00FF8F" - }, - { - "data": "11006F22000000002400000003250035788533000000000000000034000000000000000055555B93628BF3EC318892BB7C7CDCB6732FF53D12B6EEC4FAF60DD1AEE1C6101F501071633D7DE1B6AEB32F87F1A73258B13FC8CC32942D53A66D4F038D7EA4C6800064D4838D7EA4C68000000000000000000000000000425443000000000035DD7DF146893456296BF4061FBE68735D28F3286540000000000F42408114A4B8F5F7B644AEDC3447F9459C132EEB016A133B", - "index": "000037C6659BB98F8D09F2F4CFEB27DE8EFEAFE54DD9E1C13AECDF5794B0C0F5" - }, - { - "data": "11006F2200020000240000000A250067395C33000000000000000034000000000000000055A160BC41A45B6BB118DF23D77E4FF23C723431B917F50DCB41319ECC2821F34C5010DFA3B6DDAB58C7E8E5D944E736DA4B7046C30E4F460FD9DE4C1AA535D3D0C00064D554C88B43EFA00000000000000000000000000055534400000000000A20B3C85F482532A9578DBB3950B85CA06594D165400000B59B9F780081148366FB9ACD2A0FD822E31112D2EB6F98C317C2C1", - "index": "0000A8791F78CC9B39200E12A9BDAACCF40A72A512FA815525CFC9BA772990F7" - }, - { - "data": "1100612200000000240000000125003E742F2D0000000055286498B513710CFEB2D723A554C7557983D1952DF4DEE342C40DCB43067C9A21624000000306DC42008114225BAB89C4A4B94624BB069D6DB3C819F934991C", - "index": "0000B717320558E2DE1A3B9FDB24E9A695BF05D1A44E4A4683212BB1DD0FBA23" - }, - { - "data": "110072220002000025000B65783700000000000000003800000000000000005587591A63051645F37B85D1FBA55EE69B1C96BFF16904F5C99F03FB93D42D03756280000000000000000000000000000000000000004254430000000000000000000000000000000000000000000000000166800000000000000000000000000000000000000042544300000000000A20B3C85F482532A9578DBB3950B85CA06594D167D4C38D7EA4C680000000000000000000000000004254430000000000C795FDF8A637BCAAEDAD1C434033506236C82A2D", - "index": "000103996A3BAD918657F86E12A67D693E8FC8A814DA4B958A244B5F14D93E58" - } - ], - "status": "success" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_entry.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_entry.md deleted file mode 100644 index 097941db..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ledger_entry.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "ledger_entry" -slug: "rpc-xrp-ledger_entry" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.ledgerEntry({ - ledgerIndex: 'validated', - index: '7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4' -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -In this example, we're initializing the SDK for the XRP network and calling the `ledgerEntry` method with a specific ledger index and object ID. - -### Overview - -The `ledgerEntry` method of Tatum SDK facilitates interaction with the XRP Ledger. This method allows you to retrieve a single ledger object from the XRP Ledger in its raw format. It is a powerful and flexible tool with numerous use-cases such as obtaining account details, checking the state of an offer, retrieving trust lines, and much more. - -This method is comprehensive and can retrieve several different types of data. The specific type of item you wish to retrieve can be selected by passing the appropriate parameters. - -{% embed url=" %} - -### Parameters - -The `ledgerEntry` method accepts a parameter of `LedgerEntryOptions` type, which may contain the following fields: - -- `index`: the object ID of a single object to retrieve from the ledger, as a 64-character (256-bit) hexadecimal string. -- `accountRoot`: the classic address of the AccountRoot object to retrieve. -- `directory`: the object ID of the directory or an object requiring either `dir_root` or `owner` as a sub-field, plus optionally a `sub_index` sub-field. -- `offer`: the unique object ID to the Offer or an object requiring the sub-fields `account` and `seq` to uniquely identify the offer. -- `rippleState`: an object specifying the RippleState (trust line) object to retrieve, with the `accounts` and `currency` sub-fields required. -- `check`: the object ID of a Check object to retrieve. -- `escrow`: the object ID of the Escrow or an object requiring `owner` and `seq` sub-fields. -- `paymentChannel`: the object ID of a PayChannel object to retrieve. -- `depositPreauth`: the object ID of the DepositPreauth object or an object requiring `owner` and `authorized` sub-fields. -- `ticket`: the object ID of the Ticket or an object requiring `account` and `ticket_seq` sub-fields. -- `nftPage`: the object ID of an NFT Page to retrieve. - -### Return Object - -The `ledger_entry` response provides information about a specific ledger object and follows the standard format. A successful result contains the following fields: - -- `index`: A string representing the unique ID of the ledger object. -- `ledger_index`: An unsigned integer representing the ledger index of the ledger that was used when retrieving this data. -- `node`: An object containing the data of the ledger object, according to the ledger format. This field is omitted if the "binary": true parameter is specified. -- `node_binary`: A string representing the binary representation of the ledger object in hexadecimal format. This field is included only if the "binary": true parameter is specified. - -### JSON-RPC Request Example - -```json -{ - "method": "ledger_entry", - "params": [ - { - "index": "7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4", - "ledger_index": "validated" - } - ] -} -``` - -In this example, we're requesting a ledger entry for a particular object ID and using the 'validated' ledger index. - -### JSON-RPC Response Example - -```json -{ - "result": { - "ledger_index": 464, - "nft_page": "7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4", - "ledger_index": "validated" - }] -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-manifest.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-manifest.md deleted file mode 100644 index 2c879b4c..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-manifest.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "manifest" -slug: "rpc-xrp-manifest" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.manifest('nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `manifest` method is a specialized RPC method provided by the Ripple (XRP) blockchain to report the current "manifest" information for a given validator's public key. The "manifest" is a block of data that authorizes an ephemeral signing key with a signature from the validator's master key pair. - -This method is particularly useful in scenarios where one needs to verify the authenticity of a validator. It could also be used to gather information about a validator's association with a domain, its ephemeral and master keys, and the sequence number of its manifest. - -{% embed url=" %} - -### Parameters - -The `manifest` method accepts a single parameter: - -- `publicKey`: The base58-encoded public key of the validator to look up. This can be the master public key or ephemeral public key. - -### Return Object - -The `manifest` method returns an object with the following fields: - -- `details`: An object containing detailed information about the manifest. This field is omitted if the server does not have a manifest for the `public_key` from the request. The details object has the following fields: - - `domain`: The domain name this validator claims to be associated with. If the manifest does not contain a domain, this is an empty string. - - `ephemeral_key`: The ephemeral public key for this validator, in base58. - - `master_key`: The master public key for this validator, in base58. - - `seq`: The sequence number of this manifest. This number increases whenever the validator operator updates the validator's token to rotate ephemeral keys or change settings. -- `manifest`: The full manifest data in base64 format. This data is serialized to binary before being base64-encoded. This field is omitted if the server does not have a manifest for the `public_key` from the request. -- `requested`: The `public_key` from the request. -- `status`: The status of the request, typically "success". - -### JSON-RPC Request Example - -```json -{ - "method": "manifest", - "params": [{ - "public_key":"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p" - }] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "details": { - "domain": "", - "ephemeral_key": "n9J67zk4B7GpbQV5jRQntbgdKf7TW6894QuG7qq1rE5gvjCu6snA", - "master_key": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p", - "seq": 1 - }, - "manifest": "JAAAAAFxIe3AkJgOyqs3y+UuiAI27Ff3Mrfbt8e7mjdo06bnGEp5XnMhAhRmvCZmWZXlwShVE9qXs2AVCvhVuA/WGYkTX/vVGBGwdkYwRAIgGnYpIGufURojN2cTXakAM7Vwa0GR7o3osdVlZShroXQCIH9R/Lx1v9rdb4YY2n5nrxdnhSSof3U6V/wIHJmeao5ucBJA9D1iAMo7YFCpb245N3Czc0L1R2Xac0YwQ6XdGT+cZ7yw2n8JbdC3hH8Xu9OUqc867Ee6JmlXtyDHzBdY/hdJCQ==", - "requested": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p", - "status": "success" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-nft_buy_offers.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-nft_buy_offers.md deleted file mode 100644 index ab266f52..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-nft_buy_offers.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "nft_buy_offers" -slug: "rpc-xrp-nft_buy_offers" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const nftId = '00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007' - -const res = await tatum.rpc.nftBuyOffers(nftId, { ledgerIndex: 'validated', limit: 250 }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `nft_buy_offers` method is used to get a list of active buy offers for a specific NFToken. This allows users to track and analyze offers for a particular token and make informed decisions based on the market demand. - -{% embed url=" %} - -### Parameters - -- `nftId` (String): The unique identifier of a NFToken object. -- `options` (Ledger & Pagination): Optional parameter that includes details about the ledger to use and pagination options. - -### Return Object - -The `nft_buy_offers` method returns an object that provides information about the buy offers for a specific non-fungible token (NFT). The object contains the following fields: - -- `nft_id`: A string that represents the NFT these offers are for, as specified in the request. -- `offers`: An array that contains a list of buy offers for the token. Each member of this array represents one NFTokenOffer object to buy the NFT in question and has the following fields: - - `amount`: A string or an object that represents the amount offered to buy the NFT for. This could be a string representing an amount in drops of XRP, or an object representing an amount of a fungible token. - - `flags`: A number that represents a set of bit-flags for this offer. See NFTokenOffer flags for possible values. - - `nft_offer_index`: A string that represents the ledger object ID of this offer. - - `owner`: A string that represents the account that placed this offer. -- `limit`: (May be omitted) A number that represents the limit, as specified in the request. -- `marker`: (May be omitted) A server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. This field is omitted when there are no pages of information after this one. - -### JSON-RPC Request Example - -```json -{ - "method": "nft_buy_offers", - "params": [{ - "nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007", - "ledger_index": "validated" - }] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007", - "offers": [ - { - "amount": "1500", - "flags": 0, - "nft_offer_index": "3212D26DB00031889D4EF7D9129BB0FA673B5B40B1759564486C0F0946BA203F", - "owner": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx" - } - ], - "status": "success" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-nft_sell_offers.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-nft_sell_offers.md deleted file mode 100644 index 6072086e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-nft_sell_offers.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: "nft_sell_offers" -slug: "rpc-xrp-nft_sell_offers" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const nftId = '00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007' - -const res = await tatum.rpc.nftSellOffers(nftId, { ledgerIndex: 'validated', limit: 250 }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `nft_sell_offers` method is used to get a list of active sell offers for a specific NFToken. This allows users to track and analyze offers for a particular token and make informed decisions based on the market demand. - -{% embed url=" %} - -### Parameters - -- `nftId` (String): The unique identifier of a NFToken object. -- `options` (Ledger & Pagination): Optional parameter that includes details about the ledger to use and pagination options. - -### Return Object - -The `nft_sell_offers` method returns an object that provides information about the sell offers for a specific non-fungible token (NFT). The object contains the following fields: - -- `nft_id`: A string that represents the NFT these offers are for, as specified in the request. -- `offers`: An array that contains a list of sell offers for the token. Each member of this array represents one NFTokenOffer object to sell the NFT in question and has the following fields: - - `amount`: A string or an object that represents the amount offered to sell the NFT for. This could be a string representing an amount in drops of XRP, or an object representing an amount of a fungible token. - - `flags`: A number that represents a set of bit-flags for this offer. See NFTokenOffer flags for possible values. - - `nft_offer_index`: A string that represents the ledger object ID of this offer. - - `owner`: A string that represents the account that placed this offer. -- `limit`: (May be omitted) A number that represents the limit, as specified in the request. -- `marker`: (May be omitted) A server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. This field is omitted when there are no pages of information after this one. - -### JSON-RPC Request Example - -```json -{ - "method": "nft_sell_offers", - "params": [{ - "nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007" - }] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007", - "offers": [ - { - "amount": "1000", - "flags": 1, - "nft_offer_index": "9E28E366573187F8E5B85CE301F229E061A619EE5A589EF740088F8843BF10A1", - "owner": "rLpSRZ1E8JHyNDZeHYsQs1R5cwDCB3uuZt" - } - ], - "status": "success" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-noripple_check.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-noripple_check.md deleted file mode 100644 index a6f1d100..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-noripple_check.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "noripple_check" -slug: "rpc-xrp-noripple_check" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const result = await tatum.rpc.norippleCheck('r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', 'gateway', { - transactions: true, - limit: 2 -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `noripple_check` method provides a quick way to check the status of the Default Ripple field for an account and the No Ripple flag of its trust lines, compared with the recommended settings. This can be useful for developers and administrators who want to ensure that their accounts are configured correctly, especially when managing the accounts of large or complex financial organisations. - -{% embed url=" %} - -### Parameters - -- `account` (String): A unique identifier for the account, most commonly the account's address. -- `role` (String): Whether the address refers to a gateway or user. Recommendations depend on the role of the account. Issuers must have Default Ripple enabled and must disable No Ripple on all trust lines. Users should have Default Ripple disabled, and should enable No Ripple on all trust lines. -- `transactions` (Boolean, optional): If true, include an array of suggested transactions, as JSON objects, that you can sign and submit to fix the problems. Defaults to false. -- `limit` (Number, optional): The maximum number of trust line problems to include in the results. Defaults to 300. - -### Return Object - -The `noripple_check` method returns an object with the following fields: - -- `ledger_current_index` (Number): The ledger index of the ledger used to calculate these results. -- `problems` (Array): Array of strings with human-readable descriptions of the problems. This includes up to one entry if the account's Default Ripple setting is not as recommended, plus up to limit entries for trust lines whose No Ripple setting is not as recommended. -- `transactions` (Array): If the request specified transactions as true, this is an array of JSON objects, each of which is the JSON form of a transaction that should fix one of the described problems. The length of this array is the same as the problems array, and each entry is intended to fix the problem described at the same index into that array. - -### JSON-RPC Request Example - -```json -{ - "method": "noripple_check", - "params": [ - { - "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "ledger_index": "current", - "limit": 2, - "role": "gateway", - "transactions": true - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "ledger_current_index": 14380381, - "problems": [ - "You should immediately set your default ripple flag", - "You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z", - "You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q" - ], - "status": "success", - "transactions": [ - { - "Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "Fee": 10000, - "Sequence": 1406, - "SetFlag": 8, - "TransactionType": "AccountSet" - }, - { - "Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "Fee": 10000, - "Flags": 262144, - "LimitAmount": { - "currency": "XAU", - "issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z", - "value": "0" - }, - "Sequence": 1407, - "TransactionType": "TrustSet" - }, - { - "Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "Fee": 10000, - "Flags": 262144, - "LimitAmount": { - "currency": "USD", - "issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", - "value": "5" - }, - "Sequence": 1408, - "TransactionType": "TrustSet" - } - ], - "validated": false - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ping.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ping.md deleted file mode 100644 index dbb2da3b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ping.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "ping" -slug: "rpc-xrp-ping" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.ping() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `ping` method is a simple RPC method provided by the Ripple (XRP) blockchain, used primarily to check the connection status and latency to the XRP blockchain node. It's a useful tool in debugging and network troubleshooting scenarios, as it provides an easy way to verify the connection and round-trip time between the client and the server. - -{% embed url=" %} - -### Parameters - -The `ping` method accepts no parameters. - -### Return Object - -The `ping` method returns a simple object with the following field: - -- `status`: The status of the request, typically "success". The presence of this field in the response indicates a successful round trip. - -The client can measure the round-trip time from the request to the response as latency. - -### JSON-RPC Request Example - -```json -{ - "method": "ping", - "params": [ - {} - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "status": "success" - } -} -``` - -This response signifies a successful connection to the XRP node. The time it takes to receive this response can be used to measure network latency. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-random.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-random.md deleted file mode 100644 index 123dc33f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-random.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "random" -slug: "rpc-xrp-random" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.random() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `random` method is an RPC method provided by the Ripple (XRP) blockchain. This command returns a random number that can be used as a source of entropy for random number generation by clients. It's particularly useful in scenarios where a high-entropy random number is required, such as cryptographic operations or unique identifier generation. - -{% embed url=" %} - -### Parameters - -The `random` method accepts no parameters. - -### Return Object - -The `random` method returns an object with the following fields: - -- `random`: A Random 256-bit hex value. -- `status`: The status of the request, typically "success". - -### JSON-RPC Request Example - -```json -{ - "method": "random", - "params": [ - {} - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "random": "4E57146AA47BC6E88FDFE8BAA235B900126C916B6CC521550996F590487B837A", - "status": "success" - } -} -``` - -This response includes a random 256-bit hex value generated by the XRP node. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ripple_path_find.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ripple_path_find.md deleted file mode 100644 index 314931d0..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-ripple_path_find.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: "ripple_path_find" -slug: "rpc-xrp-ripple_path_find" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network, CurrencyAmount, RipplePathFindOptions } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const destinationAmount: CurrencyAmount = { - currency: 'USD', - issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B', - value: '0.001', -} - -const res = await tatum.rpc.ripplePathFind( - 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', - 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', - destinationAmount -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `ripple_path_find` method is a simplified version of the `path_find` method that provides a single response with a payment path that can be used immediately. It tries to find the cheapest path or combination of paths for making a payment, but it is not guaranteed that the paths returned are, in fact, the best paths. - -The method is available in both the WebSocket and JSON-RPC APIs. However, the results tend to become outdated as time passes. Instead of making multiple calls to stay updated, it is recommended to use the `path_find` method to subscribe to continued updates where possible. - -One thing to note is that pathfinding results from untrusted servers need to be handled with care. A server could be modified to return less-than-optimal paths to earn money for its operators. A server may also return poor results when under heavy load. If you do not have your own server that you can trust with pathfinding, you should compare the results of pathfinding from multiple servers run by different parties, to minimize the risk of a single server returning poor results. - -### Parameters - -The `ripple_path_find` method includes the following parameters: - -- `source_account`: Unique address of the account that would send funds in a transaction -- `destination_account`: Unique address of the account that would receive funds in a transaction -- `destination_amount`: Currency Amount that the destination account would receive in a transaction. Special case: New in: rippled 0.30.0 You can specify "-1" (for XRP) or provide -1 as the contents of the value field (for non-XRP currencies). This requests a path to deliver as much as possible, while spending no more than the amount specified in send\_max (if provided). -- `send_max`: (Optional) Currency Amount that would be spent in the transaction. Cannot be used with source\_currencies. New in: rippled 0.30.0 -- `source_currencies`: (Optional) Array of currencies that the source account might want to spend. Each entry in the array should be a JSON object with a mandatory currency field and optional issuer field, like how currency amounts are specified. Cannot contain more than 18 source currencies. By default, uses all source currencies available up to a maximum of 88 different currency/issuer pairs. -- `ledger_hash`: (Optional) A 20-byte hex string for the ledger version to use. (See Specifying Ledgers) -- `ledger_index`: (Optional) The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. (See Specifying Ledgers) - -### Return Object - -The `ripple_path_find` method returns a result object that includes: - -- `alternatives`: Array of objects with possible paths to take. If empty, then there are no paths connecting the source and destination accounts. -- `destination_account`: Unique address of the account that would receive a payment transaction -- `destination_currencies`: Array of strings representing the currencies that the destination accepts, as 3-letter codes like "USD" or as 40-character hex like "015841551A748AD2C1F76FF6ECB0CCCD00000000" - -Each element in the alternatives array is an object that represents a path from one possible source currency (held by the initiating account) to the destination account and currency. This object has the following fields: - -- `paths_computed`: Array of arrays of objects defining payment paths -- `source_amount`: Currency Amount that the source would have to send along this path for the destination to receive the desired amount - -### JSON-RPC Request Example - -```json -{ - "method": "ripple_path_find", - "params": [ - { - "destination_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "destination_amount": { - "currency": "USD", - "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B", - "value": "0.001" - }, - "source_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "source_currencies": [ - { - "currency": "XRP" - }, - { - "currency": "USD" - } - ] - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "alternatives": [ - { - "paths_computed": [ - [ - { - "currency": "USD", - "issuer": "rpDMez6pm6dBve2TJsmDpv7Yae6V5Pyvy2", - "type": 48, - "type_hex": "0000000000000030" - }, - { - "account": "rpDMez6pm6dBve2TJsmDpv7Yae6V5Pyvy2", - "type": 1, - "type_hex": "0000000000000001" - }, - { - "account": "rfDeu7TPUmyvUrffexjMjq3mMcSQHZSYyA", - "type": 1, - "type_hex": "0000000000000001" - }, - { - "account": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B", - "type": 1, - "type_hex": "0000000000000001" - } - ] - ], - "source_amount": "207414" - } - ], - "destination_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", - "destination_currencies": [ - "USD", - "JOE", - "BTC", - "DYM", - "CNY", - "EUR", - "015841551A748AD2C1F76FF6ECB0CCCD00000000", - "MXN", - "XRP" - ], - "status": "success" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-server_info.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-server_info.md deleted file mode 100644 index 9fe5cf20..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-server_info.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -title: "server_info" -slug: "rpc-xrp-server_info" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -// Initialize Tatum SDK for XRP -const tatum = await TatumSDK.init({network: Network.XRP}) - -// Call the serverInfo method -const serverInfo = await tatum.rpc.serverInfo() - -console.log(serverInfo) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `serverInfo` method provides a human-readable version of various information about the rippled server being queried. This information can be crucial for understanding the current state of the server, including its uptime, validation quorum, current ledger sequence, transaction load, and much more. - -Use cases for `serverInfo` include: - -- Monitoring server performance and resource usage. -- Checking the server's connection status to the XRP Ledger network. -- Investigating the server's ledger history and validation status. - -{% embed url=" %} - -### Parameters - -The `serverInfo` method doesn't require any parameters. - -Here are the fields for the `server_info` method: - -- `amendment_blocked`: (May be omitted) A Boolean value that indicates whether this server is amendment blocked. If the server is not amendment blocked, the response omits this field. -- `build_version`: A string that represents the version number of the running `rippled` server. -- `closed_ledger`: (May be omitted) An object that provides information about the most recently closed ledger that has not been validated by consensus. If the most recently validated ledger is available, the response omits this field and includes `validated_ledger` instead. The member fields are the same as the `validated_ledger` field. -- `complete_ledgers`: A string that indicates the range of ledger versions the local `rippled` has in its database. This may be a disjoint sequence. If the server does not have any complete ledgers, this is the string "empty". -- `hostid`: On an admin request, returns the hostname of the server running the `rippled` instance; otherwise, returns a single RFC-1751 word based on the node public key. -- `io_latency_ms`: A number that shows the amount of time spent waiting for I/O operations, in milliseconds. If this number is high, then the `rippled` server is probably having serious load issues. -- `jq_trans_overflow`: The number of times (since starting up) that this server has had over 250 transactions waiting to be processed at once. A large number here may mean that your server is unable to handle the transaction load of the XRP Ledger network. -- `last_close`: An object that provides information about the last time the server closed a ledger, including the amount of time it took to reach a consensus and the number of trusted validators participating. - - `last_close.converge_time_s`: A number that represents the amount of time it took to reach a consensus on the most recently validated ledger version, in seconds. - - `last_close.proposers`: A number that shows how many trusted validators the server considered (including itself, if configured as a validator) in the consensus process for the most recently validated ledger version. -- `load`: (Admin only) An object that provides detailed information about the current load state of the server. - - `load.job_types`: (Admin only) An array that provides information about the rate of different types of jobs the server is doing and how much time it spends on each. - - `load.threads`: (Admin only) A number that shows the number of threads in the server's main job pool. -- `load_factor`: A number that represents the load-scaled open ledger transaction cost the server is currently enforcing, as a multiplier on the base transaction cost. -- `load_factor_local`: (May be omitted) A number that represents the current multiplier to the transaction cost based on load to this server. -- `load_factor_net`: (May be omitted) A number that represents the current multiplier to the transaction cost being used by the rest of the network (estimated from other servers' reported load values). -- `load_factor_cluster`: (May be omitted) A number that represents the current multiplier to the transaction cost based on load to servers in this cluster. -- `load_factor_fee_escalation`: (May be omitted) A number that represents the current multiplier to the transaction cost that a transaction must pay to get into the open ledger. -- `load_factor_fee_queue`: (May be omitted) A number that represents the current multiplier to the transaction cost that a transaction must pay to get into the queue, if the queue is full. -- `load_factor_server`: (May be omitted) A number that represents the load factor the server is enforcing, not - -including the open ledger cost. - -- `peers`: (Omitted by reporting mode servers) A number that shows how many other `rippled` servers this one is currently connected to. -- `pubkey_node`: A string that represents the public key used to verify this server for peer-to-peer communications. -- `pubkey_validator`: (Admin only) A string that represents the public key used by this node to sign ledger validations. -- `reporting`: (Reporting mode servers only) An object that provides information about this server's reporting-mode specific configurations. -- `reporting.etl_sources`: (Reporting mode servers only) An array that lists the P2P-mode servers this reporting mode is retrieving data from. -- `reporting.is_writer`: (Reporting mode servers only) A Boolean value that indicates whether this server is writing to the external database with ledger data. -- `reporting.last_publish_time`: (Reporting mode servers only) A string that represents an ISO 8601 timestamp indicating when this server last published a validated ledger to its subscription streams. -- `server_state`: A string that indicates to what extent the server is participating in the network. -- `server_state_duration_us`: A number that represents the number of consecutive microseconds the server has been in the current state. -- `state_accounting`: An object that is a map of various server states with information about the time the server spends in each. -- `state_accounting.*.duration_us`: A string that shows the number of microseconds the server has spent in this state. -- `state_accounting.*.transitions`: A string that shows the number of times the server has changed into this state. -- `time`: A string that represents the current time in UTC, according to the server's clock. -- `uptime`: A number that represents the number of consecutive seconds that the server has been operational. -- `validated_ledger`: (May be omitted) An object that provides information about the most recent fully-validated ledger. - - `validated_ledger.age`: A number that shows the time since the ledger was closed, in seconds. - - `validated_ledger.base_fee_xrp`: A number that represents the base fee, in XRP. - - `validated_ledger.hash`: A string that represents the unique hash for the ledger, as hexadecimal. - - `validated_ledger.reserve_base_xrp`: A number that represents the minimum amount of XRP (not drops) necessary for every account to keep in reserve. - - `validated_ledger.reserve_inc_xrp`: A number that represents the amount of XRP (not drops) added to the account reserve for each object an account owns in the ledger. - - `validated_ledger.seq`: A number that represents the ledger index of the latest validated ledger. -- `validation_quorum`: A number that represents the minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations. -- `validator_list_expires`: (Admin only) A string that either represents the human readable time, in UTC, when the current validator list expires, the string "unknown" if the server has yet to load a published validator list or the string "never" if the server uses a static validator list. - -### JSON-RPC Request Example - -```json -{ - "method": "server_info", - "params": [ - {} - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "info": { - "build_version": "1.9.4", - "complete_ledgers": "32570-75801747", - "hostid": "ABET", - "initial_sync_duration_us": "566800928", - "io_latency_ms": 1, - "jq_trans_overflow": "47035", - "last_close": { - "converge_time_s": 3, - "proposers": 35 - }, - "load_factor": 1, - "network_id": 0, - "peer_disconnects": "542", - "peer_disconnects_resources": "1", - "peers": 24, - "pubkey_node": "n9LvjJyaYHBWUvQUat632RrnpS7UHVLW2tLUGXSZ2yXouh4goDHX", - "server_state": "full", - "server_state_duration_us": "3612238603", - "state_accounting": { - "connected": { - "duration_us": "125498126", - "transitions": "67" - }, - "disconnected": { - "duration_us": "473415516", - "transitions": "2" - }, - "full": { - "duration_us": "4365855930299", - "transitions": "337" - }, - "syncing": { - "duration_us": "1383837914", - "transitions": "311" - }, - "tracking": { - "duration_us": "518995710", - "transitions": "374" - } - }, - "time": "2022-Nov-16 21:51:03.737667 UTC", - "uptime": 4368357, - "validated_ledger": { - "age": 1, - "base_fee_xrp": 0.00001, - "hash": "D54A94D5EF620DC212EAB5958D592EC641FC94ED92146477A04DCE5B006DFF05", - "reserve_base_xrp": 10, - "reserve_inc_xrp": 2, - "seq": 75801747 - }, - "validation_quorum": 28 - }, - "status": "success" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-server_state.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-server_state.md deleted file mode 100644 index 9c91e5d1..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-server_state.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -title: "server_state" -slug: "rpc-xrp-server_state" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.serverState() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `server_state` RPC method is used to retrieve various machine-readable information about the rippled server's current state. The response provided by this method is almost the same as the `server_info` method, but uses units that are easier to process instead of easier to read. For example, XRP values are given in integer drops instead of scientific notation or decimal values, and time is given in milliseconds instead of seconds. - -This method can be useful when you need to gather specific information about the server's state, such as the build version, complete ledgers, load base, load factor, server state, and more. This information can be useful for monitoring the health and performance of a rippled server. - -{% embed url=" %} - -### Parameters - -The `server_state` method does not require any parameters. - -### Return Object - -The `server_state` method returns an object with the following fields: - -- `amendment_blocked`: (Optional) A Boolean value that indicates if the server is amendment blocked. This field may be omitted if the server is not amendment blocked. -- `build_version`: A string that provides the version number of the running `rippled` version. -- `complete_ledgers`: A string that indicates the sequence numbers of the ledger versions the local `rippled` has in its database. This could be a disjoint sequence like "2500-5000,32570-7695432". If the server does not have any complete ledgers (for example, if it recently started syncing with the network), this is an empty string. -- `closed_ledger`: (Optional) An object that provides information on the most recently closed ledger that has not been validated by consensus. If the most recently validated ledger is available, the response omits this field and includes `validated_ledger` instead. The member fields are the same as the `validated_ledger` field. -- `io_latency_ms`: A number that indicates the amount of time spent waiting for I/O operations, in milliseconds. If this number is not very, very low, then the `rippled` server is probably having serious load issues. -- `jq_trans_overflow`: A string-number that represents the number of times this server has had over 250 transactions waiting to be processed at once. A large number here may mean that your server is unable to handle the transaction load of the XRP Ledger network. -- `last_close`: An object that provides information about the last time the server closed a ledger, including the amount of time it took to reach a consensus and the number of trusted validators participating. This object includes: - - `last_close.converge_time`: A number that shows the amount of time it took to reach a consensus on the most recently validated ledger version, in milliseconds. - - `last_close.proposers`: A number that indicates how many trusted validators the server considered (including itself, if configured as a validator) in the consensus process for the most recently validated ledger version. -- `load`: (Admin only) An object that provides detailed information about the current load state of the server. This object includes: - - `load.job_types`: (Admin only) An array that provides information about the rate of different types of jobs the server is doing and how much time it spends on each. - - `load.threads`: (Admin only) A number that indicates the number of threads in the server's main job pool. -- `load_base`: An integer that represents the baseline amount of server load used in transaction cost calculations. If the `load_factor` is equal to the `load_base` then only the base transaction cost is enforced. If the `load_factor` is higher than the `load_base`, then transaction costs are multiplied by the ratio between them. -- `load_factor`: A number that represents the load factor the server is currently enforcing. The ratio between this value and the `load_base` determines the multiplier for transaction costs. The load factor is determined by the highest of the individual server's load factor, cluster's load factor, the open ledger cost, and the overall network's load factor. -- `load_factor_fee_escalation`: (Optional) A number that indicates the current multiplier to the transaction cost to get into the open ledger, in fee levels. -- `load_factor_fee_queue`: (Optional) A number that indicates the current multiplier to the transaction cost to get into the queue, if the queue is full, in fee levels. -- `load_factor_fee_reference`: (Optional) A number that indicates the transaction cost with no load scaling, in fee levels. -- `load_factor_server`: (Optional) A number that represents the load factor the server is enforcing, not including the open ledger cost. -- `peers`: A number that shows how many other `rippled` servers this one is currently connected to. This field is omitted by reporting mode servers. -- `pubkey_node`: A string that represents the public key used to verify this server for peer-to-peer communications. This node key pair is automatically generated by the server the first time it starts up. -- `pubkey_validator`: (Admin only) A string that represents the public key used by this node to sign ledger validations. This validation key pair is derived from the `[validator_token]` or `[validation_seed]` config field. -- `reporting`: (Reporting mode servers only) An object that provides information about this server's reporting-mode specific configurations. This object includes: - - `reporting.etl_sources`: (Reporting mode servers only) An array that lists P2P-mode servers this reporting mode is retrieving data from. Each entry in this array is an ETL Source object. - - `reporting.is_writer`: (Reporting mode servers only) A Boolean value that indicates if this server is writing to the external database with ledger data. If false, it is not currently writing, possibly because another reporting mode server is currently populating a shared database, or because it's configured as read-only. - - `reporting.last_publish_time`: (Reporting mode servers only) A string that represents an ISO 8601 timestamp indicating when this server last saw a new validated ledger from any of its P2P mode sources. -- `server_state`: A string that indicates to what extent the server is participating in the network. -- `server_state_duration_us`: A number that shows the number of consecutive microseconds the server has been in the current state. -- `state_accounting`: An object that represents a map of various server states with information about the time the server spends in each. This object includes: - - `state_accounting.*.duration_us`: A string that indicates the number of microseconds the server has spent in this state. This is updated whenever the server transitions into another state. - - `state_accounting.*.transitions`: A string that shows the number of times the server has changed into this state. -- `time`: A string that indicates the current time in UTC, according to the server's clock. -- `uptime`: A number that indicates the number of consecutive seconds that the server has been operational. -- `validated_ledger`: (Optional) An object that provides information about the most recent fully-validated ledger. This object includes: - - `validated_ledger.base_fee`: A number that indicates the base fee, in drops of XRP, for propagating a transaction to the network. - - `validated_ledger.close_time`: A number that shows the time this ledger was closed, in seconds since the Ripple Epoch. - - `validated_ledger.hash`: A string that represents the unique hash of this ledger version, as hexadecimal. - - `validated_ledger.reserve_base`: A number that shows the minimum account reserve, as of the most recent validated ledger version. - - `validated_ledger.reserve_inc`: A number that shows the owner reserve for each item an account owns, as of the most recent validated ledger version. - - `validated_ledger.seq`: A number that represents the ledger index of the most recently validated ledger version. -- `validation_quorum`: A number that indicates the minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations. -- `validator_list_expires`: (Admin only) A number that shows when the current validator list expires, in seconds since the Ripple Epoch, or 0 if the server has yet to load a published validator list. - -For the `ETL Source Object`, each member of the `etl_sources` field is an object with the following fields: - -- `connected`: A Boolean value that indicates if the reporting mode server is connected to this P2P mode server. If false, the server is not connected. -- `grpc_port`: A string that shows the port number on the P2P mode server where this reporting mode server is configured to connect and retrieve ledger data via gRPC. -- `ip`: A string that represents the IP address (IPv4 or IPv6) of the P2P mode server. -- `last_message_arrival_time`: A string that represents an ISO 8601 timestamp indicating the most recent time the reporting mode server received a message from this P2P server. -- `validated_ledgers_range`: A string that shows the range of validated ledger versions this P2P mode server reports that it has available, in the same format as complete\_ledgers. -- `websocket_port`: A string that shows the port number on the P2P server where this reporting mode server is configured to forward WebSocket requests that cannot be served directly from reporting mode. - -### JSON-RPC Request Example - -```json -{ - "method": "server_state", - "params": [ - {} - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "state": { - "build_version": "1.7.2", - "complete_ledgers": "65844785-65887184", - "io_latency_ms": 3, - "jq_trans_overflow": "580", - "last_close": { - "converge_time": 3012, - "proposers": 41 - }, - "load_base": 256, - "load_factor": 134022, - "load_factor_fee_escalation": 134022, - "load_factor_fee_queue": 256, - "load_factor_fee_reference": 256, - "load_factor_server": 256, - "peer_disconnects": "792367", - "peer_disconnects_resources": "7273", - "peers": 72, - "pubkey_node": "n9LNvsFiYfFf8va6pma2PHGJKVLSyZweN1iBAkJQSeHw4GjM8gvN", - "server_state": "full", - "server_state_duration_us": "422128665555", - "state_accounting": { - "connected": { - "duration_us": "172799714", - "transitions": "1" - }, - "disconnected": { - "duration_us": "309059", - "transitions": "1" - }, - "full": { - "duration_us": "6020429212246", - "transitions": "143" - }, - "syncing": { - "duration_us": "413813232", - "transitions": "152" - }, - "tracking": { - "duration_us": "266553605", - "transitions": "152" - } - }, - "time": "2021-Aug-24 20:43:43.043406 UTC", - "uptime": 6021282, - "validated_ledger": { - "base_fee": 10, - "close_time": 683153020, - "hash": "ABEF3D24015E8B6B7184B4ABCEDC0E0E3AA4F0677FAB91C40B1E500707C1F3E5", - "reserve_base": 20000000, - "reserve_inc": 5000000, - "seq": 65887184 - }, - "validation_quorum": 33 - }, - "status": "success" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-submit.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-submit.md deleted file mode 100644 index a5bc0b9e..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-submit.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -title: "submit" -slug: "rpc-xrp-submit" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const tx = { - TransactionType: "Payment", - Account: "rBPAQmwMrt7FDDPNyjwFgwSqbWZPf6GieV", - Destination: "rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY", - Amount: "2000000", - Flags: 2147483648 -} - -const res = await tatum.rpc.submit(tx, { - secret: 's████████████████████████████' -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `submit` method is an RPC method in the XRP Ledger which is used to apply a transaction and send it to the network for confirmation and inclusion in future ledgers. It has two modes: Submit-only mode, where a signed and serialized transaction is submitted as-is, and Sign-and-submit mode, where a JSON-formatted transaction object is completed, signed, and then submitted. It is generally recommended to use the Submit-only mode for robustness. - -Use cases for this method include submitting transactions to the XRP ledger, such as sending payments, managing trust lines, or deploying smart contracts. - -{% embed url=" %} - -### Parameters - -The `submit` method takes the following parameters: - -- `tx` (required): A string or JSON object representing the transaction to be submitted. This can be a hex representation of the signed transaction or a transaction definition in JSON format. -- `options` (optional): An object containing additional parameters. These can include: - - `secret` (optional): The secret seed of the account. - - `seed` (optional): The secret seed of the account in the XRP Ledger's base58 format. - - `seedHex` (optional): The secret seed of the account in the hexadecimal format. - - `passphrase` (optional): The secret seed of the account as the string passphrase. - - `keyType` (optional): The signing algorithm of the cryptographic key pair provided (secp256k1 or ed25519). - - `failHard` (optional): If true, and the transaction fails locally, do not retry or relay the transaction to other servers. - - `offline` (optional): If true, when constructing the transaction, do not try to automatically fill in or validate values. - - `buildPath` (optional): If true, the server auto-fills the Paths field of a Payment transaction before signing. - - `feeMultMax` (optional): Sign-and-submit fails with the error rpcHIGH\_FEE if the auto-filled Fee value would be greater than the reference transaction cost × feeMultMax ÷ feeDivMax. - - `feeDivMax` (optional): Sign-and-submit fails with the error rpcHIGH\_FEE if the auto-filled Fee value would be greater than the reference transaction cost × feeMultMax ÷ feeDivMax. - -### Return Object - -The `submit` method returns an object that provides information about the result of the submitted transaction. The object contains the following fields: - -- `engine_result`: A string that represents a code indicating the preliminary result of the transaction, for example, "tesSUCCESS". -- `engine_result_code`: An integer that represents a numeric version of the result code. This is directly correlated to the `engine_result`. -- `engine_result_message`: A string that represents a human-readable explanation of the transaction's preliminary result. -- `tx_blob`: A string that represents the complete transaction in hexadecimal string format. -- `tx_json`: An object that represents the complete transaction in JSON format. -- `accepted`: A boolean value that indicates whether the transaction was accepted. This field is omitted in sign-and-submit mode. -- `account_sequence_available`: A number indicating the next Sequence Number available for the sending account after all pending and queued transactions. This field is omitted in sign-and-submit mode. -- `account_sequence_next`: A number indicating the next Sequence Number for the sending account after all transactions that have been provisionally applied, but not transactions in the queue. This field is omitted in sign-and-submit mode. -- `applied`: A boolean value indicating whether the transaction was applied to the open ledger. This field is omitted in sign-and-submit mode. -- `broadcast`: A boolean value indicating whether the transaction was broadcast to peer servers in the peer-to-peer XRP Ledger network. This field is omitted in sign-and-submit mode. -- `kept`: A boolean value indicating whether the transaction was kept to be retried later. This field is omitted in sign-and-submit mode. -- `queued`: A boolean value indicating whether the transaction was put in the Transaction Queue. This field is omitted in sign-and-submit mode. -- `open_ledger_cost`: A string indicating the current open ledger cost before processing this transaction. Transactions with a lower cost are likely to be queued. This field is omitted in sign-and-submit mode. -- `validated_ledger_index`: An integer indicating the ledger index of the newest validated ledger at the time of submission. This field is omitted in sign-and-submit mode. - -### JSON-RPC Request Example - Submit Only - -```json -{ - "method": "submit", - "params": [ - { - "tx_blob": "1200002280000000240000000361D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA968400000000000000A732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB74473045022100D184EB4AE5956FF600E7536EE459345C7BBCF097A84CC61A93B9AF7197EDB98702201CEA8009B7BEEBAA2AACC0359B41C427C1C5B550A4CA4B80CF2174AF2D6D5DCE81144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754" - } - ] -} -``` - -### JSON-RPC Request Example - Submit Only - -```json -{ - "method": "submit", - "params": [ - { - "offline": false, - "secret": "s████████████████████████████", - "tx_json": { - "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "Amount": { - "currency": "USD", - "issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "value": "1" - }, - "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", - "TransactionType": "Payment" - }, - "fee_mult_max": 1000 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "accepted" : true, - "account_sequence_available" : 362, - "account_sequence_next" : 362, - "applied" : true, - "broadcast" : true, - "engine_result": "tesSUCCESS", - "engine_result_code": 0, - "engine_result_message": "The transaction was applied. Only final in a validated ledger.", - "status": "success", - "kept" : true, - "open_ledger_cost": "10", - "queued" : false, - "tx_blob": "1200002280000000240000016961D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA9684000000000002710732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB74473045022100A7CCD11455E47547FF617D5BFC15D120D9053DFD0536B044F10CA3631CD609E502203B61DEE4AC027C5743A1B56AF568D1E2B8E79BB9E9E14744AC87F38375C3C2F181144B4E9C06F24296074F7BC48F92A97916C6DC5EA983143E9D4A2B8AA0780F682D136F7A56D6724EF53754", - "tx_json": { - "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "Amount": { - "currency": "USD", - "issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", - "value": "1" - }, - "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", - "Fee": "10000", - "Flags": 2147483648, - "Sequence": 361, - "SigningPubKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB", - "TransactionType": "Payment", - "TxnSignature": "3045022100A7CCD11455E47547FF617D5BFC15D120D9053DFD0536B044F10CA3631CD609E502203B61DEE4AC027C5743A1B56AF568D1E2B8E79BB9E9E14744AC87F38375C3C2F1", - "hash": "5B31A7518DC304D5327B4887CD1F7DC2C38D5F684170097020C7C9758B973847" - } - }, - "validated_ledger_index" : 21184416 -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-submit_multisigned.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-submit_multisigned.md deleted file mode 100644 index bfc80a4b..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-submit_multisigned.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: "submit_multisigned" -slug: "rpc-xrp-submit_multisigned" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const txJson = { /* your transaction JSON here */ } -const options = { failHard: true } // optional - -const res = await tatum.rpc.submitMultisigned(txJson, options) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `submitMultisigned` method in the XRP RPC API allows you to apply a multi-signed transaction and send it to the network to be included in future ledgers. This method requires the MultiSign amendment to be enabled and was introduced in rippled 0.31.0. - -This method is used when multiple parties are required to authorise a transaction, which can be a useful feature for securing high-value accounts, implementing distributed decision-making processes, or creating more complex authorisation structures for transactions. - -{% embed url=" %} - -### Parameters - -- `txJson` (TxJson): The transaction in JSON format with an array of Signers. To be successful, the weights of the signatures must be equal to or higher than the quorum of the SignerList. -- `options` (FailOption, optional): This parameter is optional. If `failHard` is true, and the transaction fails locally, it will not retry or relay the transaction to other servers. The default is false. - -### Return Object - -The `submit_multisigned` method returns an object that provides information about the result of the submitted multisigned transaction. The object contains the following fields: - -- `engine_result`: A string that represents a code indicating the preliminary result of the transaction, for example, "tesSUCCESS". -- `engine_result_code`: An integer that represents a numeric code indicating the preliminary result of the transaction. This is directly correlated to the `engine_result`. -- `engine_result_message`: A string that represents a human-readable explanation of the preliminary transaction result. -- `tx_blob`: A string that represents the complete transaction in hexadecimal string format. -- `tx_json`: An object that represents the complete transaction in JSON format. - -### JSON-RPC Request Example - -```json -{ - "method": "submit_multisigned", - "params": [ - { - "tx_json": { - "Account": "rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC", - "Fee": "30000", - /* ... rest of the transaction ... */ - }, - "fail_hard": true - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "engine_result": "tesSUCCESS", - "engine_result_code": 0, - "engine_result_message": "The transaction was applied. Only final in a validated ledger.", - "status": "success", - "tx_blob": "120014220004000024000000046380000000000000000000000000000000000000005553440000000000B5F762798A53D543A014CAF8B297CFF8F2F937E868400000000000753073008114A3780F5CB5A44D366520FC44055E8ED44D9A2270F3E010732102B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF74473045022100CC9C56DF51251CB04BB047E5F3B5EF01A0F4A8A549D7A20A7402BF54BA744064022061EF8EF1BCCBF144F480B32508B1D10FD4271831D5303F920DE41C64671CB5B78114204288D2E47F8EF6C99BCC457966320D12409711E1E010732103398A4EDAE8EE009A5879113EAA5BA15C7BB0F612A87F4103E793AC919BD1E3C174473045022100FEE8D8FA2D06CE49E9124567DCA265A21A9F5465F4A9279F075E4CE27E4430DE022042D5305777DA1A7801446780308897699412E4EDF0E1AEFDF3C8A0532BDE4D0881143A4C02EA95AD6AC3BED92FA036E0BBFB712C030CE1F1", - "tx_json": { - "Account": "rEuLyBCvcw4CFmzv8RepSiAoNgF8tTGJQC", - "Fee": "30000", - "Flags": 262144, - "LimitAmount": { - "currency": "USD", - "issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", - "value": "0" - }, - "Sequence": 4, - "Signers": [ - { - "Signer": { - "Account": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW", - "SigningPubKey": "02B3EC4E5DD96029A647CFA20DA07FE1F85296505552CCAC114087E66B46BD77DF", - "TxnSignature": "3045022100CC9C56DF51251CB04BB047E5F3B5EF01A0F4A8A549D7A20A7402BF54BA744064022061EF8EF1BCCBF144F480B32508B1D10FD4271831D5303F920DE41C64671CB5B7" - } - }, - { - "Signer": { - "Account": "raKEEVSGnKSD9Zyvxu4z6Pqpm4ABH8FS6n", - "SigningPubKey": "03398A4EDAE8EE009A5879113EAA5BA15C7BB0F612A87F4103E793AC919BD1E3C1", - "TxnSignature": "3045022100FEE8D8FA2D06CE49E9124567DCA265A21A9F5465F4A9279F075E4CE27E4430DE022042D5305777DA1A7801446780308897699412E4EDF0E1AEFDF3C8A0532BDE4D08" - } - } - ], - "SigningPubKey": "", - "TransactionType": "TrustSet", - "hash": "81A477E2A362D171BB16BE17B4120D9F809A327FA00242ABCA867283BEA2F4F8" - } - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-transaction_entry.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-transaction_entry.md deleted file mode 100644 index 1b871f4f..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-transaction_entry.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "transaction_entry" -slug: "rpc-xrp-transaction_entry" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum - -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const res = await tatum.rpc.transactionEntry('C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9', { - ledgerIndex: '56865245', -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `transaction_entry` method retrieves information on a single transaction from a specific ledger version. It does not search all ledgers for the specified transaction, unlike the `tx` method, which does. The `transaction_entry` method is useful for fetching transaction data from a specified ledger, making it an essential method for auditing or tracking transaction histories. - -It's important to note that this method does not support retrieving information from the current in-progress ledger. A ledger version must be specified in either `ledger_index` or `ledger_hash`. - -This method can fail to find the transaction due to the following reasons: - -- The transaction does not exist. -- The transaction exists, but not in the specified ledger version. -- The server does not have the specified ledger version available. Another server that has the correct version on hand may have a different response. - -{% embed url=" %} - -### Parameters - -The parameters required for this method are: - -- `txHash`: (String) The unique hash of the transaction you are looking up. -- `options`: (Ledger) Options for specifying the ledger to use. It includes the following properties: - - `ledger_hash`: (Optional) A 20-byte hex string for the ledger version to use. - - `ledger_index`: (Optional) The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. - -### Return Object - -The `transaction_entry` method returns an object that provides detailed information about a transaction from a specified ledger. The object contains the following fields: - -- `ledger_index`: A number that represents the ledger index of the ledger version the transaction was found in; this is the same as the one from the request. -- `ledger_hash`: A string that represents the identifying hash of the ledger version the transaction was found in; this is the same as the one from the request. This field may be omitted. -- `metadata`: An object that represents the transaction metadata. This shows the exact results of the transaction in detail. -- `tx_json`: An object that represents the JSON representation of the Transaction object. - -### JSON-RPC Request Example - -```json -{ - "method": "transaction_entry", - "params": [ - { - "tx_hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", - "ledger_index": 56865245 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "ledger_hash": "793E56131D8D4ABFB27FA383BFC44F2978B046E023FF46C588D7E0C874C2472A", - "ledger_index": 56865245, - "metadata": { /* Detailed result of the transaction */ }, - "status": "success", - "tx_json": { /* JSON representation of the Transaction object */ }, - "validated": true - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-tx.md b/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-tx.md deleted file mode 100644 index 4e4204dc..00000000 --- a/v1.0/RPC Nodes/rpc-others/rpc-xrp/rpc-xrp-tx.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -title: "tx" -slug: "rpc-xrp-tx" -excerpt: "XRP RPC" -hidden: false -metadata: - description: "XRP RPC" - image: [] - keywords: "xrp, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```javascript -// yarn add @tatumio/tatum -import { TatumSDK, Xrp, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.XRP}) - -const transactionDetails = await tatum.rpc.tx('C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9', { - binary: false, - minLedger: 10000, - maxLedger: 20000, -}) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -### Overview - -The `tx` method in XRP ledger's RPC API retrieves information on a single transaction by its identifying hash. It is primarily used for querying details about specific transactions that have occurred on the XRP Ledger. The transaction could be any type of operation such as a payment, offer creation, offer cancellation, trust set operation, etc. - -This method can be very useful when tracking payment statuses, auditing transactions, or developing blockchain analysis tools. However, it should be noted that the command may successfully find the transaction even if it is included in a ledger outside the range of min\_ledger to max\_ledger. - -{% embed url=" %} - -### Parameters - -The `tx` method accepts the following parameters: - -- `transaction`: (Type: String) The 256-bit hash of the transaction, as hex. -- `binary`: (Type: Boolean, Optional) If true, return transaction data and metadata as binary serialized to hexadecimal strings. If false, return transaction data and metadata as JSON. The default is false. -- `minLedger`: (Type: Number, Optional) Use this with `maxLedger` to specify a range of up to 1000 ledger indexes, starting with this ledger (inclusive). -- `maxLedger`: (Type: Number, Optional) Use this with `minLedger` to specify a range of up to 1000 ledger indexes, ending with this ledger (inclusive). - -### Return Object - -The `tx` method returns an object that provides information about a prepared transaction. The object contains the following fields: - -- `date`: A number that represents the number of seconds since January 1, 2000 (00:00 UTC) indicating the close time of the ledger in which the transaction was applied. This value does not have a precise relationship with physical time, and is dependent on the close time resolution. -- `hash`: A string that represents the SHA-512 hash of the transaction. -- `inLedger`: (Deprecated) An alias for `ledger_index`. -- `ledger_index`: A number that represents the ledger index of the ledger that includes this transaction. -- `meta`: An object (JSON) or a string (binary) that represents the transaction metadata, which describes the results of the transaction. -- `validated`: A boolean that indicates if this data comes from a validated ledger version; if omitted or set to false, this data is not final. -- `(Various)`: (Various) Other fields from the Transaction object. - -### JSON-RPC Request Example - -```json -{ - "method": "tx", - "params": [ - { - "transaction": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", - "binary": false, - "minLedger": 10000, - "maxLedger": 20000 - } - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "result": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Fee": "12", - "Flags": 0, - "LastLedgerSequence": 56865248, - "OfferSequence": 5037708, - "Sequence": 5037710, - "SigningPubKey": "03B51A3EDF70E4098DA7FB053A01C5A6A0A163A30ED1445F14F87C7C3295FCB3BE", - "TakerGets": "15000000000", - "TakerPays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "20160.75" - }, - "TransactionType": "OfferCreate", - "TxnSignature": "3045022100A5023A0E64923616FCDB6D664F569644C7C9D1895772F986CD6B981B515B02A00220530C973E9A8395BC6FE2484948D2751F6B030FC7FB8575D1BFB406368AD554D9", - "date": 648248020, - "hash": "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9", - "inLedger": 56865245, - "ledger_index": 56865245, - "meta": { - "AffectedNodes": [ - { - "ModifiedNode": { - "FinalFields": { - "ExchangeRate": "4F04C66806CF7400", - "Flags": 0, - "RootIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "TakerGetsCurrency": "0000000000000000000000000000000000000000", - "TakerGetsIssuer": "0000000000000000000000000000000000000000", - "TakerPaysCurrency": "000000000000000000000000434E590000000000", - "TakerPaysIssuer": "CED6E99370D5C00EF4EBF72567DA99F5661BFB3A" - }, - "LedgerEntryType": "DirectoryNode", - "LedgerIndex": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400" - } - }, - { - "ModifiedNode": { - "FinalFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "Balance": "10404767991", - "Flags": 0, - "OwnerCount": 3, - "Sequence": 5037711 - }, - "LedgerEntryType": "AccountRoot", - "LedgerIndex": "1DECD9844E95FFBA273F1B94BA0BF2564DDF69F2804497A6D7837B52050174A2", - "PreviousFields": { - "Balance": "10404768003", - "Sequence": 5037710 - }, - "PreviousTxnID": "4DC47B246B5EB9CCE92ABA8C482479E3BF1F946CABBEF74CA4DE36521D5F9008", - "PreviousTxnLgrSeq": 56865244 - } - }, - { - "DeletedNode": { - "FinalFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "BookNode": "0000000000000000", - "Flags": 0, - "OwnerNode": "0000000000000000", - "PreviousTxnID": "8F5FF57B404827F12BDA7561876A13C3E3B3095CBF75334DBFB5F227391A660C", - "PreviousTxnLgrSeq": 56865244, - "Sequence": 5037708, - "TakerGets": "15000000000", - "TakerPays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "20160.75" - } - }, - "LedgerEntryType": "Offer", - "LedgerIndex": "26AAE6CA8D29E28A47C92ADF22D5D96A0216F0551E16936856DDC8CB1AAEE93B" - } - }, - { - "ModifiedNode": { - "FinalFields": { - "Flags": 0, - "IndexNext": "0000000000000000", - "IndexPrevious": "0000000000000000", - "Owner": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "RootIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - }, - "LedgerEntryType": "DirectoryNode", - "LedgerIndex": "47FAF5D102D8CE655574F440CDB97AC67C5A11068BB3759E87C2B9745EE94548" - } - }, - { - "CreatedNode": { - "LedgerEntryType": "Offer", - "LedgerIndex": "8BAEE3C7DE04A568E96007420FA11ABD0BC9AE44D35932BB5640E9C3FB46BC9B", - "NewFields": { - "Account": "rhhh49pFH96roGyuC4E5P4CHaNjS1k8gzM", - "BookDirectory": "02BAAC1E67C1CE0E96F0FA2E8061020536CEDD043FEB0FF54F04C66806CF7400", - "Sequence": 5037710, - "TakerGets": "15000000000", - "TakerPays": { - "currency": "CNY", - "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", - "value": "20160.75" - } - } - } - } - ], - "TransactionIndex": 0, - "TransactionResult": "tesSUCCESS" - }, - "status": "success", - "validated": true - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-utxo.md b/v1.0/RPC Nodes/rpc-utxo.md deleted file mode 100644 index bc9e35ea..00000000 --- a/v1.0/RPC Nodes/rpc-utxo.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "UTXO" -slug: "rpc-utxo" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:34:40 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:33 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1.md deleted file mode 100644 index f33a2335..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Bitcoin" -slug: "bitcoin-1" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:39:28 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getbestblockhash.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getbestblockhash.md deleted file mode 100644 index d71cff89..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getbestblockhash.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "getbestblockhash" -slug: "rpc-btc-getbestblockhash" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:41:06 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getbestblockhash `method is part of the Bitcoin JSON-RPC API, which is used to interact with a Bitcoin node. This method specifically returns the hash of the tip block in the most-work fully-validated chain. The tip block is the most recent block in the longest chain that the node has fully validated. This method is useful for applications that need to know the current state of the blockchain, such as wallets or block explorers. - -## Parameters - -The method does not accept any parameters, which means it is straightforward to use. It simply returns the hash of the best block, represented as a hexadecimal string. This hash can then be used with other methods to retrieve more information about the block, such as its height, transactions, or confirmations. - -## Returns - -This method outputs a string representing serialized data for a block hash, encoded in hexadecimal format. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "id": 1, - "jsonrpc": "2.0", - "method": "getbestblockhash" -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getBestBlockHash() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblock.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblock.md deleted file mode 100644 index 45e17a85..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblock.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "getblock" -slug: "rpc-btc-getblock" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Tue Mar 26 2024 11:48:41 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getblock` is a Bitcoin RPC method that returns information about a specified block. This method is useful for obtaining block details such as the hash, height, transactions, and other metadata. It can be used for various purposes, including validating transactions, monitoring the blockchain, and analyzing the network. - -## Parameters - -- `blockhash`: The hash of the block to be retrieved. - - Example: "0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e" -- `verbosity`: Specifies the level of detail returned for the block. - - `0`: Returns a serialized block as a hex-encoded string (default). - - `1`: Returns a JSON object with block information. - - `2`: Returns a JSON object with block information and detailed transaction data. - -## Returns - -The returned object varies depending on the `verbosity` parameter: - -- If `verbosity` is `0`, the return object is a hex-encoded string of the serialized block. -- If `verbosity` is `1` or `2`, the return object is a JSON object containing the following fields: - -| Name | Description | -| :---------------- | :------------------------------------------------------------------------------------------------------------------- | -| hash | The block hash. | -| confirmations | The number of confirmations for the block. | -| strippedsize | The block size without witness data. | -| size | The block size. | -| transactionIndex | The index of the transaction within the block. | -| weight | The block weight. | -| height | The block height. | -| version | he block version. | -| versionHex | The block version as a hex string. | -| merkleroot | The Merkle root of the transactions in the block. | -| tx | An array of transaction identifiers (if `verbosity` is `1`) or detailed transaction objects (if `verbosity` is `2`). | -| time | The block time in UNIX timestamp format. | -| mediantime | The median block time of the previous 11 blocks. | -| nonce | The block nonce. | -| bits | The block difficulty target as a hex string. | -| difficulty | The block difficulty. | -| chainwork | he total work in the blockchain up to this block. | -| nTx | The number of transactions in the block. | -| previousblockhash | The hash of the previous block. | -| nextblockhash | The hash of the next block (if available). | - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblock", - "params": [ - "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - 1 - ] -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getBlock('000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockchaininfo.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockchaininfo.md deleted file mode 100644 index 46aa3aed..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockchaininfo.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: "getblockchaininfo" -slug: "rpc-btc-getblockchaininfo" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Tue Mar 26 2024 12:36:17 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getblockchaininfo` is a Bitcoin RPC method that provides general information about the current state of the blockchain. This method is useful for obtaining an overview of the blockchain, including the best block hash, chain height, difficulty, and network protocol version. It can be used for various purposes, such as monitoring the blockchain, tracking network upgrades, and assessing the current mining difficulty. - -## Returns - -The return object is a JSON object containing the following fields: - -| Name | Description | -| :------------------- | :------------------------------------------------------------------------------------------------ | -| chain | The current network name (e.g., "main", "test", or "regtest"). | -| blocks | The number of blocks in the local best block chain. | -| headers | The number of headers the local node has validated. | -| bestblockhash | The hash of the best (tip) block. | -| difficulty | The current mining difficulty. | -| mediantime | The median block time of the last 11 blocks in UNIX timestamp format. | -| verificationprogress | The estimate of the verification progress of the local node as a percentage. | -| initialblockdownload | A boolean indicating whether the node is in the initial block download mode. | -| chainwork | The total work in the blockchain up to the best block. | -| size_on_disk | The estimated size of the block and undo files on disk. | -| pruned | A boolean indicating whether the block chain is pruned. | -| pruneheight | The lowest-height complete block stored if the node is pruned (only present if `pruned` is true). | -| softforks | An array of objects, each containing information about a softfork. | -| bip9_softforks | An object containing the status of BIP9 softforks in the blockchain. | -| warnings | Any network and blockchain warnings. | - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockchaininfo" -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getBlockChainInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockcount.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockcount.md deleted file mode 100644 index 0e26aa96..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockcount.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "getblockcount" -slug: "rpc-btc-getblockcount" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - description: "Bitcoin RPC" - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Tue Mar 26 2024 12:10:23 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getblockcount` is a Bitcoin RPC method that returns the number of blocks in the local best blockchain. This method is useful for obtaining the current height of the blockchain, which can be used for various purposes, such as monitoring the blockchain, determining the number of confirmations for a transaction, or assessing the progress of the blockchain's growth. - -## Returns - -The returned object is an integer representing the number of blocks in the local best blockchain. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockcount" -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getBlockCount() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockhash.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockhash.md deleted file mode 100644 index 9f041786..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockhash.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "getblockhash" -slug: "rpc-btc-getblockhash" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Mon Mar 25 2024 13:04:54 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getblockhash` method is part of the Bitcoin JSON-RPC API, which is used to interact with the Bitcoin blockchain. This method is specifically designed to return the hash of a block given its height in the blockchain. The height is a numeric value that represents the position of the block in the blockchain, starting from 0 for the genesis block. - -## Parameters - -- `height`: This is a required parameter. It is a numeric value that specifies the height index of the block in the blockchain. The height index is used to identify a block uniquely within the blockchain. - -## Returns - -- `result`: The method returns the hash of the block corresponding to the provided height. This hash is a unique identifier for the block in the Bitcoin blockchain. -- `error`: If there is an error in processing the request, the method will return an error message detailing the issue. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "getblockhash", - "params": [587123], - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getBlockHash(587123) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockheader.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockheader.md deleted file mode 100644 index 3bd6ae6e..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockheader.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "getblockheader" -slug: "rpc-btc-getblockheader" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Tue Mar 26 2024 12:49:15 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getblockheader` is a Bitcoin RPC method that returns information about a specified block header. This method is useful for obtaining a high-level view of a specific block, including its hash, previous block hash, merkle root, timestamp, difficulty target, and nonce, without having to fetch the entire block's contents. - -## Parameters - -- `blockhash`: The hash of the block for which the header information is requested. This is a string parameter. - - Example: "0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e" -- `verbose`: A boolean parameter that specifies whether to return the header information in a JSON object (true) or as a serialized hex-encoded string (false). Default is true. - - Example: `True` - -## Returns - -If `verbose` is set to true (default), the return object is a JSON object containing the following fields: - -| Name | Description | -| :---------------- | :-------------------------------------------------------------------- | -| hash | The hash of the block. | -| confirmations | The number of confirmations for the block. | -| height | The height of the block in the block chain. | -| version | The block version. | -| versionHex | The block version formatted as a hex string. | -| merkleroot | The merkle root of the block. | -| time | The block timestamp in UNIX format. | -| mediantime | The median block time of the last 11 blocks in UNIX timestamp format. | -| nonce | The nonce value for the block. | -| bits | The encoded difficulty target for the block. | -| difficulty | The actual difficulty target for the block as a decimal number. | -| chainwork | The total work in the block chain up to this block. | -| nTx | The number of transactions in the block. | -| previousblockhash | The hash of the previous block. | -| nextblockhash | The hash of the next block (only present if there is a next block). | - -If `verbose` is set to false, the return object is a serialized hex-encoded string of the block header. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "getblockheader", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true], - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getBlockHeader("0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockstats.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockstats.md deleted file mode 100644 index 32649336..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getblockstats.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "getblockstats" -slug: "rpc-btc-getblockstats" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Tue Mar 26 2024 12:59:59 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getblockstats` is a Bitcoin RPC method that returns various statistics about a specified block. This method is useful for obtaining detailed information about a block, including the number of transactions, transaction volume, fees, and other related data. The results can be used for data analysis, monitoring, and understanding the state of the Bitcoin network at a specific block height. - -## Parameters - -- `blockhash`: The hash of the block for which the header information is requested. This is a string parameter. - - Example: "0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e" -- `verbose`: A boolean parameter that specifies whether to return the header information in a JSON object (true) or as a serialized hex-encoded string (false). Default is true. - - Example: `True` - - `hash_or_height`: The block hash or block height for which the statistics are requested. This parameter can be either a string (block hash) or an integer (block height). - - Example (block hash): "`0000000000000000000f92fb968a8d1a2a9c2039e6e99f8c7a0ee3421a44a7d6`" - - Example (block height): `685230` - - `stats` (optional): An array of strings indicating the statistics to be included in the response. If not specified, all available statistics will be returned. - - Example: ["txs", "avgfee"] - -## Returns - -The return object is a JSON object containing the requested statistics as key-value pairs. The available statistics are: - -| Name | Description | -| :------------- | :--------------------------------------------------------- | -| avgfee | The average transaction fee in satoshis. | -| avgfeerate | The average fee rate in satoshis per virtual byte. | -| avgtxsize | The average transaction size in bytes. | -| blockhash | The hash of the block. | -| height | The height of the block in the block chain. | -| ins | The total number of inputs in all transactions. | -| maxfee | The maximum transaction fee in satoshis. | -| maxfeerate | The maximum fee rate in satoshis per virtual byte. | -| maxtxsize | The maximum transaction size in bytes. | -| medianfee | The median transaction fee in satoshis. | -| mediantime | The median time for the block in UNIX timestamp format. | -| mediantxsize | The median transaction size in bytes. | -| minfee | The minimum transaction fee in satoshis. | -| minfeerate | The minimum fee rate in satoshis per virtual byte. | -| mintxsize | The minimum transaction size in bytes. | -| outs | The total number of outputs in all transactions. | -| subsidy | The block reward in satoshis. | -| swtotal_size | The total size of all SegWit transactions in bytes. | -| swtotal_weight | The total weight of all SegWit transactions. | -| swtxs | The total number of SegWit transactions. | -| time | The block timestamp in UNIX format. | -| total_size | The total size of all transactions in bytes. | -| total_weight | The total weight of all transactions. | -| totalfee | The total transaction fees in satoshis. | -| txs | The total number of transactions in the block. | -| utxo_increase | The increase in the number of unspent transaction outputs. | -| utxo_size_inc | The increase in the size of the UTXO set. | - -If `verbose` is set to false, the return object is a serialized hex-encoded string of the block header. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{{ - "jsonrpc": "2.0", - "method": "getblockstats", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f"], - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getBlockStats("0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getchaintips.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getchaintips.md deleted file mode 100644 index a09427cc..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getchaintips.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "getchaintips" -slug: "rpc-btc-getchaintips" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Tue Mar 26 2024 13:12:08 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getchaintips` is a Bitcoin RPC method that returns information about all known tips in the block tree. This method is useful for identifying and analyzing potential forks or alternative chains in the Bitcoin network. It can be used to monitor the health and status of the network or to investigate discrepancies in blockchain data. - -## Returns - -The return object is an array of JSON objects, with each object representing a chain tip. The fields in each object are: - -[block:parameters] -{ - "data": { - "h-0": "Name", - "h-1": "Description", - "0-0": "height", - "0-1": "The height of the chain tip in the block chain.", - "1-0": "hash", - "1-1": "The hash of the block corresponding to the chain tip.", - "2-0": "branchlen", - "2-1": "The length of the branch connected to the main chain.", - "3-0": "status", - "3-1": "The status of the chain tip, which can be one of the following values: \n`active`: The tip is part of the main chain. \n`valid-fork`: The tip is part of a valid but inactive fork \n`valid-headers`: The tip is part of a valid fork but with incomplete block data. \n`headers-only`: The tip is a fork with valid headers but incomplete block data and an invalid parent block. \n`invalid`: The tip is part of an invalid fork. \n`unknown`: The tip has an unknown validation state." - }, - "cols": 2, - "rows": 4, - "align": [ - "left", - "left" - ] -} -[/block] - - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "getchaintips", - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getChainTips() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getdifficulty.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getdifficulty.md deleted file mode 100644 index f6c94e80..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getdifficulty.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "getdifficulty" -slug: "rpc-btc-getdifficulty" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 06:03:46 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getdifficulty` is a Bitcoin RPC method that returns the current mining difficulty. The mining difficulty is a measure of how difficult it is to find a new block compared to the easiest it can ever be. This method can be used to monitor the mining difficulty, which adjusts every 2016 blocks to maintain a consistent block creation rate of approximately 10 minutes per block. - -## Returns - -A return object is a floating-point number that represents the current mining difficulty. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "getdifficulty", - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getDifficulty() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolancestors.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolancestors.md deleted file mode 100644 index 6935f9fa..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolancestors.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "getmempoolancestors" -slug: "rpc-btc-getmempoolancestors" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 06:41:59 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getmempoolancestors` is a Bitcoin RPC method that returns information about the ancestors of a transaction in the memory pool. This method can be used to analyze the dependency relationships between unconfirmed transactions and to investigate potential transaction issues, such as chains of unconfirmed transactions or transactions that depend on others with a low fee. - -## Parameters - -- `txid`: The transaction ID (string, required) of the transaction for which you want to retrieve the ancestors. -- `verbose`: Whether to return a JSON object with detailed information about the ancestors (bool, optional, default = false). If `false`, only the transaction IDs of the ancestors are returned. - -## Returns - -The return object depends on the `verbose` parameter: - -If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of an ancestor. - -If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the ancestors, and the values are JSON objects containing detailed information about the ancestors. - -\## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempoolancestors", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} -' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getMempoolAncestors("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempooldescendants.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempooldescendants.md deleted file mode 100644 index fddb05cd..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempooldescendants.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "getmempooldescendants" -slug: "rpc-btc-getmempooldescendants" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 06:45:56 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getmempooldescendants` RPC method allows you to retrieve information about the descendant transactions of a specified transaction in the memory pool. This method is useful for understanding the relationships between unconfirmed transactions and the possible effects of their confirmation on the overall transaction fees and network congestion. - -## Parameters - -- `txid`: The transaction ID of the transaction for which you want to get its descendants. -- `verbose`: If set to `true`, detailed information about each descendant transaction will be returned, otherwise only the transaction IDs will be returned. - -## Returns - -The return object depends on the `verbose` parameter: - -If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of a descendant. - -If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the descendants, and the values are JSON objects containing detailed information about the descendants. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempooldescendants", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getMempoolDescendants("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolentry.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolentry.md deleted file mode 100644 index 3dda967b..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolentry.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: "getmempoolentry" -slug: "rpc-btc-getmempoolentry" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 06:49:30 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getmempoolentry` RPC method allows you to retrieve information about a specific transaction in the memory pool. This method is useful for tracking the status of unconfirmed transactions and for gathering additional details about their current state. - -## Parameters - -- `txid`: The transaction ID of the transaction you want to retrieve information about. - -## Returns - -The return object will be an object containing information about the specified transaction. - -| Name | Description | -| :----------------- | :----------------------------------------------------------------------------------------------- | -| size | The transaction size in bytes. | -| fee | The transaction fee in BTC. | -| modifiedfee | The transaction fee with fee deltas used for mining priority. | -| time | The local time the transaction entered the memory pool. | -| height | The block height when the transaction entered the memory pool. | -| descendantcount | The number of descendant transactions. | -| descendantsize | he virtual transaction size of all descendant transactions combined. | -| descendantfees | The total fees of all descendant transactions. | -| ancestorcount | The number of ancestor transactions. | -| ancestorsize | he virtual transaction size of all ancestor transactions combined. | -| ancestorfees | The total fees of all ancestor transactions. | -| wtxid | The witness transaction ID of the transaction. | -| depends | An array containing the witness transaction IDs of the transactions this transaction depends on. | -| spentby | An array containing the witness transaction IDs of the transactions that spend this transaction. | -| bip125-replaceable | Whether the transaction is BIP125 replaceable. Possible values are "yes", "no", or "unknown". | - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "getmempoolentry", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getMempoolEntry("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolinfo.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolinfo.md deleted file mode 100644 index 6a6aff94..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getmempoolinfo.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "getmempoolinfo" -slug: "rpc-btc-getmempoolinfo" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 06:56:15 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getmempoolinfo` RPC method allows you to retrieve general information about the current memory pool. This method is useful for monitoring the state of the memory pool, such as its size, the total transaction fees, and the minimum fee rate required for transactions to be included in the next block. - -## Parameters - -This method does not require any parameters. - -## Returns - -The return object will be an object containing general information about the current memory pool. - -| Name | Description | -| :------------ | :-------------------------------------------------------------------------------------------- | -| size | The number of transactions in the memory pool. | -| bytes | The total size of all transactions in the memory pool, in bytes. | -| usage | The total memory usage of the memory pool, in bytes. | -| maxmempool | The maximum memory usage of the memory pool, in bytes. | -| mempoolminfee | The minimum fee rate (in BTC/kB) required for transactions to be included in the memory pool. | -| minrelaytxfee | The minimum fee rate (in BTC/kB) required for transactions to be relayed across the network. | - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "getmempoolinfo", - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getMempoolInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getrawmempool.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getrawmempool.md deleted file mode 100644 index 0d6ac288..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-getrawmempool.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "getrawmempool" -slug: "rpc-btc-getrawmempool" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 07:01:48 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `getrawmempool` RPC method provides information on the transactions currently in the memory pool. This method is useful for getting details about unconfirmed transactions that have not yet been included in a block. - -## Parameters - -`verbose`: Set to true to receive a detailed JSON object for each transaction in the memory pool. Set to false to receive a simple array of transaction IDs. - -- Example: `verbose`: `true` - -## Returns - -The return object will depend on the value of the verbose parameter. - -If `verbose` is set to `false`, the method will return an array of transaction IDs. - -If `verbose` is set to `true`, the method will return an object with transaction IDs as keys and detailed transaction information as values. - -Fields (when verbose is true): - -| Name | Description | -| :-------------- | :----------------------------------------------------------------------------- | -| size | The transaction size in bytes. | -| fee | The transaction fee in BTC. | -| modifiedfee | The transaction fee with descendants in BTC. | -| time | The local time when the transaction entered the memory pool. | -| height | The block height when the transaction entered the memory pool. | -| descendantcount | The number of descendant transactions in the memory pool. | -| descendantsize | The total size of all descendant transactions in the memory pool, in bytes. | -| descendantfees | The total fees of all descendant transactions in the memory pool, in satoshis. | -| ancestorcount | The number of ancestor transactions in the memory pool. | -| ancestorsize | The total size of all ancestor transactions in the memory pool, in bytes. | -| ancestorfees | The total fees of all ancestor transactions in the memory pool, in satoshis. | -| wtxid | The transaction witness ID. | -| depends | An array of unconfirmed transactions that this transaction depends on. | - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "getrawmempool", - "params": [true], - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getRawMemPool(true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-gettxout.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-gettxout.md deleted file mode 100644 index e9db632b..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-gettxout.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "gettxout" -slug: "rpc-btc-gettxout" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 06:07:03 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `gettxout` RPC method returns details about an unspent transaction output (UTXO). This method can be used to check if a specific transaction output is still unspent and obtain its details such as the value and scriptPubKey. - -## Parameters - -- `txid`: The transaction ID of the output. - - Example: "a12345abcdef67890bcdef1234567890abcdef1234567890abcdef1234567890" -- `n`: The index of the output within the transaction (vout). - - Example: `1` -- `include_mempool`: Whether to include the mempool. Set to false to only check for outputs confirmed in the blockchain. - - Example: `True` - -## Returns - -The return object contains the following fields: - -[block:parameters] -{ - "data": { - "h-0": "Name", - "h-1": "Description", - "0-0": "bestblock", - "0-1": "The hash of the block at the tip of the blockchain.", - "1-0": "confirmations", - "1-1": "The number of confirmations for the transaction. -1 if the transaction is not yet confirmed and in the mempool.", - "2-0": "value", - "2-1": "The value of the output in BTC.", - "3-0": "scriptPubKey", - "3-1": "Information about the output's scriptPubKey: \n`asm`: The assembly representation of the script. \n`hex`: The hex representation of the script. \n`type`: The type of the script (e.g., pubkeyhash, scripthash). \n`addresses`: The Bitcoin addresses associated with this output.", - "4-0": "coinbase", - "4-1": "Whether the transaction is a coinbase transaction.", - "5-0": "version", - "5-1": "The transaction version.", - "6-0": "height", - "6-1": "The height of the block containing this output." - }, - "cols": 2, - "rows": 7, - "align": [ - "left", - "left" - ] -} -[/block] - - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "gettxout", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1], - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getTxOut("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-gettxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-gettxoutproof.md deleted file mode 100644 index a4baea0c..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-gettxoutproof.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: "gettxoutproof" -slug: "rpc-btc-gettxoutproof" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 06:34:41 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `gettxoutproof` RPC method returns a hex-encoded proof that the specified transaction(s) were included in a block. This method can be used to provide proof of inclusion for one or more transactions in the blockchain. - -## Parameters - -- `txids`: An array of transaction IDs to create a proof for. - - txids: ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"] -- `blockhash`: The hash of the block that contains the transactions. If not provided, the method will search for the transactions in the most recent blocks. - - Example: "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2" - -## Returns - -`hex`: The hex-encoded proof of the transaction(s) inclusion in the block. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "method": "gettxoutproof", - "params": [["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2"], - "id": 1 -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.getTxOutProof(["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-validateaddress.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-validateaddress.md deleted file mode 100644 index 49433947..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-validateaddress.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: "validateaddress" -slug: "rpc-btc-validateaddress" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 07:09:40 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `validateaddress` is a Bitcoin RPC method that enables users to verify if a given Bitcoin address is valid. This method provides important information about the address, such as its type and whether it's a spendable or watch-only address. It can be particularly useful in applications where address validation is necessary before performing transactions or when dealing with user-generated addresses to ensure their validity. - -## Parameters - -The `validateaddress` method accepts one required parameter: - -`address` : The Bitcoin address to be validated. - -## Returns - -The validateaddress method returns an object with the following fields: - -| Name | Description | -| :-------------- | :------------------------------------------------------------------------------------------ | -| isvalid | Indicates if the supplied address is valid. | -| address | The validated Bitcoin address. | -| scriptPubKey | The hex-encoded scriptPubKey generated by the address. | -| isscript | Indicates if the address is a script address (P2SH). | -| iswitness | Indicates if the address is a witness address (P2WPKH or P2WSH). | -| witness_version | The version number of the witness program, if applicable. | -| witness_program | The hex value of the witness program, if applicable. | -| isspendable | Indicates if the address is spendable (has the private key). | -| iswatchonly | Indicates if the address is watch-only (wallet has the public key but not the private key). | -| iscompressed | Indicates if the associated public key is compressed. | -| account | DEPRECATED. The account associated with the address, if any. | - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "id": 1, - "method": "validateaddress", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" - ] -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.validateAddress("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-verifymessage.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-verifymessage.md deleted file mode 100644 index f2c7f61f..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-verifymessage.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "verifymessage" -slug: "rpc-btc-verifymessage" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 07:17:22 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `verifymessage` is a Bitcoin RPC method that allows users to verify a signed message using a Bitcoin address. This method can be used to confirm the authenticity of a message by verifying that the signature was created by the owner of the address, without revealing the private key. Use cases include proving ownership of an address, verifying the content of a message, or validating communications within a trustless system. - -## Parameters - -The `verifymessage` method accepts three required parameters: - -`address`: The Bitcoin address that supposedly signed the message. - -`signature`: The base64-encoded signature of the message. - -`message`: The message that was signed. - -## Returns - -The `verifymessage` method returns a single boolean value: - -`isvalid`: Indicates if the signature is valid for the given message and address - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifymessage", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", -"HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", - "Hello, this is a signed message." - ] -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.verifyMessage( "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", "Hello, this is a signed message.") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-verifytxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-verifytxoutproof.md deleted file mode 100644 index 65be2928..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/bitcoin-1/rpc-btc-verifytxoutproof.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "verifytxoutproof" -slug: "rpc-btc-verifytxoutproof" -excerpt: "Bitcoin RPC" -hidden: false -metadata: - image: [] - keywords: "bitcoin, rpc" - robots: "index" -createdAt: "Wed Mar 27 2024 06:39:07 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- -## Overview - -The `verifytxoutproof` RPC method verifies the given transaction proof (in the form of a Merkle block) and returns an array of transaction hashes contained in the verified Merkle block. This method can be used to confirm that specific transactions are included in a block without having to download the entire block. - -## Parameters - -- `proof`: The hex-encoded proof generated by the gettxoutproof RPC method. - -## Returns - -An array of transaction hashes contained in the verified Merkle block. - -## Request Example - -```curl cURL -curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \ ---header 'Content-Type: application/json' \ ---header 'x-api-key: {API_KEY}' \ ---data '{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifytxoutproof", - "params": [ - "00000020fc61cc9f1bda9ef9e5d6bcccc7f210a0e87e7ccbc017d8487031b91d0000000047451bc9b84a546eafbe39baedb3cda967ea57cf1ab650b24d88395f2e4e3d413e4f22e8d9d9ea1c000000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a01000000434104e70b81e35e7cf03f6238471f7d9c903d48aea7c1d067e3010b9000000000000" - ] -}' -``` -```typescript JS SDK -// yarn add @tatumio/tatum - -import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN}) - -const result = await tatum.rpc.verifyTxOutProof("") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch.md deleted file mode 100644 index 58172cfc..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "BCH" -slug: "rpc-bch" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:39:28 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-createrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-createrawtransaction.md deleted file mode 100644 index 3f984a30..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-createrawtransaction.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: "createrawtransaction" -slug: "rpc-bch-createrawtransaction" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.createRawTransaction([ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0 - } - ], - { - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 - }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `createrawtransaction` RPC method creates an unsigned raw transaction that spends a set of previous transaction outputs to a set of new addresses with specific amounts. The method can be used to create custom transactions, which can then be signed and broadcasted to the network. - -### Parameters - -- `inputs`: (array, required) An array of objects, each specifying a previous transaction output to spend. - - `txid`: (string, required) The transaction ID of the previous transaction output to spend. - - `vout`: (numeric, required) The index of the output to spend from the previous transaction. - - `sequence`: (numeric, optional) default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number -- `outputs`: (object, required) An object with the key-value pairs representing the receiving address and the amount to be sent. -- `locktime`: (numeric, optional, default=0) The lock time for the transaction. It can be used to specify the earliest time or block height at which the transaction can be included in a block. -- `replaceable`: (boolean, optional, default=false) **Marks this transaction as BIP125-replaceable.** Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible. - -### Return Object - -- (string) A hex-encoded raw transaction. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "createrawtransaction", - "params": [ - [ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0 - } - ], - { - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 - } - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000", - "error": null, - "id": 1 -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-decoderawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-decoderawtransaction.md deleted file mode 100644 index fe8c603e..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-decoderawtransaction.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: "decoderawtransaction" -slug: "rpc-bch-decoderawtransaction" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.decodeRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `decoderawtransaction` RPC method decodes a serialized (hex-encoded) raw transaction and displays its information in a human-readable format. This method is useful for inspecting raw transactions before broadcasting them to the network or for debugging purposes. - -### Parameters - -- `hex_string`: (string, required) The serialized raw transaction in hex format. - -### Return Object - -An object containing the decoded raw transaction information: - -- `txid`: (string) The transaction ID. -- `hash`: (string) The transaction hash. -- `version`: (numeric) The transaction version. -- `size`: (numeric) The transaction size in bytes. -- `vsize`: (numeric) The virtual transaction size in bytes. -- `weight`: (numeric) The transaction weight. -- `locktime`: (numeric) The lock time for the transaction. -- `vin`: (array) An array of objects, each representing an input of the transaction. - - `txid`: (string) The transaction ID of the previous transaction output to spend. - - `vout`: (numeric) The index of the output to spend from the previous transaction. - - `scriptSig`: (object) The script used to redeem the previous transaction output. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex-encoded script. - - `sequence`: (numeric) The sequence number. -- `vout`: (array) An array of objects, each representing an output of the transaction. - - `value`: (numeric) The amount sent to the output. - - `n`: (numeric) The index of the output. - - `scriptPubKey`: (object) The script used to lock the output. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex-encoded script. - - `reqSigs`: (numeric) The required number of signatures. - - `type`: (string) The type of the script (e.g., 'pubkeyhash'). - - `addresses`: (array) An array of addresses associated with the output. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "decoderawtransaction", - "params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "txid": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", - "hash": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", - "version": 2, - "size": 85, - "vsize": 85, - "weight": 340, - "locktime": 0, - "vin": [ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0, - "scriptSig": { - "asm": "", - "hex": "" - }, - "sequence": 4294967293 - } - ], - "vout": [ - { - "value": 0.01, - "n": 0, - "scriptPubKey": { - "asm": "OP_DUP OP_HASH160 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 OP_EQUALVERIFY OP_CHECKSIG", - "desc": "addr(1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa)#632p52jr", - "hex": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", - "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", - "type": "pubkeyhash" - } - } - ] - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-decodescript.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-decodescript.md deleted file mode 100644 index 4a2bbabf..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-decodescript.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "decodescript" -slug: "rpc-bch-decodescript" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.decodeScript("3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `decodescript` RPC method decodes a serialized (hex-encoded) script and provides information about the script in a human-readable format. This method is useful for inspecting scripts for debugging purposes or for understanding their structure. - -### Parameters - -- `hex_string`: (string, required) The serialized script in hex format. - -### Return Object - -An object containing the decoded script information: - -- `asm`: (string) The assembly representation of the script. -- `hex`: (string) The hex-encoded script. -- `type`: (string) The type of the script (e.g., 'pubkeyhash', 'multisig'). -- `reqSigs`: (numeric, optional) The required number of signatures if the script is a multisig script. -- `addresses`: (array, optional) An array of addresses associated with the script if applicable. -- `p2sh`: (string, optional) The P2SH address for this script if applicable. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "decodescript", - "params": ["3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "asm": "44022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86 OP_MAX OP_UNKNOWN OP_UNKNOWN [error]", - "desc": "raw(3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501)#3x5hf724", - "type": "nonstandard" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-estimatefee.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-estimatefee.md deleted file mode 100644 index 8bc1d22b..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-estimatefee.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "estimatefee" -slug: "rpc-bch-estimatefee" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -```typescript -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum'; - -// Initialize Tatum SDK for Bitcoin Cash -const tatum = await TatumSDK.init({ network: Network.BITCOIN_CASH }); - -// Call the estimatefee method -const estimatedFee = await tatum.rpc.estimateFee(); - -console.log('Estimated fee:', estimatedFee.result); - -// Destroy Tatum SDK - needed for stopping background jobs -await tatum.destroy(); -``` - -### Overview - -The `estimatefee` method is used to estimate the transaction fee for a transaction. It calculates the fee based on the current network conditions. - -### Example use cases: - -1. **Transaction Fee Calculation:** - This method is commonly used by wallet applications to calculate the appropriate transaction fee for a transaction based on the desired confirmation time. - -2. **Custom Fee Estimation:** - Developers can use this method to implement custom fee estimation logic in their applications. - -### Request Parameters - -The `estimatefee` method does not require any parameters. - -### Return Object - -The `estimatefee` method returns an estimated transaction fee in currency unit. The fee is typically represented as a numeric value. diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-estimatesmartfee.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-estimatesmartfee.md deleted file mode 100644 index f769e5ce..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-estimatesmartfee.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "estimatesmartfee" -slug: "rpc-bch-estimatesmartfee" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.estimateSmartFee(20) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `estimatesmartfee` method provides an estimated fee rate for a transaction to be confirmed within a certain number of blocks. The estimation is based on recent transactions in the network. - -This method can be useful for users or applications trying to decide on an appropriate fee for their transactions, based on the desired confirmation speed. - -### Parameters - -The `estimatesmartfee` method accepts the following parameters: - -- `conf_target`: An integer representing the number of blocks within which the transaction should be confirmed. -- `estimate_mode` _(optional)_: A string that determines the estimation mode. Possible values are "UNSET", "ECONOMICAL", and "CONSERVATIVE". Default is "CONSERVATIVE". - -### Return Object - -The `estimatesmartfee` method returns an object containing the following fields: - -- `feerate`: A decimal number representing the estimated fee rate/kB. -- `blocks`: An integer representing the number of blocks within which the transaction is expected to be confirmed. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "estimatesmartfee", - "params": [20], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "feerate": 0.00017258, - "blocks": 20 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getbestblockhash.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getbestblockhash.md deleted file mode 100644 index a75e6cc3..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getbestblockhash.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getbestblockhash" -slug: "rpc-bch-getbestblockhash" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getBestBlockHash() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getbestblockhash` is a method that returns the hash of the best (tip) block in the longest blockchain. This method is useful for obtaining the latest block hash, which can be used to fetch block details or confirmations for transactions. - -### Parameters - -This method does not have any parameters. - -### Return Object - -The returned object is a string containing the hash of the best block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getbestblockhash" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": "0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e", - "error": null -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblock.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblock.md deleted file mode 100644 index 60c8fb17..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblock.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: "getblock" -slug: "rpc-bch-getblock" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getBlock('000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblock` is a method that returns information about a specified block. This method is useful for obtaining block details such as the hash, height, transactions, and other metadata. It can be used for various purposes, including validating transactions, monitoring the blockchain, and analyzing the network. - -### Parameters - -- `blockhash` (required): The hash of the block to be retrieved. - - Example: `"0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e"` -- `verbosity` (optional): Specifies the level of detail returned for the block. - - `0`: Returns a serialized block as a hex-encoded string (default). - - `1`: Returns a JSON object with block information. - - `2`: Returns a JSON object with block information and detailed transaction data. - - Example: `1` - -### Return Object - -The returned object varies depending on the `verbosity` parameter: - -- If `verbosity` is `0`, the return object is a hex-encoded string of the serialized block. -- If `verbosity` is `1` or `2`, the return object is a JSON object containing the following fields: - - `hash`: The block hash. - - `confirmations`: The number of confirmations for the block. - - `strippedsize`: The block size without witness data. - - `size`: The block size. - - `weight`: The block weight. - - `height`: The block height. - - `version`: The block version. - - `versionHex`: The block version as a hex string. - - `merkleroot`: The Merkle root of the transactions in the block. - - `tx`: An array of transaction identifiers (if `verbosity` is `1`) or detailed transaction objects (if `verbosity` is `2`). - - `time`: The block time in UNIX timestamp format. - - `mediantime`: The median block time of the previous 11 blocks. - - `nonce`: The block nonce. - - `bits`: The block difficulty target as a hex string. - - `difficulty`: The block difficulty. - - `chainwork`: The total work in the blockchain up to this block. - - `nTx`: The number of transactions in the block. - - `previousblockhash`: The hash of the previous block. - - `nextblockhash`: The hash of the next block (if available). - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblock", - "params": [ - "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - 1 - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "hash": "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - "confirmations": 1, - "height": 787065, - "version": 536895488, - "versionHex": "20006000", - "merkleroot": "f4d9edf4e50ed243778b553ae0043683a2a9be84c0996f15b30e2e282e6bd2d8", - "time": 1682499730, - "mediantime": 1682496628, - "nonce": 1195457913, - "bits": "1705c739", - "difficulty": 48712405953118.43, - "chainwork": "000000000000000000000000000000000000000046b01da204f6db69fc714174", - "nTx": 4114, - "previousblockhash": "000000000000000000041dd53066beb0577142582ec56573b5260d915311c773", - "strippedsize": 770704, - "size": 1680952, - "weight": 3993064, - "tx": [ - "63b36961bd94b217382409ceb8ec2f3da3d35a24e962e66089946d333f1af82b" - ] - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockchaininfo.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockchaininfo.md deleted file mode 100644 index 8eb06f07..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockchaininfo.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: "getblockchaininfo" -slug: "rpc-bch-getblockchaininfo" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getBlockChainInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockchaininfo` is a method that provides general information about the current state of the blockchain. This method is useful for obtaining an overview of the blockchain, including the best block hash, chain height, difficulty, and network protocol version. It can be used for various purposes, such as monitoring the blockchain, tracking network upgrades, and assessing the current mining difficulty. - -### Parameters - -This method does not have any parameters. - -### Return Object - -The return object is a JSON object containing the following fields: - -- `chain`: The current network name (e.g., "main", "test", or "regtest"). -- `blocks`: The number of blocks in the local best block chain. -- `headers`: The number of headers the local node has validated. -- `bestblockhash`: The hash of the best (tip) block. -- `difficulty`: The current mining difficulty. -- `mediantime`: The median block time of the last 11 blocks in UNIX timestamp format. -- `verificationprogress`: The estimate of the verification progress of the local node as a percentage. -- `initialblockdownload`: A boolean indicating whether the node is in the initial block download mode. -- `chainwork`: The total work in the blockchain up to the best block. -- `size_on_disk`: The estimated size of the block and undo files on disk. -- `pruned`: A boolean indicating whether the block chain is pruned. -- `pruneheight`: The lowest-height complete block stored if the node is pruned (only present if `pruned` is true). -- `softforks`: An array of objects, each containing information about a softfork. -- `bip9_softforks`: An object containing the status of BIP9 softforks in the blockchain. -- `warnings`: Any network and blockchain warnings. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockchaininfo" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "chain": "main", - "blocks": 787066, - "headers": 787066, - "bestblockhash": "00000000000000000005233c5202951a85538b047e62f4c12c25d9ff65e62f07", - "difficulty": 48712405953118.43, - "time": 1682501447, - "mediantime": 1682496904, - "verificationprogress": 0.9999996042025764, - "initialblockdownload": false, - "chainwork": "000000000000000000000000000000000000000046b049efeeebefbd7f5e5cd6", - "size_on_disk": 540374248868, - "pruned": false, - "warnings": "" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockcount.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockcount.md deleted file mode 100644 index 540329ae..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockcount.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getblockcount" -slug: "rpc-bch-getblockcount" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getBlockCount() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockcount` is a method that returns the number of blocks in the local best blockchain. This method is useful for obtaining the current height of the blockchain, which can be used for various purposes, such as monitoring the blockchain, determining the number of confirmations for a transaction, or assessing the progress of the blockchain's growth. - -### Parameters - -This method does not have any parameters. - -### Return Object - -The returned object is an integer representing the number of blocks in the local best blockchain. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockcount" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": 787067, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockhash.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockhash.md deleted file mode 100644 index a2a65eed..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockhash.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "getblockhash" -slug: "rpc-bch-getblockhash" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getBlockHash(587123) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockhash` is a method that returns the block hash for a specified block height in the local best blockchain. This method is useful for obtaining the hash of a specific block, which can then be used to query for more detailed information about that block using other RPC methods, such as `getblock`. - -### Parameters - -- `height`: The height of the block for which the hash is requested. This is an integer parameter. - - Example: `587123` - -### Return Object - -The return object is a string representing the hash of the block at the specified height. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockhash", - "params": [587123], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockheader.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockheader.md deleted file mode 100644 index 21fa7418..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockheader.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: "getblockheader" -slug: "rpc-bch-getblockheader" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getBlockHeader("0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockheader` is a method that returns information about a specified block header. This method is useful for obtaining a high-level view of a specific block, including its hash, previous block hash, merkle root, timestamp, difficulty target, and nonce, without having to fetch the entire block's contents. - -### Parameters - -- `blockhash`: The hash of the block for which the header information is requested. This is a string parameter. - - Example: `"`0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f`"` -- `verbose` (optional): A boolean parameter that specifies whether to return the header information in a JSON object (true) or as a serialized hex-encoded string (false). Default is true. - - Example: `true` - -### Return Object - -If `verbose` is set to true (default), the return object is a JSON object containing the following fields: - -- `hash`: The hash of the block. -- `confirmations`: The number of confirmations for the block. -- `height`: The height of the block in the block chain. -- `version`: The block version. -- `versionHex`: The block version formatted as a hex string. -- `merkleroot`: The merkle root of the block. -- `time`: The block timestamp in UNIX format. -- `mediantime`: The median block time of the last 11 blocks in UNIX timestamp format. -- `nonce`: The nonce value for the block. -- `bits`: The encoded difficulty target for the block. -- `difficulty`: The actual difficulty target for the block as a decimal number. -- `chainwork`: The total work in the block chain up to this block. -- `nTx`: The number of transactions in the block. -- `previousblockhash`: The hash of the previous block. -- `nextblockhash`: The hash of the next block (only present if there is a next block). - -If `verbose` is set to false, the return object is a serialized hex-encoded string of the block header. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockheader", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "hash": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "confirmations": 199945, - "height": 587123, - "version": 549453824, - "versionHex": "20c00000", - "merkleroot": "06bc20da616f96fef435445cbf1bbcc9ff00896dd30c73b875aed7e06902666d", - "time": 1564152126, - "mediantime": 1564151358, - "nonce": 444284193, - "bits": "171f3a08", - "difficulty": 9013786945891.682, - "chainwork": "00000000000000000000000000000000000000000768b223a5622f8f0f1ac0a0", - "nTx": 1820, - "previousblockhash": "0000000000000000001683477bc3c17ab029412183952cb4a37f49968e16e6a8", - "nextblockhash": "00000000000000000007aeb07bc2fe4dbd0b55fc4be751050589b59fe95352fc" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockstats.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockstats.md deleted file mode 100644 index f94beeee..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getblockstats.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: "getblockstats" -slug: "rpc-bch-getblockstats" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getBlockStats("0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockstats` is a method that returns various statistics about a specified block. This method is useful for obtaining detailed information about a block, including the number of transactions, transaction volume, fees, and other related data. The results can be used for data analysis, monitoring, and understanding the state of the network at a specific block height. - -### Parameters - -- `hash_or_height`: The block hash or block height for which the statistics are requested. This parameter can be either a string (block hash) or an integer (block height). - - Example (block hash): `"0000000000000000000f92fb968a8d1a2a9c2039e6e99f8c7a0ee3421a44a7d6"` - - Example (block height): `685230` -- `stats` (optional): An array of strings indicating the statistics to be included in the response. If not specified, all available statistics will be returned. - - Example: `["txs", "avgfee"]` - -### Return Object - -The return object is a JSON object containing the requested statistics as key-value pairs. The available statistics are: - -- `avgfee`: The average transaction fee in satoshis. -- `avgfeerate`: The average fee rate in satoshis per virtual byte. -- `avgtxsize`: The average transaction size in bytes. -- `blockhash`: The hash of the block. -- `height`: The height of the block in the block chain. -- `ins`: The total number of inputs in all transactions. -- `maxfee`: The maximum transaction fee in satoshis. -- `maxfeerate`: The maximum fee rate in satoshis per virtual byte. -- `maxtxsize`: The maximum transaction size in bytes. -- `medianfee`: The median transaction fee in satoshis. -- `mediantime`: The median time for the block in UNIX timestamp format. -- `mediantxsize`: The median transaction size in bytes. -- `minfee`: The minimum transaction fee in satoshis. -- `minfeerate`: The minimum fee rate in satoshis per virtual byte. -- `mintxsize`: The minimum transaction size in bytes. -- `outs`: The total number of outputs in all transactions. -- `subsidy`: The block reward in satoshis. -- `swtotal_size`: The total size of all SegWit transactions in bytes. -- `swtotal_weight`: The total weight of all SegWit transactions. -- `swtxs`: The total number of SegWit transactions. -- `time`: The block timestamp in UNIX format. -- `total_size`: The total size of all transactions in bytes. -- `total_weight`: The total weight of all transactions. -- `totalfee`: The total transaction fees in satoshis. -- `txs`: The total number of transactions in the block. -- `utxo_increase`: The increase in the number of unspent transaction outputs. -- `utxo_size_inc`: The increase in the size of the UTXO set. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockstats", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "avgfee": 10220, - "avgfeerate": 18, - "avgtxsize": 619, - "blockhash": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "feerate_percentiles": [ - 6, - 9, - 9, - 15, - 48 - ], - "height": 587123, - "ins": 3615, - "maxfee": 419448, - "maxfeerate": 393, - "maxtxsize": 17196, - "medianfee": 9528, - "mediantime": 1564151358, - "mediantxsize": 374, - "minfee": 136, - "minfeerate": 1, - "mintxsize": 189, - "outs": 3617, - "subsidy": 1250000000, - "swtotal_size": 323742, - "swtotal_weight": 777804, - "swtxs": 616, - "time": 1564152126, - "total_out": 342467209172, - "total_size": 1127251, - "total_weight": 3991840, - "totalfee": 18590521, - "txs": 1820, - "utxo_increase": 2, - "utxo_size_inc": 4000 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getchaintips.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getchaintips.md deleted file mode 100644 index 4de9e93e..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getchaintips.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -title: "getchaintips" -slug: "rpc-bch-getchaintips" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getChainTips() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getchaintips` is a method that returns information about all known tips in the block tree. This method is useful for identifying and analyzing potential forks or alternative chains in the network. It can be used to monitor the health and status of the network or to investigate discrepancies in blockchain data. - -### Parameters - -This method does not require any parameters. - -### Return Object - -The return object is an array of JSON objects, with each object representing a chain tip. The fields in each object are: - -- `height`: The height of the chain tip in the block chain. -- `hash`: The hash of the block corresponding to the chain tip. -- `branchlen`: The length of the branch connected to the main chain. -- `status`: The status of the chain tip, which can be one of the following values: - - `active`: The tip is part of the main chain. - - `valid-fork`: The tip is part of a valid but inactive fork. - - `valid-headers`: The tip is part of a valid fork but with incomplete block data. - - `headers-only`: The tip is a fork with valid headers but incomplete block data and an invalid parent block. - - `invalid`: The tip is part of an invalid fork. - - `unknown`: The tip has an unknown validation state. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getchaintips", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": [ - { - "height": 787067, - "hash": "0000000000000000000348522f4f24304bfcadece8b34c0696faa4f87ec4fdc4", - "branchlen": 0, - "status": "active" - }, - { - "height": 784121, - "hash": "000000000000000000046a2698233ed93bb5e74ba7d2146a68ddb0c2504c980d", - "branchlen": 1, - "status": "invalid" - }, - { - "height": 783830, - "hash": "0000000000000000000366d2c12772a350f507879a5325203424e58ec440249b", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 783478, - "hash": "0000000000000000000446f7d3093688ae697386fed3f52a63812678ea6b251d", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 783426, - "hash": "00000000000000000002ec935e245f8ae70fc68cc828f05bf4cfa002668599e4", - "branchlen": 1, - "status": "invalid" - }, - { - "height": 782333, - "hash": "00000000000000000001a1abda3a2eb4acc211f64f8748d1a7635aad80690b7a", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 782129, - "hash": "000000000000000000036f461ab63c78f08401d3907a67fd2237166d8a373193", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 781487, - "hash": "0000000000000000000125e5d7c0d2e1b83982e5284ea21e08f5a73b8109d41b", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 781277, - "hash": "0000000000000000000388f42000fa901c01f2bfae36042bbae133ee430e6485", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 780994, - "hash": "00000000000000000001b666391fe81859e96fdfdbb83f1a1eafb7951c738c77", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 777172, - "hash": "0000000000000000000215ac1b6fd564d8d4707631f6b77273521eb1e242cf28", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 776941, - "hash": "00000000000000000004cc87382e38118248ec926716565d50d63f0637c22c07", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 772981, - "hash": "0000000000000000000682990a0dae862b48e0451d619938215dd47ed9560200", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 771745, - "hash": "00000000000000000004370a77a30add64bba97c26a90ca9643b45a75219b2a6", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 771627, - "hash": "00000000000000000005a92bdb6f9d55ea8d2b42579e0db6ca7764f97b6910e1", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 763445, - "hash": "000000000000000000065d0f6847466feeeaffa9663895cedde33aa12c262e00", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 759781, - "hash": "000000000000000000025edbf5ea025e4af2674b318ba82206f70681d97ca162", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 741082, - "hash": "00000000000000000004e2891d08337eb9263b703eb1c897e05dc59e8b246a9b", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 737096, - "hash": "00000000000000000002b07a9a9f066d463844960542d96e88b4815e063fab08", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 733430, - "hash": "00000000000000000006ead1cff09f279f7beb31a7290c2a603b0776d98dc334", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 730848, - "hash": "000000000000000000029ec31578132d01696910f299f8d104f29b8f8bbdc24f", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 723102, - "hash": "00000000000000000006a970fdd8e537521747aff917d909bf3a78b4b68143e1", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 715276, - "hash": "00000000000000000009b160476c5f407ccd4957e20346b862d8fc46004759f0", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 715139, - "hash": "0000000000000000000407bc4e26035c137869cdb677dfcab268b3faf7d7b5d1", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 714637, - "hash": "00000000000000000009f819d004fea5bcb77bda25f4906d0a39e79c9ba19590", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 714367, - "hash": "0000000000000000000b2e70d7675bc7b4e89d384d0e6e1a7ecc2779e1d93244", - "branchlen": 1, - "status": "valid-headers" - } - ], - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getdifficulty.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getdifficulty.md deleted file mode 100644 index 5787f3b7..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getdifficulty.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getdifficulty" -slug: "rpc-bch-getdifficulty" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getDifficulty() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getdifficulty` is a method that returns the current mining difficulty. The mining difficulty is a measure of how difficult it is to find a new block compared to the easiest it can ever be. This method can be used to monitor the mining difficulty, which adjusts every 2016 blocks to maintain a consistent block creation rate of approximately 10 minutes per block. - -### Parameters - -This method does not require any parameters. - -### Return Object - -A return object is a floating-point number that represents the current mining difficulty. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getdifficulty", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": 48712405953118.43, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolancestors.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolancestors.md deleted file mode 100644 index 2250aa9c..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolancestors.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getmempoolancestors" -slug: "rpc-bch-getmempoolancestors" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getMempoolAncestors("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getmempoolancestors` is a method that returns information about the ancestors of a transaction in the memory pool. This method can be used to analyze the dependency relationships between unconfirmed transactions and to investigate potential transaction issues, such as chains of unconfirmed transactions or transactions that depend on others with a low fee. - -### Parameters - -- `txid`: The transaction ID (string, required) of the transaction for which you want to retrieve the ancestors. -- `verbose`: Whether to return a JSON object with detailed information about the ancestors (bool, optional, default = false). If `false`, only the transaction IDs of the ancestors are returned. - -### Return Object - -The return object depends on the `verbose` parameter: - -- If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of an ancestor. -- If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the ancestors, and the values are JSON objects containing detailed information about the ancestors. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempoolancestors", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} - -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": [ - "1d1c1bc9a9a7d7b0990e0e1f1b5b5a5a5c5b5a5a5a5a5a5a5a5a5a5a5a5a5a5a" - ] -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempooldescendants.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempooldescendants.md deleted file mode 100644 index 8e1015f9..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempooldescendants.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getmempooldescendants" -slug: "rpc-bch-getmempooldescendants" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getMempoolDescendants("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempooldescendants` RPC method allows you to retrieve information about the descendant transactions of a specified transaction in the memory pool. This method is useful for understanding the relationships between unconfirmed transactions and the possible effects of their confirmation on the overall transaction fees and network congestion. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction for which you want to get its descendants. -- `verbose`: (boolean, optional, default=`false`) If set to `true`, detailed information about each descendant transaction will be returned, otherwise only the transaction IDs will be returned. - -### Return Object - -The return object depends on the `verbose` parameter: - -- If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of a descendant. -- If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the descendants, and the values are JSON objects containing detailed information about the descendants. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempooldescendants", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} - -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": [ - "1d1c1bc9a9a7d7b0990e0e1f1b5b5a5a5c5b5a5a5a5a5a5a5a5a5a5a5a5a5a5a" - ] -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolentry.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolentry.md deleted file mode 100644 index ffa7db7d..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolentry.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "getmempoolentry" -slug: "rpc-bch-getmempoolentry" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getMempoolEntry("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempoolentry` RPC method allows you to retrieve information about a specific transaction in the memory pool. This method is useful for tracking the status of unconfirmed transactions and for gathering additional details about their current state. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction you want to retrieve information about. - -### Return Object - -The return object will be an object containing information about the specified transaction. - -**Fields** - -- `size`: (numeric) The transaction size in bytes. -- `fee`: (numeric) The transaction fee. -- `modifiedfee`: (numeric) The transaction fee with fee deltas used for mining priority. -- `time`: (numeric) The local time the transaction entered the memory pool. -- `height`: (numeric) The block height when the transaction entered the memory pool. -- `descendantcount`: (numeric) The number of descendant transactions. -- `descendantsize`: (numeric) The virtual transaction size of all descendant transactions combined. -- `descendantfees`: (numeric) The total fees of all descendant transactions. -- `ancestorcount`: (numeric) The number of ancestor transactions. -- `ancestorsize`: (numeric) The virtual transaction size of all ancestor transactions combined. -- `ancestorfees`: (numeric) The total fees of all ancestor transactions. -- `wtxid`: (string) The witness transaction ID of the transaction. -- `depends`: (array) An array containing the witness transaction IDs of the transactions this transaction depends on. -- `spentby`: (array) An array containing the witness transaction IDs of the transactions that spend this transaction. -- `bip125-replaceable`: (string) Whether the transaction is BIP125 replaceable. Possible values are "yes", "no", or "unknown". - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getmempoolentry", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "vsize": 203, - "weight": 809, - "time": 1682502684, - "height": 787068, - "descendantcount": 1, - "descendantsize": 203, - "ancestorcount": 1, - "ancestorsize": 203, - "wtxid": "c00fc27056ad4305dc65a40a78381a6c923b4311a460ceccd81401016f5c8984", - "fees": { - "base": 0.00005481, - "modified": 0.00005481, - "ancestor": 0.00005481, - "descendant": 0.00005481 - }, - "depends": [], - "spentby": [], - "bip125-replaceable": false, - "unbroadcast": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolinfo.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolinfo.md deleted file mode 100644 index f1005c52..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getmempoolinfo.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "getmempoolinfo" -slug: "rpc-bch-getmempoolinfo" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getMempoolInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempoolinfo` RPC method allows you to retrieve general information about the current memory pool. This method is useful for monitoring the state of the memory pool, such as its size, the total transaction fees, and the minimum fee rate required for transactions to be included in the next block. - -### Parameters - -This method does not require any parameters. - -### Return Object - -The return object will be an object containing general information about the current memory pool. - -**Fields** - -- `size`: (numeric) The number of transactions in the memory pool. -- `bytes`: (numeric) The total size of all transactions in the memory pool, in bytes. -- `usage`: (numeric) The total memory usage of the memory pool, in bytes. -- `maxmempool`: (numeric) The maximum memory usage of the memory pool, in bytes. -- `mempoolminfee`: (numeric) The minimum fee rate required for transactions to be included in the memory pool. -- `minrelaytxfee`: (numeric) The minimum fee rate required for transactions to be relayed across the network. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getmempoolinfo", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "loaded": true, - "size": 28338, - "bytes": 11367166, - "usage": 63671920, - "total_fee": 0.73841041, - "maxmempool": 4000000000, - "mempoolminfee": 0.00001, - "minrelaytxfee": 0.00001, - "incrementalrelayfee": 0.00001, - "unbroadcastcount": 0, - "fullrbf": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getrawmempool.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getrawmempool.md deleted file mode 100644 index b76b0b87..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getrawmempool.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "getrawmempool" -slug: "rpc-bch-getrawmempool" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getRawMemPool(true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getrawmempool` RPC method provides information on the transactions currently in the memory pool. This method is useful for getting details about unconfirmed transactions that have not yet been included in a block. - -### Parameters - -- `verbose` (boolean, optional, default=false): Set to `true` to receive a detailed JSON object for each transaction in the memory pool. Set to `false` to receive a simple array of transaction IDs. - -**Example** - -- `verbose`: `true` - -### Return Object - -The return object will depend on the value of the `verbose` parameter. - -- If `verbose` is set to `false`, the method will return an array of transaction IDs. -- If `verbose` is set to `true`, the method will return an object with transaction IDs as keys and detailed transaction information as values. - -**Fields (when verbose is true)** - -- `size`: (numeric) The transaction size in bytes. -- `fee`: (numeric) The transaction fee. -- `modifiedfee`: (numeric) The transaction fee with descendants. -- `time`: (numeric) The local time when the transaction entered the memory pool. -- `height`: (numeric) The block height when the transaction entered the memory pool. -- `descendantcount`: (numeric) The number of descendant transactions in the memory pool. -- `descendantsize`: (numeric) The total size of all descendant transactions in the memory pool, in bytes. -- `descendantfees`: (numeric) The total fees of all descendant transactions in the memory pool, in satoshis. -- `ancestorcount`: (numeric) The number of ancestor transactions in the memory pool. -- `ancestorsize`: (numeric) The total size of all ancestor transactions in the memory pool, in bytes. -- `ancestorfees`: (numeric) The total fees of all ancestor transactions in the memory pool, in satoshis. -- `wtxid`: (string) The transaction witness ID. -- `depends`: (array) An array of unconfirmed transactions that this transaction depends on. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getrawmempool", - "params": [true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ -"result": { - "940352ce2be1f34f2a88ed32ba9bfcd01d4d8cbd68b79c88ce97115d1d8da8ce": { - "vsize": 151, - "weight": 602, - "time": 1682395086, - "height": 787063, - "descendantcount": 1, - "descendantsize": 151, - "ancestorcount": 2, - "ancestorsize": 1334, - "wtxid": "a824488001981d130794c9982afb0aeab3cdef25b5b9505b50ded0724308e976", - "fees": { - "base": 0.00000307, - "modified": 0.00000307, - "ancestor": 0.00002679, - "descendant": 0.00000307 - }, - "depends": [ - "e17275ca632c7083ce2f36415d4a52eda928901624e90f104c51696bc3338379" - ], - "spentby": [], - "bip125-replaceable": true, - "unbroadcast": false - } - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getrawtransaction.md deleted file mode 100644 index c346a384..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-getrawtransaction.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: "getrawtransaction" -slug: "rpc-bch-getrawtransaction" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getRawTransaction("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getrawtransaction` RPC method retrieves a raw transaction from the blockchain or mempool. It returns the serialized (hex-encoded) transaction data. This method can be used to inspect a transaction's content before it's included in a block or to decode the transaction for further analysis. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction to fetch. -- `verbose`: (bool, optional, default=false) If set to `true`, the method returns a JSON object containing information about the transaction. - -### Return Object - -If `verbose` is `false`, the method returns a hex-encoded string representing the serialized transaction data. If `verbose` is `true`, the method returns a JSON object with the following fields: - -- `txid`: (string) The transaction ID. -- `hash`: (string) The transaction hash. -- `version`: (numeric) The transaction version. -- `size`: (numeric) The transaction size. -- `vsize`: (numeric) The virtual transaction size. -- `weight`: (numeric) The transaction's weight. -- `locktime`: (numeric) The transaction locktime. -- `vin`: (array) The transaction inputs. Each object within the array has the following properties: - 1. `txid`: A string representing the transaction ID of the output being spent. This refers to the transaction where the bitcoin spent in the current transaction was received. - 2. `vout`: An integer representing the index of the output in the transaction specified by `txid`. This is the position of the output in that transaction's `vout` array. - 3. `scriptSig`: An object containing two fields, `asm` and `hex`, which represent the unlocking script that satisfies the conditions of the spent output's locking script. `asm` contains the assembly representation of the script, while `hex` contains the hexadecimal representation. - 4. `sequence`: A number representing the sequence number of the input. It can be used to signal relative locktime constraints on the transaction. -- `vout`: (array) The transaction outputs. Each object within the array has the following properties: - 1. `value`: A decimal number representing the amount sent to the output's address. - 2. `n`: An integer representing the index of the output in the transaction's `vout` array. - 3. `scriptPubKey`: An object containing information about the locking script used to lock the output. The object has the following fields: - - `asm`: The assembly representation of the locking script. - - `hex`: The hexadecimal representation of the locking script. - - `reqSigs`: The number of required signatures to unlock the output (relevant for multisig addresses). - - `type`: The type of the locking script (e.g., 'pubkeyhash', 'scripthash', 'multisig', etc.). - - `addresses`: An array of addresses associated with the output. -- `hex`: (string) The serialized transaction data in hex format. -- `blockhash`: (string, optional) The block hash containing the transaction. -- `confirmations`: (numeric, optional) The number of confirmations the transaction has. -- `time`: (numeric, optional) The transaction time in UNIX timestamp format. -- `blocktime`: (numeric, optional) The block time in UNIX timestamp format. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getrawtransaction", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "txid": "c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", - "hash": "c00fc27056ad4305dc65a40a78381a6c923b4311a460ceccd81401016f5c8984", - "version": 2, - "size": 284, - "vsize": 203, - "weight": 809, - "locktime": 0, - "vin": [ - { - "txid": "aaeb16390ca5209d8c72a0090a9ca87e6ff6491f239b3496cdb5c99977643583", - "vout": 9, - "scriptSig": { - "asm": "", - "hex": "" - }, - "txinwitness": [ - "3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501", - "03c9f7cff5a1d1a5fc107f37609c99d2e0fd699cacdef9696753b626b7508921c0" - ], - "sequence": 4294967294 - } - ], - "vout": [ - { - "value": 0.00112825, - "n": 0, - "scriptPubKey": { - "asm": "0 29a7007eabae2ac56f221aad9c983b77a9f96c3b", - "desc": "addr(bc1q9xnsql4t4c4v2mezr2keexpmw75ljmpm0we75k)#3al0qk8v", - "hex": "001429a7007eabae2ac56f221aad9c983b77a9f96c3b", - "address": "bc1q9xnsql4t4c4v2mezr2keexpmw75ljmpm0we75k", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.0027, - "n": 1, - "scriptPubKey": { - "asm": "0 24007ed98749dbb504fdea2bd07715c94d4c7751", - "desc": "addr(bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88)#2wxgfkqe", - "hex": "001424007ed98749dbb504fdea2bd07715c94d4c7751", - "address": "bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.00104468, - "n": 2, - "scriptPubKey": { - "asm": "0 c4c04e31613e2c3dfadaedde383bbfdd7a107d8a", - "desc": "addr(bc1qcnqyuvtp8ckrm7k6ah0rswalm4apqlv2ku24fa)#5rw0gs2m", - "hex": "0014c4c04e31613e2c3dfadaedde383bbfdd7a107d8a", - "address": "bc1qcnqyuvtp8ckrm7k6ah0rswalm4apqlv2ku24fa", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.41658346, - "n": 3, - "scriptPubKey": { - "asm": "0 b33b0a68aba1d4697d8329f2b7939fb2a46b7332", - "desc": "addr(bc1qkvas569t582xjlvr98et0yulk2jxkuejx27yh4)#savgw9p6", - "hex": "0014b33b0a68aba1d4697d8329f2b7939fb2a46b7332", - "address": "bc1qkvas569t582xjlvr98et0yulk2jxkuejx27yh4", - "type": "witness_v0_keyhash" - } - } - ], - "hex": "020000000001018335647799c9b5cd96349b231f49f66f7ea89c0a09a0728c9d20a50c3916ebaa0900000000feffffff04b9b801000000000016001429a7007eabae2ac56f221aad9c983b77a9f96c3bb01e04000000000016001424007ed98749dbb504fdea2bd07715c94d4c77511498010000000000160014c4c04e31613e2c3dfadaedde383bbfdd7a107d8aeaa77b0200000000160014b33b0a68aba1d4697d8329f2b7939fb2a46b733202473044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c85012103c9f7cff5a1d1a5fc107f37609c99d2e0fd699cacdef9696753b626b7508921c000000000", - "blockhash": "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2", - "confirmations": 7, - "time": 1682503076, - "blocktime": 1682503076 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-gettxout.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-gettxout.md deleted file mode 100644 index dec1fd7f..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-gettxout.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: "gettxout" -slug: "rpc-bch-gettxout" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getTxOut("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `gettxout` RPC method returns details about an unspent transaction output (UTXO). This method can be used to check if a specific transaction output is still unspent and obtain its details such as the value and scriptPubKey. - -### Parameters - -- `txid` (string, required): The transaction ID of the output. -- `n` (numeric, required): The index of the output within the transaction (vout). -- `include_mempool` (boolean, optional, default=true): Whether to include the mempool. Set to `false` to only check for outputs confirmed in the blockchain. - -**Example** - -- `txid`: `"a12345abcdef67890bcdef1234567890abcdef1234567890abcdef1234567890"` -- `n`: `1` -- `include_mempool`: `true` - -### Return Object - -The return object contains the following fields: - -- `bestblock`: (string) The hash of the block at the tip of the blockchain. -- `confirmations`: (numeric) The number of confirmations for the transaction. -1 if the transaction is not yet confirmed and in the mempool. -- `value`: (numeric) The value of the output. -- `scriptPubKey`: (object) Information about the output's scriptPubKey. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex representation of the script. - - `type`: (string) The type of the script (e.g., `pubkeyhash`, `scripthash`). - - `addresses`: (array) The addresses associated with this output. -- `coinbase`: (boolean) Whether the transaction is a coinbase transaction. -- `version`: (numeric) The transaction version. -- `height`: (numeric) The height of the block containing this output. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "gettxout", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "bestblock": "00000000000000000000bb252e11a381e2d9ee948dd8f2c9df9b7cb41adc40b2", - "confirmations": 5, - "value": 0.0027, - "scriptPubKey": { - "asm": "0 24007ed98749dbb504fdea2bd07715c94d4c7751", - "desc": "addr(bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88)#2wxgfkqe", - "hex": "001424007ed98749dbb504fdea2bd07715c94d4c7751", - "address": "bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88", - "type": "witness_v0_keyhash" - }, - "coinbase": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-gettxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-gettxoutproof.md deleted file mode 100644 index c8acdd7b..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-gettxoutproof.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "gettxoutproof" -slug: "rpc-bch-gettxoutproof" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.getTxOutProof(["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `gettxoutproof` RPC method returns a hex-encoded proof that the specified transaction(s) were included in a block. This method can be used to provide proof of inclusion for one or more transactions in the blockchain. - -### Parameters - -- `txids` (array, required): An array of transaction IDs to create a proof for. -- `blockhash` (string, optional): The hash of the block that contains the transactions. If not provided, the method will search for the transactions in the most recent blocks. - -**Example** - -- `txids`: `["`c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2`"]` -- `blockhash`: `"`00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2`"` - -### Return Object - -- `hex`: (string) The hex-encoded proof of the transaction(s) inclusion in the block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "gettxoutproof", - "params": [["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "00800020208d9c3576f57c3f0c35bd94440f37fe7971cf2b914001000000000000000000db47732e70243f1ae818f635ae4f5cacbacf1230f4dc226f0e62c0871d6e8692a4f5486439c705171a71df638e1100000e8c9aa54adefc4c7b9ccd760b4ee1369bdd5cc7cb8b3e426b4a3b490c2eee5473e8f8f4134d4035e4241a929b9cdac2c22b6d74e0cae88e9ad1f50eeba06ae52659f1c0be83c1705e6642336d47356c39632ca55d11c04f24d09132fd081f5144caf6c733deed2366cd75a4e5a355920cd31c889239e78e195fb15435451f82398b683b27258ff3523cf63a276f38ffe296dd541b99f80cc87ecb40f473e1af2656ac06a0d999105c71c293e571bb62bdd3f0509fe8d5be381d92a76d1659cafcfea20ac316c4cc72a4d81fd7e9d94227cf6457d5412e4ef0d0b32e195a092321e1ad6c16ff7c6a28b39104f3e38a21775f4ea730b25269de7a54eb4dee8752735fe3e7add927cb2f0813a5bddda182776a559d7ba91c3580fb55e49a0bef8186f274f6dccad47742cdab8d3cab06c26c1336a23675bbc2ad36d1396ae451adc759fa97499c565c252524eed6934be8f18f3784f1f7d74a1471c1778af5aa65b6e6ebb5c3625ce00ac09a644aaa8b0b86b679e65c9fa204582ac285368b97eaa7ef2c43019754f8a3e9442c9a6820a25b3d7037fe53ba9d89732f5835939225fa30b5d86694bb5fc5a384e799a22ae82017fb0cf95e70e7bb529725a81e0f96f704afaa5a00", - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-sendrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-sendrawtransaction.md deleted file mode 100644 index 66cdb5b2..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-sendrawtransaction.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "sendrawtransaction" -slug: "rpc-bch-sendrawtransaction" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.sendRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `sendrawtransaction` method submits a serialized raw transaction to the network. If the transaction is well-formed and valid, it will be propagated to the network and included in a mined block. - -This method is commonly used in conjunction with [`createrawtransaction`](createrawtransaction.md), or other methods to construct and sign raw transactions before broadcasting them. - -### Parameters - -The `sendrawtransaction` method accepts the following parameters: - -- `hexstring`: A string representing the serialized raw transaction in hexadecimal format. - -### Return Object - -The `sendrawtransaction` method returns a string containing the transaction ID (txid) of the broadcasted transaction. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "sendrawtransaction", - "params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", - "error": null, - "id": 1 -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-validateaddress.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-validateaddress.md deleted file mode 100644 index 0b01e4c0..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-validateaddress.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "validateaddress" -slug: "rpc-bch-validateaddress" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.validateAddress("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`validateaddress` is a method that enables users to verify if a given address is valid. This method provides important information about the address, such as its type and whether it's a spendable or watch-only address. It can be particularly useful in applications where address validation is necessary before performing transactions or when dealing with user-generated addresses to ensure their validity. - -### Parameters - -The `validateaddress` method accepts one required parameter: - -- `address` (string, required): The address to be validated. - -### Return Object - -The `validateaddress` method returns an object with the following fields: - -- `isvalid` (boolean): Indicates if the supplied address is valid. -- `address` (string): The validated address. -- `scriptPubKey` (string): The hex-encoded scriptPubKey generated by the address. -- `isscript` (boolean): Indicates if the address is a script address (P2SH). -- `iswitness` (boolean): Indicates if the address is a witness address (P2WPKH or P2WSH). -- `witness_version` (numeric, optional): The version number of the witness program, if applicable. -- `witness_program` (string, optional): The hex value of the witness program, if applicable. -- `isspendable` (boolean): Indicates if the address is spendable (has the private key). -- `iswatchonly` (boolean): Indicates if the address is watch-only (wallet has the public key but not the private key). -- `iscompressed` (boolean, optional): Indicates if the associated public key is compressed. -- `account` (string, optional): DEPRECATED. The account associated with the address, if any. Example: - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "validateaddress", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "isvalid": true, - "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", - "scriptPubKey": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", - "isscript": false, - "iswitness": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-verifymessage.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-verifymessage.md deleted file mode 100644 index f4c951bc..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-verifymessage.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "verifymessage" -slug: "rpc-bch-verifymessage" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.verifyMessage( "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", "Hello, this is a signed message.") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`verifymessage` is a method that allows users to verify a signed message using a address. This method can be used to confirm the authenticity of a message by verifying that the signature was created by the owner of the address, without revealing the private key. Use cases include proving ownership of an address, verifying the content of a message, or validating communications within a trustless system. - -### Parameters - -The `verifymessage` method accepts three required parameters: - -- `address` (string, required): The address that supposedly signed the message. -- `signature` (string, required): The base64-encoded signature of the message. -- `message` (string, required): The message that was signed. - -### Return Object - -The `verifymessage` method returns a single boolean value: - -- `isvalid` (boolean): Indicates if the signature is valid for the given message and address - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifymessage", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", -"HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", - "Hello, this is a signed message." - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": false, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-verifytxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-verifytxoutproof.md deleted file mode 100644 index c68c5b07..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-bch/rpc-bch-verifytxoutproof.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "verifytxoutproof" -slug: "rpc-bch-verifytxoutproof" -excerpt: "BCH RPC" -hidden: false -metadata: - description: "BCH RPC" - image: [] - keywords: "bch, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, BitcoinCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.BITCOIN_CASH}) - -const result = await tatum.rpc.verifyTxOutProof("") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `verifytxoutproof` RPC method verifies the given transaction proof (in the form of a Merkle block) and returns an array of transaction hashes contained in the verified Merkle block. This method can be used to confirm that specific transactions are included in a block without having to download the entire block. - -### Parameters - -- `proof`: (string, required) The hex-encoded proof generated by the `gettxoutproof` RPC method. - -### Return Object - -- (array of strings) An array of transaction hashes contained in the verified Merkle block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifytxoutproof", - "params": [ - "00000020fc61cc9f1bda9ef9e5d6bcccc7f210a0e87e7ccbc017d8487031b91d0000000047451bc9b84a546eafbe39baedb3cda967ea57cf1ab650b24d88395f2e4e3d413e4f22e8d9d9ea1c000000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a01000000434104e70b81e35e7cf03f6238471f7d9c903d48aea7c1d067e3010b9000000000000" - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": [ - "3e4f22e8d9d9ea1c123456789abcdef0123456789abcdef0123456789abcdef" - ], - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin.md deleted file mode 100644 index ae31363e..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Dogecoin" -slug: "rpc-degecoin" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:39:28 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-createrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-createrawtransaction.md deleted file mode 100644 index ae41c252..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-createrawtransaction.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "createrawtransaction" -slug: "rpc-dogecoin-createrawtransaction" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.createRawTransaction([ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0 - } - ], - { - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 - }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -{% embed url=" %} - -The `createrawtransaction` RPC method creates an unsigned raw transaction that spends a set of previous transaction outputs to a set of new addresses with specific amounts. The method can be used to create custom transactions, which can then be signed and broadcast to the Dogecoin network. - -### Parameters - -- `inputs`: (array, required) An array of objects, each specifying a previous transaction output to spend. - - `txid`: (string, required) The transaction ID of the previous transaction output to spend. - - `vout`: (numeric, required) The index of the output to spend from the previous transaction. - - `sequence`: (numeric, optional) default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number -- `outputs`: (object, required) An object with the key-value pairs representing the receiving address and the amount to be sent (in BTC). -- `locktime`: (numeric, optional, default=0) The lock time for the transaction. It can be used to specify the earliest time or block height at which the transaction can be included in a block. -- `replaceable`: (boolean, optional, default=false) **Marks this transaction as BIP125-replaceable.** Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible. - -### Return Object - -- (string) A hex-encoded raw transaction. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "createrawtransaction", - "params": [ - [ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0 - } - ], - { - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 - } - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000", - "error": null, - "id": 1 -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decoderawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decoderawtransaction.md deleted file mode 100644 index ca285d2f..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decoderawtransaction.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: "decoderawtransaction" -slug: "rpc-dogecoin-decoderawtransaction" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.decodeRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `decoderawtransaction` RPC method decodes a serialized (hex-encoded) raw transaction and displays its information in a human-readable format. This method is useful for inspecting raw transactions before broadcasting them to the Dogecoin network or for debugging purposes. - -{% embed url=" %} - -### Parameters - -- `hex_string`: (string, required) The serialized raw transaction in hex format. - -### Return Object - -An object containing the decoded raw transaction information: - -- `txid`: (string) The transaction ID. -- `hash`: (string) The transaction hash. -- `version`: (numeric) The transaction version. -- `size`: (numeric) The transaction size in bytes. -- `vsize`: (numeric) The virtual transaction size in bytes. -- `weight`: (numeric) The transaction weight. -- `locktime`: (numeric) The lock time for the transaction. -- `vin`: (array) An array of objects, each representing an input of the transaction. - - `txid`: (string) The transaction ID of the previous transaction output to spend. - - `vout`: (numeric) The index of the output to spend from the previous transaction. - - `scriptSig`: (object) The script used to redeem the previous transaction output. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex-encoded script. - - `sequence`: (numeric) The sequence number. -- `vout`: (array) An array of objects, each representing an output of the transaction. - - `value`: (numeric) The amount sent to the output. - - `n`: (numeric) The index of the output. - - `scriptPubKey`: (object) The script used to lock the output. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex-encoded script. - - `reqSigs`: (numeric) The required number of signatures. - - `type`: (string) The type of the script (e.g., 'pubkeyhash'). - - `addresses`: (array) An array of Dogecoin addresses associated with the output. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "decoderawtransaction", - "params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "txid": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", - "hash": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", - "version": 2, - "size": 85, - "vsize": 85, - "weight": 340, - "locktime": 0, - "vin": [ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0, - "scriptSig": { - "asm": "", - "hex": "" - }, - "sequence": 4294967293 - } - ], - "vout": [ - { - "value": 0.01, - "n": 0, - "scriptPubKey": { - "asm": "OP_DUP OP_HASH160 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 OP_EQUALVERIFY OP_CHECKSIG", - "desc": "addr(1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa)#632p52jr", - "hex": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", - "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", - "type": "pubkeyhash" - } - } - ] - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decodescript.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decodescript.md deleted file mode 100644 index c216455b..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-decodescript.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "decodescript" -slug: "rpc-dogecoin-decodescript" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.decodeScript("3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `decodescript` RPC method decodes a serialized (hex-encoded) script and provides information about the script in a human-readable format. This method is useful for inspecting scripts for debugging purposes or for understanding their structure. - -{% embed url=" %} - -### Parameters - -- `hex_string`: (string, required) The serialized script in hex format. - -### Return Object - -An object containing the decoded script information: - -- `asm`: (string) The assembly representation of the script. -- `hex`: (string) The hex-encoded script. -- `type`: (string) The type of the script (e.g., 'pubkeyhash', 'multisig'). -- `reqSigs`: (numeric, optional) The required number of signatures if the script is a multisig script. -- `addresses`: (array, optional) An array of Litecoin addresses associated with the script if applicable. -- `p2sh`: (string, optional) The P2SH address for this script if applicable. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "decodescript", - "params": ["3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "asm": "44022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86 OP_MAX OP_UNKNOWN OP_UNKNOWN [error]", - "desc": "raw(3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501)#3x5hf724", - "type": "nonstandard" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-estimatesmartfee.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-estimatesmartfee.md deleted file mode 100644 index 18150fa4..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-estimatesmartfee.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "estimatesmartfee" -slug: "rpc-dogecoin-estimatesmartfee" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.estimateSmartFee(20) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `estimatesmartfee` method provides an estimated fee rate (in DOGE/kB) for a transaction to be confirmed within a certain number of blocks. The estimation is based on recent transactions in the Dogecoin network. - -This method can be useful for users or applications trying to decide on an appropriate fee for their transactions, based on the desired confirmation speed. - -{% embed url=" %} - -### Parameters - -The `estimatesmartfee` method accepts the following parameters: - -- `conf_target`: An integer representing the number of blocks within which the transaction should be confirmed. -- `estimate_mode` _(optional)_: A string that determines the estimation mode. Possible values are "UNSET", "ECONOMICAL", and "CONSERVATIVE". Default is "CONSERVATIVE". - -### Return Object - -The `estimatesmartfee` method returns an object containing the following fields: - -- `feerate`: A decimal number representing the estimated fee rate in DOGE/kB. -- `blocks`: An integer representing the number of blocks within which the transaction is expected to be confirmed. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "estimatesmartfee", - "params": [20], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "feerate": 0.00017258, - "blocks": 20 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getbestblockhash.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getbestblockhash.md deleted file mode 100644 index 1741df3c..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getbestblockhash.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "getbestblockhash" -slug: "rpc-dogecoin-getbestblockhash" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: DOGECOIN}) - -const result = await tatum.rpc.getBestBlockHash() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getbestblockhash` is a Dogecoin RPC method that returns the hash of the best (tip) block in the longest blockchain. This method is useful for obtaining the latest block hash, which can be used to fetch block details or confirmations for transactions. - -{% embed url=" %} - -### Parameters - -This method does not have any parameters. - -### Return Object - -The returned object is a string containing the hash of the best block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getbestblockhash" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": "0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e", - "error": null -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblock.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblock.md deleted file mode 100644 index 76569b55..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblock.md +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: "getblock" -slug: "rpc-dogecoin-getblock" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getBlock('000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblock` is a Dogecoin RPC method that returns information about a specified block. This method is useful for obtaining block details such as the hash, height, transactions, and other metadata. It can be used for various purposes, including validating transactions, monitoring the blockchain, and analyzing the network. - -{% embed url=" %} - -### Parameters - -- `hashOrHeight` (required): The hash or height of the block to be retrieved. - - Example: `"0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e"` -- `verbose` - (boolean, optional, default=true) true for a json object, false for the hex encoded data - -### Return Object - -The returned object varies depending on the `verbosity` parameter: - -- If `verbose` is `false`, the return object is a hex-encoded string of the serialized block. -- If `verbose` is `true`, the return object is a JSON object containing the following fields: - - `hash`: The block hash. - - `confirmations`: The number of confirmations for the block. - - `strippedsize`: The block size without witness data. - - `size`: The block size. - - `weight`: The block weight. - - `height`: The block height. - - `version`: The block version. - - `versionHex`: The block version as a hex string. - - `merkleroot`: The Merkle root of the transactions in the block. - - `tx`: An array of transaction identifiers (if `verbosity` is `1`) or detailed transaction objects (if `verbosity` is `2`). - - `time`: The block time in UNIX timestamp format. - - `mediantime`: The median block time of the previous 11 blocks. - - `nonce`: The block nonce. - - `bits`: The block difficulty target as a hex string. - - `difficulty`: The block difficulty. - - `chainwork`: The total work in the blockchain up to this block. - - `nTx`: The number of transactions in the block. - - `previousblockhash`: The hash of the previous block. - - `nextblockhash`: The hash of the next block (if available). - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblock", - "params": [ - "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - 1 - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "hash": "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - "confirmations": 1, - "height": 787065, - "version": 536895488, - "versionHex": "20006000", - "merkleroot": "f4d9edf4e50ed243778b553ae0043683a2a9be84c0996f15b30e2e282e6bd2d8", - "time": 1682499730, - "mediantime": 1682496628, - "nonce": 1195457913, - "bits": "1705c739", - "difficulty": 48712405953118.43, - "chainwork": "000000000000000000000000000000000000000046b01da204f6db69fc714174", - "nTx": 4114, - "previousblockhash": "000000000000000000041dd53066beb0577142582ec56573b5260d915311c773", - "strippedsize": 770704, - "size": 1680952, - "weight": 3993064, - "tx": [ - "63b36961bd94b217382409ceb8ec2f3da3d35a24e962e66089946d333f1af82b" - ] - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockchaininfo.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockchaininfo.md deleted file mode 100644 index d84153f8..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockchaininfo.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: "getblockchaininfo" -slug: "rpc-dogecoin-getblockchaininfo" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getBlockChainInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockchaininfo` is a Dogecoin RPC method that provides general information about the current state of the blockchain. This method is useful for obtaining an overview of the blockchain, including the best block hash, chain height, difficulty, and network protocol version. It can be used for various purposes, such as monitoring the blockchain, tracking network upgrades, and assessing the current mining difficulty. - -{% embed url=" %} - -### Parameters - -This method does not have any parameters. - -### Return Object - -The return object is a JSON object containing the following fields: - -- `chain`: The current network name (e.g., "main", "test", or "regtest"). -- `blocks`: The number of blocks in the local best block chain. -- `headers`: The number of headers the local node has validated. -- `bestblockhash`: The hash of the best (tip) block. -- `difficulty`: The current mining difficulty. -- `mediantime`: The median block time of the last 11 blocks in UNIX timestamp format. -- `verificationprogress`: The estimate of the verification progress of the local node as a percentage. -- `initialblockdownload`: A boolean indicating whether the node is in the initial block download mode. -- `chainwork`: The total work in the blockchain up to the best block. -- `size_on_disk`: The estimated size of the block and undo files on disk. -- `pruned`: A boolean indicating whether the block chain is pruned. -- `pruneheight`: The lowest-height complete block stored if the node is pruned (only present if `pruned` is true). -- `softforks`: An array of objects, each containing information about a softfork. -- `bip9_softforks`: An object containing the status of BIP9 softforks in the blockchain. -- `warnings`: Any network and blockchain warnings. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockchaininfo" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "chain": "main", - "blocks": 787066, - "headers": 787066, - "bestblockhash": "00000000000000000005233c5202951a85538b047e62f4c12c25d9ff65e62f07", - "difficulty": 48712405953118.43, - "time": 1682501447, - "mediantime": 1682496904, - "verificationprogress": 0.9999996042025764, - "initialblockdownload": false, - "chainwork": "000000000000000000000000000000000000000046b049efeeebefbd7f5e5cd6", - "size_on_disk": 540374248868, - "pruned": false, - "warnings": "" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockcount.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockcount.md deleted file mode 100644 index 8f23dff0..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockcount.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "getblockcount" -slug: "rpc-dogecoin-getblockcount" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @@tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getBlockCount() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockcount` is a Dogecoin RPC method that returns the number of blocks in the local best blockchain. This method is useful for obtaining the current height of the blockchain, which can be used for various purposes, such as monitoring the blockchain, determining the number of confirmations for a transaction, or assessing the progress of the blockchain's growth. - -{% embed url=" %} - -### Parameters - -This method does not have any parameters. - -### Return Object - -The returned object is an integer representing the number of blocks in the local best blockchain. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockcount" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": 787067, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockhash.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockhash.md deleted file mode 100644 index ab6fd5af..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockhash.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "getblockhash" -slug: "rpc-dogecoin-getblockhash" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getBlockHash(587123) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockhash` is a Dogecoin RPC method that returns the block hash for a specified block height in the local best blockchain. This method is useful for obtaining the hash of a specific block, which can then be used to query for more detailed information about that block using other RPC methods, such as `getblock`. - -{% embed url=" %} - -### Parameters - -- `height`: The height of the block for which the hash is requested. This is an integer parameter. - - Example: `587123` - -### Return Object - -The return object is a string representing the hash of the block at the specified height. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockhash", - "params": [587123], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockheader.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockheader.md deleted file mode 100644 index 1702d548..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getblockheader.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: "getblockheader" -slug: "rpc-dogecoin-getblockheader" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getBlockHeader("0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockheader` is a Dogecoin RPC method that returns information about a specified block header. This method is useful for obtaining a high-level view of a specific block, including its hash, previous block hash, merkle root, timestamp, difficulty target, and nonce, without having to fetch the entire block's contents. - -{% embed url=" %} - -### Parameters - -- `blockhash`: The hash of the block for which the header information is requested. This is a string parameter. - - Example: `"`0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f`"` -- `verbose` (optional): A boolean parameter that specifies whether to return the header information in a JSON object (true) or as a serialized hex-encoded string (false). Default is true. - - Example: `true` - -### Return Object - -If `verbose` is set to true (default), the return object is a JSON object containing the following fields: - -- `hash`: The hash of the block. -- `confirmations`: The number of confirmations for the block. -- `height`: The height of the block in the block chain. -- `version`: The block version. -- `versionHex`: The block version formatted as a hex string. -- `merkleroot`: The merkle root of the block. -- `time`: The block timestamp in UNIX format. -- `mediantime`: The median block time of the last 11 blocks in UNIX timestamp format. -- `nonce`: The nonce value for the block. -- `bits`: The encoded difficulty target for the block. -- `difficulty`: The actual difficulty target for the block as a decimal number. -- `chainwork`: The total work in the block chain up to this block. -- `nTx`: The number of transactions in the block. -- `previousblockhash`: The hash of the previous block. -- `nextblockhash`: The hash of the next block (only present if there is a next block). - -If `verbose` is set to false, the return object is a serialized hex-encoded string of the block header. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockheader", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "hash": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "confirmations": 199945, - "height": 587123, - "version": 549453824, - "versionHex": "20c00000", - "merkleroot": "06bc20da616f96fef435445cbf1bbcc9ff00896dd30c73b875aed7e06902666d", - "time": 1564152126, - "mediantime": 1564151358, - "nonce": 444284193, - "bits": "171f3a08", - "difficulty": 9013786945891.682, - "chainwork": "00000000000000000000000000000000000000000768b223a5622f8f0f1ac0a0", - "nTx": 1820, - "previousblockhash": "0000000000000000001683477bc3c17ab029412183952cb4a37f49968e16e6a8", - "nextblockhash": "00000000000000000007aeb07bc2fe4dbd0b55fc4be751050589b59fe95352fc" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getchaintips.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getchaintips.md deleted file mode 100644 index 2681c2d8..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getchaintips.md +++ /dev/null @@ -1,251 +0,0 @@ ---- -title: "getchaintips" -slug: "rpc-dogecoin-getchaintips" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatums' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getChainTips() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getchaintips` is a Dogecoin RPC method that returns information about all known tips in the block tree. This method is useful for identifying and analyzing potential forks or alternative chains in the Litecoin network. It can be used to monitor the health and status of the network or to investigate discrepancies in blockchain data. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The return object is an array of JSON objects, with each object representing a chain tip. The fields in each object are: - -- `height`: The height of the chain tip in the block chain. -- `hash`: The hash of the block corresponding to the chain tip. -- `branchlen`: The length of the branch connected to the main chain. -- `status`: The status of the chain tip, which can be one of the following values: - - `active`: The tip is part of the main chain. - - `valid-fork`: The tip is part of a valid but inactive fork. - - `valid-headers`: The tip is part of a valid fork but with incomplete block data. - - `headers-only`: The tip is a fork with valid headers but incomplete block data and an invalid parent block. - - `invalid`: The tip is part of an invalid fork. - - `unknown`: The tip has an unknown validation state. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getchaintips", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": [ - { - "height": 787067, - "hash": "0000000000000000000348522f4f24304bfcadece8b34c0696faa4f87ec4fdc4", - "branchlen": 0, - "status": "active" - }, - { - "height": 784121, - "hash": "000000000000000000046a2698233ed93bb5e74ba7d2146a68ddb0c2504c980d", - "branchlen": 1, - "status": "invalid" - }, - { - "height": 783830, - "hash": "0000000000000000000366d2c12772a350f507879a5325203424e58ec440249b", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 783478, - "hash": "0000000000000000000446f7d3093688ae697386fed3f52a63812678ea6b251d", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 783426, - "hash": "00000000000000000002ec935e245f8ae70fc68cc828f05bf4cfa002668599e4", - "branchlen": 1, - "status": "invalid" - }, - { - "height": 782333, - "hash": "00000000000000000001a1abda3a2eb4acc211f64f8748d1a7635aad80690b7a", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 782129, - "hash": "000000000000000000036f461ab63c78f08401d3907a67fd2237166d8a373193", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 781487, - "hash": "0000000000000000000125e5d7c0d2e1b83982e5284ea21e08f5a73b8109d41b", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 781277, - "hash": "0000000000000000000388f42000fa901c01f2bfae36042bbae133ee430e6485", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 780994, - "hash": "00000000000000000001b666391fe81859e96fdfdbb83f1a1eafb7951c738c77", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 777172, - "hash": "0000000000000000000215ac1b6fd564d8d4707631f6b77273521eb1e242cf28", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 776941, - "hash": "00000000000000000004cc87382e38118248ec926716565d50d63f0637c22c07", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 772981, - "hash": "0000000000000000000682990a0dae862b48e0451d619938215dd47ed9560200", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 771745, - "hash": "00000000000000000004370a77a30add64bba97c26a90ca9643b45a75219b2a6", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 771627, - "hash": "00000000000000000005a92bdb6f9d55ea8d2b42579e0db6ca7764f97b6910e1", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 763445, - "hash": "000000000000000000065d0f6847466feeeaffa9663895cedde33aa12c262e00", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 759781, - "hash": "000000000000000000025edbf5ea025e4af2674b318ba82206f70681d97ca162", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 741082, - "hash": "00000000000000000004e2891d08337eb9263b703eb1c897e05dc59e8b246a9b", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 737096, - "hash": "00000000000000000002b07a9a9f066d463844960542d96e88b4815e063fab08", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 733430, - "hash": "00000000000000000006ead1cff09f279f7beb31a7290c2a603b0776d98dc334", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 730848, - "hash": "000000000000000000029ec31578132d01696910f299f8d104f29b8f8bbdc24f", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 723102, - "hash": "00000000000000000006a970fdd8e537521747aff917d909bf3a78b4b68143e1", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 715276, - "hash": "00000000000000000009b160476c5f407ccd4957e20346b862d8fc46004759f0", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 715139, - "hash": "0000000000000000000407bc4e26035c137869cdb677dfcab268b3faf7d7b5d1", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 714637, - "hash": "00000000000000000009f819d004fea5bcb77bda25f4906d0a39e79c9ba19590", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 714367, - "hash": "0000000000000000000b2e70d7675bc7b4e89d384d0e6e1a7ecc2779e1d93244", - "branchlen": 1, - "status": "valid-headers" - } - ], - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getdifficulty.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getdifficulty.md deleted file mode 100644 index d8fa92e1..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getdifficulty.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "getdifficulty" -slug: "rpc-dogecoin-getdifficulty" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getDifficulty() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getdifficulty` is a Dogecoin RPC method that returns the current mining difficulty. The mining difficulty is a measure of how difficult it is to find a new block compared to the easiest it can ever be. This method can be used to monitor the mining difficulty, which adjusts every 2016 blocks to maintain a consistent block creation rate of approximately 10 minutes per block. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -A return object is a floating-point number that represents the current mining difficulty. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getdifficulty", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": 48712405953118.43, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolancestors.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolancestors.md deleted file mode 100644 index 8232c366..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolancestors.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getmempoolancestors" -slug: "rpc-dogecoin-getmempoolancestors" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getMempoolAncestors("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getmempoolancestors` is a Dogecoin RPC method that returns information about the ancestors of a transaction in the memory pool. This method can be used to analyze the dependency relationships between unconfirmed transactions and to investigate potential transaction issues, such as chains of unconfirmed transactions or transactions that depend on others with a low fee. - -### Parameters - -- `txid`: The transaction ID (string, required) of the transaction for which you want to retrieve the ancestors. -- `verbose`: Whether to return a JSON object with detailed information about the ancestors (bool, optional, default = false). If `false`, only the transaction IDs of the ancestors are returned. - -### Return Object - -The return object depends on the `verbose` parameter: - -- If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of an ancestor. -- If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the ancestors, and the values are JSON objects containing detailed information about the ancestors. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempoolancestors", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} - -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": [ - "1d1c1bc9a9a7d7b0990e0e1f1b5b5a5a5c5b5a5a5a5a5a5a5a5a5a5a5a5a5a5a" - ] -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempooldescendants.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempooldescendants.md deleted file mode 100644 index e68aef89..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempooldescendants.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getmempooldescendants" -slug: "rpc-dogecoin-getmempooldescendants" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getMempoolDescendants("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempooldescendants` RPC method allows you to retrieve information about the descendant transactions of a specified transaction in the memory pool. This method is useful for understanding the relationships between unconfirmed transactions and the possible effects of their confirmation on the overall transaction fees and network congestion. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction for which you want to get its descendants. -- `verbose`: (boolean, optional, default=`false`) If set to `true`, detailed information about each descendant transaction will be returned, otherwise only the transaction IDs will be returned. - -### Return Object - -The return object depends on the `verbose` parameter: - -- If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of a descendant. -- If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the descendants, and the values are JSON objects containing detailed information about the descendants. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempooldescendants", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} - -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": [ - "1d1c1bc9a9a7d7b0990e0e1f1b5b5a5a5c5b5a5a5a5a5a5a5a5a5a5a5a5a5a5a" - ] -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolentry.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolentry.md deleted file mode 100644 index 0aa58123..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolentry.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "getmempoolentry" -slug: "rpc-dogecoin-getmempoolentry" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getMempoolEntry("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempoolentry` RPC method allows you to retrieve information about a specific transaction in the memory pool. This method is useful for tracking the status of unconfirmed transactions and for gathering additional details about their current state. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction you want to retrieve information about. - -### Return Object - -The return object will be an object containing information about the specified transaction. - -**Fields** - -- `size`: (numeric) The transaction size in bytes. -- `fee`: (numeric) The transaction fee. -- `modifiedfee`: (numeric) The transaction fee with fee deltas used for mining priority. -- `time`: (numeric) The local time the transaction entered the memory pool. -- `height`: (numeric) The block height when the transaction entered the memory pool. -- `descendantcount`: (numeric) The number of descendant transactions. -- `descendantsize`: (numeric) The virtual transaction size of all descendant transactions combined. -- `descendantfees`: (numeric) The total fees of all descendant transactions. -- `ancestorcount`: (numeric) The number of ancestor transactions. -- `ancestorsize`: (numeric) The virtual transaction size of all ancestor transactions combined. -- `ancestorfees`: (numeric) The total fees of all ancestor transactions. -- `wtxid`: (string) The witness transaction ID of the transaction. -- `depends`: (array) An array containing the witness transaction IDs of the transactions this transaction depends on. -- `spentby`: (array) An array containing the witness transaction IDs of the transactions that spend this transaction. -- `bip125-replaceable`: (string) Whether the transaction is BIP125 replaceable. Possible values are "yes", "no", or "unknown". - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getmempoolentry", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "vsize": 203, - "weight": 809, - "time": 1682502684, - "height": 787068, - "descendantcount": 1, - "descendantsize": 203, - "ancestorcount": 1, - "ancestorsize": 203, - "wtxid": "c00fc27056ad4305dc65a40a78381a6c923b4311a460ceccd81401016f5c8984", - "fees": { - "base": 0.00005481, - "modified": 0.00005481, - "ancestor": 0.00005481, - "descendant": 0.00005481 - }, - "depends": [], - "spentby": [], - "bip125-replaceable": false, - "unbroadcast": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolinfo.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolinfo.md deleted file mode 100644 index d8fa69ea..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getmempoolinfo.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "getmempoolinfo" -slug: "rpc-dogecoin-getmempoolinfo" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getMempoolInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempoolinfo` RPC method allows you to retrieve general information about the current memory pool. This method is useful for monitoring the state of the memory pool, such as its size, the total transaction fees, and the minimum fee rate required for transactions to be included in the next block. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The return object will be an object containing general information about the current memory pool. - -**Fields** - -- `size`: (numeric) The number of transactions in the memory pool. -- `bytes`: (numeric) The total size of all transactions in the memory pool, in bytes. -- `usage`: (numeric) The total memory usage of the memory pool, in bytes. -- `maxmempool`: (numeric) The maximum memory usage of the memory pool, in bytes. -- `mempoolminfee`: (numeric) The minimum fee rate (in BTC/kB) required for transactions to be included in the memory pool. -- `minrelaytxfee`: (numeric) The minimum fee rate (in BTC/kB) required for transactions to be relayed across the network. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getmempoolinfo", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "loaded": true, - "size": 28338, - "bytes": 11367166, - "usage": 63671920, - "total_fee": 0.73841041, - "maxmempool": 4000000000, - "mempoolminfee": 0.00001, - "minrelaytxfee": 0.00001, - "incrementalrelayfee": 0.00001, - "unbroadcastcount": 0, - "fullrbf": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getrawmempool.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getrawmempool.md deleted file mode 100644 index aaefc5e4..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getrawmempool.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "getrawmempool" -slug: "rpc-dogecoin-getrawmempool" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getRawMemPool(true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getrawmempool` RPC method provides information on the transactions currently in the memory pool. This method is useful for getting details about unconfirmed transactions that have not yet been included in a block. - -### Parameters - -- `verbose` (boolean, optional, default=false): Set to `true` to receive a detailed JSON object for each transaction in the memory pool. Set to `false` to receive a simple array of transaction IDs. - -**Example** - -- `verbose`: `true` - -### Return Object - -The return object will depend on the value of the `verbose` parameter. - -- If `verbose` is set to `false`, the method will return an array of transaction IDs. -- If `verbose` is set to `true`, the method will return an object with transaction IDs as keys and detailed transaction information as values. - -**Fields (when verbose is true)** - -- `size`: (numeric) The transaction size in bytes. -- `fee`: (numeric) The transaction fee. -- `modifiedfee`: (numeric) The transaction fee with descendants. -- `time`: (numeric) The local time when the transaction entered the memory pool. -- `height`: (numeric) The block height when the transaction entered the memory pool. -- `descendantcount`: (numeric) The number of descendant transactions in the memory pool. -- `descendantsize`: (numeric) The total size of all descendant transactions in the memory pool, in bytes. -- `descendantfees`: (numeric) The total fees of all descendant transactions in the memory pool, in satoshis. -- `ancestorcount`: (numeric) The number of ancestor transactions in the memory pool. -- `ancestorsize`: (numeric) The total size of all ancestor transactions in the memory pool, in bytes. -- `ancestorfees`: (numeric) The total fees of all ancestor transactions in the memory pool, in satoshis. -- `wtxid`: (string) The transaction witness ID. -- `depends`: (array) An array of unconfirmed transactions that this transaction depends on. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getrawmempool", - "params": [true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ -"result": { - "940352ce2be1f34f2a88ed32ba9bfcd01d4d8cbd68b79c88ce97115d1d8da8ce": { - "vsize": 151, - "weight": 602, - "time": 1682395086, - "height": 787063, - "descendantcount": 1, - "descendantsize": 151, - "ancestorcount": 2, - "ancestorsize": 1334, - "wtxid": "a824488001981d130794c9982afb0aeab3cdef25b5b9505b50ded0724308e976", - "fees": { - "base": 0.00000307, - "modified": 0.00000307, - "ancestor": 0.00002679, - "descendant": 0.00000307 - }, - "depends": [ - "e17275ca632c7083ce2f36415d4a52eda928901624e90f104c51696bc3338379" - ], - "spentby": [], - "bip125-replaceable": true, - "unbroadcast": false - } - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getrawtransaction.md deleted file mode 100644 index a6849e8b..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-getrawtransaction.md +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: "getrawtransaction" -slug: "rpc-dogecoin-getrawtransaction" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getRawTransaction("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getrawtransaction` RPC method retrieves a raw transaction from the blockchain or mempool. It returns the serialized (hex-encoded) transaction data. This method can be used to inspect a transaction's content before it's included in a block or to decode the transaction for further analysis. - -{% embed url=" %} - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction to fetch. -- `verbose`: (bool, optional, default=false) If set to `true`, the method returns a JSON object containing information about the transaction. - -### Return Object - -If `verbose` is `false`, the method returns a hex-encoded string representing the serialized transaction data. If `verbose` is `true`, the method returns a JSON object with the following fields: - -- `txid`: (string) The transaction ID. -- `hash`: (string) The transaction hash. -- `version`: (numeric) The transaction version. -- `size`: (numeric) The transaction size. -- `vsize`: (numeric) The virtual transaction size. -- `weight`: (numeric) The transaction's weight. -- `locktime`: (numeric) The transaction locktime. -- `vin`: (array) The transaction inputs. Each object within the array has the following properties: - 1. `txid`: A string representing the transaction ID of the output being spent. This refers to the transaction where the LTC being spent in the current transaction was received. - 2. `vout`: An integer representing the index of the output in the transaction specified by `txid`. This is the position of the output in that transaction's `vout` array. - 3. `scriptSig`: An object containing two fields, `asm` and `hex`, which represents the unlocking script that satisfies the conditions of the spent output's locking script. `asm` contains the assembly representation of the script while `hex` containing the hexadecimal representation. - 4. `sequence`: A number representing the sequence number of the input. It can be used to signal relative locktime constraints on the transaction. -- `vout`: (array) The transaction outputs. Each object within the array has the following properties: - 1. `value`: A decimal number representing the amount of DOGE being sent to the output's address. This value is expressed in dogecoins (DOGE). - 2. `n`: An integer representing the index of the output in the transaction's `vout` array. - 3. `scriptPubKey`: An object containing information about the locking script used to lock the output. The object has the following fields: - - `asm`: The assembly representation of the locking script. - - `hex`: The hexadecimal representation of the locking script. - - `reqSigs`: The number of required signatures to unlock the output (relevant for multisig addresses). - - `type`: The type of the locking script (e.g., 'pubkeyhash', 'scripthash', 'multisig', etc.). - - `addresses`: An array of Dogecoin addresses associated with the output. -- `hex`: (string) The serialized transaction data in hex format. -- `blockhash`: (string, optional) The block hash containing the transaction. -- `confirmations`: (numeric, optional) The number of confirmations the transaction has. -- `time`: (numeric, optional) The transaction time in UNIX timestamp format. -- `blocktime`: (numeric, optional) The block time in UNIX timestamp format. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getrawtransaction", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "txid": "c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", - "hash": "c00fc27056ad4305dc65a40a78381a6c923b4311a460ceccd81401016f5c8984", - "version": 2, - "size": 284, - "vsize": 203, - "weight": 809, - "locktime": 0, - "vin": [ - { - "txid": "aaeb16390ca5209d8c72a0090a9ca87e6ff6491f239b3496cdb5c99977643583", - "vout": 9, - "scriptSig": { - "asm": "", - "hex": "" - }, - "txinwitness": [ - "3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501", - "03c9f7cff5a1d1a5fc107f37609c99d2e0fd699cacdef9696753b626b7508921c0" - ], - "sequence": 4294967294 - } - ], - "vout": [ - { - "value": 0.00112825, - "n": 0, - "scriptPubKey": { - "asm": "0 29a7007eabae2ac56f221aad9c983b77a9f96c3b", - "desc": "addr(bc1q9xnsql4t4c4v2mezr2keexpmw75ljmpm0we75k)#3al0qk8v", - "hex": "001429a7007eabae2ac56f221aad9c983b77a9f96c3b", - "address": "bc1q9xnsql4t4c4v2mezr2keexpmw75ljmpm0we75k", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.0027, - "n": 1, - "scriptPubKey": { - "asm": "0 24007ed98749dbb504fdea2bd07715c94d4c7751", - "desc": "addr(bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88)#2wxgfkqe", - "hex": "001424007ed98749dbb504fdea2bd07715c94d4c7751", - "address": "bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.00104468, - "n": 2, - "scriptPubKey": { - "asm": "0 c4c04e31613e2c3dfadaedde383bbfdd7a107d8a", - "desc": "addr(bc1qcnqyuvtp8ckrm7k6ah0rswalm4apqlv2ku24fa)#5rw0gs2m", - "hex": "0014c4c04e31613e2c3dfadaedde383bbfdd7a107d8a", - "address": "bc1qcnqyuvtp8ckrm7k6ah0rswalm4apqlv2ku24fa", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.41658346, - "n": 3, - "scriptPubKey": { - "asm": "0 b33b0a68aba1d4697d8329f2b7939fb2a46b7332", - "desc": "addr(bc1qkvas569t582xjlvr98et0yulk2jxkuejx27yh4)#savgw9p6", - "hex": "0014b33b0a68aba1d4697d8329f2b7939fb2a46b7332", - "address": "bc1qkvas569t582xjlvr98et0yulk2jxkuejx27yh4", - "type": "witness_v0_keyhash" - } - } - ], - "hex": "020000000001018335647799c9b5cd96349b231f49f66f7ea89c0a09a0728c9d20a50c3916ebaa0900000000feffffff04b9b801000000000016001429a7007eabae2ac56f221aad9c983b77a9f96c3bb01e04000000000016001424007ed98749dbb504fdea2bd07715c94d4c77511498010000000000160014c4c04e31613e2c3dfadaedde383bbfdd7a107d8aeaa77b0200000000160014b33b0a68aba1d4697d8329f2b7939fb2a46b733202473044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c85012103c9f7cff5a1d1a5fc107f37609c99d2e0fd699cacdef9696753b626b7508921c000000000", - "blockhash": "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2", - "confirmations": 7, - "time": 1682503076, - "blocktime": 1682503076 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-gettxout.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-gettxout.md deleted file mode 100644 index 523eab95..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-gettxout.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "gettxout" -slug: "rpc-dogecoin-gettxout" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getTxOut("39589032c66cb5e79b7120a41181b6f81bf0b6b2c019b4e85249ede65c8b0a35", 1) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `gettxout` RPC method returns details about an unspent transaction output (UTXO). This method can be used to check if a specific transaction output is still unspent and obtain its details such as the value and scriptPubKey. - -{% embed url=" %} - -### Parameters - -- `txid` (string, required): The transaction ID of the output. -- `n` (numeric, required): The index of the output within the transaction (vout). -- `include_mempool` (boolean, optional, default=true): Whether to include the mempool. Set to `false` to only check for outputs confirmed in the blockchain. - -**Example** - -- `txid`: `"`39589032c66cb5e79b7120a41181b6f81bf0b6b2c019b4e85249ede65c8b0a35`"` -- `n`: `1` -- `include_mempool`: `true` - -### Return Object - -The return object contains the following fields: - -- `bestblock`: (string) The hash of the block at the tip of the blockchain. -- `confirmations`: (numeric) The number of confirmations for the transaction. -1 if the transaction is not yet confirmed and in the mempool. -- `value`: (numeric) The value of the output. -- `scriptPubKey`: (object) Information about the output's scriptPubKey. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex representation of the script. - - `type`: (string) The type of the script (e.g., `pubkeyhash`, `scripthash`). - - `addresses`: (array) The Dogecoin addresses associated with this output. -- `coinbase`: (boolean) Whether the transaction is a coinbase transaction. -- `version`: (numeric) The transaction version. -- `height`: (numeric) The height of the block containing this output. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "gettxout", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "bestblock": "00000000000000000000bb252e11a381e2d9ee948dd8f2c9df9b7cb41adc40b2", - "confirmations": 5, - "value": 0.0027, - "scriptPubKey": { - "asm": "0 24007ed98749dbb504fdea2bd07715c94d4c7751", - "desc": "addr(bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88)#2wxgfkqe", - "hex": "001424007ed98749dbb504fdea2bd07715c94d4c7751", - "address": "bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88", - "type": "witness_v0_keyhash" - }, - "coinbase": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-gettxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-gettxoutproof.md deleted file mode 100644 index 649feff3..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-gettxoutproof.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: "gettxoutproof" -slug: "rpc-dogecoin-gettxoutproof" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.getTxOutProof(["0cd40ddd4650c833ffbd7c9cc7c174715014ea26ce4655fdf543351f72ff83f8"], "e97879aa74d9d8e9645fab2032bc5ee19ae9874c30b1d8f9197374207db488b6") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `gettxoutproof` RPC method returns a hex-encoded proof that the specified transaction(s) were included in a block. This method can be used to provide proof of inclusion for one or more transactions in the blockchain. - -{% embed url=" %} - -### Parameters - -- `txids` (array, required): An array of transaction IDs to create a proof for. -- `blockhash` (string, optional): The hash of the block that contains the transactions. If not provided, the method will search for the transactions in the most recent blocks. - -**Example** - -- `txids`: `["`c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2`"]` -- `blockhash`: `"`00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2`"` - -### Return Object - -- `hex`: (string) The hex-encoded proof of the transaction(s) inclusion in the block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "gettxoutproof", - "params": [["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "00800020208d9c3576f57c3f0c35bd94440f37fe7971cf2b914001000000000000000000db47732e70243f1ae818f635ae4f5cacbacf1230f4dc226f0e62c0871d6e8692a4f5486439c705171a71df638e1100000e8c9aa54adefc4c7b9ccd760b4ee1369bdd5cc7cb8b3e426b4a3b490c2eee5473e8f8f4134d4035e4241a929b9cdac2c22b6d74e0cae88e9ad1f50eeba06ae52659f1c0be83c1705e6642336d47356c39632ca55d11c04f24d09132fd081f5144caf6c733deed2366cd75a4e5a355920cd31c889239e78e195fb15435451f82398b683b27258ff3523cf63a276f38ffe296dd541b99f80cc87ecb40f473e1af2656ac06a0d999105c71c293e571bb62bdd3f0509fe8d5be381d92a76d1659cafcfea20ac316c4cc72a4d81fd7e9d94227cf6457d5412e4ef0d0b32e195a092321e1ad6c16ff7c6a28b39104f3e38a21775f4ea730b25269de7a54eb4dee8752735fe3e7add927cb2f0813a5bddda182776a559d7ba91c3580fb55e49a0bef8186f274f6dccad47742cdab8d3cab06c26c1336a23675bbc2ad36d1396ae451adc759fa97499c565c252524eed6934be8f18f3784f1f7d74a1471c1778af5aa65b6e6ebb5c3625ce00ac09a644aaa8b0b86b679e65c9fa204582ac285368b97eaa7ef2c43019754f8a3e9442c9a6820a25b3d7037fe53ba9d89732f5835939225fa30b5d86694bb5fc5a384e799a22ae82017fb0cf95e70e7bb529725a81e0f96f704afaa5a00", - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-sendrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-sendrawtransaction.md deleted file mode 100644 index faee11cf..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-sendrawtransaction.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "sendrawtransaction" -slug: "rpc-dogecoin-sendrawtransaction" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.sendRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `sendrawtransaction` method submits a serialized raw transaction to the Dogecoin network. If the transaction is well-formed and valid, it will be propagated to the network and included in a mined block. - -This method is commonly used in conjunction with [`createrawtransaction`](../../bitcoin-rpc-documentation/transactions/createrawtransaction.md), or other methods to construct and sign raw transactions before broadcasting them. - -### Parameters - -The `sendrawtransaction` method accepts the following parameters: - -- `hexstring`: A string representing the serialized raw transaction in hexadecimal format. - -### Return Object - -The `sendrawtransaction` method returns a string containing the transaction ID (txid) of the broadcasted transaction. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "sendrawtransaction", - "params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", - "error": null, - "id": 1 -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-validateaddress.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-validateaddress.md deleted file mode 100644 index 05efb76a..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-validateaddress.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "validateaddress" -slug: "rpc-dogecoin-validateaddress" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.validateAddress("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`validateaddress` is an Dogecoin RPC method that enables users to verify if a given Dogecoin address is valid. This method provides important information about the address, such as its type and whether it's a spendable or watch-only address. It can be particularly useful in applications where address validation is necessary before performing transactions or when dealing with user-generated addresses to ensure their validity. - -{% embed url=" %} - -### Parameters - -The `validateaddress` method accepts one required parameter: - -- `address` (string, required): The Dogecoin address to be validated. - -### Return Object - -The `validateaddress` method returns an object with the following fields: - -- `isvalid` (boolean): Indicates if the supplied address is valid. -- `address` (string): The validated Dogecoin address. -- `scriptPubKey` (string): The hex-encoded scriptPubKey generated by the address. -- `isscript` (boolean): Indicates if the address is a script address (P2SH). -- `iswitness` (boolean): Indicates if the address is a witness address (P2WPKH or P2WSH). -- `witness_version` (numeric, optional): The version number of the witness program, if applicable. -- `witness_program` (string, optional): The hex value of the witness program, if applicable. -- `isspendable` (boolean): Indicates if the address is spendable (has the private key). -- `iswatchonly` (boolean): Indicates if the address is watch-only (wallet has the public key but not the private key). -- `iscompressed` (boolean, optional): Indicates if the associated public key is compressed. -- `account` (string, optional): DEPRECATED. The account associated with the address, if any. Example: - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "validateaddress", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "isvalid": true, - "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", - "scriptPubKey": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", - "isscript": false, - "iswitness": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-verifymessage.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-verifymessage.md deleted file mode 100644 index 9141b90a..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-verifymessage.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "verifymessage" -slug: "rpc-dogecoin-verifymessage" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.verifyMessage( "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", "Hello, this is a signed message.") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`verifymessage` is an Dogecoin RPC method that allows users to verify a signed message using a Dogecoin address. This method can be used to confirm the authenticity of a message by verifying that the signature was created by the owner of the address, without revealing the private key. Use cases include proving ownership of an address, verifying the content of a message, or validating communications within a trustless system. - -### Parameters - -The `verifymessage` method accepts three required parameters: - -- `address` (string, required): The Dogecoin address that supposedly signed the message. -- `signature` (string, required): The base64-encoded signature of the message. -- `message` (string, required): The message that was signed. - -### Return Object - -The `verifymessage` method returns a single boolean value: - -- `isvalid` (boolean): Indicates if the signature is valid for the given message and address - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifymessage", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", -"HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", - "Hello, this is a signed message." - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": false, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-verifytxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-verifytxoutproof.md deleted file mode 100644 index b1e1bbc3..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-degecoin/rpc-dogecoin-verifytxoutproof.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "verifytxoutproof" -slug: "rpc-dogecoin-verifytxoutproof" -excerpt: "Dogecoin RPC" -hidden: false -metadata: - description: "Dogecoin RPC" - image: [] - keywords: "dogecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.DOGECOIN}) - -const result = await tatum.rpc.verifyTxOutProof("") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `verifytxoutproof` RPC method verifies the given transaction proof (in the form of a Merkle block) and returns an array of transaction hashes contained in the verified Merkle block. This method can be used to confirm that specific transactions are included in a block without having to download the entire block. - -{% embed url=" %} - -### Parameters - -- `proof`: (string, required) The hex-encoded proof generated by the `gettxoutproof` RPC method. - -### Return Object - -- (array of strings) An array of transaction hashes contained in the verified Merkle block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifytxoutproof", - "params": [ - "00000020fc61cc9f1bda9ef9e5d6bcccc7f210a0e87e7ccbc017d8487031b91d0000000047451bc9b84a546eafbe39baedb3cda967ea57cf1ab650b24d88395f2e4e3d413e4f22e8d9d9ea1c000000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a01000000434104e70b81e35e7cf03f6238471f7d9c903d48aea7c1d067e3010b9000000000000" - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": [ - "3e4f22e8d9d9ea1c123456789abcdef0123456789abcdef0123456789abcdef" - ], - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin.md deleted file mode 100644 index 2c1a5006..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Litecoin" -slug: "rpc-litecoin" -excerpt: "" -hidden: false -createdAt: "Wed Mar 06 2024 10:39:28 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-createrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-createrawtransaction.md deleted file mode 100644 index c25d90ad..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-createrawtransaction.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "createrawtransaction" -slug: "rpc-litecoin-createrawtransaction" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.createRawTransaction([ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0 - } - ], - { - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 - }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `createrawtransaction` RPC method creates an unsigned raw transaction that spends a set of previous transaction outputs to a set of new addresses with specific amounts. The method can be used to create custom transactions, which can then be signed and broadcast to the Litecoin network. - -{% embed url=" %} - -### Parameters - -- `inputs`: (array, required) An array of objects, each specifying a previous transaction output to spend. - - `txid`: (string, required) The transaction ID of the previous transaction output to spend. - - `vout`: (numeric, required) The index of the output to spend from the previous transaction. - - `sequence`: (numeric, optional) default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number -- `outputs`: (object, required) An object with the key-value pairs representing the receiving address and the amount to be sent (in BTC). -- `locktime`: (numeric, optional, default=0) The lock time for the transaction. It can be used to specify the earliest time or block height at which the transaction can be included in a block. -- `replaceable`: (boolean, optional, default=false) **Marks this transaction as BIP125-replaceable.** Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible. - -### Return Object - -- (string) A hex-encoded raw transaction. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "createrawtransaction", - "params": [ - [ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0 - } - ], - { - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 - } - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000", - "error": null, - "id": 1 -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-decoderawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-decoderawtransaction.md deleted file mode 100644 index 3d753f8e..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-decoderawtransaction.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: "decoderawtransaction" -slug: "rpc-litecoin-decoderawtransaction" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.decodeRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `decoderawtransaction` RPC method decodes a serialized (hex-encoded) raw transaction and displays its information in a human-readable format. This method is useful for inspecting raw transactions before broadcasting them to the Litecoin network or for debugging purposes. - -{% embed url=" %} - -### Parameters - -- `hex_string`: (string, required) The serialized raw transaction in hex format. - -### Return Object - -An object containing the decoded raw transaction information: - -- `txid`: (string) The transaction ID. -- `hash`: (string) The transaction hash. -- `version`: (numeric) The transaction version. -- `size`: (numeric) The transaction size in bytes. -- `vsize`: (numeric) The virtual transaction size in bytes. -- `weight`: (numeric) The transaction weight. -- `locktime`: (numeric) The lock time for the transaction. -- `vin`: (array) An array of objects, each representing an input of the transaction. - - `txid`: (string) The transaction ID of the previous transaction output to spend. - - `vout`: (numeric) The index of the output to spend from the previous transaction. - - `scriptSig`: (object) The script used to redeem the previous transaction output. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex-encoded script. - - `sequence`: (numeric) The sequence number. -- `vout`: (array) An array of objects, each representing an output of the transaction. - - `value`: (numeric) The amount sent to the output. - - `n`: (numeric) The index of the output. - - `scriptPubKey`: (object) The script used to lock the output. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex-encoded script. - - `reqSigs`: (numeric) The required number of signatures. - - `type`: (string) The type of the script (e.g., 'pubkeyhash'). - - `addresses`: (array) An array of Litecoin addresses associated with the output. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "decoderawtransaction", - "params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "txid": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", - "hash": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", - "version": 2, - "size": 85, - "vsize": 85, - "weight": 340, - "locktime": 0, - "vin": [ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0, - "scriptSig": { - "asm": "", - "hex": "" - }, - "sequence": 4294967293 - } - ], - "vout": [ - { - "value": 0.01, - "n": 0, - "scriptPubKey": { - "asm": "OP_DUP OP_HASH160 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 OP_EQUALVERIFY OP_CHECKSIG", - "desc": "addr(1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa)#632p52jr", - "hex": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", - "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", - "type": "pubkeyhash" - } - } - ] - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-decodescript.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-decodescript.md deleted file mode 100644 index 39867cda..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-decodescript.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "decodescript" -slug: "rpc-litecoin-decodescript" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.decodeScript("3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `decodescript` RPC method decodes a serialized (hex-encoded) script and provides information about the script in a human-readable format. This method is useful for inspecting scripts for debugging purposes or for understanding their structure. - -{% embed url=" %} - -### Parameters - -- `hex_string`: (string, required) The serialized script in hex format. - -### Return Object - -An object containing the decoded script information: - -- `asm`: (string) The assembly representation of the script. -- `hex`: (string) The hex-encoded script. -- `type`: (string) The type of the script (e.g., 'pubkeyhash', 'multisig'). -- `reqSigs`: (numeric, optional) The required number of signatures if the script is a multisig script. -- `addresses`: (array, optional) An array of Litecoin addresses associated with the script if applicable. -- `p2sh`: (string, optional) The P2SH address for this script if applicable. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "decodescript", - "params": ["3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "asm": "44022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86 OP_MAX OP_UNKNOWN OP_UNKNOWN [error]", - "desc": "raw(3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501)#3x5hf724", - "type": "nonstandard" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-estimatesmartfee.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-estimatesmartfee.md deleted file mode 100644 index 003d25cc..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-estimatesmartfee.md +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: "estimatesmartfee" -slug: "rpc-litecoin-estimatesmartfee" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.estimateSmartFee(20) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `estimatesmartfee` method provides an estimated fee rate (in BTC/kB) for a transaction to be confirmed within a certain number of blocks. The estimation is based on recent transactions in the Litecoin network. - -This method can be useful for users or applications trying to decide on an appropriate fee for their transactions, based on the desired confirmation speed. - -{% embed url=" %} - -### Parameters - -The `estimatesmartfee` method accepts the following parameters: - -- `conf_target`: An integer representing the number of blocks within which the transaction should be confirmed. -- `estimate_mode` _(optional)_: A string that determines the estimation mode. Possible values are "UNSET", "ECONOMICAL", and "CONSERVATIVE". Default is "CONSERVATIVE". - -### Return Object - -The `estimatesmartfee` method returns an object containing the following fields: - -- `feerate`: A decimal number representing the estimated fee rate/kB. -- `blocks`: An integer representing the number of blocks within which the transaction is expected to be confirmed. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "estimatesmartfee", - "params": [20], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "feerate": 0.00017258, - "blocks": 20 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getbestblockhash.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getbestblockhash.md deleted file mode 100644 index 7890ce2e..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getbestblockhash.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "getbestblockhash" -slug: "rpc-litecoin-getbestblockhash" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getBestBlockHash() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getbestblockhash` is a Litecoin RPC method that returns the hash of the best (tip) block in the longest blockchain. This method is useful for obtaining the latest block hash, which can be used to fetch block details or confirmations for transactions. - -{% embed url=" %} - -### Parameters - -This method does not have any parameters. - -### Return Object - -The returned object is a string containing the hash of the best block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getbestblockhash" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": "0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e", - "error": null -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblock.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblock.md deleted file mode 100644 index c506af9f..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblock.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: "getblock" -slug: "rpc-litecoin-getblock" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getBlock('000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblock` is a Litecoin RPC method that returns information about a specified block. This method is useful for obtaining block details such as the hash, height, transactions, and other metadata. It can be used for various purposes, including validating transactions, monitoring the blockchain, and analyzing the network. - -{% embed url=" %} - -### Parameters - -- `blockhash` (required): The hash of the block to be retrieved. - - Example: `"0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e"` -- `verbosity` (optional): Specifies the level of detail returned for the block. - - `0`: Returns a serialized block as a hex-encoded string (default). - - `1`: Returns a JSON object with block information. - - `2`: Returns a JSON object with block information and detailed transaction data. - - Example: `1` - -### Return Object - -The returned object varies depending on the `verbosity` parameter: - -- If `verbosity` is `0`, the return object is a hex-encoded string of the serialized block. -- If `verbosity` is `1` or `2`, the return object is a JSON object containing the following fields: - - `hash`: The block hash. - - `confirmations`: The number of confirmations for the block. - - `strippedsize`: The block size without witness data. - - `size`: The block size. - - `weight`: The block weight. - - `height`: The block height. - - `version`: The block version. - - `versionHex`: The block version as a hex string. - - `merkleroot`: The Merkle root of the transactions in the block. - - `tx`: An array of transaction identifiers (if `verbosity` is `1`) or detailed transaction objects (if `verbosity` is `2`). - - `time`: The block time in UNIX timestamp format. - - `mediantime`: The median block time of the previous 11 blocks. - - `nonce`: The block nonce. - - `bits`: The block difficulty target as a hex string. - - `difficulty`: The block difficulty. - - `chainwork`: The total work in the blockchain up to this block. - - `nTx`: The number of transactions in the block. - - `previousblockhash`: The hash of the previous block. - - `nextblockhash`: The hash of the next block (if available). - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblock", - "params": [ - "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - 1 - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "hash": "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - "confirmations": 1, - "height": 787065, - "version": 536895488, - "versionHex": "20006000", - "merkleroot": "f4d9edf4e50ed243778b553ae0043683a2a9be84c0996f15b30e2e282e6bd2d8", - "time": 1682499730, - "mediantime": 1682496628, - "nonce": 1195457913, - "bits": "1705c739", - "difficulty": 48712405953118.43, - "chainwork": "000000000000000000000000000000000000000046b01da204f6db69fc714174", - "nTx": 4114, - "previousblockhash": "000000000000000000041dd53066beb0577142582ec56573b5260d915311c773", - "strippedsize": 770704, - "size": 1680952, - "weight": 3993064, - "tx": [ - "63b36961bd94b217382409ceb8ec2f3da3d35a24e962e66089946d333f1af82b" - ] - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockchaininfo.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockchaininfo.md deleted file mode 100644 index 6d79d9ef..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockchaininfo.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: "getblockchaininfo" -slug: "rpc-litecoin-getblockchaininfo" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getBlockChainInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockchaininfo` is a Litecoin RPC method that provides general information about the current state of the blockchain. This method is useful for obtaining an overview of the blockchain, including the best block hash, chain height, difficulty, and network protocol version. It can be used for various purposes, such as monitoring the blockchain, tracking network upgrades, and assessing the current mining difficulty. - -{% embed url=" %} - -### Parameters - -This method does not have any parameters. - -### Return Object - -The return object is a JSON object containing the following fields: - -- `chain`: The current network name (e.g., "main", "test", or "regtest"). -- `blocks`: The number of blocks in the local best block chain. -- `headers`: The number of headers the local node has validated. -- `bestblockhash`: The hash of the best (tip) block. -- `difficulty`: The current mining difficulty. -- `mediantime`: The median block time of the last 11 blocks in UNIX timestamp format. -- `verificationprogress`: The estimate of the verification progress of the local node as a percentage. -- `initialblockdownload`: A boolean indicating whether the node is in the initial block download mode. -- `chainwork`: The total work in the blockchain up to the best block. -- `size_on_disk`: The estimated size of the block and undo files on disk. -- `pruned`: A boolean indicating whether the block chain is pruned. -- `pruneheight`: The lowest-height complete block stored if the node is pruned (only present if `pruned` is true). -- `softforks`: An array of objects, each containing information about a softfork. -- `bip9_softforks`: An object containing the status of BIP9 softforks in the blockchain. -- `warnings`: Any network and blockchain warnings. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockchaininfo" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "chain": "main", - "blocks": 787066, - "headers": 787066, - "bestblockhash": "00000000000000000005233c5202951a85538b047e62f4c12c25d9ff65e62f07", - "difficulty": 48712405953118.43, - "time": 1682501447, - "mediantime": 1682496904, - "verificationprogress": 0.9999996042025764, - "initialblockdownload": false, - "chainwork": "000000000000000000000000000000000000000046b049efeeebefbd7f5e5cd6", - "size_on_disk": 540374248868, - "pruned": false, - "warnings": "" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockcount.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockcount.md deleted file mode 100644 index c80d0d13..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockcount.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "getblockcount" -slug: "rpc-litecoin-getblockcount" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @@tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getBlockCount() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockcount` is a Litecoin RPC method that returns the number of blocks in the local best blockchain. This method is useful for obtaining the current height of the blockchain, which can be used for various purposes, such as monitoring the blockchain, determining the number of confirmations for a transaction, or assessing the progress of the blockchain's growth. - -{% embed url=" %} - -### Parameters - -This method does not have any parameters. - -### Return Object - -The returned object is an integer representing the number of blocks in the local best blockchain. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockcount" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": 787067, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockhash.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockhash.md deleted file mode 100644 index 6bd04d8f..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockhash.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "getblockhash" -slug: "rpc-litecoin-getblockhash" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getBlockHash(587123) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockhash` is a Litecoin RPC method that returns the block hash for a specified block height in the local best blockchain. This method is useful for obtaining the hash of a specific block, which can then be used to query for more detailed information about that block using other RPC methods, such as `getblock`. - -{% embed url=" %} - -### Parameters - -- `height`: The height of the block for which the hash is requested. This is an integer parameter. - - Example: `587123` - -### Return Object - -The return object is a string representing the hash of the block at the specified height. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockhash", - "params": [587123], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockheader.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockheader.md deleted file mode 100644 index e48e7683..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockheader.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: "getblockheader" -slug: "rpc-litecoin-getblockheader" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getBlockHeader("0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockheader` is a Litecoin RPC method that returns information about a specified block header. This method is useful for obtaining a high-level view of a specific block, including its hash, previous block hash, merkle root, timestamp, difficulty target, and nonce, without having to fetch the entire block's contents. - -{% embed url=" %} - -### Parameters - -- `blockhash`: The hash of the block for which the header information is requested. This is a string parameter. - - Example: `"`0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f`"` -- `verbose` (optional): A boolean parameter that specifies whether to return the header information in a JSON object (true) or as a serialized hex-encoded string (false). Default is true. - - Example: `true` - -### Return Object - -If `verbose` is set to true (default), the return object is a JSON object containing the following fields: - -- `hash`: The hash of the block. -- `confirmations`: The number of confirmations for the block. -- `height`: The height of the block in the block chain. -- `version`: The block version. -- `versionHex`: The block version formatted as a hex string. -- `merkleroot`: The merkle root of the block. -- `time`: The block timestamp in UNIX format. -- `mediantime`: The median block time of the last 11 blocks in UNIX timestamp format. -- `nonce`: The nonce value for the block. -- `bits`: The encoded difficulty target for the block. -- `difficulty`: The actual difficulty target for the block as a decimal number. -- `chainwork`: The total work in the block chain up to this block. -- `nTx`: The number of transactions in the block. -- `previousblockhash`: The hash of the previous block. -- `nextblockhash`: The hash of the next block (only present if there is a next block). - -If `verbose` is set to false, the return object is a serialized hex-encoded string of the block header. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockheader", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "hash": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "confirmations": 199945, - "height": 587123, - "version": 549453824, - "versionHex": "20c00000", - "merkleroot": "06bc20da616f96fef435445cbf1bbcc9ff00896dd30c73b875aed7e06902666d", - "time": 1564152126, - "mediantime": 1564151358, - "nonce": 444284193, - "bits": "171f3a08", - "difficulty": 9013786945891.682, - "chainwork": "00000000000000000000000000000000000000000768b223a5622f8f0f1ac0a0", - "nTx": 1820, - "previousblockhash": "0000000000000000001683477bc3c17ab029412183952cb4a37f49968e16e6a8", - "nextblockhash": "00000000000000000007aeb07bc2fe4dbd0b55fc4be751050589b59fe95352fc" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockstats.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockstats.md deleted file mode 100644 index 12577e01..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getblockstats.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "getblockstats" -slug: "rpc-litecoin-getblockstats" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getBlockStats("614c1c4c6336a2ac9aba7b3c91f21fc89b974a38f7844a230accb2165e61a128") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockstats` is a Litecoin RPC method that returns various statistics about a specified block. This method is useful for obtaining detailed information about a block, including the number of transactions, transaction volume, fees, and other related data. The results can be used for data analysis, monitoring, and understanding the state of the Litecoin network at a specific block height. - -{% embed url=" %} - -### Parameters - -- `hash_or_height`: The block hash or block height for which the statistics are requested. This parameter can be either a string (block hash) or an integer (block height). - - Example (block hash): `"0000000000000000000f92fb968a8d1a2a9c2039e6e99f8c7a0ee3421a44a7d6"` - - Example (block height): `685230` -- `stats` (optional): An array of strings indicating the statistics to be included in the response. If not specified, all available statistics will be returned. - - Example: `["txs", "avgfee"]` - -### Return Object - -The return object is a JSON object containing the requested statistics as key-value pairs. The available statistics are: - -- `avgfee`: The average transaction fee in satoshis. -- `avgfeerate`: The average fee rate in satoshis per virtual byte. -- `avgtxsize`: The average transaction size in bytes. -- `blockhash`: The hash of the block. -- `height`: The height of the block in the block chain. -- `ins`: The total number of inputs in all transactions. -- `maxfee`: The maximum transaction fee in satoshis. -- `maxfeerate`: The maximum fee rate in satoshis per virtual byte. -- `maxtxsize`: The maximum transaction size in bytes. -- `medianfee`: The median transaction fee in satoshis. -- `mediantime`: The median time for the block in UNIX timestamp format. -- `mediantxsize`: The median transaction size in bytes. -- `minfee`: The minimum transaction fee in satoshis. -- `minfeerate`: The minimum fee rate in satoshis per virtual byte. -- `mintxsize`: The minimum transaction size in bytes. -- `outs`: The total number of outputs in all transactions. -- `subsidy`: The block reward in satoshis. -- `swtotal_size`: The total size of all SegWit transactions in bytes. -- `swtotal_weight`: The total weight of all SegWit transactions. -- `swtxs`: The total number of SegWit transactions. -- `time`: The block timestamp in UNIX format. -- `total_size`: The total size of all transactions in bytes. -- `total_weight`: The total weight of all transactions. -- `totalfee`: The total transaction fees in satoshis. -- `txs`: The total number of transactions in the block. -- `utxo_increase`: The increase in the number of unspent transaction outputs. -- `utxo_size_inc`: The increase in the size of the UTXO set. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockstats", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "avgfee": 10220, - "avgfeerate": 18, - "avgtxsize": 619, - "blockhash": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "feerate_percentiles": [ - 6, - 9, - 9, - 15, - 48 - ], - "height": 587123, - "ins": 3615, - "maxfee": 419448, - "maxfeerate": 393, - "maxtxsize": 17196, - "medianfee": 9528, - "mediantime": 1564151358, - "mediantxsize": 374, - "minfee": 136, - "minfeerate": 1, - "mintxsize": 189, - "outs": 3617, - "subsidy": 1250000000, - "swtotal_size": 323742, - "swtotal_weight": 777804, - "swtxs": 616, - "time": 1564152126, - "total_out": 342467209172, - "total_size": 1127251, - "total_weight": 3991840, - "totalfee": 18590521, - "txs": 1820, - "utxo_increase": 2, - "utxo_size_inc": 4000 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getchaintips.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getchaintips.md deleted file mode 100644 index 088cd44b..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getchaintips.md +++ /dev/null @@ -1,251 +0,0 @@ ---- -title: "getchaintips" -slug: "rpc-litecoin-getchaintips" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatums' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getChainTips() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getchaintips` is a Litecoin RPC method that returns information about all known tips in the block tree. This method is useful for identifying and analyzing potential forks or alternative chains in the Litecoin network. It can be used to monitor the health and status of the network or to investigate discrepancies in blockchain data. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The return object is an array of JSON objects, with each object representing a chain tip. The fields in each object are: - -- `height`: The height of the chain tip in the block chain. -- `hash`: The hash of the block corresponding to the chain tip. -- `branchlen`: The length of the branch connected to the main chain. -- `status`: The status of the chain tip, which can be one of the following values: - - `active`: The tip is part of the main chain. - - `valid-fork`: The tip is part of a valid but inactive fork. - - `valid-headers`: The tip is part of a valid fork but with incomplete block data. - - `headers-only`: The tip is a fork with valid headers but incomplete block data and an invalid parent block. - - `invalid`: The tip is part of an invalid fork. - - `unknown`: The tip has an unknown validation state. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getchaintips", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": [ - { - "height": 787067, - "hash": "0000000000000000000348522f4f24304bfcadece8b34c0696faa4f87ec4fdc4", - "branchlen": 0, - "status": "active" - }, - { - "height": 784121, - "hash": "000000000000000000046a2698233ed93bb5e74ba7d2146a68ddb0c2504c980d", - "branchlen": 1, - "status": "invalid" - }, - { - "height": 783830, - "hash": "0000000000000000000366d2c12772a350f507879a5325203424e58ec440249b", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 783478, - "hash": "0000000000000000000446f7d3093688ae697386fed3f52a63812678ea6b251d", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 783426, - "hash": "00000000000000000002ec935e245f8ae70fc68cc828f05bf4cfa002668599e4", - "branchlen": 1, - "status": "invalid" - }, - { - "height": 782333, - "hash": "00000000000000000001a1abda3a2eb4acc211f64f8748d1a7635aad80690b7a", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 782129, - "hash": "000000000000000000036f461ab63c78f08401d3907a67fd2237166d8a373193", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 781487, - "hash": "0000000000000000000125e5d7c0d2e1b83982e5284ea21e08f5a73b8109d41b", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 781277, - "hash": "0000000000000000000388f42000fa901c01f2bfae36042bbae133ee430e6485", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 780994, - "hash": "00000000000000000001b666391fe81859e96fdfdbb83f1a1eafb7951c738c77", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 777172, - "hash": "0000000000000000000215ac1b6fd564d8d4707631f6b77273521eb1e242cf28", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 776941, - "hash": "00000000000000000004cc87382e38118248ec926716565d50d63f0637c22c07", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 772981, - "hash": "0000000000000000000682990a0dae862b48e0451d619938215dd47ed9560200", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 771745, - "hash": "00000000000000000004370a77a30add64bba97c26a90ca9643b45a75219b2a6", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 771627, - "hash": "00000000000000000005a92bdb6f9d55ea8d2b42579e0db6ca7764f97b6910e1", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 763445, - "hash": "000000000000000000065d0f6847466feeeaffa9663895cedde33aa12c262e00", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 759781, - "hash": "000000000000000000025edbf5ea025e4af2674b318ba82206f70681d97ca162", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 741082, - "hash": "00000000000000000004e2891d08337eb9263b703eb1c897e05dc59e8b246a9b", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 737096, - "hash": "00000000000000000002b07a9a9f066d463844960542d96e88b4815e063fab08", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 733430, - "hash": "00000000000000000006ead1cff09f279f7beb31a7290c2a603b0776d98dc334", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 730848, - "hash": "000000000000000000029ec31578132d01696910f299f8d104f29b8f8bbdc24f", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 723102, - "hash": "00000000000000000006a970fdd8e537521747aff917d909bf3a78b4b68143e1", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 715276, - "hash": "00000000000000000009b160476c5f407ccd4957e20346b862d8fc46004759f0", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 715139, - "hash": "0000000000000000000407bc4e26035c137869cdb677dfcab268b3faf7d7b5d1", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 714637, - "hash": "00000000000000000009f819d004fea5bcb77bda25f4906d0a39e79c9ba19590", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 714367, - "hash": "0000000000000000000b2e70d7675bc7b4e89d384d0e6e1a7ecc2779e1d93244", - "branchlen": 1, - "status": "valid-headers" - } - ], - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getdifficulty.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getdifficulty.md deleted file mode 100644 index 934672ca..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getdifficulty.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "getdifficulty" -slug: "rpc-litecoin-getdifficulty" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getDifficulty() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getdifficulty` is a Litecoin RPC method that returns the current mining difficulty. The mining difficulty is a measure of how difficult it is to find a new block compared to the easiest it can ever be. This method can be used to monitor the mining difficulty, which adjusts every 2016 blocks to maintain a consistent block creation rate of approximately 10 minutes per block. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -A return object is a floating-point number that represents the current mining difficulty. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getdifficulty", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": 48712405953118.43, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolancestors.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolancestors.md deleted file mode 100644 index 1a0b4c78..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolancestors.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getmempoolancestors" -slug: "rpc-litecoin-getmempoolancestors" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getMempoolAncestors("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getmempoolancestors` is a Litecoin RPC method that returns information about the ancestors of a transaction in the memory pool. This method can be used to analyze the dependency relationships between unconfirmed transactions and to investigate potential transaction issues, such as chains of unconfirmed transactions or transactions that depend on others with a low fee. - -### Parameters - -- `txid`: The transaction ID (string, required) of the transaction for which you want to retrieve the ancestors. -- `verbose`: Whether to return a JSON object with detailed information about the ancestors (bool, optional, default = false). If `false`, only the transaction IDs of the ancestors are returned. - -### Return Object - -The return object depends on the `verbose` parameter: - -- If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of an ancestor. -- If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the ancestors, and the values are JSON objects containing detailed information about the ancestors. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempoolancestors", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} - -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": [ - "1d1c1bc9a9a7d7b0990e0e1f1b5b5a5a5c5b5a5a5a5a5a5a5a5a5a5a5a5a5a5a" - ] -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempooldescendants.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempooldescendants.md deleted file mode 100644 index 0fd0998c..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempooldescendants.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getmempooldescendants" -slug: "rpc-litecoin-getmempooldescendants" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getMempoolDescendants("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempooldescendants` RPC method allows you to retrieve information about the descendant transactions of a specified transaction in the memory pool. This method is useful for understanding the relationships between unconfirmed transactions and the possible effects of their confirmation on the overall transaction fees and network congestion. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction for which you want to get its descendants. -- `verbose`: (boolean, optional, default=`false`) If set to `true`, detailed information about each descendant transaction will be returned, otherwise only the transaction IDs will be returned. - -### Return Object - -The return object depends on the `verbose` parameter: - -- If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of a descendant. -- If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the descendants, and the values are JSON objects containing detailed information about the descendants. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempooldescendants", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} - -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": [ - "1d1c1bc9a9a7d7b0990e0e1f1b5b5a5a5c5b5a5a5a5a5a5a5a5a5a5a5a5a5a5a" - ] -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolentry.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolentry.md deleted file mode 100644 index 6a09ad51..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolentry.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "getmempoolentry" -slug: "rpc-litecoin-getmempoolentry" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getMempoolEntry("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempoolentry` RPC method allows you to retrieve information about a specific transaction in the memory pool. This method is useful for tracking the status of unconfirmed transactions and for gathering additional details about their current state. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction you want to retrieve information about. - -### Return Object - -The return object will be an object containing information about the specified transaction. - -**Fields** - -- `size`: (numeric) The transaction size in bytes. -- `fee`: (numeric) The transaction fee. -- `modifiedfee`: (numeric) The transaction fee with fee deltas used for mining priority. -- `time`: (numeric) The local time the transaction entered the memory pool. -- `height`: (numeric) The block height when the transaction entered the memory pool. -- `descendantcount`: (numeric) The number of descendant transactions. -- `descendantsize`: (numeric) The virtual transaction size of all descendant transactions combined. -- `descendantfees`: (numeric) The total fees of all descendant transactions. -- `ancestorcount`: (numeric) The number of ancestor transactions. -- `ancestorsize`: (numeric) The virtual transaction size of all ancestor transactions combined. -- `ancestorfees`: (numeric) The total fees of all ancestor transactions. -- `wtxid`: (string) The witness transaction ID of the transaction. -- `depends`: (array) An array containing the witness transaction IDs of the transactions this transaction depends on. -- `spentby`: (array) An array containing the witness transaction IDs of the transactions that spend this transaction. -- `bip125-replaceable`: (string) Whether the transaction is BIP125 replaceable. Possible values are "yes", "no", or "unknown". - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getmempoolentry", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "vsize": 203, - "weight": 809, - "time": 1682502684, - "height": 787068, - "descendantcount": 1, - "descendantsize": 203, - "ancestorcount": 1, - "ancestorsize": 203, - "wtxid": "c00fc27056ad4305dc65a40a78381a6c923b4311a460ceccd81401016f5c8984", - "fees": { - "base": 0.00005481, - "modified": 0.00005481, - "ancestor": 0.00005481, - "descendant": 0.00005481 - }, - "depends": [], - "spentby": [], - "bip125-replaceable": false, - "unbroadcast": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolinfo.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolinfo.md deleted file mode 100644 index 7252f547..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getmempoolinfo.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "getmempoolinfo" -slug: "rpc-litecoin-getmempoolinfo" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getMempoolInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempoolinfo` RPC method allows you to retrieve general information about the current memory pool. This method is useful for monitoring the state of the memory pool, such as its size, the total transaction fees, and the minimum fee rate required for transactions to be included in the next block. - -{% embed url=" %} - -### Parameters - -This method does not require any parameters. - -### Return Object - -The return object will be an object containing general information about the current memory pool. - -**Fields** - -- `size`: (numeric) The number of transactions in the memory pool. -- `bytes`: (numeric) The total size of all transactions in the memory pool, in bytes. -- `usage`: (numeric) The total memory usage of the memory pool, in bytes. -- `maxmempool`: (numeric) The maximum memory usage of the memory pool, in bytes. -- `mempoolminfee`: (numeric) The minimum fee rate (in BTC/kB) required for transactions to be included in the memory pool. -- `minrelaytxfee`: (numeric) The minimum fee rate (in BTC/kB) required for transactions to be relayed across the network. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getmempoolinfo", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "loaded": true, - "size": 28338, - "bytes": 11367166, - "usage": 63671920, - "total_fee": 0.73841041, - "maxmempool": 4000000000, - "mempoolminfee": 0.00001, - "minrelaytxfee": 0.00001, - "incrementalrelayfee": 0.00001, - "unbroadcastcount": 0, - "fullrbf": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getrawmempool.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getrawmempool.md deleted file mode 100644 index e90ebc91..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getrawmempool.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "getrawmempool" -slug: "rpc-litecoin-getrawmempool" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getRawMemPool(true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getrawmempool` RPC method provides information on the transactions currently in the memory pool. This method is useful for getting details about unconfirmed transactions that have not yet been included in a block. - -### Parameters - -- `verbose` (boolean, optional, default=false): Set to `true` to receive a detailed JSON object for each transaction in the memory pool. Set to `false` to receive a simple array of transaction IDs. - -**Example** - -- `verbose`: `true` - -### Return Object - -The return object will depend on the value of the `verbose` parameter. - -- If `verbose` is set to `false`, the method will return an array of transaction IDs. -- If `verbose` is set to `true`, the method will return an object with transaction IDs as keys and detailed transaction information as values. - -**Fields (when verbose is true)** - -- `size`: (numeric) The transaction size in bytes. -- `fee`: (numeric) The transaction fee. -- `modifiedfee`: (numeric) The transaction fee with descendants. -- `time`: (numeric) The local time when the transaction entered the memory pool. -- `height`: (numeric) The block height when the transaction entered the memory pool. -- `descendantcount`: (numeric) The number of descendant transactions in the memory pool. -- `descendantsize`: (numeric) The total size of all descendant transactions in the memory pool, in bytes. -- `descendantfees`: (numeric) The total fees of all descendant transactions in the memory pool, in satoshis. -- `ancestorcount`: (numeric) The number of ancestor transactions in the memory pool. -- `ancestorsize`: (numeric) The total size of all ancestor transactions in the memory pool, in bytes. -- `ancestorfees`: (numeric) The total fees of all ancestor transactions in the memory pool, in satoshis. -- `wtxid`: (string) The transaction witness ID. -- `depends`: (array) An array of unconfirmed transactions that this transaction depends on. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getrawmempool", - "params": [true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ -"result": { - "940352ce2be1f34f2a88ed32ba9bfcd01d4d8cbd68b79c88ce97115d1d8da8ce": { - "vsize": 151, - "weight": 602, - "time": 1682395086, - "height": 787063, - "descendantcount": 1, - "descendantsize": 151, - "ancestorcount": 2, - "ancestorsize": 1334, - "wtxid": "a824488001981d130794c9982afb0aeab3cdef25b5b9505b50ded0724308e976", - "fees": { - "base": 0.00000307, - "modified": 0.00000307, - "ancestor": 0.00002679, - "descendant": 0.00000307 - }, - "depends": [ - "e17275ca632c7083ce2f36415d4a52eda928901624e90f104c51696bc3338379" - ], - "spentby": [], - "bip125-replaceable": true, - "unbroadcast": false - } - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getrawtransaction.md deleted file mode 100644 index 024ad93b..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-getrawtransaction.md +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: "getrawtransaction" -slug: "rpc-litecoin-getrawtransaction" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getRawTransaction("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getrawtransaction` RPC method retrieves a raw transaction from the blockchain or mempool. It returns the serialized (hex-encoded) transaction data. This method can be used to inspect a transaction's content before it's included in a block or to decode the transaction for further analysis. - -{% embed url=" %} - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction to fetch. -- `verbose`: (bool, optional, default=false) If set to `true`, the method returns a JSON object containing information about the transaction. - -### Return Object - -If `verbose` is `false`, the method returns a hex-encoded string representing the serialized transaction data. If `verbose` is `true`, the method returns a JSON object with the following fields: - -- `txid`: (string) The transaction ID. -- `hash`: (string) The transaction hash. -- `version`: (numeric) The transaction version. -- `size`: (numeric) The transaction size. -- `vsize`: (numeric) The virtual transaction size. -- `weight`: (numeric) The transaction's weight. -- `locktime`: (numeric) The transaction locktime. -- `vin`: (array) The transaction inputs. Each object within the array has the following properties: - 1. `txid`: A string representing the transaction ID of the output being spent. This refers to the transaction where the LTC being spent in the current transaction was received. - 2. `vout`: An integer representing the index of the output in the transaction specified by `txid`. This is the position of the output in that transaction's `vout` array. - 3. `scriptSig`: An object containing two fields, `asm` and `hex`, which represents the unlocking script that satisfies the conditions of the spent output's locking script. `asm` contains the assembly representation of the script while `hex` containing the hexadecimal representation. - 4. `sequence`: A number representing the sequence number of the input. It can be used to signal relative locktime constraints on the transaction. -- `vout`: (array) The transaction outputs. Each object within the array has the following properties: - 1. `value`: A decimal number representing the amount of litecoin being sent to the output's address. This value is expressed in litecoins (LTC). - 2. `n`: An integer representing the index of the output in the transaction's `vout` array. - 3. `scriptPubKey`: An object containing information about the locking script used to lock the output. The object has the following fields: - - `asm`: The assembly representation of the locking script. - - `hex`: The hexadecimal representation of the locking script. - - `reqSigs`: The number of required signatures to unlock the output (relevant for multisig addresses). - - `type`: The type of the locking script (e.g., 'pubkeyhash', 'scripthash', 'multisig', etc.). - - `addresses`: An array of Litecoin addresses associated with the output. -- `hex`: (string) The serialized transaction data in hex format. -- `blockhash`: (string, optional) The block hash containing the transaction. -- `confirmations`: (numeric, optional) The number of confirmations the transaction has. -- `time`: (numeric, optional) The transaction time in UNIX timestamp format. -- `blocktime`: (numeric, optional) The block time in UNIX timestamp format. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getrawtransaction", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "txid": "c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", - "hash": "c00fc27056ad4305dc65a40a78381a6c923b4311a460ceccd81401016f5c8984", - "version": 2, - "size": 284, - "vsize": 203, - "weight": 809, - "locktime": 0, - "vin": [ - { - "txid": "aaeb16390ca5209d8c72a0090a9ca87e6ff6491f239b3496cdb5c99977643583", - "vout": 9, - "scriptSig": { - "asm": "", - "hex": "" - }, - "txinwitness": [ - "3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501", - "03c9f7cff5a1d1a5fc107f37609c99d2e0fd699cacdef9696753b626b7508921c0" - ], - "sequence": 4294967294 - } - ], - "vout": [ - { - "value": 0.00112825, - "n": 0, - "scriptPubKey": { - "asm": "0 29a7007eabae2ac56f221aad9c983b77a9f96c3b", - "desc": "addr(bc1q9xnsql4t4c4v2mezr2keexpmw75ljmpm0we75k)#3al0qk8v", - "hex": "001429a7007eabae2ac56f221aad9c983b77a9f96c3b", - "address": "bc1q9xnsql4t4c4v2mezr2keexpmw75ljmpm0we75k", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.0027, - "n": 1, - "scriptPubKey": { - "asm": "0 24007ed98749dbb504fdea2bd07715c94d4c7751", - "desc": "addr(bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88)#2wxgfkqe", - "hex": "001424007ed98749dbb504fdea2bd07715c94d4c7751", - "address": "bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.00104468, - "n": 2, - "scriptPubKey": { - "asm": "0 c4c04e31613e2c3dfadaedde383bbfdd7a107d8a", - "desc": "addr(bc1qcnqyuvtp8ckrm7k6ah0rswalm4apqlv2ku24fa)#5rw0gs2m", - "hex": "0014c4c04e31613e2c3dfadaedde383bbfdd7a107d8a", - "address": "bc1qcnqyuvtp8ckrm7k6ah0rswalm4apqlv2ku24fa", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.41658346, - "n": 3, - "scriptPubKey": { - "asm": "0 b33b0a68aba1d4697d8329f2b7939fb2a46b7332", - "desc": "addr(bc1qkvas569t582xjlvr98et0yulk2jxkuejx27yh4)#savgw9p6", - "hex": "0014b33b0a68aba1d4697d8329f2b7939fb2a46b7332", - "address": "bc1qkvas569t582xjlvr98et0yulk2jxkuejx27yh4", - "type": "witness_v0_keyhash" - } - } - ], - "hex": "020000000001018335647799c9b5cd96349b231f49f66f7ea89c0a09a0728c9d20a50c3916ebaa0900000000feffffff04b9b801000000000016001429a7007eabae2ac56f221aad9c983b77a9f96c3bb01e04000000000016001424007ed98749dbb504fdea2bd07715c94d4c77511498010000000000160014c4c04e31613e2c3dfadaedde383bbfdd7a107d8aeaa77b0200000000160014b33b0a68aba1d4697d8329f2b7939fb2a46b733202473044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c85012103c9f7cff5a1d1a5fc107f37609c99d2e0fd699cacdef9696753b626b7508921c000000000", - "blockhash": "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2", - "confirmations": 7, - "time": 1682503076, - "blocktime": 1682503076 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-gettxout.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-gettxout.md deleted file mode 100644 index 4ccd08b8..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-gettxout.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "gettxout" -slug: "rpc-litecoin-gettxout" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getTxOut("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `gettxout` RPC method returns details about an unspent transaction output (UTXO). This method can be used to check if a specific transaction output is still unspent and obtain its details such as the value and scriptPubKey. - -{% embed url=" %} - -### Parameters - -- `txid` (string, required): The transaction ID of the output. -- `n` (numeric, required): The index of the output within the transaction (vout). -- `include_mempool` (boolean, optional, default=true): Whether to include the mempool. Set to `false` to only check for outputs confirmed in the blockchain. - -**Example** - -- `txid`: `"a12345abcdef67890bcdef1234567890abcdef1234567890abcdef1234567890"` -- `n`: `1` -- `include_mempool`: `true` - -### Return Object - -The return object contains the following fields: - -- `bestblock`: (string) The hash of the block at the tip of the blockchain. -- `confirmations`: (numeric) The number of confirmations for the transaction. -1 if the transaction is not yet confirmed and in the mempool. -- `value`: (numeric) The value of the output. -- `scriptPubKey`: (object) Information about the output's scriptPubKey. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex representation of the script. - - `type`: (string) The type of the script (e.g., `pubkeyhash`, `scripthash`). - - `addresses`: (array) The Litecoin addresses associated with this output. -- `coinbase`: (boolean) Whether the transaction is a coinbase transaction. -- `version`: (numeric) The transaction version. -- `height`: (numeric) The height of the block containing this output. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "gettxout", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "bestblock": "00000000000000000000bb252e11a381e2d9ee948dd8f2c9df9b7cb41adc40b2", - "confirmations": 5, - "value": 0.0027, - "scriptPubKey": { - "asm": "0 24007ed98749dbb504fdea2bd07715c94d4c7751", - "desc": "addr(bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88)#2wxgfkqe", - "hex": "001424007ed98749dbb504fdea2bd07715c94d4c7751", - "address": "bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88", - "type": "witness_v0_keyhash" - }, - "coinbase": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-gettxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-gettxoutproof.md deleted file mode 100644 index 80b8054c..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-gettxoutproof.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: "gettxoutproof" -slug: "rpc-litecoin-gettxoutproof" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.getTxOutProof(["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `gettxoutproof` RPC method returns a hex-encoded proof that the specified transaction(s) were included in a block. This method can be used to provide proof of inclusion for one or more transactions in the blockchain. - -{% embed url=" %} - -### Parameters - -- `txids` (array, required): An array of transaction IDs to create a proof for. -- `blockhash` (string, optional): The hash of the block that contains the transactions. If not provided, the method will search for the transactions in the most recent blocks. - -**Example** - -- `txids`: `["`c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2`"]` -- `blockhash`: `"`00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2`"` - -### Return Object - -- `hex`: (string) The hex-encoded proof of the transaction(s) inclusion in the block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "gettxoutproof", - "params": [["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "00800020208d9c3576f57c3f0c35bd94440f37fe7971cf2b914001000000000000000000db47732e70243f1ae818f635ae4f5cacbacf1230f4dc226f0e62c0871d6e8692a4f5486439c705171a71df638e1100000e8c9aa54adefc4c7b9ccd760b4ee1369bdd5cc7cb8b3e426b4a3b490c2eee5473e8f8f4134d4035e4241a929b9cdac2c22b6d74e0cae88e9ad1f50eeba06ae52659f1c0be83c1705e6642336d47356c39632ca55d11c04f24d09132fd081f5144caf6c733deed2366cd75a4e5a355920cd31c889239e78e195fb15435451f82398b683b27258ff3523cf63a276f38ffe296dd541b99f80cc87ecb40f473e1af2656ac06a0d999105c71c293e571bb62bdd3f0509fe8d5be381d92a76d1659cafcfea20ac316c4cc72a4d81fd7e9d94227cf6457d5412e4ef0d0b32e195a092321e1ad6c16ff7c6a28b39104f3e38a21775f4ea730b25269de7a54eb4dee8752735fe3e7add927cb2f0813a5bddda182776a559d7ba91c3580fb55e49a0bef8186f274f6dccad47742cdab8d3cab06c26c1336a23675bbc2ad36d1396ae451adc759fa97499c565c252524eed6934be8f18f3784f1f7d74a1471c1778af5aa65b6e6ebb5c3625ce00ac09a644aaa8b0b86b679e65c9fa204582ac285368b97eaa7ef2c43019754f8a3e9442c9a6820a25b3d7037fe53ba9d89732f5835939225fa30b5d86694bb5fc5a384e799a22ae82017fb0cf95e70e7bb529725a81e0f96f704afaa5a00", - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-sendrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-sendrawtransaction.md deleted file mode 100644 index d7fcb3f3..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-sendrawtransaction.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "sendrawtransaction" -slug: "rpc-litecoin-sendrawtransaction" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.sendRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `sendrawtransaction` method submits a serialized raw transaction to the Litecoin network. If the transaction is well-formed and valid, it will be propagated to the network and included in a mined block. - -This method is commonly used in conjunction with [`createrawtransaction`](../../bitcoin-rpc-documentation/transactions/createrawtransaction.md), or other methods to construct and sign raw transactions before broadcasting them. - -### Parameters - -The `sendrawtransaction` method accepts the following parameters: - -- `hexstring`: A string representing the serialized raw transaction in hexadecimal format. - -### Return Object - -The `sendrawtransaction` method returns a string containing the transaction ID (txid) of the broadcasted transaction. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "sendrawtransaction", - "params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", - "error": null, - "id": 1 -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-validateaddress.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-validateaddress.md deleted file mode 100644 index f7535eed..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-validateaddress.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "validateaddress" -slug: "rpc-litecoin-validateaddress" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.validateAddress("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`validateaddress` is an Litecoin RPC method that enables users to verify if a given Litecoin address is valid. This method provides important information about the address, such as its type and whether it's a spendable or watch-only address. It can be particularly useful in applications where address validation is necessary before performing transactions or when dealing with user-generated addresses to ensure their validity. - -{% embed url=" %} - -### Parameters - -The `validateaddress` method accepts one required parameter: - -- `address` (string, required): The Litecoin address to be validated. - -### Return Object - -The `validateaddress` method returns an object with the following fields: - -- `isvalid` (boolean): Indicates if the supplied address is valid. -- `address` (string): The validated Litecoin address. -- `scriptPubKey` (string): The hex-encoded scriptPubKey generated by the address. -- `isscript` (boolean): Indicates if the address is a script address (P2SH). -- `iswitness` (boolean): Indicates if the address is a witness address (P2WPKH or P2WSH). -- `witness_version` (numeric, optional): The version number of the witness program, if applicable. -- `witness_program` (string, optional): The hex value of the witness program, if applicable. -- `isspendable` (boolean): Indicates if the address is spendable (has the private key). -- `iswatchonly` (boolean): Indicates if the address is watch-only (wallet has the public key but not the private key). -- `iscompressed` (boolean, optional): Indicates if the associated public key is compressed. -- `account` (string, optional): DEPRECATED. The account associated with the address, if any. Example: - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "validateaddress", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "isvalid": true, - "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", - "scriptPubKey": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", - "isscript": false, - "iswitness": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-verifymessage.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-verifymessage.md deleted file mode 100644 index cee20ce3..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-verifymessage.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "verifymessage" -slug: "rpc-litecoin-verifymessage" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.verifyMessage( "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", "Hello, this is a signed message.") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`verifymessage` is an Litecoin RPC method that allows users to verify a signed message using a Litecoin address. This method can be used to confirm the authenticity of a message by verifying that the signature was created by the owner of the address, without revealing the private key. Use cases include proving ownership of an address, verifying the content of a message, or validating communications within a trustless system. - -### Parameters - -The `verifymessage` method accepts three required parameters: - -- `address` (string, required): The Litecoin address that supposedly signed the message. -- `signature` (string, required): The base64-encoded signature of the message. -- `message` (string, required): The message that was signed. - -### Return Object - -The `verifymessage` method returns a single boolean value: - -- `isvalid` (boolean): Indicates if the signature is valid for the given message and address - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifymessage", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", -"HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", - "Hello, this is a signed message." - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": false, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-verifytxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-verifytxoutproof.md deleted file mode 100644 index 6d42477c..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/rpc-litecoin/rpc-litecoin-verifytxoutproof.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "verifytxoutproof" -slug: "rpc-litecoin-verifytxoutproof" -excerpt: "Litecoin RPC" -hidden: false -metadata: - description: "Litecoin RPC" - image: [] - keywords: "litecoin, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Litecoin, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.LITECOIN}) - -const result = await tatum.rpc.verifyTxOutProof("") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `verifytxoutproof` RPC method verifies the given transaction proof (in the form of a Merkle block) and returns an array of transaction hashes contained in the verified Merkle block. This method can be used to confirm that specific transactions are included in a block without having to download the entire block. - -{% embed url=" %} - -### Parameters - -- `proof`: (string, required) The hex-encoded proof generated by the `gettxoutproof` RPC method. - -### Return Object - -- (array of strings) An array of transaction hashes contained in the verified Merkle block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifytxoutproof", - "params": [ - "00000020fc61cc9f1bda9ef9e5d6bcccc7f210a0e87e7ccbc017d8487031b91d0000000047451bc9b84a546eafbe39baedb3cda967ea57cf1ab650b24d88395f2e4e3d413e4f22e8d9d9ea1c000000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a01000000434104e70b81e35e7cf03f6238471f7d9c903d48aea7c1d067e3010b9000000000000" - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": [ - "3e4f22e8d9d9ea1c123456789abcdef0123456789abcdef0123456789abcdef" - ], - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash.md b/v1.0/RPC Nodes/rpc-utxo/zcash.md deleted file mode 100644 index 3465a734..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Zcash" -slug: "zcash" -excerpt: "" -hidden: false -createdAt: "Sat Apr 06 2024 07:33:40 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" ---- diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-createrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-createrawtransaction.md deleted file mode 100644 index ab3340fd..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-createrawtransaction.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: "createrawtransaction" -slug: "rpc-zcash-createrawtransaction" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.createRawTransaction([ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0 - } - ], - { - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 - }) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `createrawtransaction` RPC method creates an unsigned raw transaction that spends a set of previous transaction outputs to a set of new addresses with specific amounts. The method can be used to create custom transactions, which can then be signed and broadcasted to the network. - -### Parameters - -- `inputs`: (array, required) An array of objects, each specifying a previous transaction output to spend. - - `txid`: (string, required) The transaction ID of the previous transaction output to spend. - - `vout`: (numeric, required) The index of the output to spend from the previous transaction. - - `sequence`: (numeric, optional) default=depends on the value of the 'replaceable' and 'locktime' arguments) The sequence number -- `outputs`: (object, required) An object with the key-value pairs representing the receiving address and the amount to be sent. -- `locktime`: (numeric, optional, default=0) The lock time for the transaction. It can be used to specify the earliest time or block height at which the transaction can be included in a block. -- `replaceable`: (boolean, optional, default=false) **Marks this transaction as BIP125-replaceable.** Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible. - -### Return Object - -- (string) A hex-encoded raw transaction. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "createrawtransaction", - "params": [ - [ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0 - } - ], - { - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01 - } - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000", - "error": null, - "id": 1 -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-decoderawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-decoderawtransaction.md deleted file mode 100644 index 76f77cc7..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-decoderawtransaction.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: "decoderawtransaction" -slug: "rpc-zcash-decoderawtransaction" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.decodeRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `decoderawtransaction` RPC method decodes a serialized (hex-encoded) raw transaction and displays its information in a human-readable format. This method is useful for inspecting raw transactions before broadcasting them to the network or for debugging purposes. - -### Parameters - -- `hex_string`: (string, required) The serialized raw transaction in hex format. - -### Return Object - -An object containing the decoded raw transaction information: - -- `txid`: (string) The transaction ID. -- `hash`: (string) The transaction hash. -- `version`: (numeric) The transaction version. -- `size`: (numeric) The transaction size in bytes. -- `vsize`: (numeric) The virtual transaction size in bytes. -- `weight`: (numeric) The transaction weight. -- `locktime`: (numeric) The lock time for the transaction. -- `vin`: (array) An array of objects, each representing an input of the transaction. - - `txid`: (string) The transaction ID of the previous transaction output to spend. - - `vout`: (numeric) The index of the output to spend from the previous transaction. - - `scriptSig`: (object) The script used to redeem the previous transaction output. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex-encoded script. - - `sequence`: (numeric) The sequence number. -- `vout`: (array) An array of objects, each representing an output of the transaction. - - `value`: (numeric) The amount sent to the output. - - `n`: (numeric) The index of the output. - - `scriptPubKey`: (object) The script used to lock the output. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex-encoded script. - - `reqSigs`: (numeric) The required number of signatures. - - `type`: (string) The type of the script (e.g., 'pubkeyhash'). - - `addresses`: (array) An array of addresses associated with the output. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "decoderawtransaction", - "params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "txid": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", - "hash": "9f5f5e6d36b6a284f52626be505175e43900009e7aa1b88fce74fcd30f0dc258", - "version": 2, - "size": 85, - "vsize": 85, - "weight": 340, - "locktime": 0, - "vin": [ - { - "txid": "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234", - "vout": 0, - "scriptSig": { - "asm": "", - "hex": "" - }, - "sequence": 4294967293 - } - ], - "vout": [ - { - "value": 0.01, - "n": 0, - "scriptPubKey": { - "asm": "OP_DUP OP_HASH160 62e907b15cbf27d5425399ebf6f0fb50ebb88f18 OP_EQUALVERIFY OP_CHECKSIG", - "desc": "addr(1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa)#632p52jr", - "hex": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", - "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", - "type": "pubkeyhash" - } - } - ] - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-decodescript.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-decodescript.md deleted file mode 100644 index 1e647f18..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-decodescript.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "decodescript" -slug: "rpc-zcash-decodescript" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:48 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.decodeScript("3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `decodescript` RPC method decodes a serialized (hex-encoded) script and provides information about the script in a human-readable format. This method is useful for inspecting scripts for debugging purposes or for understanding their structure. - -### Parameters - -- `hex_string`: (string, required) The serialized script in hex format. - -### Return Object - -An object containing the decoded script information: - -- `asm`: (string) The assembly representation of the script. -- `hex`: (string) The hex-encoded script. -- `type`: (string) The type of the script (e.g., 'pubkeyhash', 'multisig'). -- `reqSigs`: (numeric, optional) The required number of signatures if the script is a multisig script. -- `addresses`: (array, optional) An array of addresses associated with the script if applicable. -- `p2sh`: (string, optional) The P2SH address for this script if applicable. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "decodescript", - "params": ["3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "asm": "44022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86 OP_MAX OP_UNKNOWN OP_UNKNOWN [error]", - "desc": "raw(3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501)#3x5hf724", - "type": "nonstandard" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-estimatesmartfee.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-estimatesmartfee.md deleted file mode 100644 index 06e72ab1..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-estimatesmartfee.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: "estimatesmartfee" -slug: "rpc-zcash-estimatesmartfee" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.estimateSmartFee(20) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `estimatesmartfee` method provides an estimated fee rate for a transaction to be confirmed within a certain number of blocks. The estimation is based on recent transactions in the network. - -This method can be useful for users or applications trying to decide on an appropriate fee for their transactions, based on the desired confirmation speed. - -### Parameters - -The `estimatesmartfee` method accepts the following parameters: - -- `conf_target`: An integer representing the number of blocks within which the transaction should be confirmed. -- `estimate_mode` _(optional)_: A string that determines the estimation mode. Possible values are "UNSET", "ECONOMICAL", and "CONSERVATIVE". Default is "CONSERVATIVE". - -### Return Object - -The `estimatesmartfee` method returns an object containing the following fields: - -- `feerate`: A decimal number representing the estimated fee rate/kB. -- `blocks`: An integer representing the number of blocks within which the transaction is expected to be confirmed. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "estimatesmartfee", - "params": [20], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "feerate": 0.00017258, - "blocks": 20 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getbestblockhash.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getbestblockhash.md deleted file mode 100644 index 84a1cfbc..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getbestblockhash.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getbestblockhash" -slug: "rpc-zcash-getbestblockhash" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getBestBlockHash() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getbestblockhash` is a method that returns the hash of the best (tip) block in the longest blockchain. This method is useful for obtaining the latest block hash, which can be used to fetch block details or confirmations for transactions. - -### Parameters - -This method does not have any parameters. - -### Return Object - -The returned object is a string containing the hash of the best block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getbestblockhash" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": "0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e", - "error": null -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblock.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblock.md deleted file mode 100644 index 557bd6f3..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblock.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: "getblock" -slug: "rpc-zcash-getblock" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:41 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getBlock('000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblock` is a method that returns information about a specified block. This method is useful for obtaining block details such as the hash, height, transactions, and other metadata. It can be used for various purposes, including validating transactions, monitoring the blockchain, and analyzing the network. - -### Parameters - -- `blockhash` (required): The hash of the block to be retrieved. - - Example: `"0000000000000000000ef0e1f703b56f2b0d6724e4eeccf00e4f8d55b9c3c3f6e"` -- `verbosity` (optional): Specifies the level of detail returned for the block. - - `0`: Returns a serialized block as a hex-encoded string (default). - - `1`: Returns a JSON object with block information. - - `2`: Returns a JSON object with block information and detailed transaction data. - - Example: `1` - -### Return Object - -The returned object varies depending on the `verbosity` parameter: - -- If `verbosity` is `0`, the return object is a hex-encoded string of the serialized block. -- If `verbosity` is `1` or `2`, the return object is a JSON object containing the following fields: - - `hash`: The block hash. - - `confirmations`: The number of confirmations for the block. - - `strippedsize`: The block size without witness data. - - `size`: The block size. - - `weight`: The block weight. - - `height`: The block height. - - `version`: The block version. - - `versionHex`: The block version as a hex string. - - `merkleroot`: The Merkle root of the transactions in the block. - - `tx`: An array of transaction identifiers (if `verbosity` is `1`) or detailed transaction objects (if `verbosity` is `2`). - - `time`: The block time in UNIX timestamp format. - - `mediantime`: The median block time of the previous 11 blocks. - - `nonce`: The block nonce. - - `bits`: The block difficulty target as a hex string. - - `difficulty`: The block difficulty. - - `chainwork`: The total work in the blockchain up to this block. - - `nTx`: The number of transactions in the block. - - `previousblockhash`: The hash of the previous block. - - `nextblockhash`: The hash of the next block (if available). - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblock", - "params": [ - "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - 1 - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "hash": "000000000000000000013d0a85b72c591500abe074a7f9175c596a194f67b82d", - "confirmations": 1, - "height": 787065, - "version": 536895488, - "versionHex": "20006000", - "merkleroot": "f4d9edf4e50ed243778b553ae0043683a2a9be84c0996f15b30e2e282e6bd2d8", - "time": 1682499730, - "mediantime": 1682496628, - "nonce": 1195457913, - "bits": "1705c739", - "difficulty": 48712405953118.43, - "chainwork": "000000000000000000000000000000000000000046b01da204f6db69fc714174", - "nTx": 4114, - "previousblockhash": "000000000000000000041dd53066beb0577142582ec56573b5260d915311c773", - "strippedsize": 770704, - "size": 1680952, - "weight": 3993064, - "tx": [ - "63b36961bd94b217382409ceb8ec2f3da3d35a24e962e66089946d333f1af82b" - ] - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockchaininfo.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockchaininfo.md deleted file mode 100644 index 3b2d5725..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockchaininfo.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: "getblockchaininfo" -slug: "rpc-zcash-getblockchaininfo" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getBlockChainInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockchaininfo` is a method that provides general information about the current state of the blockchain. This method is useful for obtaining an overview of the blockchain, including the best block hash, chain height, difficulty, and network protocol version. It can be used for various purposes, such as monitoring the blockchain, tracking network upgrades, and assessing the current mining difficulty. - -### Parameters - -This method does not have any parameters. - -### Return Object - -The return object is a JSON object containing the following fields: - -- `chain`: The current network name (e.g., "main", "test", or "regtest"). -- `blocks`: The number of blocks in the local best block chain. -- `headers`: The number of headers the local node has validated. -- `bestblockhash`: The hash of the best (tip) block. -- `difficulty`: The current mining difficulty. -- `mediantime`: The median block time of the last 11 blocks in UNIX timestamp format. -- `verificationprogress`: The estimate of the verification progress of the local node as a percentage. -- `initialblockdownload`: A boolean indicating whether the node is in the initial block download mode. -- `chainwork`: The total work in the blockchain up to the best block. -- `size_on_disk`: The estimated size of the block and undo files on disk. -- `pruned`: A boolean indicating whether the block chain is pruned. -- `pruneheight`: The lowest-height complete block stored if the node is pruned (only present if `pruned` is true). -- `softforks`: An array of objects, each containing information about a softfork. -- `bip9_softforks`: An object containing the status of BIP9 softforks in the blockchain. -- `warnings`: Any network and blockchain warnings. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockchaininfo" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "chain": "main", - "blocks": 787066, - "headers": 787066, - "bestblockhash": "00000000000000000005233c5202951a85538b047e62f4c12c25d9ff65e62f07", - "difficulty": 48712405953118.43, - "time": 1682501447, - "mediantime": 1682496904, - "verificationprogress": 0.9999996042025764, - "initialblockdownload": false, - "chainwork": "000000000000000000000000000000000000000046b049efeeebefbd7f5e5cd6", - "size_on_disk": 540374248868, - "pruned": false, - "warnings": "" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockcount.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockcount.md deleted file mode 100644 index b96c8492..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockcount.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getblockcount" -slug: "rpc-zcash-getblockcount" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getBlockCount() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockcount` is a method that returns the number of blocks in the local best blockchain. This method is useful for obtaining the current height of the blockchain, which can be used for various purposes, such as monitoring the blockchain, determining the number of confirmations for a transaction, or assessing the progress of the blockchain's growth. - -### Parameters - -This method does not have any parameters. - -### Return Object - -The returned object is an integer representing the number of blocks in the local best blockchain. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getblockcount" -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": 787067, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockhash.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockhash.md deleted file mode 100644 index 9ad91d29..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockhash.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "getblockhash" -slug: "rpc-zcash-getblockhash" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getBlockHash(587123) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockhash` is a method that returns the block hash for a specified block height in the local best blockchain. This method is useful for obtaining the hash of a specific block, which can then be used to query for more detailed information about that block using other RPC methods, such as `getblock`. - -### Parameters - -- `height`: The height of the block for which the hash is requested. This is an integer parameter. - - Example: `587123` - -### Return Object - -The return object is a string representing the hash of the block at the specified height. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockhash", - "params": [587123], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockheader.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockheader.md deleted file mode 100644 index 775d9171..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockheader.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: "getblockheader" -slug: "rpc-zcash-getblockheader" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getBlockHeader("0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockheader` is a method that returns information about a specified block header. This method is useful for obtaining a high-level view of a specific block, including its hash, previous block hash, merkle root, timestamp, difficulty target, and nonce, without having to fetch the entire block's contents. - -### Parameters - -- `blockhash`: The hash of the block for which the header information is requested. This is a string parameter. - - Example: `"`0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f`"` -- `verbose` (optional): A boolean parameter that specifies whether to return the header information in a JSON object (true) or as a serialized hex-encoded string (false). Default is true. - - Example: `true` - -### Return Object - -If `verbose` is set to true (default), the return object is a JSON object containing the following fields: - -- `hash`: The hash of the block. -- `confirmations`: The number of confirmations for the block. -- `height`: The height of the block in the block chain. -- `version`: The block version. -- `versionHex`: The block version formatted as a hex string. -- `merkleroot`: The merkle root of the block. -- `time`: The block timestamp in UNIX format. -- `mediantime`: The median block time of the last 11 blocks in UNIX timestamp format. -- `nonce`: The nonce value for the block. -- `bits`: The encoded difficulty target for the block. -- `difficulty`: The actual difficulty target for the block as a decimal number. -- `chainwork`: The total work in the block chain up to this block. -- `nTx`: The number of transactions in the block. -- `previousblockhash`: The hash of the previous block. -- `nextblockhash`: The hash of the next block (only present if there is a next block). - -If `verbose` is set to false, the return object is a serialized hex-encoded string of the block header. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockheader", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "hash": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "confirmations": 199945, - "height": 587123, - "version": 549453824, - "versionHex": "20c00000", - "merkleroot": "06bc20da616f96fef435445cbf1bbcc9ff00896dd30c73b875aed7e06902666d", - "time": 1564152126, - "mediantime": 1564151358, - "nonce": 444284193, - "bits": "171f3a08", - "difficulty": 9013786945891.682, - "chainwork": "00000000000000000000000000000000000000000768b223a5622f8f0f1ac0a0", - "nTx": 1820, - "previousblockhash": "0000000000000000001683477bc3c17ab029412183952cb4a37f49968e16e6a8", - "nextblockhash": "00000000000000000007aeb07bc2fe4dbd0b55fc4be751050589b59fe95352fc" - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockstats.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockstats.md deleted file mode 100644 index 81f6a26f..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getblockstats.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: "getblockstats" -slug: "rpc-zcash-getblockstats" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getBlockStats("0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getblockstats` is a method that returns various statistics about a specified block. This method is useful for obtaining detailed information about a block, including the number of transactions, transaction volume, fees, and other related data. The results can be used for data analysis, monitoring, and understanding the state of the network at a specific block height. - -### Parameters - -- `hash_or_height`: The block hash or block height for which the statistics are requested. This parameter can be either a string (block hash) or an integer (block height). - - Example (block hash): `"0000000000000000000f92fb968a8d1a2a9c2039e6e99f8c7a0ee3421a44a7d6"` - - Example (block height): `685230` -- `stats` (optional): An array of strings indicating the statistics to be included in the response. If not specified, all available statistics will be returned. - - Example: `["txs", "avgfee"]` - -### Return Object - -The return object is a JSON object containing the requested statistics as key-value pairs. The available statistics are: - -- `avgfee`: The average transaction fee in satoshis. -- `avgfeerate`: The average fee rate in satoshis per virtual byte. -- `avgtxsize`: The average transaction size in bytes. -- `blockhash`: The hash of the block. -- `height`: The height of the block in the block chain. -- `ins`: The total number of inputs in all transactions. -- `maxfee`: The maximum transaction fee in satoshis. -- `maxfeerate`: The maximum fee rate in satoshis per virtual byte. -- `maxtxsize`: The maximum transaction size in bytes. -- `medianfee`: The median transaction fee in satoshis. -- `mediantime`: The median time for the block in UNIX timestamp format. -- `mediantxsize`: The median transaction size in bytes. -- `minfee`: The minimum transaction fee in satoshis. -- `minfeerate`: The minimum fee rate in satoshis per virtual byte. -- `mintxsize`: The minimum transaction size in bytes. -- `outs`: The total number of outputs in all transactions. -- `subsidy`: The block reward in satoshis. -- `swtotal_size`: The total size of all SegWit transactions in bytes. -- `swtotal_weight`: The total weight of all SegWit transactions. -- `swtxs`: The total number of SegWit transactions. -- `time`: The block timestamp in UNIX format. -- `total_size`: The total size of all transactions in bytes. -- `total_weight`: The total weight of all transactions. -- `totalfee`: The total transaction fees in satoshis. -- `txs`: The total number of transactions in the block. -- `utxo_increase`: The increase in the number of unspent transaction outputs. -- `utxo_size_inc`: The increase in the size of the UTXO set. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getblockstats", - "params": ["0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "avgfee": 10220, - "avgfeerate": 18, - "avgtxsize": 619, - "blockhash": "0000000000000000001b4fedbfb3672963c37f965686c2bf6350e32e77f9941f", - "feerate_percentiles": [ - 6, - 9, - 9, - 15, - 48 - ], - "height": 587123, - "ins": 3615, - "maxfee": 419448, - "maxfeerate": 393, - "maxtxsize": 17196, - "medianfee": 9528, - "mediantime": 1564151358, - "mediantxsize": 374, - "minfee": 136, - "minfeerate": 1, - "mintxsize": 189, - "outs": 3617, - "subsidy": 1250000000, - "swtotal_size": 323742, - "swtotal_weight": 777804, - "swtxs": 616, - "time": 1564152126, - "total_out": 342467209172, - "total_size": 1127251, - "total_weight": 3991840, - "totalfee": 18590521, - "txs": 1820, - "utxo_increase": 2, - "utxo_size_inc": 4000 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getchaintips.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getchaintips.md deleted file mode 100644 index f8616c96..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getchaintips.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -title: "getchaintips" -slug: "rpc-zcash-getchaintips" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getChainTips() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getchaintips` is a method that returns information about all known tips in the block tree. This method is useful for identifying and analyzing potential forks or alternative chains in the network. It can be used to monitor the health and status of the network or to investigate discrepancies in blockchain data. - -### Parameters - -This method does not require any parameters. - -### Return Object - -The return object is an array of JSON objects, with each object representing a chain tip. The fields in each object are: - -- `height`: The height of the chain tip in the block chain. -- `hash`: The hash of the block corresponding to the chain tip. -- `branchlen`: The length of the branch connected to the main chain. -- `status`: The status of the chain tip, which can be one of the following values: - - `active`: The tip is part of the main chain. - - `valid-fork`: The tip is part of a valid but inactive fork. - - `valid-headers`: The tip is part of a valid fork but with incomplete block data. - - `headers-only`: The tip is a fork with valid headers but incomplete block data and an invalid parent block. - - `invalid`: The tip is part of an invalid fork. - - `unknown`: The tip has an unknown validation state. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getchaintips", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": [ - { - "height": 787067, - "hash": "0000000000000000000348522f4f24304bfcadece8b34c0696faa4f87ec4fdc4", - "branchlen": 0, - "status": "active" - }, - { - "height": 784121, - "hash": "000000000000000000046a2698233ed93bb5e74ba7d2146a68ddb0c2504c980d", - "branchlen": 1, - "status": "invalid" - }, - { - "height": 783830, - "hash": "0000000000000000000366d2c12772a350f507879a5325203424e58ec440249b", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 783478, - "hash": "0000000000000000000446f7d3093688ae697386fed3f52a63812678ea6b251d", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 783426, - "hash": "00000000000000000002ec935e245f8ae70fc68cc828f05bf4cfa002668599e4", - "branchlen": 1, - "status": "invalid" - }, - { - "height": 782333, - "hash": "00000000000000000001a1abda3a2eb4acc211f64f8748d1a7635aad80690b7a", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 782129, - "hash": "000000000000000000036f461ab63c78f08401d3907a67fd2237166d8a373193", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 781487, - "hash": "0000000000000000000125e5d7c0d2e1b83982e5284ea21e08f5a73b8109d41b", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 781277, - "hash": "0000000000000000000388f42000fa901c01f2bfae36042bbae133ee430e6485", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 780994, - "hash": "00000000000000000001b666391fe81859e96fdfdbb83f1a1eafb7951c738c77", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 777172, - "hash": "0000000000000000000215ac1b6fd564d8d4707631f6b77273521eb1e242cf28", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 776941, - "hash": "00000000000000000004cc87382e38118248ec926716565d50d63f0637c22c07", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 772981, - "hash": "0000000000000000000682990a0dae862b48e0451d619938215dd47ed9560200", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 771745, - "hash": "00000000000000000004370a77a30add64bba97c26a90ca9643b45a75219b2a6", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 771627, - "hash": "00000000000000000005a92bdb6f9d55ea8d2b42579e0db6ca7764f97b6910e1", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 763445, - "hash": "000000000000000000065d0f6847466feeeaffa9663895cedde33aa12c262e00", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 759781, - "hash": "000000000000000000025edbf5ea025e4af2674b318ba82206f70681d97ca162", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 741082, - "hash": "00000000000000000004e2891d08337eb9263b703eb1c897e05dc59e8b246a9b", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 737096, - "hash": "00000000000000000002b07a9a9f066d463844960542d96e88b4815e063fab08", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 733430, - "hash": "00000000000000000006ead1cff09f279f7beb31a7290c2a603b0776d98dc334", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 730848, - "hash": "000000000000000000029ec31578132d01696910f299f8d104f29b8f8bbdc24f", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 723102, - "hash": "00000000000000000006a970fdd8e537521747aff917d909bf3a78b4b68143e1", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 715276, - "hash": "00000000000000000009b160476c5f407ccd4957e20346b862d8fc46004759f0", - "branchlen": 1, - "status": "valid-headers" - }, - { - "height": 715139, - "hash": "0000000000000000000407bc4e26035c137869cdb677dfcab268b3faf7d7b5d1", - "branchlen": 1, - "status": "headers-only" - }, - { - "height": 714637, - "hash": "00000000000000000009f819d004fea5bcb77bda25f4906d0a39e79c9ba19590", - "branchlen": 1, - "status": "valid-fork" - }, - { - "height": 714367, - "hash": "0000000000000000000b2e70d7675bc7b4e89d384d0e6e1a7ecc2779e1d93244", - "branchlen": 1, - "status": "valid-headers" - } - ], - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getdifficulty.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getdifficulty.md deleted file mode 100644 index 3f7e6c3a..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getdifficulty.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "getdifficulty" -slug: "rpc-zcash-getdifficulty" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getDifficulty() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getdifficulty` is a method that returns the current mining difficulty. The mining difficulty is a measure of how difficult it is to find a new block compared to the easiest it can ever be. This method can be used to monitor the mining difficulty, which adjusts every 2016 blocks to maintain a consistent block creation rate of approximately 10 minutes per block. - -### Parameters - -This method does not require any parameters. - -### Return Object - -A return object is a floating-point number that represents the current mining difficulty. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getdifficulty", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": 48712405953118.43, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolancestors.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolancestors.md deleted file mode 100644 index 9bc19723..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolancestors.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getmempoolancestors" -slug: "rpc-zcash-getmempoolancestors" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getMempoolAncestors("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`getmempoolancestors` is a method that returns information about the ancestors of a transaction in the memory pool. This method can be used to analyze the dependency relationships between unconfirmed transactions and to investigate potential transaction issues, such as chains of unconfirmed transactions or transactions that depend on others with a low fee. - -### Parameters - -- `txid`: The transaction ID (string, required) of the transaction for which you want to retrieve the ancestors. -- `verbose`: Whether to return a JSON object with detailed information about the ancestors (bool, optional, default = false). If `false`, only the transaction IDs of the ancestors are returned. - -### Return Object - -The return object depends on the `verbose` parameter: - -- If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of an ancestor. -- If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the ancestors, and the values are JSON objects containing detailed information about the ancestors. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempoolancestors", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} - -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": [ - "1d1c1bc9a9a7d7b0990e0e1f1b5b5a5a5c5b5a5a5a5a5a5a5a5a5a5a5a5a5a5a" - ] -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempooldescendants.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempooldescendants.md deleted file mode 100644 index 9da6da3a..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempooldescendants.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: "getmempooldescendants" -slug: "rpc-zcash-getmempooldescendants" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getMempoolDescendants("3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempooldescendants` RPC method allows you to retrieve information about the descendant transactions of a specified transaction in the memory pool. This method is useful for understanding the relationships between unconfirmed transactions and the possible effects of their confirmation on the overall transaction fees and network congestion. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction for which you want to get its descendants. -- `verbose`: (boolean, optional, default=`false`) If set to `true`, detailed information about each descendant transaction will be returned, otherwise only the transaction IDs will be returned. - -### Return Object - -The return object depends on the `verbose` parameter: - -- If `verbose` is `false`, the return object is an array of strings, each representing the transaction ID of a descendant. -- If `verbose` is `true`, the return object is a JSON object, where the keys are the transaction IDs of the descendants, and the values are JSON objects containing detailed information about the descendants. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "getmempooldescendants", - "params": [ - "3b3c3bc559deddb0991e1fe9fb6d9f10c1c4a0dab4a18c12e8566b37ad4f06e4" - ] -} - -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "id": 1, - "result": [ - "1d1c1bc9a9a7d7b0990e0e1f1b5b5a5a5c5b5a5a5a5a5a5a5a5a5a5a5a5a5a5a" - ] -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolentry.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolentry.md deleted file mode 100644 index fafcf49e..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolentry.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "getmempoolentry" -slug: "rpc-zcash-getmempoolentry" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getMempoolEntry("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempoolentry` RPC method allows you to retrieve information about a specific transaction in the memory pool. This method is useful for tracking the status of unconfirmed transactions and for gathering additional details about their current state. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction you want to retrieve information about. - -### Return Object - -The return object will be an object containing information about the specified transaction. - -**Fields** - -- `size`: (numeric) The transaction size in bytes. -- `fee`: (numeric) The transaction fee. -- `modifiedfee`: (numeric) The transaction fee with fee deltas used for mining priority. -- `time`: (numeric) The local time the transaction entered the memory pool. -- `height`: (numeric) The block height when the transaction entered the memory pool. -- `descendantcount`: (numeric) The number of descendant transactions. -- `descendantsize`: (numeric) The virtual transaction size of all descendant transactions combined. -- `descendantfees`: (numeric) The total fees of all descendant transactions. -- `ancestorcount`: (numeric) The number of ancestor transactions. -- `ancestorsize`: (numeric) The virtual transaction size of all ancestor transactions combined. -- `ancestorfees`: (numeric) The total fees of all ancestor transactions. -- `wtxid`: (string) The witness transaction ID of the transaction. -- `depends`: (array) An array containing the witness transaction IDs of the transactions this transaction depends on. -- `spentby`: (array) An array containing the witness transaction IDs of the transactions that spend this transaction. -- `bip125-replaceable`: (string) Whether the transaction is BIP125 replaceable. Possible values are "yes", "no", or "unknown". - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getmempoolentry", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "vsize": 203, - "weight": 809, - "time": 1682502684, - "height": 787068, - "descendantcount": 1, - "descendantsize": 203, - "ancestorcount": 1, - "ancestorsize": 203, - "wtxid": "c00fc27056ad4305dc65a40a78381a6c923b4311a460ceccd81401016f5c8984", - "fees": { - "base": 0.00005481, - "modified": 0.00005481, - "ancestor": 0.00005481, - "descendant": 0.00005481 - }, - "depends": [], - "spentby": [], - "bip125-replaceable": false, - "unbroadcast": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolinfo.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolinfo.md deleted file mode 100644 index 671be4f2..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getmempoolinfo.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: "getmempoolinfo" -slug: "rpc-zcash-getmempoolinfo" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getMempoolInfo() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getmempoolinfo` RPC method allows you to retrieve general information about the current memory pool. This method is useful for monitoring the state of the memory pool, such as its size, the total transaction fees, and the minimum fee rate required for transactions to be included in the next block. - -### Parameters - -This method does not require any parameters. - -### Return Object - -The return object will be an object containing general information about the current memory pool. - -**Fields** - -- `size`: (numeric) The number of transactions in the memory pool. -- `bytes`: (numeric) The total size of all transactions in the memory pool, in bytes. -- `usage`: (numeric) The total memory usage of the memory pool, in bytes. -- `maxmempool`: (numeric) The maximum memory usage of the memory pool, in bytes. -- `mempoolminfee`: (numeric) The minimum fee rate required for transactions to be included in the memory pool. -- `minrelaytxfee`: (numeric) The minimum fee rate required for transactions to be relayed across the network. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getmempoolinfo", - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "loaded": true, - "size": 28338, - "bytes": 11367166, - "usage": 63671920, - "total_fee": 0.73841041, - "maxmempool": 4000000000, - "mempoolminfee": 0.00001, - "minrelaytxfee": 0.00001, - "incrementalrelayfee": 0.00001, - "unbroadcastcount": 0, - "fullrbf": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getrawmempool.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getrawmempool.md deleted file mode 100644 index de903ae2..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getrawmempool.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: "getrawmempool" -slug: "rpc-zcash-getrawmempool" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getRawMemPool(true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getrawmempool` RPC method provides information on the transactions currently in the memory pool. This method is useful for getting details about unconfirmed transactions that have not yet been included in a block. - -### Parameters - -- `verbose` (boolean, optional, default=false): Set to `true` to receive a detailed JSON object for each transaction in the memory pool. Set to `false` to receive a simple array of transaction IDs. - -**Example** - -- `verbose`: `true` - -### Return Object - -The return object will depend on the value of the `verbose` parameter. - -- If `verbose` is set to `false`, the method will return an array of transaction IDs. -- If `verbose` is set to `true`, the method will return an object with transaction IDs as keys and detailed transaction information as values. - -**Fields (when verbose is true)** - -- `size`: (numeric) The transaction size in bytes. -- `fee`: (numeric) The transaction fee. -- `modifiedfee`: (numeric) The transaction fee with descendants. -- `time`: (numeric) The local time when the transaction entered the memory pool. -- `height`: (numeric) The block height when the transaction entered the memory pool. -- `descendantcount`: (numeric) The number of descendant transactions in the memory pool. -- `descendantsize`: (numeric) The total size of all descendant transactions in the memory pool, in bytes. -- `descendantfees`: (numeric) The total fees of all descendant transactions in the memory pool, in satoshis. -- `ancestorcount`: (numeric) The number of ancestor transactions in the memory pool. -- `ancestorsize`: (numeric) The total size of all ancestor transactions in the memory pool, in bytes. -- `ancestorfees`: (numeric) The total fees of all ancestor transactions in the memory pool, in satoshis. -- `wtxid`: (string) The transaction witness ID. -- `depends`: (array) An array of unconfirmed transactions that this transaction depends on. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getrawmempool", - "params": [true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ -"result": { - "940352ce2be1f34f2a88ed32ba9bfcd01d4d8cbd68b79c88ce97115d1d8da8ce": { - "vsize": 151, - "weight": 602, - "time": 1682395086, - "height": 787063, - "descendantcount": 1, - "descendantsize": 151, - "ancestorcount": 2, - "ancestorsize": 1334, - "wtxid": "a824488001981d130794c9982afb0aeab3cdef25b5b9505b50ded0724308e976", - "fees": { - "base": 0.00000307, - "modified": 0.00000307, - "ancestor": 0.00002679, - "descendant": 0.00000307 - }, - "depends": [ - "e17275ca632c7083ce2f36415d4a52eda928901624e90f104c51696bc3338379" - ], - "spentby": [], - "bip125-replaceable": true, - "unbroadcast": false - } - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getrawtransaction.md deleted file mode 100644 index fc989f78..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-getrawtransaction.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: "getrawtransaction" -slug: "rpc-zcash-getrawtransaction" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getRawTransaction("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `getrawtransaction` RPC method retrieves a raw transaction from the blockchain or mempool. It returns the serialized (hex-encoded) transaction data. This method can be used to inspect a transaction's content before it's included in a block or to decode the transaction for further analysis. - -### Parameters - -- `txid`: (string, required) The transaction ID of the transaction to fetch. -- `verbose`: (bool, optional, default=false) If set to `true`, the method returns a JSON object containing information about the transaction. - -### Return Object - -If `verbose` is `false`, the method returns a hex-encoded string representing the serialized transaction data. If `verbose` is `true`, the method returns a JSON object with the following fields: - -- `txid`: (string) The transaction ID. -- `hash`: (string) The transaction hash. -- `version`: (numeric) The transaction version. -- `size`: (numeric) The transaction size. -- `vsize`: (numeric) The virtual transaction size. -- `weight`: (numeric) The transaction's weight. -- `locktime`: (numeric) The transaction locktime. -- `vin`: (array) The transaction inputs. Each object within the array has the following properties: - 1. `txid`: A string representing the transaction ID of the output being spent. This refers to the transaction where the amount being spent in the current transaction was received. - 2. `vout`: An integer representing the index of the output in the transaction specified by `txid`. This is the position of the output in that transaction's `vout` array. - 3. `scriptSig`: An object containing two fields, `asm` and `hex`, which represent the unlocking script that satisfies the conditions of the spent output's locking script. `asm` contains the assembly representation of the script, while `hex` contains the hexadecimal representation. - 4. `sequence`: A number representing the sequence number of the input. It can be used to signal relative locktime constraints on the transaction. -- `vout`: (array) The transaction outputs. Each object within the array has the following properties: - 1. `value`: A decimal number representing the amount of amount being sent to the output's address. - 2. `n`: An integer representing the index of the output in the transaction's `vout` array. - 3. `scriptPubKey`: An object containing information about the locking script used to lock the output. The object has the following fields: - - `asm`: The assembly representation of the locking script. - - `hex`: The hexadecimal representation of the locking script. - - `reqSigs`: The number of required signatures to unlock the output (relevant for multisig addresses). - - `type`: The type of the locking script (e.g., 'pubkeyhash', 'scripthash', 'multisig', etc.). - - `addresses`: An array of addresses associated with the output. -- `hex`: (string) The serialized transaction data in hex format. -- `blockhash`: (string, optional) The block hash containing the transaction. -- `confirmations`: (numeric, optional) The number of confirmations the transaction has. -- `time`: (numeric, optional) The transaction time in UNIX timestamp format. -- `blocktime`: (numeric, optional) The block time in UNIX timestamp format. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "getrawtransaction", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", true], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "txid": "c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", - "hash": "c00fc27056ad4305dc65a40a78381a6c923b4311a460ceccd81401016f5c8984", - "version": 2, - "size": 284, - "vsize": 203, - "weight": 809, - "locktime": 0, - "vin": [ - { - "txid": "aaeb16390ca5209d8c72a0090a9ca87e6ff6491f239b3496cdb5c99977643583", - "vout": 9, - "scriptSig": { - "asm": "", - "hex": "" - }, - "txinwitness": [ - "3044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c8501", - "03c9f7cff5a1d1a5fc107f37609c99d2e0fd699cacdef9696753b626b7508921c0" - ], - "sequence": 4294967294 - } - ], - "vout": [ - { - "value": 0.00112825, - "n": 0, - "scriptPubKey": { - "asm": "0 29a7007eabae2ac56f221aad9c983b77a9f96c3b", - "desc": "addr(bc1q9xnsql4t4c4v2mezr2keexpmw75ljmpm0we75k)#3al0qk8v", - "hex": "001429a7007eabae2ac56f221aad9c983b77a9f96c3b", - "address": "bc1q9xnsql4t4c4v2mezr2keexpmw75ljmpm0we75k", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.0027, - "n": 1, - "scriptPubKey": { - "asm": "0 24007ed98749dbb504fdea2bd07715c94d4c7751", - "desc": "addr(bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88)#2wxgfkqe", - "hex": "001424007ed98749dbb504fdea2bd07715c94d4c7751", - "address": "bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.00104468, - "n": 2, - "scriptPubKey": { - "asm": "0 c4c04e31613e2c3dfadaedde383bbfdd7a107d8a", - "desc": "addr(bc1qcnqyuvtp8ckrm7k6ah0rswalm4apqlv2ku24fa)#5rw0gs2m", - "hex": "0014c4c04e31613e2c3dfadaedde383bbfdd7a107d8a", - "address": "bc1qcnqyuvtp8ckrm7k6ah0rswalm4apqlv2ku24fa", - "type": "witness_v0_keyhash" - } - }, - { - "value": 0.41658346, - "n": 3, - "scriptPubKey": { - "asm": "0 b33b0a68aba1d4697d8329f2b7939fb2a46b7332", - "desc": "addr(bc1qkvas569t582xjlvr98et0yulk2jxkuejx27yh4)#savgw9p6", - "hex": "0014b33b0a68aba1d4697d8329f2b7939fb2a46b7332", - "address": "bc1qkvas569t582xjlvr98et0yulk2jxkuejx27yh4", - "type": "witness_v0_keyhash" - } - } - ], - "hex": "020000000001018335647799c9b5cd96349b231f49f66f7ea89c0a09a0728c9d20a50c3916ebaa0900000000feffffff04b9b801000000000016001429a7007eabae2ac56f221aad9c983b77a9f96c3bb01e04000000000016001424007ed98749dbb504fdea2bd07715c94d4c77511498010000000000160014c4c04e31613e2c3dfadaedde383bbfdd7a107d8aeaa77b0200000000160014b33b0a68aba1d4697d8329f2b7939fb2a46b733202473044022070cc08500b2203b6ebe7c8285295bc1914a9d252504416e1cde4de4a7dc6c3c8022079af2be6db34efcf147e86a4cbf61cf9995106e5b5e95270d47c40b082052c85012103c9f7cff5a1d1a5fc107f37609c99d2e0fd699cacdef9696753b626b7508921c000000000", - "blockhash": "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2", - "confirmations": 7, - "time": 1682503076, - "blocktime": 1682503076 - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-gettxout.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-gettxout.md deleted file mode 100644 index 20004fb0..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-gettxout.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: "gettxout" -slug: "rpc-zcash-gettxout" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getTxOut("c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `gettxout` RPC method returns details about an unspent transaction output (UTXO). This method can be used to check if a specific transaction output is still unspent and obtain its details such as the value and scriptPubKey. - -### Parameters - -- `txid` (string, required): The transaction ID of the output. -- `n` (numeric, required): The index of the output within the transaction (vout). -- `include_mempool` (boolean, optional, default=true): Whether to include the mempool. Set to `false` to only check for outputs confirmed in the blockchain. - -**Example** - -- `txid`: `"a12345abcdef67890bcdef1234567890abcdef1234567890abcdef1234567890"` -- `n`: `1` -- `include_mempool`: `true` - -### Return Object - -The return object contains the following fields: - -- `bestblock`: (string) The hash of the block at the tip of the blockchain. -- `confirmations`: (numeric) The number of confirmations for the transaction. -1 if the transaction is not yet confirmed and in the mempool. -- `value`: (numeric) The value of the output. -- `scriptPubKey`: (object) Information about the output's scriptPubKey. - - `asm`: (string) The assembly representation of the script. - - `hex`: (string) The hex representation of the script. - - `type`: (string) The type of the script (e.g., `pubkeyhash`, `scripthash`). - - `addresses`: (array) The addresses associated with this output. -- `coinbase`: (boolean) Whether the transaction is a coinbase transaction. -- `version`: (numeric) The transaction version. -- `height`: (numeric) The height of the block containing this output. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "gettxout", - "params": ["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", 1], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "bestblock": "00000000000000000000bb252e11a381e2d9ee948dd8f2c9df9b7cb41adc40b2", - "confirmations": 5, - "value": 0.0027, - "scriptPubKey": { - "asm": "0 24007ed98749dbb504fdea2bd07715c94d4c7751", - "desc": "addr(bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88)#2wxgfkqe", - "hex": "001424007ed98749dbb504fdea2bd07715c94d4c7751", - "address": "bc1qysq8akv8f8dm2p8aag4aqac4e9x5ca63yq4c88", - "type": "witness_v0_keyhash" - }, - "coinbase": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-gettxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-gettxoutproof.md deleted file mode 100644 index a5042a85..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-gettxoutproof.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: "gettxoutproof" -slug: "rpc-zcash-gettxoutproof" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.getTxOutProof(["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `gettxoutproof` RPC method returns a hex-encoded proof that the specified transaction(s) were included in a block. This method can be used to provide proof of inclusion for one or more transactions in the blockchain. - -### Parameters - -- `txids` (array, required): An array of transaction IDs to create a proof for. -- `blockhash` (string, optional): The hash of the block that contains the transactions. If not provided, the method will search for the transactions in the most recent blocks. - -**Example** - -- `txids`: `["`c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2`"]` -- `blockhash`: `"`00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2`"` - -### Return Object - -- `hex`: (string) The hex-encoded proof of the transaction(s) inclusion in the block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "method": "gettxoutproof", - "params": [["c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2"], "00000000000000000004c6125026f00b76e7b762e645a0b0b7ecfa7a7dafdba2"], - "id": 1 -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "00800020208d9c3576f57c3f0c35bd94440f37fe7971cf2b914001000000000000000000db47732e70243f1ae818f635ae4f5cacbacf1230f4dc226f0e62c0871d6e8692a4f5486439c705171a71df638e1100000e8c9aa54adefc4c7b9ccd760b4ee1369bdd5cc7cb8b3e426b4a3b490c2eee5473e8f8f4134d4035e4241a929b9cdac2c22b6d74e0cae88e9ad1f50eeba06ae52659f1c0be83c1705e6642336d47356c39632ca55d11c04f24d09132fd081f5144caf6c733deed2366cd75a4e5a355920cd31c889239e78e195fb15435451f82398b683b27258ff3523cf63a276f38ffe296dd541b99f80cc87ecb40f473e1af2656ac06a0d999105c71c293e571bb62bdd3f0509fe8d5be381d92a76d1659cafcfea20ac316c4cc72a4d81fd7e9d94227cf6457d5412e4ef0d0b32e195a092321e1ad6c16ff7c6a28b39104f3e38a21775f4ea730b25269de7a54eb4dee8752735fe3e7add927cb2f0813a5bddda182776a559d7ba91c3580fb55e49a0bef8186f274f6dccad47742cdab8d3cab06c26c1336a23675bbc2ad36d1396ae451adc759fa97499c565c252524eed6934be8f18f3784f1f7d74a1471c1778af5aa65b6e6ebb5c3625ce00ac09a644aaa8b0b86b679e65c9fa204582ac285368b97eaa7ef2c43019754f8a3e9442c9a6820a25b3d7037fe53ba9d89732f5835939225fa30b5d86694bb5fc5a384e799a22ae82017fb0cf95e70e7bb529725a81e0f96f704afaa5a00", - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-sendrawtransaction.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-sendrawtransaction.md deleted file mode 100644 index 7300e45c..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-sendrawtransaction.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "sendrawtransaction" -slug: "rpc-zcash-sendrawtransaction" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.sendRawTransaction("02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `sendrawtransaction` method submits a serialized raw transaction to the network. If the transaction is well-formed and valid, it will be propagated to the network and included in a mined block. - -This method is commonly used in conjunction with [`createrawtransaction`](createrawtransaction.md), or other methods to construct and sign raw transactions before broadcasting them. - -### Parameters - -The `sendrawtransaction` method accepts the following parameters: - -- `hexstring`: A string representing the serialized raw transaction in hexadecimal format. - -### Return Object - -The `sendrawtransaction` method returns a string containing the transaction ID (txid) of the broadcasted transaction. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "sendrawtransaction", - "params": ["02000000013412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab3412cdab0000000000fdffffff0140420f00000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac00000000"] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": "c7ad51e46a39d136adc2bb7536a236136cc206ab3c8dabcd4277d4cadcf674f2", - "error": null, - "id": 1 -} - -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-validateaddress.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-validateaddress.md deleted file mode 100644 index 3206ba74..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-validateaddress.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: "validateaddress" -slug: "rpc-zcash-validateaddress" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.validateAddress("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`validateaddress` is a method that enables users to verify if a given address is valid. This method provides important information about the address, such as its type and whether it's a spendable or watch-only address. It can be particularly useful in applications where address validation is necessary before performing transactions or when dealing with user-generated addresses to ensure their validity. - -### Parameters - -The `validateaddress` method accepts one required parameter: - -- `address` (string, required): The address to be validated. - -### Return Object - -The `validateaddress` method returns an object with the following fields: - -- `isvalid` (boolean): Indicates if the supplied address is valid. -- `address` (string): The validated address. -- `scriptPubKey` (string): The hex-encoded scriptPubKey generated by the address. -- `isscript` (boolean): Indicates if the address is a script address (P2SH). -- `iswitness` (boolean): Indicates if the address is a witness address (P2WPKH or P2WSH). -- `witness_version` (numeric, optional): The version number of the witness program, if applicable. -- `witness_program` (string, optional): The hex value of the witness program, if applicable. -- `isspendable` (boolean): Indicates if the address is spendable (has the private key). -- `iswatchonly` (boolean): Indicates if the address is watch-only (wallet has the public key but not the private key). -- `iscompressed` (boolean, optional): Indicates if the associated public key is compressed. -- `account` (string, optional): DEPRECATED. The account associated with the address, if any. Example: - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "validateaddress", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": { - "isvalid": true, - "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", - "scriptPubKey": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", - "isscript": false, - "iswitness": false - }, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-verifymessage.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-verifymessage.md deleted file mode 100644 index e2b69efb..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-verifymessage.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "verifymessage" -slug: "rpc-zcash-verifymessage" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.verifyMessage( "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", "Hello, this is a signed message.") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`verifymessage` is a method that allows users to verify a signed message using a address. This method can be used to confirm the authenticity of a message by verifying that the signature was created by the owner of the address, without revealing the private key. Use cases include proving ownership of an address, verifying the content of a message, or validating communications within a trustless system. - -### Parameters - -The `verifymessage` method accepts three required parameters: - -- `address` (string, required): The address that supposedly signed the message. -- `signature` (string, required): The base64-encoded signature of the message. -- `message` (string, required): The message that was signed. - -### Return Object - -The `verifymessage` method returns a single boolean value: - -- `isvalid` (boolean): Indicates if the signature is valid for the given message and address - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifymessage", - "params": [ - "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", -"HxK7Mw0K6Uox7iGcOe9v9Ll+OZzG7TjTkeTJCD7VHw4yKP4O4a4gFtgm9XNmxfH1tK7JRgYrP/+20xP/ek8iQ2E=", - "Hello, this is a signed message." - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": false, - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\ diff --git a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-verifytxoutproof.md b/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-verifytxoutproof.md deleted file mode 100644 index 2a744b8f..00000000 --- a/v1.0/RPC Nodes/rpc-utxo/zcash/rpc-zcash-verifytxoutproof.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "verifytxoutproof" -slug: "rpc-zcash-verifytxoutproof" -excerpt: "Zcash RPC" -hidden: false -metadata: - description: "Zcash RPC" - image: [] - keywords: "zcash, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" ---- - - - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, ZCash, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.ZCASH}) - -const result = await tatum.rpc.verifyTxOutProof("") - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `verifytxoutproof` RPC method verifies the given transaction proof (in the form of a Merkle block) and returns an array of transaction hashes contained in the verified Merkle block. This method can be used to confirm that specific transactions are included in a block without having to download the entire block. - -### Parameters - -- `proof`: (string, required) The hex-encoded proof generated by the `gettxoutproof` RPC method. - -### Return Object - -- (array of strings) An array of transaction hashes contained in the verified Merkle block. - -### JSON Examples - -Request example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "verifytxoutproof", - "params": [ - "00000020fc61cc9f1bda9ef9e5d6bcccc7f210a0e87e7ccbc017d8487031b91d0000000047451bc9b84a546eafbe39baedb3cda967ea57cf1ab650b24d88395f2e4e3d413e4f22e8d9d9ea1c000000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a01000000434104e70b81e35e7cf03f6238471f7d9c903d48aea7c1d067e3010b9000000000000" - ] -} -``` - -{% endcode %} - -Response example: - -{% code overflow="wrap" lineNumbers="true" %} - -```json -{ - "result": [ - "3e4f22e8d9d9ea1c123456789abcdef0123456789abcdef0123456789abcdef" - ], - "error": null, - "id": 1 -} -``` - -{% endcode %} - -\\