JSPM

  • Created
  • Published
  • Downloads 56334
  • Score
    100M100P100Q180015F
  • License GPL-3.0

TonWeb - JavaScript API for TON (Telegram Open Network)

Package Exports

  • tonweb

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tonweb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tonweb

Root package of TonWeb.

Usage

  • TonWeb.version - current version

  • TonWeb.utils - utils package

  • TonWeb.Address - Address class

  • TonWeb.boc - boc package

  • TonWeb.Contract - Contract class

  • tonweb.wallet - wallets object

  • tonweb.getTransactions(address: Address | string, limit?: number) - Use this method to get transaction history of a given address.

  • tonweb.getBalance(address: Address | string) - The current balance for the given address in nanograms.

  • tonweb.sendBoc(bytes: Uint8Array) - Use this method to send serialized boc file: fully packed and serialized external message.

  • tonweb.call(address: Address | string, method: string | number, params: Array) - Invoke get-method of smart contract

Additional

  • tonweb.provider.getAddressInfo(address: string) - Use this method to get information about address: balance, code, data, last_transaction_id.

  • tonweb.provider.getExtendedAddressInfo(address: string) - Similar to previous one but tries to parse additional information for known contract types. This method is based on generic.getAccountState thus number of recognizable contracts may grow. For wallets we recommend to use getWalletInformation.

  • tonweb.provider.getWalletInfo(address: string) - Use this method to retrieve wallet information, this method parse contract state and currently supports more wallet types than getExtendedAddressInformation: simple wallet, stadart wallet and v3 wallet.

Build

npx webpack --mode=none

Authors

@rulon and @tolyayanot