Class HttpApi

Hierarchy

  • HttpApi

Constructors

Properties

cache: TonCache
endpoint: string
parameters: HttpApiResolvedParameters
shardCache: TypedCache<number, {
    @type: "ton.blockIdExt";
    file_hash: string;
    root_hash: string;
    seqno: number;
    shard: string;
    workchain: number;
}[]>
shardLoader: DataLoader<number, {
    @type: "ton.blockIdExt";
    file_hash: string;
    root_hash: string;
    seqno: number;
    shard: string;
    workchain: number;
}[], number>
shardTransactionsCache: TypedCache<{
    seqno: number;
    shard: string;
    workchain: number;
}, {
    id: { '@type': "ton.blockIdExt"; workchain: number; shard: string; seqno: number; root_hash: string; file_hash: string; };
    incomplete: boolean;
    req_count: number;
    transactions: ({ '@type': "blocks.shortTxId"; mode: number; account: string; lt: string; hash: string; })[];
}>
shardTransactionsLoader: DataLoader<{
    seqno: number;
    shard: string;
    workchain: number;
}, {
    id: { '@type': "ton.blockIdExt"; workchain: number; shard: string; seqno: number; root_hash: string; file_hash: string; };
    incomplete: boolean;
    req_count: number;
    transactions: ({ '@type': "blocks.shortTxId"; mode: number; account: string; lt: string; hash: string; })[];
}, string>

Methods

  • Parameters

    Returns Promise<{
        exit_code: number;
        gas_used: number;
        stack: unknown[];
    }>

  • Type Parameters

    • T

    Parameters

    • method: string
    • body: any
    • codec: Type<T, T, unknown>

    Returns Promise<T>

  • Parameters

    • address: Address
    • args: {
          body: Cell;
          ignoreSignature: boolean;
          initCode: null | Cell;
          initData: null | Cell;
      }
      • body: Cell
      • ignoreSignature: boolean
      • initCode: null | Cell
      • initData: null | Cell

    Returns Promise<{
        @type: "query.fees";
        source_fees: { '@type': "fees"; in_fwd_fee: number; storage_fee: number; gas_fee: number; fwd_fee: number; };
    }>

  • Parameters

    Returns Promise<{
        balance: string | number;
        block_id: { '@type': "ton.blockIdExt"; workchain: number; shard: string; seqno: number; root_hash: string; file_hash: string; };
        code: string;
        data: string;
        last_transaction_id: { '@type': "internal.transactionId"; lt: string; hash: string; };
        state: "active" | "uninitialized" | "frozen";
        sync_utime: number;
    }>

  • Parameters

    • workchain: number
    • seqno: number
    • shard: string

    Returns Promise<{
        id: { '@type': "ton.blockIdExt"; workchain: number; shard: string; seqno: number; root_hash: string; file_hash: string; };
        incomplete: boolean;
        req_count: number;
        transactions: ({ '@type': "blocks.shortTxId"; mode: number; account: string; lt: string; hash: string; })[];
    }>

  • Returns Promise<{
        init: { '@type': "ton.blockIdExt"; workchain: number; shard: string; seqno: number; root_hash: string; file_hash: string; };
        last: { '@type': "ton.blockIdExt"; workchain: number; shard: string; seqno: number; root_hash: string; file_hash: string; };
        state_root_hash: string;
    }>

  • Parameters

    • seqno: number

    Returns Promise<{
        @type: "ton.blockIdExt";
        file_hash: string;
        root_hash: string;
        seqno: number;
        shard: string;
        workchain: number;
    }[]>

  • Parameters

    • address: Address
    • lt: string
    • hash: string

    Returns Promise<null | {
        data: string;
        fee: string;
        in_msg: undefined | ({ source: string; destination: string; value: string; fwd_fee: string; ihr_fee: string; created_lt: string; body_hash: string; msg_data: { '@type': "msg.dataRaw"; body: string; } | { '@type': "msg.dataText"; text: string; } | { ...; } | { ...; }; });
        other_fee: string;
        out_msgs: ({ source: string; destination: string; value: string; fwd_fee: string; ihr_fee: string; created_lt: string; body_hash: string; msg_data: { '@type': "msg.dataRaw"; body: string; } | { '@type': "msg.dataText"; text: string; } | { ...; } | { ...; }; })[];
        storage_fee: string;
        transaction_id: { lt: string; hash: string; };
        utime: number;
    }>

  • Parameters

    • address: Address
    • opts: {
          hash?: string;
          inclusive?: boolean;
          limit: number;
          lt?: string;
          to_lt?: string;
      }
      • Optional hash?: string
      • Optional inclusive?: boolean
      • limit: number
      • Optional lt?: string
      • Optional to_lt?: string

    Returns Promise<{
        data: string;
        fee: string;
        in_msg: undefined | ({ source: string; destination: string; value: string; fwd_fee: string; ihr_fee: string; created_lt: string; body_hash: string; msg_data: { '@type': "msg.dataRaw"; body: string; } | { '@type': "msg.dataText"; text: string; } | { ...; } | { ...; }; });
        other_fee: string;
        out_msgs: ({ source: string; destination: string; value: string; fwd_fee: string; ihr_fee: string; created_lt: string; body_hash: string; msg_data: { '@type': "msg.dataRaw"; body: string; } | { '@type': "msg.dataText"; text: string; } | { ...; } | { ...; }; })[];
        storage_fee: string;
        transaction_id: { lt: string; hash: string; };
        utime: number;
    }[]>

Generated using TypeDoc