diff --git a/src/dto/rpc/ton/TonRpcSuite.ts b/src/dto/rpc/ton/TonRpcSuite.ts index 956770cc5..2c04fc684 100644 --- a/src/dto/rpc/ton/TonRpcSuite.ts +++ b/src/dto/rpc/ton/TonRpcSuite.ts @@ -54,6 +54,8 @@ import type { PoolInfo } from './models/PoolInfo'; import type { StorageProvider } from './models/StorageProvider'; import type { Seqno } from './models/Seqno'; import { NftItem } from './models/NftItem' +import { TonResponse } from './models/TonResponse' +import { GetTransactions } from './models/GetTransactions' export interface TonRpcSuite { status(): Promise; @@ -539,4 +541,32 @@ export interface TonRpcSuite { getWalletsByPublicKey(publicKey: string): Promise; getAccountSeqno(accountId: string): Promise; + + // Ton Http API + + // Accounts + getAddressInformation(address: string): Promise; + + getExtendedAddressInformation(address: string): Promise; + + getWalletInformation(address: string): Promise; + + getTransactions(params: GetTransactions): Promise; + + getAddressBalance(address: string): Promise; + + getAddressState(address: string): Promise; + + packAddress(address: string): Promise; + + unpackAddress(address: string): Promise; + + getTokenMetadata(token: string): Promise; + + detectAddress(address: string): Promise; + + // Blocks + getMasterchainInfo(): Promise; + + getMasterchainBlockSignatures(seqno: number): Promise; } diff --git a/src/dto/rpc/ton/models/Body_estimate_fee_estimateFee_post.ts b/src/dto/rpc/ton/models/Body_estimate_fee_estimateFee_post.ts new file mode 100644 index 000000000..7e1f108c3 --- /dev/null +++ b/src/dto/rpc/ton/models/Body_estimate_fee_estimateFee_post.ts @@ -0,0 +1,26 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type Body_estimate_fee_estimateFee_post = { + /** + * Address in any format + */ + address: string; + /** + * b64-encoded cell with message body + */ + body: string; + /** + * b64-encoded cell with init-code + */ + init_code?: string; + /** + * b64-encoded cell with init-data + */ + init_data?: string; + /** + * If true during test query processing assume that all chksig operations return True + */ + ignore_chksig?: boolean; +}; diff --git a/src/dto/rpc/ton/models/Body_run_get_method_runGetMethod_post.ts b/src/dto/rpc/ton/models/Body_run_get_method_runGetMethod_post.ts new file mode 100644 index 000000000..3299d15e1 --- /dev/null +++ b/src/dto/rpc/ton/models/Body_run_get_method_runGetMethod_post.ts @@ -0,0 +1,22 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type Body_run_get_method_runGetMethod_post = { + /** + * Contract address + */ + address: string; + /** + * Method name or method id + */ + method: (string | number); + /** + * Array of stack elements: `[['num',3], ['cell', cell_object], ['slice', slice_object]]` + */ + stack: Array>; + /** + * Seqno of masterchain block at which moment the Get Method is to be executed + */ + seqno?: number; +}; diff --git a/src/dto/rpc/ton/models/Body_send_boc_return_hash_sendBocReturnHash_post.ts b/src/dto/rpc/ton/models/Body_send_boc_return_hash_sendBocReturnHash_post.ts new file mode 100644 index 000000000..26d6c9472 --- /dev/null +++ b/src/dto/rpc/ton/models/Body_send_boc_return_hash_sendBocReturnHash_post.ts @@ -0,0 +1,10 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type Body_send_boc_return_hash_sendBocReturnHash_post = { + /** + * b64 encoded bag of cells + */ + boc: string; +}; diff --git a/src/dto/rpc/ton/models/Body_send_boc_sendBoc_post.ts b/src/dto/rpc/ton/models/Body_send_boc_sendBoc_post.ts new file mode 100644 index 000000000..f7de174cc --- /dev/null +++ b/src/dto/rpc/ton/models/Body_send_boc_sendBoc_post.ts @@ -0,0 +1,10 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type Body_send_boc_sendBoc_post = { + /** + * b64 encoded bag of cells + */ + boc: string; +}; diff --git a/src/dto/rpc/ton/models/Body_send_query_sendQuery_post.ts b/src/dto/rpc/ton/models/Body_send_query_sendQuery_post.ts new file mode 100644 index 000000000..c9b747f9e --- /dev/null +++ b/src/dto/rpc/ton/models/Body_send_query_sendQuery_post.ts @@ -0,0 +1,22 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type Body_send_query_sendQuery_post = { + /** + * Address in any format + */ + address: string; + /** + * b64-encoded boc-serialized cell with message body + */ + body: string; + /** + * b64-encoded boc-serialized cell with init-code + */ + init_code?: string; + /** + * b64-encoded boc-serialized cell with init-data + */ + init_data?: string; +}; diff --git a/src/dto/rpc/ton/models/DeprecatedTonResponseJsonRPC.ts b/src/dto/rpc/ton/models/DeprecatedTonResponseJsonRPC.ts new file mode 100644 index 000000000..3ba5fe1c1 --- /dev/null +++ b/src/dto/rpc/ton/models/DeprecatedTonResponseJsonRPC.ts @@ -0,0 +1,12 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type DeprecatedTonResponseJsonRPC = { + ok: boolean; + result?: any; + error?: string; + code?: number; + id: string; + jsonrpc?: string; +}; diff --git a/src/dto/rpc/ton/models/GetShardBlockProof.ts b/src/dto/rpc/ton/models/GetShardBlockProof.ts new file mode 100644 index 000000000..05522636b --- /dev/null +++ b/src/dto/rpc/ton/models/GetShardBlockProof.ts @@ -0,0 +1,6 @@ +export interface GetShardBlockProof { + workchain: number + shard: number + seqno: number + from_seqno?: number +} diff --git a/src/dto/rpc/ton/models/GetTransactions.ts b/src/dto/rpc/ton/models/GetTransactions.ts new file mode 100644 index 000000000..10e3f45e4 --- /dev/null +++ b/src/dto/rpc/ton/models/GetTransactions.ts @@ -0,0 +1,8 @@ +export interface GetTransactions { + address: string + limit?: number + It?: number + hash?: string + to_It?: number + archival?: boolean +} diff --git a/src/dto/rpc/ton/models/TonRequestJsonRPC.ts b/src/dto/rpc/ton/models/TonRequestJsonRPC.ts new file mode 100644 index 000000000..0d6c0542b --- /dev/null +++ b/src/dto/rpc/ton/models/TonRequestJsonRPC.ts @@ -0,0 +1,10 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type TonRequestJsonRPC = { + method: string; + params?: any; + id?: string; + jsonrpc?: string; +}; diff --git a/src/dto/rpc/ton/models/TonResponse.ts b/src/dto/rpc/ton/models/TonResponse.ts new file mode 100644 index 000000000..803aed42b --- /dev/null +++ b/src/dto/rpc/ton/models/TonResponse.ts @@ -0,0 +1,10 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type TonResponse = { + ok: boolean; + result?: string; + error?: string; + code?: number; +};