🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

tonapi-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tonapi-sdk

Provide_access_to_indexed_TON_blockchain

2.0.1
latest
Source
npm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

tonapi-sdk

TonapiSdk - JavaScript client for tonapi-sdk Provide access to indexed TON blockchain This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0.0
  • Package version: 2.0.0
  • Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen

Installation

For Node.js

npm

npm install tonapi-sdk --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var TonapiSdk = require('tonapi-sdk');

var api = new TonapiSdk.AccountsApi()
var accountId = "accountId_example"; // {String} account ID

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.accountDnsBackResolve(accountId, callback);

Documentation for API Endpoints

All URIs are relative to https://tonapi.io

ClassMethodHTTP requestDescription
TonapiSdk.AccountsApiaccountDnsBackResolveGET /v2/accounts/{account_id}/dns/backresolve
TonapiSdk.AccountsApiaddressParseGET /v2/address/{account_id}/parse
TonapiSdk.AccountsApigetAccountGET /v2/accounts/{account_id}
TonapiSdk.AccountsApigetAccountDiffGET /v2/accounts/{account_id}/diff
TonapiSdk.AccountsApigetAccountDnsExpiringGET /v2/accounts/{account_id}/dns/expiring
TonapiSdk.AccountsApigetAccountEventGET /v2/accounts/{account_id}/events/{event_id}
TonapiSdk.AccountsApigetAccountEventsGET /v2/accounts/{account_id}/events
TonapiSdk.AccountsApigetAccountJettonHistoryByIDGET /v2/accounts/{account_id}/jettons/{jetton_id}/history
TonapiSdk.AccountsApigetAccountJettonsBalancesGET /v2/accounts/{account_id}/jettons
TonapiSdk.AccountsApigetAccountJettonsHistoryGET /v2/accounts/{account_id}/jettons/history
TonapiSdk.AccountsApigetAccountNftItemsGET /v2/accounts/{account_id}/nfts
TonapiSdk.AccountsApigetAccountPublicKeyGET /v2/accounts/{account_id}/publickey
TonapiSdk.AccountsApigetAccountSubscriptionsGET /v2/accounts/{account_id}/subscriptions
TonapiSdk.AccountsApigetAccountTracesGET /v2/accounts/{account_id}/traces
TonapiSdk.AccountsApigetAccountsPOST /v2/accounts/_bulk
TonapiSdk.AccountsApireindexAccountPOST /v2/accounts/{account_id}/reindex
TonapiSdk.AccountsApisearchAccountsGET /v2/accounts/search
TonapiSdk.BlockchainApiblockchainAccountInspectGET /v2/blockchain/accounts/{account_id}/inspect
TonapiSdk.BlockchainApiexecGetMethodForBlockchainAccountGET /v2/blockchain/accounts/{account_id}/methods/{method_name}
TonapiSdk.BlockchainApigetBlockchainAccountTransactionsGET /v2/blockchain/accounts/{account_id}/transactions
TonapiSdk.BlockchainApigetBlockchainBlockGET /v2/blockchain/blocks/{block_id}
TonapiSdk.BlockchainApigetBlockchainBlockTransactionsGET /v2/blockchain/blocks/{block_id}/transactions
TonapiSdk.BlockchainApigetBlockchainConfigGET /v2/blockchain/config
TonapiSdk.BlockchainApigetBlockchainConfigFromBlockGET /v2/blockchain/masterchain/{masterchain_seqno}/config
TonapiSdk.BlockchainApigetBlockchainMasterchainBlocksGET /v2/blockchain/masterchain/{masterchain_seqno}/blocks
TonapiSdk.BlockchainApigetBlockchainMasterchainHeadGET /v2/blockchain/masterchain-head
TonapiSdk.BlockchainApigetBlockchainMasterchainShardsGET /v2/blockchain/masterchain/{masterchain_seqno}/shards
TonapiSdk.BlockchainApigetBlockchainMasterchainTransactionsGET /v2/blockchain/masterchain/{masterchain_seqno}/transactions
TonapiSdk.BlockchainApigetBlockchainRawAccountGET /v2/blockchain/accounts/{account_id}
TonapiSdk.BlockchainApigetBlockchainTransactionGET /v2/blockchain/transactions/{transaction_id}
TonapiSdk.BlockchainApigetBlockchainTransactionByMessageHashGET /v2/blockchain/messages/{msg_id}/transaction
TonapiSdk.BlockchainApigetBlockchainValidatorsGET /v2/blockchain/validators
TonapiSdk.BlockchainApigetRawBlockchainConfigGET /v2/blockchain/config/raw
TonapiSdk.BlockchainApigetRawBlockchainConfigFromBlockGET /v2/blockchain/masterchain/{masterchain_seqno}/config/raw
TonapiSdk.BlockchainApisendBlockchainMessagePOST /v2/blockchain/message
TonapiSdk.BlockchainApistatusGET /v2/status
TonapiSdk.ConnectApigetAccountInfoByStateInitPOST /v2/tonconnect/stateinit
TonapiSdk.ConnectApigetTonConnectPayloadGET /v2/tonconnect/payload
TonapiSdk.DNSApidnsResolveGET /v2/dns/{domain_name}/resolve
TonapiSdk.DNSApigetAllAuctionsGET /v2/dns/auctions
TonapiSdk.DNSApigetDnsInfoGET /v2/dns/{domain_name}
TonapiSdk.DNSApigetDomainBidsGET /v2/dns/{domain_name}/bids
TonapiSdk.EmulationApidecodeMessagePOST /v2/message/decode
TonapiSdk.EmulationApiemulateMessageToAccountEventPOST /v2/accounts/{account_id}/events/emulate
TonapiSdk.EmulationApiemulateMessageToEventPOST /v2/events/emulate
TonapiSdk.EmulationApiemulateMessageToTracePOST /v2/traces/emulate
TonapiSdk.EmulationApiemulateMessageToWalletPOST /v2/wallet/emulate
TonapiSdk.EventsApigetEventGET /v2/events/{event_id}
TonapiSdk.InscriptionsApigetAccountInscriptionsGET /v2/experimental/accounts/{account_id}/inscriptions
TonapiSdk.InscriptionsApigetAccountInscriptionsHistoryGET /v2/experimental/accounts/{account_id}/inscriptions/history
TonapiSdk.InscriptionsApigetAccountInscriptionsHistoryByTickerGET /v2/experimental/accounts/{account_id}/inscriptions/{ticker}/history
TonapiSdk.InscriptionsApigetInscriptionOpTemplateGET /v2/experimental/inscriptions/op-template
TonapiSdk.JettonsApigetJettonHoldersGET /v2/jettons/{account_id}/holders
TonapiSdk.JettonsApigetJettonInfoGET /v2/jettons/{account_id}
TonapiSdk.JettonsApigetJettonsGET /v2/jettons
TonapiSdk.JettonsApigetJettonsEventsGET /v2/events/{event_id}/jettons
TonapiSdk.LiteServerApigetAllRawShardsInfoGET /v2/liteserver/get_all_shards_info/{block_id}
TonapiSdk.LiteServerApigetOutMsgQueueSizesGET /v2/liteserver/get_out_msg_queue_sizes
TonapiSdk.LiteServerApigetRawAccountStateGET /v2/liteserver/get_account_state/{account_id}
TonapiSdk.LiteServerApigetRawBlockProofGET /v2/liteserver/get_block_proof
TonapiSdk.LiteServerApigetRawBlockchainBlockGET /v2/liteserver/get_block/{block_id}
TonapiSdk.LiteServerApigetRawBlockchainBlockHeaderGET /v2/liteserver/get_block_header/{block_id}
TonapiSdk.LiteServerApigetRawBlockchainBlockStateGET /v2/liteserver/get_state/{block_id}
TonapiSdk.LiteServerApigetRawConfigGET /v2/liteserver/get_config_all/{block_id}
TonapiSdk.LiteServerApigetRawListBlockTransactionsGET /v2/liteserver/list_block_transactions/{block_id}
TonapiSdk.LiteServerApigetRawMasterchainInfoGET /v2/liteserver/get_masterchain_info
TonapiSdk.LiteServerApigetRawMasterchainInfoExtGET /v2/liteserver/get_masterchain_info_ext
TonapiSdk.LiteServerApigetRawShardBlockProofGET /v2/liteserver/get_shard_block_proof/{block_id}
TonapiSdk.LiteServerApigetRawShardInfoGET /v2/liteserver/get_shard_info/{block_id}
TonapiSdk.LiteServerApigetRawTimeGET /v2/liteserver/get_time
TonapiSdk.LiteServerApigetRawTransactionsGET /v2/liteserver/get_transactions/{account_id}
TonapiSdk.LiteServerApisendRawMessagePOST /v2/liteserver/send_message
TonapiSdk.NFTApigetAccountNftHistoryGET /v2/accounts/{account_id}/nfts/history
TonapiSdk.NFTApigetItemsFromCollectionGET /v2/nfts/collections/{account_id}/items
TonapiSdk.NFTApigetNftCollectionGET /v2/nfts/collections/{account_id}
TonapiSdk.NFTApigetNftCollectionsGET /v2/nfts/collections
TonapiSdk.NFTApigetNftHistoryByIDGET /v2/nfts/{account_id}/history
TonapiSdk.NFTApigetNftItemByAddressGET /v2/nfts/{account_id}
TonapiSdk.NFTApigetNftItemsByAddressesPOST /v2/nfts/_bulk
TonapiSdk.RatesApigetChartRatesGET /v2/rates/chart
TonapiSdk.RatesApigetMarketsRatesGET /v2/rates/markets
TonapiSdk.RatesApigetRatesGET /v2/rates
TonapiSdk.StakingApigetAccountNominatorsPoolsGET /v2/staking/nominator/{account_id}/pools
TonapiSdk.StakingApigetStakingPoolHistoryGET /v2/staking/pool/{account_id}/history
TonapiSdk.StakingApigetStakingPoolInfoGET /v2/staking/pool/{account_id}
TonapiSdk.StakingApigetStakingPoolsGET /v2/staking/pools
TonapiSdk.StorageApigetStorageProvidersGET /v2/storage/providers
TonapiSdk.TracesApigetTraceGET /v2/traces/{trace_id}
TonapiSdk.WalletApigetAccountSeqnoGET /v2/wallet/{account_id}/seqno
TonapiSdk.WalletApigetWalletBackupGET /v2/wallet/backup
TonapiSdk.WalletApigetWalletsByPublicKeyGET /v2/pubkeys/{public_key}/wallets
TonapiSdk.WalletApisetWalletBackupPUT /v2/wallet/backup
TonapiSdk.WalletApitonConnectProofPOST /v2/wallet/auth/proof

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Keywords

tonapi

FAQs

Package last updated on 08 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts