TON SDK Documentation - v15.3.1duck0.0.3
    Preparing search index...

    Class HttpApi

    Index

    Constructors

    Properties

    cache: TonCache
    endpoint: string

    Methods

    • Parameters

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

    • Parameters

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

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

    • Parameters

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

    • Parameters

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

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

    • Returns Promise<
          {
              init: {
                  "@type": "ton.blockIdExt";
                  file_hash: string;
                  root_hash: string;
                  seqno: number;
                  shard: string;
                  workchain: number;
              };
              last: {
                  "@type": "ton.blockIdExt";
                  file_hash: string;
                  root_hash: string;
                  seqno: number;
                  shard: string;
                  workchain: number;
              };
              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?: {
                  body_hash: string;
                  created_lt: string;
                  destination: string;
                  fwd_fee: string;
                  ihr_fee: string;
                  message?: string;
                  msg_data: (
                      | { "@type": "msg.dataRaw"; body: string }
                      | { "@type": "msg.dataText"; text: string }
                      | { "@type": "msg.dataDecryptedText"; text: string }
                      | { "@type": "msg.dataEncryptedText"; text: string }
                  ) & (
                      | undefined
                      | { "@type": "msg.dataRaw"; body: string }
                      | { "@type": "msg.dataText"; text: string }
                      | { "@type": "msg.dataDecryptedText"; text: string }
                      | { "@type": "msg.dataEncryptedText"; text: string }
                  );
                  source: string;
                  value: string;
              };
              other_fee: string;
              out_msgs: {
                  body_hash: string;
                  created_lt: string;
                  destination: string;
                  fwd_fee: string;
                  ihr_fee: string;
                  message?: string;
                  msg_data: (
                      | { "@type": "msg.dataRaw"; body: string }
                      | { "@type": "msg.dataText"; text: string }
                      | { "@type": "msg.dataDecryptedText"; text: string }
                      | { "@type": "msg.dataEncryptedText"; text: string }
                  ) & (
                      | undefined
                      | { "@type": "msg.dataRaw"; body: string }
                      | { "@type": "msg.dataText"; text: string }
                      | { "@type": "msg.dataDecryptedText"; text: string }
                      | { "@type": "msg.dataEncryptedText"; text: string }
                  );
                  source: string;
                  value: string;
              }[];
              storage_fee: string;
              transaction_id: { hash: string; lt: string };
              utime: number;
          },
      >

    • Parameters

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

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

    • Parameters

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

    • Parameters

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