Skip to content

Latest commit

 

History

History
39 lines (22 loc) · 2.25 KB

README.md

File metadata and controls

39 lines (22 loc) · 2.25 KB

tonweb

Root of TonWeb.

Usage

  • TonWeb.version - current version

  • TonWeb.utils - utils class

  • TonWeb.Address - Address class

  • TonWeb.boc - boc class

  • TonWeb.Contract - Contract class

  • tonweb.wallet - wallets object

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

    • address - Identifier of target account in
    • limit [Optional] - Amount of transactions
    • lt [Optional] - Logical time of transaction to start with, must be sent with hash
    • txhash [Optional] - Hash of transaction in HEX to start with, must be sent with lt
    • to_lt [Optional] - Logical time of transaction to finish with (that way it is possible to get tx from lt to to_lt)
  • 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.