
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
TonapiSdk - JavaScript client for tonapi-sdk Provide access to indexed TON blockchain This SDK is automatically generated by the Swagger Codegen project:
npm install tonapi-sdk --save
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.
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
}
}
]
}
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);
All URIs are relative to https://tonapi.io
Class | Method | HTTP request | Description |
---|---|---|---|
TonapiSdk.AccountsApi | accountDnsBackResolve | GET /v2/accounts/{account_id}/dns/backresolve | |
TonapiSdk.AccountsApi | addressParse | GET /v2/address/{account_id}/parse | |
TonapiSdk.AccountsApi | getAccount | GET /v2/accounts/{account_id} | |
TonapiSdk.AccountsApi | getAccountDiff | GET /v2/accounts/{account_id}/diff | |
TonapiSdk.AccountsApi | getAccountDnsExpiring | GET /v2/accounts/{account_id}/dns/expiring | |
TonapiSdk.AccountsApi | getAccountEvent | GET /v2/accounts/{account_id}/events/{event_id} | |
TonapiSdk.AccountsApi | getAccountEvents | GET /v2/accounts/{account_id}/events | |
TonapiSdk.AccountsApi | getAccountJettonHistoryByID | GET /v2/accounts/{account_id}/jettons/{jetton_id}/history | |
TonapiSdk.AccountsApi | getAccountJettonsBalances | GET /v2/accounts/{account_id}/jettons | |
TonapiSdk.AccountsApi | getAccountJettonsHistory | GET /v2/accounts/{account_id}/jettons/history | |
TonapiSdk.AccountsApi | getAccountNftItems | GET /v2/accounts/{account_id}/nfts | |
TonapiSdk.AccountsApi | getAccountPublicKey | GET /v2/accounts/{account_id}/publickey | |
TonapiSdk.AccountsApi | getAccountSubscriptions | GET /v2/accounts/{account_id}/subscriptions | |
TonapiSdk.AccountsApi | getAccountTraces | GET /v2/accounts/{account_id}/traces | |
TonapiSdk.AccountsApi | getAccounts | POST /v2/accounts/_bulk | |
TonapiSdk.AccountsApi | reindexAccount | POST /v2/accounts/{account_id}/reindex | |
TonapiSdk.AccountsApi | searchAccounts | GET /v2/accounts/search | |
TonapiSdk.BlockchainApi | blockchainAccountInspect | GET /v2/blockchain/accounts/{account_id}/inspect | |
TonapiSdk.BlockchainApi | execGetMethodForBlockchainAccount | GET /v2/blockchain/accounts/{account_id}/methods/{method_name} | |
TonapiSdk.BlockchainApi | getBlockchainAccountTransactions | GET /v2/blockchain/accounts/{account_id}/transactions | |
TonapiSdk.BlockchainApi | getBlockchainBlock | GET /v2/blockchain/blocks/{block_id} | |
TonapiSdk.BlockchainApi | getBlockchainBlockTransactions | GET /v2/blockchain/blocks/{block_id}/transactions | |
TonapiSdk.BlockchainApi | getBlockchainConfig | GET /v2/blockchain/config | |
TonapiSdk.BlockchainApi | getBlockchainConfigFromBlock | GET /v2/blockchain/masterchain/{masterchain_seqno}/config | |
TonapiSdk.BlockchainApi | getBlockchainMasterchainBlocks | GET /v2/blockchain/masterchain/{masterchain_seqno}/blocks | |
TonapiSdk.BlockchainApi | getBlockchainMasterchainHead | GET /v2/blockchain/masterchain-head | |
TonapiSdk.BlockchainApi | getBlockchainMasterchainShards | GET /v2/blockchain/masterchain/{masterchain_seqno}/shards | |
TonapiSdk.BlockchainApi | getBlockchainMasterchainTransactions | GET /v2/blockchain/masterchain/{masterchain_seqno}/transactions | |
TonapiSdk.BlockchainApi | getBlockchainRawAccount | GET /v2/blockchain/accounts/{account_id} | |
TonapiSdk.BlockchainApi | getBlockchainTransaction | GET /v2/blockchain/transactions/{transaction_id} | |
TonapiSdk.BlockchainApi | getBlockchainTransactionByMessageHash | GET /v2/blockchain/messages/{msg_id}/transaction | |
TonapiSdk.BlockchainApi | getBlockchainValidators | GET /v2/blockchain/validators | |
TonapiSdk.BlockchainApi | getRawBlockchainConfig | GET /v2/blockchain/config/raw | |
TonapiSdk.BlockchainApi | getRawBlockchainConfigFromBlock | GET /v2/blockchain/masterchain/{masterchain_seqno}/config/raw | |
TonapiSdk.BlockchainApi | sendBlockchainMessage | POST /v2/blockchain/message | |
TonapiSdk.BlockchainApi | status | GET /v2/status | |
TonapiSdk.ConnectApi | getAccountInfoByStateInit | POST /v2/tonconnect/stateinit | |
TonapiSdk.ConnectApi | getTonConnectPayload | GET /v2/tonconnect/payload | |
TonapiSdk.DNSApi | dnsResolve | GET /v2/dns/{domain_name}/resolve | |
TonapiSdk.DNSApi | getAllAuctions | GET /v2/dns/auctions | |
TonapiSdk.DNSApi | getDnsInfo | GET /v2/dns/{domain_name} | |
TonapiSdk.DNSApi | getDomainBids | GET /v2/dns/{domain_name}/bids | |
TonapiSdk.EmulationApi | decodeMessage | POST /v2/message/decode | |
TonapiSdk.EmulationApi | emulateMessageToAccountEvent | POST /v2/accounts/{account_id}/events/emulate | |
TonapiSdk.EmulationApi | emulateMessageToEvent | POST /v2/events/emulate | |
TonapiSdk.EmulationApi | emulateMessageToTrace | POST /v2/traces/emulate | |
TonapiSdk.EmulationApi | emulateMessageToWallet | POST /v2/wallet/emulate | |
TonapiSdk.EventsApi | getEvent | GET /v2/events/{event_id} | |
TonapiSdk.InscriptionsApi | getAccountInscriptions | GET /v2/experimental/accounts/{account_id}/inscriptions | |
TonapiSdk.InscriptionsApi | getAccountInscriptionsHistory | GET /v2/experimental/accounts/{account_id}/inscriptions/history | |
TonapiSdk.InscriptionsApi | getAccountInscriptionsHistoryByTicker | GET /v2/experimental/accounts/{account_id}/inscriptions/{ticker}/history | |
TonapiSdk.InscriptionsApi | getInscriptionOpTemplate | GET /v2/experimental/inscriptions/op-template | |
TonapiSdk.JettonsApi | getJettonHolders | GET /v2/jettons/{account_id}/holders | |
TonapiSdk.JettonsApi | getJettonInfo | GET /v2/jettons/{account_id} | |
TonapiSdk.JettonsApi | getJettons | GET /v2/jettons | |
TonapiSdk.JettonsApi | getJettonsEvents | GET /v2/events/{event_id}/jettons | |
TonapiSdk.LiteServerApi | getAllRawShardsInfo | GET /v2/liteserver/get_all_shards_info/{block_id} | |
TonapiSdk.LiteServerApi | getOutMsgQueueSizes | GET /v2/liteserver/get_out_msg_queue_sizes | |
TonapiSdk.LiteServerApi | getRawAccountState | GET /v2/liteserver/get_account_state/{account_id} | |
TonapiSdk.LiteServerApi | getRawBlockProof | GET /v2/liteserver/get_block_proof | |
TonapiSdk.LiteServerApi | getRawBlockchainBlock | GET /v2/liteserver/get_block/{block_id} | |
TonapiSdk.LiteServerApi | getRawBlockchainBlockHeader | GET /v2/liteserver/get_block_header/{block_id} | |
TonapiSdk.LiteServerApi | getRawBlockchainBlockState | GET /v2/liteserver/get_state/{block_id} | |
TonapiSdk.LiteServerApi | getRawConfig | GET /v2/liteserver/get_config_all/{block_id} | |
TonapiSdk.LiteServerApi | getRawListBlockTransactions | GET /v2/liteserver/list_block_transactions/{block_id} | |
TonapiSdk.LiteServerApi | getRawMasterchainInfo | GET /v2/liteserver/get_masterchain_info | |
TonapiSdk.LiteServerApi | getRawMasterchainInfoExt | GET /v2/liteserver/get_masterchain_info_ext | |
TonapiSdk.LiteServerApi | getRawShardBlockProof | GET /v2/liteserver/get_shard_block_proof/{block_id} | |
TonapiSdk.LiteServerApi | getRawShardInfo | GET /v2/liteserver/get_shard_info/{block_id} | |
TonapiSdk.LiteServerApi | getRawTime | GET /v2/liteserver/get_time | |
TonapiSdk.LiteServerApi | getRawTransactions | GET /v2/liteserver/get_transactions/{account_id} | |
TonapiSdk.LiteServerApi | sendRawMessage | POST /v2/liteserver/send_message | |
TonapiSdk.NFTApi | getAccountNftHistory | GET /v2/accounts/{account_id}/nfts/history | |
TonapiSdk.NFTApi | getItemsFromCollection | GET /v2/nfts/collections/{account_id}/items | |
TonapiSdk.NFTApi | getNftCollection | GET /v2/nfts/collections/{account_id} | |
TonapiSdk.NFTApi | getNftCollections | GET /v2/nfts/collections | |
TonapiSdk.NFTApi | getNftHistoryByID | GET /v2/nfts/{account_id}/history | |
TonapiSdk.NFTApi | getNftItemByAddress | GET /v2/nfts/{account_id} | |
TonapiSdk.NFTApi | getNftItemsByAddresses | POST /v2/nfts/_bulk | |
TonapiSdk.RatesApi | getChartRates | GET /v2/rates/chart | |
TonapiSdk.RatesApi | getMarketsRates | GET /v2/rates/markets | |
TonapiSdk.RatesApi | getRates | GET /v2/rates | |
TonapiSdk.StakingApi | getAccountNominatorsPools | GET /v2/staking/nominator/{account_id}/pools | |
TonapiSdk.StakingApi | getStakingPoolHistory | GET /v2/staking/pool/{account_id}/history | |
TonapiSdk.StakingApi | getStakingPoolInfo | GET /v2/staking/pool/{account_id} | |
TonapiSdk.StakingApi | getStakingPools | GET /v2/staking/pools | |
TonapiSdk.StorageApi | getStorageProviders | GET /v2/storage/providers | |
TonapiSdk.TracesApi | getTrace | GET /v2/traces/{trace_id} | |
TonapiSdk.WalletApi | getAccountSeqno | GET /v2/wallet/{account_id}/seqno | |
TonapiSdk.WalletApi | getWalletBackup | GET /v2/wallet/backup | |
TonapiSdk.WalletApi | getWalletsByPublicKey | GET /v2/pubkeys/{public_key}/wallets | |
TonapiSdk.WalletApi | setWalletBackup | PUT /v2/wallet/backup | |
TonapiSdk.WalletApi | tonConnectProof | POST /v2/wallet/auth/proof |
All endpoints do not require authorization.
FAQs
Provide_access_to_indexed_TON_blockchain
The npm package tonapi-sdk receives a total of 2 weekly downloads. As such, tonapi-sdk popularity was classified as not popular.
We found that tonapi-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.