Interface for web sdk exclusive methods

Hierarchy (view full)

Implements

Constructors

Properties

connected: boolean = false
name: string = ""
provider: TonClient
rpc_url: string = ""
signer: KeyPair
wallet: WalletContractV4

Methods

  • Prepare a cell to be sent to the network.

    Parameters

    • cells: Cell[]

    Returns Promise<Buffer<ArrayBufferLike>[]>

    The cell as a sendable file

  • Alias

    Creates a signed transaction to transfer default chain currency

    Parameters

    • receiver: string

      The receiver's address

    • amount: string

      The amount to transfer

    • Optionaloptions: {
          privateKey: string;
      }

      Options

      • privateKey: string

        A private key mnemonic to use for signing the transaction(s) instead of the connected wallet

    Returns Promise<Buffer<ArrayBufferLike>>

    The signed transaction

    prepareTransfer

  • Creates a list of signed transactions to transfer default chain currency

    Parameters

    • payments: IPayOptions[]

      A list of transfers to prepare

    • Optionaloptions: {
          privateKey: string;
      }

      Options

      • privateKey: string

        A private key mnemonic to use for signing the transaction(s) instead of the connected wallet

    Returns Promise<Buffer<ArrayBufferLike>[]>

    An ordered list of signed transactions

  • Signs a message using the connected wallet

    Parameters

    • message: string

      The message to sign

    • Optionaloptions: {
          privateKey?: string;
      }

      Options

      • OptionalprivateKey?: string

    Returns Promise<string>

    The signed message

  • Verifies a message using the connected wallet

    Parameters

    • message: string

      The message to verify

    • signature: string

      The signature to verify

    • publicKey: string

    Returns Promise<boolean>

    A boolean indicating if the message was verified

  • Creates a new instance of this sdk

    Type Parameters

    Parameters

    • this: (new (rpc_url: string) => T)
        • new (rpc_url): T
        • Parameters

          • rpc_url: string

          Returns T

    • rpc_url: string = ""

      The RPC URL

    Returns Promise<T>

    The sdk instance connected to the RPC provider