0.0.3 • Published 5 months ago
@delab-team/ton-api-sdk v0.0.3
API Doc: TON Api
Install
- as local project package
yarn add @delab-team/ton-api-sdk
Example
const tonApi = new TonApi('AFXRKLZM2YCJ67AAAAAE4XDRSACSYEOYKQKOSUVUKMXNMP2AKUTWJ2UVBPTTQZWRGZMLALY', 'mainnet');
const blockchain = tonApi.Blockchain
Blockchain
path
: /v2/blockchain/blocks/{block_id}method_name
: getBlockDatadescription
: Get blockchain block datapath
: /v2/blockchain/blocks/{block_id}/transactionsmethod_name
: getTransactionsdescription
: Get transactions from blockpath
: /v2/blockchain/blocks/{block_id}/config/rawmethod_name
: getRawConfigdescription
: Get raw blockchain config from a specific block, if present.path
: /v2/blockchain/transactions/{transaction_id}method_name
: getTransactionsDatadescription
: Get transaction datapath
: /v2/blockchain/messages/{msg_id}/transactionmethod_name
: getTransactionDataMessagedescription
: Get transaction data by message hash =path
: /v2/blockchain/validatorsmethod_name
: getValidatorsdescription
: Get blockchain validatorspath
: /v2/blockchain/masterchain-headmethod_name
: getLastMasterchaindescription
: Get last known masterchain block =path
: /v2/blockchain/accounts/{account_id}method_name
: getAccountInfodescription
: Get low-level information about an account taken directly from the blockchain.path
: /v2/blockchain/accounts/{account_id}/transactionsmethod_name
: getAccountTransactionsdescription
: Get account transactionspath
: /v2/blockchain/accounts/{account_id}/methods/{method_name}method_name
: getMethodAccountdescription
: Execute get method for accountpath
: /v2/blockchain/messagemethod_name
: postMessagedescription
: Send message to blockchainpath
: /v2/blockchain/configmethod_name
: getBlockchainConfigdescription
: Get blockchain configpath
: /v2/blockchain/config/rawmethod_name
: getRawBlockchainConfigdescription
: Get raw blockchain configpath
: /v2/blockchain/accounts/{account_id}/inspectmethod_name
: getAccountInspectdescription
: Blockchain account inspect
Emulation
path
: /v2/events/emulatemethod_name
: postEmulateEventsdescription
: Emulate sending message to blockchain =path
: /v2/traces/emulatemethod_name
: postEmulateTracesdescription
: Emulate sending message to blockchainpath
: /v2/wallet/emulatemethod_name
: postEmulateWalletdescription
: Emulate sending message to blockchainpath
: /v2/accounts/{account_id}/events/emulatemethod_name
: postMessageBlockchaindescription
: Emulate sending message to blockchain
Accounts
path
: /v2/address/{account_id}/parsemethod_name
: getParseAddressdescription
: parse address and display in all formatspath
: /v2/accounts/_bulkmethod_name
: postBulkdescription
: Get human-friendly information about several accounts without low-level details.path
: /v2/accounts/{account_id}method_name
: getHumanFriendlyInfodescription
: Get human-friendly information about an account without low-level details.path
: /v2/accounts/{account_id}/dns/backresolvemethod_name
: getAccountsDomainsdescription
: Get account's domainspath
: /v2/accounts/{account_id}/jettonsmethod_name
: getAllJettonsBalancesdescription
: Get all Jettons balances by owner addresspath
: /v2/accounts/{account_id}/jettons/historymethod_name
: getTransferJettonsHistorydescription
: Get the transfer jettons history for accountpath
: /v2/accounts/{account_id}/jettons/{jetton_id}/historymethod_name
: getTransferJettonHistorydescription
: Get the transfer jetton history for account and jettonpath
: /v2/accounts/{account_id}/nftsmethod_name
: getAllNftItemsdescription
: Get all NFT items by owner addresspath
: /v2/accounts/{account_id}/eventsmethod_name
: getEventsAccountdescription
: Get events for an account. Each event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time.path
: /v2/accounts/{account_id}/events/{event_id}method_name
: getEventsAccountByIddescription
: Get event for an account by event_idpath
: /v2/accounts/{account_id}/tracesmethod_name
: getTracesAccountdescription
: Get traces for accountpath
: /v2/accounts/{account_id}/subscriptionsmethod_name
: getAllSubscriptionsdescription
: Get all subscriptions by wallet addresspath
: /v2/accounts/{account_id}/reindexmethod_name
: postUpdateInternalCachedescription
: Update internal cache for a particular accountpath
: /v2/accounts/searchmethod_name
: getSearchdescription
: Search by account domain namepath
: /v2/accounts/{account_id}/dns/expiringmethod_name
: getTonDnsdescription
: Get expiring account .ton dnspath
: /v2/accounts/{account_id}/publickeymethod_name
: getPublicKeydescription
: Get public key by account idpath
: /v2/accounts/{account_id}/diffmethod_name
: getAccountsBalanceChangedescription
: Get account's balance change
NFT
==
path
: /v2/accounts/{account_id}/nfts/historymethod_name
: getTransferNftHistorydescription
: Get the transfer nft historypath
: /v2/nfts/collectionsmethod_name
: getNftCollectionsdescription
: Get NFT collectionspath
: /v2/nfts/collections/{account_id}method_name
: getNftCollectionsByAddressdescription
: Get NFT collection by collection addresspath
: /v2/nfts/collections/{account_id}/itemsmethod_name
: getNftItemsFromCollectiondescription
: Get NFT items from collection by collection addresspath
: /v2/nfts/_bulkmethod_name
: postBulkdescription
: Get NFT items by their addressespath
: /v2/nfts/{account_id}method_name
: getNftItemByAddressdescription
: Get NFT item by its addresspath
: /v2/nfts/{account_id}/historymethod_name
: getNftTransferHistorydescription
: Get the transfer nfts history for account
DNS
path
: /v2/dns/{domain_name}method_name
: getFullInfodescription
: Get full information about domain namepath
: /v2/dns/{domain_name}/resolvemethod_name
: getDnsResolveForNamedescription
: DNS resolve for domain namepath
: /v2/dns/{domain_name}/bidsmethod_name
: getDomainBidsdescription
: Get domain bidspath
: /v2/dns/auctionsmethod_name
: getAllAuctionsdescription
: Get all auctions
Traces
path
: /v2/traces/{trace_id}method_name
: getTracedescription
: Get the trace by trace ID or hash of any transaction in trace
Events
path
: /v2/events/{event_id}method_name
: /v2/events/{event_id}description
: Get an event either by event ID or a hash of any transaction in a trace. An event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time.
Jettons
path
: /v2/jettonsmethod_name
: getListdescription
: Get a list of all indexed jetton masters in the blockchain.path
: /v2/jettons/{account_id}method_name
: getJettonMetadatadescription
: Get jetton metadata by jetton master addresspath
: /v2/jettons/{account_id}/holdersmethod_name
: getJettonsHoldersdescription
: Get jetton's holderspath
: /v2/events/{event_id}/jettonsmethod_name
: getJettonTransfersdescription
: Get only jetton transfers in the event
Staking
path
: /v2/staking/nominator/{account_id}/poolsmethod_name
: getAllPoolsdescription
: All pools where account participatespath
: /v2/staking/pool/{account_id}method_name
: getStakingPoolInfodescription
: Stacking pool infopath
: /v2/staking/pool/{account_id}/historymethod_name
: getPoolHistorydescription
: Pool historypath
: All pools available in networkmethod_name
: getAllPoolsAvailabledescription
: All pools available in network
Storage
path
: /v2/storage/providersmethod_name
: getStorageProvidersdescription
: Get TON storage providers deployed to the blockchain.
Rates
path
: /v2/ratesmethod_name
: getTokenPricedescription
: Get the token price to the currencypath
: /v2/rates/chartmethod_name
: getChartTokendescription
: Get chart by token
Connect
path
: /v2/tonconnect/payloadmethod_name
: getPayloaddescription
: Get a payload for further token receiptpath
: /v2/tonconnect/stateinitmethod_name
: postStateInitdescription
: Get account info by state init
Wallet
path
: /v2/wallet/backupmethod_name
: getBackupdescription
: Get backup infopath
: /v2/wallet/backupmethod_name
: putBackupdescription
: Set backup infopath
: /v2/wallet/auth/proofmethod_name
: postAuthProofdescription
: Account verification and token issuancepath
: /v2/pubkeys/{public_key}/walletsmethod_name
: getWalletsdescription
: Get wallets by public keypath
: /v2/wallet/{account_id}/seqnomethod_name
: getAccountSeqnodescription
: Get account seqno
Lite Server
path
: /v2/liteserver/get_masterchain_infomethod_name
: getMasterchainInfodescription
: Get raw masterchain info =path
: /v2/liteserver/get_masterchain_info_extmethod_name
: getMasterchainInfoExtdescription
: Get raw masterchain info extpath
: /v2/liteserver/get_timemethod_name
: getRawTimedescription
: Get raw timepath
: /v2/liteserver/get_block/{block_id}method_name
: getRawBlockchainBlockdescription
: Get raw blockchain blockpath
: /v2/liteserver/get_state/{block_id}method_name
: getRawBlockchainBlockStatedescription
: Get raw blockchain block statepath
: Get raw blockchain block statemethod_name
: getBlockHeaderdescription
: Get raw blockchain block headerpath
: /v2/liteserver/send_messagemethod_name
: postSendMessagedescription
: Send raw message to blockchainpath
: /v2/liteserver/get_account_state/{account_id}method_name
: getAccountStatedescription
: Get raw account statepath
: /v2/liteserver/get_shard_info/{block_id}method_name
: getShardInfodescription
: Get raw shard infopath
: /v2/liteserver/get_all_shards_info/{block_id}method_name
: getAllShardsInfodescription
: Get all raw shards infopath
: /v2/liteserver/get_transactions/{account_id}method_name
: getRawTransactionsdescription
: Get raw transactionspath
: /v2/liteserver/list_block_transactions/{block_id}method_name
: getListBlockTransactionsdescription
: Get raw list block transactionspath
: /v2/liteserver/get_block_proofmethod_name
: getBlockProofdescription
: Get raw block proofpath
: /v2/liteserver/get_config_all/{block_id}method_name
: getConfigAlldescription
: Get raw configpath
: Get raw configmethod_name
: getShardBlockProofdescription
: Get raw shard block proof