npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@delab-team/ton-api-sdk

v0.0.3

Published

Ton-Api-SDK is a library for interacting with the Ton blockchain API.

Downloads

13

Readme

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: getBlockData
  • description: Get blockchain block data =
  • path: /v2/blockchain/blocks/{block_id}/transactions
  • method_name: getTransactions
  • description: Get transactions from block =
  • path: /v2/blockchain/blocks/{block_id}/config/raw
  • method_name: getRawConfig
  • description: Get raw blockchain config from a specific block, if present. =
  • path: /v2/blockchain/transactions/{transaction_id}
  • method_name: getTransactionsData
  • description: Get transaction data =
  • path: /v2/blockchain/messages/{msg_id}/transaction
  • method_name: getTransactionDataMessage
  • description: Get transaction data by message hash =
  • path: /v2/blockchain/validators
  • method_name: getValidators
  • description: Get blockchain validators =
  • path: /v2/blockchain/masterchain-head
  • method_name: getLastMasterchain
  • description: Get last known masterchain block =
  • path: /v2/blockchain/accounts/{account_id}
  • method_name: getAccountInfo
  • description: Get low-level information about an account taken directly from the blockchain. =
  • path: /v2/blockchain/accounts/{account_id}/transactions
  • method_name: getAccountTransactions
  • description: Get account transactions =
  • path: /v2/blockchain/accounts/{account_id}/methods/{method_name}
  • method_name: getMethodAccount
  • description: Execute get method for account =
  • path: /v2/blockchain/message
  • method_name: postMessage
  • description: Send message to blockchain =
  • path: /v2/blockchain/config
  • method_name: getBlockchainConfig
  • description: Get blockchain config =
  • path: /v2/blockchain/config/raw
  • method_name: getRawBlockchainConfig
  • description: Get raw blockchain config =
  • path: /v2/blockchain/accounts/{account_id}/inspect
  • method_name: getAccountInspect
  • description: Blockchain account inspect

Emulation

  • path: /v2/events/emulate
  • method_name: postEmulateEvents
  • description: Emulate sending message to blockchain =
  • path: /v2/traces/emulate
  • method_name: postEmulateTraces
  • description: Emulate sending message to blockchain =
  • path: /v2/wallet/emulate
  • method_name: postEmulateWallet
  • description: Emulate sending message to blockchain =
  • path: /v2/accounts/{account_id}/events/emulate
  • method_name: postMessageBlockchain
  • description: Emulate sending message to blockchain

Accounts

  • path: /v2/address/{account_id}/parse
  • method_name: getParseAddress
  • description: parse address and display in all formats =
  • path: /v2/accounts/_bulk
  • method_name: postBulk
  • description: Get human-friendly information about several accounts without low-level details. =
  • path: /v2/accounts/{account_id}
  • method_name: getHumanFriendlyInfo
  • description: Get human-friendly information about an account without low-level details. =
  • path: /v2/accounts/{account_id}/dns/backresolve
  • method_name: getAccountsDomains
  • description: Get account's domains =
  • path: /v2/accounts/{account_id}/jettons
  • method_name: getAllJettonsBalances
  • description: Get all Jettons balances by owner address =
  • path: /v2/accounts/{account_id}/jettons/history
  • method_name: getTransferJettonsHistory
  • description: Get the transfer jettons history for account =
  • path: /v2/accounts/{account_id}/jettons/{jetton_id}/history
  • method_name: getTransferJettonHistory
  • description: Get the transfer jetton history for account and jetton =
  • path: /v2/accounts/{account_id}/nfts
  • method_name: getAllNftItems
  • description: Get all NFT items by owner address =
  • path: /v2/accounts/{account_id}/events
  • method_name: getEventsAccount
  • description: 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: getEventsAccountById
  • description: Get event for an account by event_id =
  • path: /v2/accounts/{account_id}/traces
  • method_name: getTracesAccount
  • description: Get traces for account =
  • path: /v2/accounts/{account_id}/subscriptions
  • method_name: getAllSubscriptions
  • description: Get all subscriptions by wallet address =
  • path: /v2/accounts/{account_id}/reindex
  • method_name: postUpdateInternalCache
  • description: Update internal cache for a particular account =
  • path: /v2/accounts/search
  • method_name: getSearch
  • description: Search by account domain name =
  • path: /v2/accounts/{account_id}/dns/expiring
  • method_name: getTonDns
  • description: Get expiring account .ton dns =
  • path: /v2/accounts/{account_id}/publickey
  • method_name: getPublicKey
  • description: Get public key by account id =
  • path: /v2/accounts/{account_id}/diff
  • method_name: getAccountsBalanceChange
  • description: Get account's balance change =

NFT

==

  • path: /v2/accounts/{account_id}/nfts/history
  • method_name: getTransferNftHistory
  • description: Get the transfer nft history =
  • path: /v2/nfts/collections
  • method_name: getNftCollections
  • description: Get NFT collections =
  • path: /v2/nfts/collections/{account_id}
  • method_name: getNftCollectionsByAddress
  • description: Get NFT collection by collection address =
  • path: /v2/nfts/collections/{account_id}/items
  • method_name: getNftItemsFromCollection
  • description: Get NFT items from collection by collection address =
  • path: /v2/nfts/_bulk
  • method_name: postBulk
  • description: Get NFT items by their addresses =
  • path: /v2/nfts/{account_id}
  • method_name: getNftItemByAddress
  • description: Get NFT item by its address =
  • path: /v2/nfts/{account_id}/history
  • method_name: getNftTransferHistory
  • description: Get the transfer nfts history for account

DNS

  • path: /v2/dns/{domain_name}
  • method_name: getFullInfo
  • description: Get full information about domain name =
  • path: /v2/dns/{domain_name}/resolve
  • method_name: getDnsResolveForName
  • description: DNS resolve for domain name =
  • path: /v2/dns/{domain_name}/bids
  • method_name: getDomainBids
  • description: Get domain bids =
  • path: /v2/dns/auctions
  • method_name: getAllAuctions
  • description: Get all auctions =

Traces

  • path: /v2/traces/{trace_id}
  • method_name: getTrace
  • description: 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/jettons
  • method_name: getList
  • description: Get a list of all indexed jetton masters in the blockchain. =
  • path: /v2/jettons/{account_id}
  • method_name: getJettonMetadata
  • description: Get jetton metadata by jetton master address =
  • path: /v2/jettons/{account_id}/holders
  • method_name: getJettonsHolders
  • description: Get jetton's holders =
  • path: /v2/events/{event_id}/jettons
  • method_name: getJettonTransfers
  • description: Get only jetton transfers in the event =

Staking

  • path: /v2/staking/nominator/{account_id}/pools
  • method_name: getAllPools
  • description: All pools where account participates =
  • path: /v2/staking/pool/{account_id}
  • method_name: getStakingPoolInfo
  • description: Stacking pool info =
  • path: /v2/staking/pool/{account_id}/history
  • method_name: getPoolHistory
  • description: Pool history =
  • path: All pools available in network
  • method_name: getAllPoolsAvailable
  • description: All pools available in network =

Storage

  • path: /v2/storage/providers
  • method_name: getStorageProviders
  • description: Get TON storage providers deployed to the blockchain. =

Rates

  • path: /v2/rates
  • method_name: getTokenPrice
  • description: Get the token price to the currency =
  • path: /v2/rates/chart
  • method_name: getChartToken
  • description: Get chart by token =

Connect

  • path: /v2/tonconnect/payload
  • method_name: getPayload
  • description: Get a payload for further token receipt =
  • path: /v2/tonconnect/stateinit
  • method_name: postStateInit
  • description: Get account info by state init =

Wallet

  • path: /v2/wallet/backup
  • method_name: getBackup
  • description: Get backup info =
  • path: /v2/wallet/backup
  • method_name: putBackup
  • description: Set backup info =
  • path: /v2/wallet/auth/proof
  • method_name: postAuthProof
  • description: Account verification and token issuance =
  • path: /v2/pubkeys/{public_key}/wallets
  • method_name: getWallets
  • description: Get wallets by public key =
  • path: /v2/wallet/{account_id}/seqno
  • method_name: getAccountSeqno
  • description: Get account seqno =

Lite Server

  • path: /v2/liteserver/get_masterchain_info
  • method_name: getMasterchainInfo
  • description: Get raw masterchain info =
  • path: /v2/liteserver/get_masterchain_info_ext
  • method_name: getMasterchainInfoExt
  • description: Get raw masterchain info ext =
  • path: /v2/liteserver/get_time
  • method_name: getRawTime
  • description: Get raw time =
  • path: /v2/liteserver/get_block/{block_id}
  • method_name: getRawBlockchainBlock
  • description: Get raw blockchain block =
  • path: /v2/liteserver/get_state/{block_id}
  • method_name: getRawBlockchainBlockState
  • description: Get raw blockchain block state =
  • path: Get raw blockchain block state
  • method_name: getBlockHeader
  • description: Get raw blockchain block header =
  • path: /v2/liteserver/send_message
  • method_name: postSendMessage
  • description: Send raw message to blockchain =
  • path: /v2/liteserver/get_account_state/{account_id}
  • method_name: getAccountState
  • description: Get raw account state =
  • path: /v2/liteserver/get_shard_info/{block_id}
  • method_name: getShardInfo
  • description: Get raw shard info =
  • path: /v2/liteserver/get_all_shards_info/{block_id}
  • method_name: getAllShardsInfo
  • description: Get all raw shards info =
  • path: /v2/liteserver/get_transactions/{account_id}
  • method_name: getRawTransactions
  • description: Get raw transactions =
  • path: /v2/liteserver/list_block_transactions/{block_id}
  • method_name: getListBlockTransactions
  • description: Get raw list block transactions =
  • path: /v2/liteserver/get_block_proof
  • method_name: getBlockProof
  • description: Get raw block proof =
  • path: /v2/liteserver/get_config_all/{block_id}
  • method_name: getConfigAll
  • description: Get raw config =
  • path: Get raw config
  • method_name: getShardBlockProof
  • description: Get raw shard block proof =