Constructors

Properties

#private: any

Methods

  • Get block info by unix timestamp

    Parameters

    • seqno: number

      block sequence number

    • address: Address

      account address

    Returns Promise<{
        account: {
            balance: {
                coins: string;
            };
            last: null | {
                hash: string;
                lt: string;
            };
            state: {
                type: "uninit";
            } | {
                code: null | string;
                data: null | string;
                type: "active";
            } | {
                stateHash: string;
                type: "frozen";
            };
            storageStat: null | {
                duePayment: null | string;
                lastPaid: number;
                used: {
                    bits: number;
                    cells: number;
                    publicCells: number;
                };
            };
        };
        block: {
            fileHash: string;
            rootHash: string;
            seqno: number;
            shard: string;
            workchain: number;
        };
    }>

    account info

  • Get account lite info (without code and data)

    Parameters

    • seqno: number

      block sequence number

    • address: Address

      account address

    Returns Promise<{
        account: {
            balance: {
                coins: string;
            };
            last: null | {
                hash: string;
                lt: string;
            };
            state: {
                type: "uninit";
            } | {
                codeHash: string;
                dataHash: string;
                type: "active";
            } | {
                stateHash: string;
                type: "frozen";
            };
            storageStat: null | {
                duePayment: null | string;
                lastPaid: number;
                used: {
                    bits: number;
                    cells: number;
                    publicCells: number;
                };
            };
        };
    }>

    account lite info

  • Load unparsed account transactions

    Parameters

    • address: Address

      address

    • lt: bigint

      last transaction lt

    • hash: Buffer

      last transaction hash

    Returns Promise<{
        block: {
            fileHash: string;
            rootHash: string;
            seqno: number;
            shard: string;
            workchain: number;
        };
        tx: Transaction;
    }[]>

    unparsed transactions

  • Load parsed account transactions

    Parameters

    • address: Address

      address

    • lt: bigint

      last transaction lt

    • hash: Buffer

      last transaction hash

    • Optional count: number

      number of transactions to load

    Returns Promise<ParsedTransactions>

    parsed transactions

  • Get block info

    Parameters

    • seqno: number

      block sequence number

    Returns Promise<{
        shards: {
            fileHash: string;
            rootHash: string;
            seqno: number;
            shard: string;
            transactions: {
                account: string;
                hash: string;
                lt: string;
            }[];
            workchain: number;
        }[];
    }>

    block info

  • Get block info by unix timestamp

    Parameters

    • ts: number

      unix timestamp

    Returns Promise<{
        shards: {
            fileHash: string;
            rootHash: string;
            seqno: number;
            shard: string;
            transactions: {
                account: string;
                hash: string;
                lt: string;
            }[];
            workchain: number;
        }[];
    }>

    block info

  • Get network config

    Parameters

    • seqno: number

      block sequence number

    • Optional ids: number[]

      optional config ids

    Returns Promise<{
        config: {
            address: string;
            cell: string;
            globalBalance: {
                coins: string;
            };
        };
    }>

    network config

  • Get Last Block

    Returns Promise<{
        init: {
            fileHash: string;
            rootHash: string;
        };
        last: {
            fileHash: string;
            rootHash: string;
            seqno: number;
            shard: string;
            workchain: number;
        };
        now: number;
        stateRootHash: string;
    }>

    last block info

  • Check if account was updated since

    Parameters

    • seqno: number

      block sequence number

    • address: Address

      account address

    • lt: bigint

      account last transaction lt

    Returns Promise<{
        block: {
            fileHash: string;
            rootHash: string;
            seqno: number;
            shard: string;
            workchain: number;
        };
        changed: boolean;
    }>

    account change info

  • Check if contract is deployed

    Parameters

    • seqno: number
    • address: Address

      addres to check

    Returns Promise<boolean>

    true if contract is in active state

  • Open smart contract

    Type Parameters

    • T extends Contract

    Parameters

    • contract: T

      contract

    Returns OpenedContract<T>

    opened contract

  • Open smart contract

    Type Parameters

    • T extends Contract

    Parameters

    • block: number

      block number

    • contract: T

      contract

    Returns OpenedContract<T>

    opened contract

  • Create provider

    Parameters

    • address: Address

      address

    • Optional init: null | StateInit

      optional init data

    Returns ContractProvider

    provider

  • Create provider at specified block number

    Parameters

    • block: number

      block number

    • address: Address

      address

    • Optional init: null | StateInit

      optional init data

    Returns ContractProvider

    provider

  • Execute run method

    Parameters

    • seqno: number

      block sequence number

    • address: Address

      account address

    • name: string

      method name

    • Optional args: TupleItem[]

      method arguments

    Returns Promise<{
        block: {
            fileHash: string;
            rootHash: string;
            seqno: number;
            shard: string;
            workchain: number;
        };
        exitCode: number;
        reader: TupleReader;
        result: TupleItem[];
        resultRaw: null | string;
        shardBlock: {
            fileHash: string;
            rootHash: string;
            seqno: number;
            shard: string;
            workchain: number;
        };
    }>

    method result

  • Send external message

    Parameters

    • message: Buffer

      message boc

    Returns Promise<{
        status: any;
    }>

    message status

Generated using TypeDoc