UNPKG

tonapi-sdk-js

Version:
1,947 lines 166 kB
export interface Error { /** @example "error description" */ error: string; } export interface AccountAddress { /** * @format maybe-address * @example "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" */ address: string; /** * Display name. Data collected from different sources like moderation lists, dns, collections names and over. * @example "Ton foundation" */ name?: string; /** * Is this account was marked as part of scammers activity * @example true */ is_scam: boolean; /** @example "https://ton.org/logo.png" */ icon?: string; /** @example true */ is_wallet: boolean; } export interface BlockCurrencyCollection { /** * @format int64 * @example 10000000000 */ grams: number; other: { /** * @format int64 * @example 13 */ id: number; /** @example "10000000000" */ value: string; }[]; } export interface BlockValueFlow { from_prev_blk: BlockCurrencyCollection; to_next_blk: BlockCurrencyCollection; imported: BlockCurrencyCollection; exported: BlockCurrencyCollection; fees_collected: BlockCurrencyCollection; burned?: BlockCurrencyCollection; fees_imported: BlockCurrencyCollection; recovered: BlockCurrencyCollection; created: BlockCurrencyCollection; minted: BlockCurrencyCollection; } export interface ServiceStatus { /** @default true */ rest_online: boolean; /** @example 100 */ indexing_latency: number; /** * @format int32 * @example 123456 */ last_known_masterchain_seqno: number; } export interface ReducedBlock { /** * @format int32 * @example 0 */ workchain_id: number; /** @example "8000000000000000" */ shard: string; /** * @format int32 * @example 21734019 */ seqno: number; /** @example "(-1,4234234,8000000000000000)" */ master_ref?: string; /** @example 130 */ tx_quantity: number; /** * @format int64 * @example 23814011000000 */ utime: number; shards_blocks: string[]; parent: string[]; } export interface BlockchainBlock { /** @example 130 */ tx_quantity: number; value_flow: BlockValueFlow; /** * @format int32 * @example 0 */ workchain_id: number; /** @example "8000000000000000" */ shard: string; /** * @format int32 * @example 21734019 */ seqno: number; /** @example "131D0C65055F04E9C19D687B51BC70F952FD9CA6F02C2801D3B89964A779DF85" */ root_hash: string; /** @example "A6A0BD6608672B11B79538A50B2204E748305C12AA0DED9C16CF0006CE3AF8DB" */ file_hash: string; /** * @format int32 * @example -239 */ global_id: number; /** * @format int32 * @example 0 */ version: number; /** @example true */ after_merge: boolean; /** @example true */ before_split: boolean; /** @example true */ after_split: boolean; /** @example true */ want_split: boolean; /** @example true */ want_merge: boolean; /** @example true */ key_block: boolean; /** * @format int64 * @example 1674826775 */ gen_utime: number; /** * @format int64 * @example 23814011000000 */ start_lt: number; /** * @format int64 * @example 23814011000001 */ end_lt: number; /** * @format int32 * @example 0 */ vert_seqno: number; /** * @format int32 * @example 0 */ gen_catchain_seqno: number; /** * @format int32 * @example 0 */ min_ref_mc_seqno: number; /** * @format int32 * @example 0 */ prev_key_block_seqno: number; /** * @format int32 * @example 0 */ gen_software_version?: number; /** * @format int64 * @example 0 */ gen_software_capabilities?: number; /** @example "(-1,4234234,8000000000000000)" */ master_ref?: string; prev_refs: string[]; /** * @format int64 * @example 0 */ in_msg_descr_length: number; /** * @format int64 * @example 0 */ out_msg_descr_length: number; /** @example "131D0C65055F04E9C19D687B51BC70F952FD9CA6F02C2801D3B89964A779DF85" */ rand_seed: string; /** @example "A6A0BD6608672B11B79538A50B2204E748305C12AA0DED9C16CF0006CE3AF8DB" */ created_by: string; } export interface BlockchainBlocks { blocks: BlockchainBlock[]; } export interface ReducedBlocks { blocks: ReducedBlock[]; } export interface BlockchainBlockShards { shards: { /** @example "(0,8000000000000000,4234234)" */ last_known_block_id: string; last_known_block: BlockchainBlock; }[]; } /** @example "active" */ export declare enum AccountStatus { Nonexist = "nonexist", Uninit = "uninit", Active = "active", Frozen = "frozen" } export interface StateInit { /** * @format cell * @example "b5ee9c72010106010044000114ff00f4a413f4bcf2c80b01020120020302014804050004f2300038d06c21d31f30ed44d0d33f3001c00197a4c8cb3fc9ed549330f206e20011a13431da89a1a67e61" */ boc: string; interfaces: string[]; } export interface Message { /** @example "int_msg" */ msg_type: "int_msg" | "ext_in_msg" | "ext_out_msg"; /** * @format int64 * @example 25713146000001 */ created_lt: number; /** @example true */ ihr_disabled: boolean; /** @example true */ bounce: boolean; /** @example true */ bounced: boolean; /** * @format int64 * @example 60000000 */ value: number; value_extra?: ExtraCurrency[]; /** * @format int64 * @example 5681002 */ fwd_fee: number; /** * @format int64 * @example 5681002 */ ihr_fee: number; destination?: AccountAddress; source?: AccountAddress; /** * @format int64 * @example 5681002 */ import_fee: number; /** * @format int64 * @example 5681002 */ created_at: number; /** @example "0xdeadbeaf" */ op_code?: string; init?: StateInit; /** @example "1219de582369ac80ee1afe12147930f458a54ff1eea612611a8bc6bd31581a6c" */ hash: string; /** * hex-encoded BoC with raw message body * @format cell * @example "B5EE9C7201010101001100001D00048656C6C6F2C20776F726C64218" */ raw_body?: string; /** @example "nft_transfer" */ decoded_op_name?: string; decoded_body?: any; } /** @example "TransOrd" */ export declare enum TransactionType { TransOrd = "TransOrd", TransTickTock = "TransTickTock", TransSplitPrepare = "TransSplitPrepare", TransSplitInstall = "TransSplitInstall", TransMergePrepare = "TransMergePrepare", TransMergeInstall = "TransMergeInstall", TransStorage = "TransStorage" } /** @example "acst_unchanged" */ export declare enum AccStatusChange { AcstUnchanged = "acst_unchanged", AcstFrozen = "acst_frozen", AcstDeleted = "acst_deleted" } /** @example "cskip_no_state" */ export declare enum ComputeSkipReason { CskipNoState = "cskip_no_state", CskipBadState = "cskip_bad_state", CskipNoGas = "cskip_no_gas", CskipSuspended = "cskip_suspended" } /** @example "cskip_no_state" */ export declare enum BouncePhaseType { TrPhaseBounceNegfunds = "TrPhaseBounceNegfunds", TrPhaseBounceNofunds = "TrPhaseBounceNofunds", TrPhaseBounceOk = "TrPhaseBounceOk" } export interface ComputePhase { /** @example true */ skipped: boolean; skip_reason?: ComputeSkipReason; /** @example true */ success?: boolean; /** * @format int64 * @example 1000 */ gas_fees?: number; /** * @format int64 * @example 10000 */ gas_used?: number; /** * @format int32 * @example 5 */ vm_steps?: number; /** * @format int32 * @example 0 */ exit_code?: number; exit_code_description?: string; } export interface StoragePhase { /** * @format int64 * @example 25713146000001 */ fees_collected: number; /** * @format int64 * @example 25713146000001 */ fees_due?: number; status_change: AccStatusChange; } export interface CreditPhase { /** * @format int64 * @example 100 */ fees_collected: number; /** * @format int64 * @example 1000 */ credit: number; } export interface ActionPhase { /** @example true */ success: boolean; /** * @format int32 * @example 5 */ result_code: number; /** * @format int32 * @example 5 */ total_actions: number; /** * @format int32 * @example 5 */ skipped_actions: number; /** * @format int64 * @example 1000 */ fwd_fees: number; /** * @format int64 * @example 1000 */ total_fees: number; result_code_description?: string; } export interface Transaction { /** @example "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" */ hash: string; /** * @format int64 * @example 25713146000001 */ lt: number; account: AccountAddress; /** @example true */ success: boolean; /** * @format int64 * @example 1645544908 */ utime: number; orig_status: AccountStatus; end_status: AccountStatus; /** * @format int64 * @example 25713146000001 */ total_fees: number; /** * @format int64 * @example 25713146000001 */ end_balance: number; transaction_type: TransactionType; /** @example "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" */ state_update_old: string; /** @example "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" */ state_update_new: string; in_msg?: Message; out_msgs: Message[]; /** @example "(-1,4234234,8000000000000000)" */ block: string; /** @example "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" */ prev_trans_hash?: string; /** * @format int64 * @example 25713146000001 */ prev_trans_lt?: number; compute_phase?: ComputePhase; storage_phase?: StoragePhase; credit_phase?: CreditPhase; action_phase?: ActionPhase; bounce_phase?: BouncePhaseType; /** @example true */ aborted: boolean; /** @example true */ destroyed: boolean; /** * hex encoded boc with raw transaction * @format cell * @example "b5ee9c72410206010001380003b372cf3b5b8c891e517c9addbda1c0386a09ccacbb0e3faf630b51cfc8152325acb00002ac5795c0e41fdf79135cb7da03cc623b165d614b562a51eeccd8a5e097f405abf6b37f4e73000002ac5629732c1666887ed000144030480102030101a004008272abc8f2971aa4404ac6da1597720f348b2e1247b1ad9f55cbd3b6812f0a5f08b269bb65039fb1f6074d00f794e857f6dfd01131d299df456af10a8a4943d4d165000d0c80608840492001ab48015581f575c3b8c6ab3d6" */ raw: string; } export interface Transactions { transactions: Transaction[]; } export interface ConfigProposalSetup { /** @example 2 */ min_tot_rounds: number; /** @example 6 */ max_tot_rounds: number; /** @example 2 */ min_wins: number; /** @example 6 */ max_losses: number; /** * @format int64 * @example 1000000 */ min_store_sec: number; /** * @format int64 * @example 10000000 */ max_store_sec: number; /** * @format int64 * @example 1 */ bit_price: number; /** * @format int64 * @example 500 */ cell_price: number; } export interface GasLimitPrices { /** @format int64 */ special_gas_limit?: number; /** @format int64 */ flat_gas_limit?: number; /** @format int64 */ flat_gas_price?: number; /** * @format int64 * @example 1 */ gas_price: number; /** * @format int64 * @example 1000000 */ gas_limit: number; /** * @format int64 * @example 1000000 */ gas_credit: number; /** * @format int64 * @example 1000000 */ block_gas_limit: number; /** * @format int64 * @example 1000000 */ freeze_due_limit: number; /** * @format int64 * @example 1000000 */ delete_due_limit: number; } export interface BlockParamLimits { /** * @format int64 * @example 1000000 */ underload: number; /** * @format int64 * @example 1000000 */ soft_limit: number; /** * @format int64 * @example 1000000 */ hard_limit: number; } export interface BlockLimits { bytes: BlockParamLimits; gas: BlockParamLimits; lt_delta: BlockParamLimits; } export interface MsgForwardPrices { /** * @format int64 * @example 1000000 */ lump_price: number; /** * @format int64 * @example 1000000 */ bit_price: number; /** * @format int64 * @example 1000000 */ cell_price: number; /** * @format int64 * @example 1000000 */ ihr_price_factor: number; /** * @format int64 * @example 1000000 */ first_frac: number; /** * @format int64 * @example 1000000 */ next_frac: number; } export interface WorkchainDescr { /** * @format int * @example 0 */ workchain: number; /** * @format int64 * @example 1000000 */ enabled_since: number; /** * @format int * @example 1000000 */ actual_min_split: number; /** * @format int * @example 1000000 */ min_split: number; /** * @format int * @example 1000000 */ max_split: number; /** @example 1000000 */ basic: number; /** @example true */ active: boolean; /** @example true */ accept_msgs: boolean; /** * @format int * @example 1000000 */ flags: number; /** @example "131D0C65055F04E9C19D687B51BC70F952FD9CA6F02C2801D3B89964A779DF85" */ zerostate_root_hash: string; /** @example "A6A0BD6608672B11B79538A50B2204E748305C12AA0DED9C16CF0006CE3AF8DB" */ zerostate_file_hash: string; /** * @format int64 * @example 1000000 */ version: number; } export interface MisbehaviourPunishmentConfig { /** * @format int64 * @example 1000000 */ default_flat_fine: number; /** * @format int64 * @example 1000000 */ default_proportional_fine: number; /** @example 1000000 */ severity_flat_mult: number; /** @example 1000000 */ severity_proportional_mult: number; /** @example 1000000 */ unpunishable_interval: number; /** @example 1000000 */ long_interval: number; /** @example 1000000 */ long_flat_mult: number; /** @example 1000000 */ long_proportional_mult: number; /** @example 1000000 */ medium_interval: number; /** @example 1000000 */ medium_flat_mult: number; /** @example 1000000 */ medium_proportional_mult: number; } export interface SizeLimitsConfig { /** * @format int64 * @example 1000000 */ max_msg_bits: number; /** * @format int64 * @example 1000000 */ max_msg_cells: number; /** * @format int64 * @example 1000000 */ max_library_cells: number; /** * @format int * @example 1000000 */ max_vm_data_depth: number; /** * @format int64 * @example 1000000 */ max_ext_msg_size: number; /** * @format int * @example 1000000 */ max_ext_msg_depth: number; /** * @format int64 * @example 1000000 */ max_acc_state_cells?: number; /** * @format int64 * @example 1000000 */ max_acc_state_bits?: number; } export interface NewConsensusConfig { /** * @format int * @example 0 */ flags: number; /** @example false */ use_quic: boolean; /** * @format int64 * @example 1000 */ target_rate_ms?: number; /** * @format int64 * @example 1 */ slots_per_leader_window: number; /** * @format int64 * @example 1000 */ first_block_timeout_ms?: number; /** * @format int64 * @example 4 */ max_leader_window_desync?: number; noncritical_params?: Record<string, number>; } export interface ValidatorsSet { utime_since: number; utime_until: number; total: number; main: number; /** @example "1152921504606846800" */ total_weight?: string; list: { public_key: string; /** @format int64 */ weight: number; /** @example "45061C1D4EC44A937D0318589E13C73D151D1CEF5D3C0E53AFBCF56A6C2FE2BD" */ adnl_addr?: string; }[]; } export interface Oracle { /** * @format address * @example "0:55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" */ address: string; /** @example "00000000000000000000000017dcab1b1481610f6c7a7a98cf0370dc0ec704a6" */ secp_pubkey: string; } export interface OracleBridgeParams { /** @format address */ bridge_addr: string; /** @format address */ oracle_multisig_address: string; external_chain_address: string; oracles: Oracle[]; } export interface JettonBridgePrices { /** @format int64 */ bridge_burn_fee: number; /** @format int64 */ bridge_mint_fee: number; /** * this field will gone after Sept. 2026, use wallet_min_gram_for_storage instead * @deprecated * @format int64 */ wallet_min_tons_for_storage?: number; /** @format int64 */ wallet_min_gram_for_storage: number; /** @format int64 */ wallet_gas_consumption: number; /** * this field will gone after Sept. 2026, use wallet_min_gram_for_storage instead * @deprecated * @format int64 */ minter_min_tons_for_storage?: number; /** @format int64 */ minter_min_gram_for_storage: number; /** @format int64 */ discover_gas_consumption: number; } export interface JettonBridgeParams { /** @format address */ bridge_address: string; /** @format address */ oracles_address: string; state_flags: number; /** @format int64 */ burn_bridge_fee?: number; oracles: Oracle[]; external_chain_address?: string; prices?: JettonBridgePrices; } export interface Validator { /** * @format address * @example "0:55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" */ address: string; /** @example "10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" */ adnl_address: string; /** * @format int64 * @example 123456789 */ stake: number; /** * @format int64 * @example 123456789 */ max_factor: number; } export interface Validators { /** * @format int64 * @example 123456789 */ elect_at: number; /** * @format int64 * @example 123456789 */ elect_close: number; /** * @format int64 * @example 123456789 */ min_stake: number; /** * @format int64 * @example 123456789 */ total_stake: number; validators: Validator[]; } export interface AccountStorageInfo { /** * @format int64 * @example 567 */ used_cells: number; /** * @format int64 * @example 567 */ used_bits: number; /** * @format int64 * @example 567 */ used_public_cells: number; /** * time of the last payment * @format int64 * @example 1720860269 */ last_paid: number; /** * @format int64 * @example 567 */ due_payment: number; } export interface BlockchainRawAccount { /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ address: string; /** * @format int64 * @example 123456789 */ balance: number; extra_balance?: ExtraCurrency[]; /** * @format cell * @example "b5ee9c72410104010087000114ff00f4a413f4a0f2c80b0102012002030002d200dfa5ffff76a268698fe9ffe8e42c5267858f90e785ffe4f6aa6467c444ffb365ffc10802faf0807d014035e7a064b87d804077e7857fc10803dfd2407d014035e7a064b86467cd8903a32b9ba4410803ade68afd014035e7a045ea432b6363796103bb7b9363210c678b64b87d807d8040c249b3e4" */ code?: string; /** * @format cell * @example "b5ee9c7241010101002600004811fd096c0000000000000000000000000000000000000000000000000000000000000000cb78264d" */ data?: string; /** * @format int64 * @example 123456789 */ last_transaction_lt: number; /** @example "088b436a846d92281734236967970612f87fbd64a2cd3573107948379e8e4161" */ last_transaction_hash?: string; /** @example "088b436a846d92281734236967970612f87fbd64a2cd3573107948379e8e4161" */ frozen_hash?: string; status: AccountStatus; storage: AccountStorageInfo; libraries?: { /** @example true */ public: boolean; /** @format cell */ root: string; }[]; } export interface BlockchainRawAccounts { accounts: BlockchainRawAccount[]; } export interface BlockchainLibrary { /** * @format cell * @example "b5ee9c7201010101005f0000baff0020dd2082014c97ba218201339cbab19c71b0ed44d0d31fd70bffe304e0a4f260810200d71820d70b1fed44d0d31fd3ffd15112baf2a122f901541044f910f2a2f80001d31f3120d74a96d307d402fb00ded1a4c8cb1fcbffc9ed54" */ boc: string; } export interface WalletStats { /** * @format int32 * @example 123456789 */ nfts_count: number; /** * @format int32 * @example 123456789 */ jettons_count: number; /** * @format int32 * @example 123456789 */ multisig_count: number; /** * @format int32 * @example 123456789 */ staking_count: number; } export interface WalletPlugin { /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ address: string; /** @example "subscription_v1" */ type: string; status: AccountStatus; } export interface Wallets { accounts: Wallet[]; } export interface WalletsByPublicKeys { /** Wallets grouped by the originating public key */ items: WalletsByPublicKey[]; } export interface WalletsByPublicKey { /** * hex-encoded ed25519 public key * @example "d8519b83d5b04b17a706ef6d04f3566422be47c2b676b0823235d67b1ef4b1b2" */ public_key: string; wallets: Wallet[]; } export interface Wallet { /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ address: string; is_wallet: boolean; /** * @format int64 * @example 123456789 */ balance: number; stats: WalletStats; plugins: WalletPlugin[]; status: AccountStatus; /** * unix timestamp * @format int64 * @example 1720860269 */ last_activity: number; /** @example "Ton foundation" */ name?: string; /** @example "https://ton.org/logo.png" */ icon?: string; /** * @deprecated * @example ["get_item_data"] */ get_methods: string[]; is_suspended?: boolean; signature_disabled?: boolean; interfaces?: string[]; /** * @format int64 * @example 25713146000001 */ last_lt: number; } export interface Account { /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ address: string; /** * @format int64 * @example 123456789 */ balance: number; extra_balance?: ExtraCurrency[]; /** * {'USD': 1, 'IDR': 1000} * @example {} */ currencies_balance?: Record<string, any>; /** * unix timestamp * @format int64 * @example 1720860269 */ last_activity: number; status: AccountStatus; interfaces?: string[]; /** @example "Ton foundation" */ name?: string; /** @example true */ is_scam?: boolean; /** @example "https://ton.org/logo.png" */ icon?: string; /** @example true */ memo_required?: boolean; /** @example ["get_item_data"] */ get_methods: string[]; is_suspended?: boolean; is_wallet: boolean; } export interface Accounts { accounts: Account[]; } export interface GaslessConfig { /** * sending excess to this address decreases the commission of a gasless transfer * @format address * @example "0:dfbd5be8497fdc0c9fcbdfc676864840ddf8ad6423d6d5657d9b0e8270d6c8ac" */ relay_address: string; /** list of jettons, any of them can be used to pay for gas */ gas_jettons: { /** @format address */ master_id: string; }[]; } export interface SignRawMessage { /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ address: string; /** Number of nanocoins to send. Decimal string. */ amount: string; /** * Raw one-cell BoC encoded in hex. * @format cell */ payload?: string; /** * Raw once-cell BoC encoded in hex. * @format cell */ stateInit?: string; } export interface GaslessTx { protocol_name: string; /** Normalized hash of the external message. */ external?: string; } export interface SignRawParams { protocol_name: string; /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ relay_address: string; /** * Commission for the transaction. In nanocoins. * @example "1000000" */ commission: string; /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ from: string; /** * @format int64 * @example 1717397217 */ valid_until: number; messages: SignRawMessage[]; /** Result of emulating a wallet message on the current blockchain state: describes the expected on-chain consequences (trace, high-level AccountEvent, risk) for the signing wallet. For UI display only. */ emulation?: MessageConsequences; } export interface MethodExecutionResult { /** @example true */ success: boolean; /** * tvm exit code * @example 0 */ exit_code: number; stack: TvmStackRecord[]; decoded?: any; } /** @format tuple-item */ export interface TvmStackRecord { /** @example "cell" */ type: "cell" | "num" | "nan" | "null" | "tuple"; /** @format cell */ cell?: string; /** @format cell */ slice?: string; /** @example "" */ num?: string; /** @example [] */ tuple?: TvmStackRecord[]; } export interface RawBlockchainConfig { /** @example {} */ config: Record<string, any>; } export interface BlockchainConfig { /** * config address * @format address */ "0": string; /** * elector address * @format address */ "1": string; /** * minter address * @format address */ "2": string; /** * The address of the transaction fee collector. * @format address */ "3"?: string; /** * dns root address * @format address */ "4": string; "5"?: { /** @format address */ blackhole_addr?: string; /** @format int64 */ fee_burn_nom: number; /** @format int64 */ fee_burn_denom: number; }; /** Minting fees of new currencies. */ "6"?: { /** @format int64 */ mint_new_price: number; /** @format int64 */ mint_add_price: number; }; /** The volume of each of the additional currencies in circulation. */ "7"?: { currencies: { /** @format int64 */ currency_id: number; amount: string; }[]; }; /** The network version and additional capabilities supported by the validators. */ "8"?: { /** @format int64 */ version: number; /** @format int64 */ capabilities: number; }; /** List of mandatory parameters of the blockchain config. */ "9"?: { mandatory_params: number[]; }; /** List of critical TON parameters, the change of which significantly affects the network, so more voting rounds are held. */ "10"?: { critical_params: number[]; }; /** This parameter indicates under what conditions proposals to change the TON configuration are accepted. */ "11"?: { normal_params: ConfigProposalSetup; critical_params: ConfigProposalSetup; }; /** Workchains in the TON Blockchain */ "12"?: { workchains: WorkchainDescr[]; }; /** The cost of filing complaints about incorrect operation of validators. */ "13"?: { /** @format int64 */ deposit: number; /** @format int64 */ bit_price: number; /** @format int64 */ cell_price: number; }; /** The reward in nanoGram for block creation in the TON blockchain. */ "14"?: { /** @format int64 */ masterchain_block_fee: number; /** @format int64 */ basechain_block_fee: number; }; /** The reward in nanograms for block creation in the TON blockchain. */ "15"?: { /** * @format int64 * @example 65536 */ validators_elected_for: number; /** * @format int64 * @example 32768 */ elections_start_before: number; /** * @format int64 * @example 8192 */ elections_end_before: number; /** * @format int64 * @example 32768 */ stake_held_for: number; }; /** The limits on the number of validators in the TON blockchain. */ "16"?: { /** @example 400 */ max_validators: number; /** @example 100 */ max_main_validators: number; /** @example 75 */ min_validators: number; }; /** The stake parameters configuration in the TON blockchain. */ "17"?: { min_stake: string; max_stake: string; min_total_stake: string; /** @format int64 */ max_stake_factor: number; }; /** The prices for data storage. */ "18"?: { storage_prices: { /** * @format int64 * @example 0 */ utime_since: number; /** * @format int64 * @example 1 */ bit_price_ps: number; /** * @format int64 * @example 500 */ cell_price_ps: number; /** * @format int64 * @example 1000 */ mc_bit_price_ps: number; /** * @format int64 * @example 500000 */ mc_cell_price_ps: number; }[]; }; /** The cost of computations in the masterchain. The complexity of any computation is estimated in gas units. */ "20"?: { gas_limits_prices: GasLimitPrices; }; /** The cost of computations in the basechains. The complexity of any computation is estimated in gas units. */ "21"?: { gas_limits_prices: GasLimitPrices; }; /** The limits on the block in the masterchain, upon reaching which the block is finalized and the callback of the remaining messages (if any) is carried over to the next block. */ "22"?: { block_limits: BlockLimits; }; /** The limits on the block in the basechains, upon reaching which the block is finalized and the callback of the remaining messages (if any) is carried over to the next block. */ "23"?: { block_limits: BlockLimits; }; /** The cost of sending messages in the masterchain of the TON blockchain. */ "24"?: { msg_forward_prices: MsgForwardPrices; }; /** The cost of sending messages in the basechains of the TON blockchain. */ "25"?: { msg_forward_prices: MsgForwardPrices; }; /** The configuration for the Catchain protocol. */ "28"?: { /** * @format int64 * @example 1000000 */ mc_catchain_lifetime: number; /** * @format int64 * @example 1000000 */ shard_catchain_lifetime: number; /** * @format int64 * @example 1000000 */ shard_validators_lifetime: number; /** * @format int64 * @example 1000000 */ shard_validators_num: number; /** * @format int * @example 1000000 */ flags?: number; shuffle_mc_validators?: boolean; }; /** The configuration for the consensus protocol above catchain. */ "29"?: { /** * @format int * @example 0 */ flags?: number; /** @example true */ new_catchain_ids?: boolean; /** * @format int64 * @example 3 */ round_candidates: number; /** * @format int64 * @example 2000 */ next_candidate_delay_ms: number; /** * @format int64 * @example 16000 */ consensus_timeout_ms: number; /** * @format int64 * @example 3 */ fast_attempts: number; /** * @format int64 * @example 8 */ attempt_duration: number; /** * @format int64 * @example 4 */ catchain_max_deps: number; /** * @format int64 * @example 2097152 */ max_block_bytes: number; /** * @format int64 * @example 2097152 */ max_collated_bytes: number; /** * @format int64 * @example 2 */ proto_version?: number; /** * @format int64 * @example 10000 */ catchain_max_blocks_coeff?: number; }; /** The configuration for the new consensus protocol. Each chain can have its own optional configuration. */ "30"?: { mc?: NewConsensusConfig; shard?: NewConsensusConfig; }; /** The configuration for the consensus protocol above catchain. */ "31"?: { fundamental_smc_addr: string[]; }; "32"?: ValidatorsSet; "33"?: ValidatorsSet; "34"?: ValidatorsSet; "35"?: ValidatorsSet; "36"?: ValidatorsSet; "37"?: ValidatorsSet; /** The configuration for punishment for improper behavior (non-validation). In the absence of the parameter, the default fine size is 101 Gram */ "40"?: { misbehaviour_punishment_config: MisbehaviourPunishmentConfig; }; /** The size limits and some other characteristics of accounts and messages. */ "43"?: { size_limits_config: SizeLimitsConfig; }; /** suspended accounts */ "44": { accounts: string[]; suspended_until: number; }; /** precompiled contracts */ "45"?: { contracts: { code_hash: string; /** @format int64 */ gas_usage: number; }[]; }; /** Bridge parameters for wrapping TON in other networks. */ "71"?: { oracle_bridge_params: OracleBridgeParams; }; /** Bridge parameters for wrapping TON in other networks. */ "72"?: { oracle_bridge_params: OracleBridgeParams; }; /** Bridge parameters for wrapping TON in other networks. */ "73"?: { oracle_bridge_params: OracleBridgeParams; }; /** Bridge parameters for wrapping tokens from other networks into tokens on the TON network. */ "79"?: { jetton_bridge_params: JettonBridgeParams; }; /** Bridge parameters for wrapping tokens from other networks into tokens on the TON network. */ "81"?: { jetton_bridge_params: JettonBridgeParams; }; /** Bridge parameters for wrapping tokens from other networks into tokens on the TON network. */ "82"?: { jetton_bridge_params: JettonBridgeParams; }; /** * config boc in hex format * @format cell */ raw: string; } export interface DomainNames { domains: string[]; } export interface DomainBid { /** * @default false * @example true */ success: boolean; /** * @format int64 * @example 1660050553 */ value: number; /** * @format int64 * @example 1660050553 */ txTime: number; /** @example "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122" */ txHash: string; bidder: AccountAddress; } export interface DomainBids { data: DomainBid[]; } export declare enum JettonVerificationType { Whitelist = "whitelist", Graylist = "graylist", Blacklist = "blacklist", None = "none" } export interface JettonPreview { /** * @format address * @example "0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0" */ address: string; /** @example "Wrapped TON" */ name: string; /** @example "WTON" */ symbol: string; /** @example 9 */ decimals: number; /** @example "https://cache.tonapi.io/images/jetton.jpg" */ image: string; verification: JettonVerificationType; custom_payload_api_uri?: string; /** @format int32 */ score: number; scaled_ui?: ScaledUI; description?: string; } export interface JettonAssetInfo { token_type: DefiAssetType; type?: DefiAssetType; defi_provider: DefiProvider; pool_assets?: DefiLiquidPoolAssets; } export interface DefiLiquidPoolAssets { asset0: DefiLockedAsset; asset1: DefiLockedAsset; } export interface ScaledUI { /** @example "597968399" */ numerator: string; /** @example "597968399" */ denominator: string; } export interface JettonBalance { /** @example "597968399" */ balance: string; price?: TokenRates; wallet_address: AccountAddress; jetton: JettonPreview; defi_asset?: JettonAssetInfo; /** @example ["custom_payload","non_transferable"] */ extensions?: string[]; lock?: { /** @example "597968399" */ amount: string; /** * @format int64 * @example 1678223064 */ till: number; }; } export interface JettonsBalances { balances: JettonBalance[]; } export interface MigrationWallets { wallets: MigrationWalletValue[]; } export interface MigrationWalletValue { /** * @format address * @example "0:97264395BD65A255A429B11326C84128B7D70FFED7949ABAE3036D506BA38621" */ account: string; /** * TON balance in nanotons * @format int64 */ balance: number; status: AccountStatus; jettons: JettonBalance[]; /** * number of NFTs owned by the account * @format int32 */ nft_count: number; } export interface MigrationPrepareRequest { /** * legacy source wallet to drain * @format address */ from: string; /** * destination wallet TON address * @format address */ to: string; /** * fiat currency for the preview values * @default "USD" * @example "USD" */ currency?: string; } export interface MigrationPrepareResponse { /** @format address */ from: string; /** @format address */ to: string; /** * source wallet version (informational) * @example "v4R2" */ wallet_version: string; /** ordered; sign and broadcast in array order, one entry per external message */ transactions: MigrationTransaction[]; } export interface MigrationTransaction { /** * wallet seqno baked into the unsigned body * @format int32 */ seqno: number; /** base64 BOC of the unsigned wallet body. Sign its hash, prepend the signature, wrap it in an external message and broadcast. */ boc: string; /** Result of emulating a wallet message on the current blockchain state: describes the expected on-chain consequences (trace, high-level AccountEvent, risk) for the signing wallet. For UI display only. */ emulation: MessageConsequences; } /** @example "jetton" */ export declare enum CurrencyType { Native = "native", ExtraCurrency = "extra_currency", Jetton = "jetton", Fiat = "fiat" } export interface VaultDepositInfo { price: Price; /** * @format address * @example "0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0" */ vault: string; } export interface Price { currency_type: CurrencyType; /** @example "123000000000" */ value: string; /** @example 9 */ decimals: number; /** @example "Gram" */ token_name: string; verification: TrustType; /** @example "https://cache.tonapi.io/images/jetton.jpg" */ image: string; /** * @format address * @example "0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0" */ jetton?: string; } export interface ImagePreview { /** @example "100x100" */ resolution: string; /** @example "https://site.com/pic1.jpg" */ url: string; } export type NftApprovedBy = ("getgems" | "tonkeeper")[]; /** @example "whitelist" */ export declare enum TrustType { Whitelist = "whitelist", Graylist = "graylist", Blacklist = "blacklist", None = "none" } export interface Sale { /** * @format address * @example "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365" */ address: string; market: AccountAddress; owner?: AccountAddress; price: Price; } export interface NftItem { /** * @format address * @example "0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B" */ address: string; /** * @format int64 * @example 58 */ index: number; owner?: AccountAddress; collection?: { /** * @format address * @example "0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B" */ address: string; /** @example "TON Diamonds" */ name: string; /** @example "Best collection in TON network" */ description: string; }; /** * Collection master contract confirmed that this item is part of collection * @example true */ verified: boolean; /** @example {} */ metadata: Record<string, any>; sale?: Sale; previews?: ImagePreview[]; /** @example "crypto.ton" */ dns?: string; /** * Please use trust field * @deprecated */ approved_by: NftApprovedBy; /** @example false */ include_cnft?: boolean; trust: TrustType; /** Hash of the NFT item account code cell (hex) */ code_hash?: string; /** Hash of the NFT item account data cell (hex) */ data_hash?: string; } export interface NftItems { nft_items: NftItem[]; } export interface Multisigs { multisigs: Multisig[]; } export interface Multisig { /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ address: string; seqno: string; /** @format int32 */ threshold: number; signers: string[]; proposers: string[]; orders: MultisigOrder[]; } export interface MultisigOrder { /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ address: string; order_seqno: string; /** @format int32 */ threshold: number; /** @example false */ sent_for_execution: boolean; signers: string[]; /** @format int32 */ approvals_num: number; /** @format int64 */ expiration_date: number; /** Conservative upper bound on assets this wallet may lose if the emulated message is sent and the counterparty behaves maliciously. Values may exceed current balances (e.g. already-authorized future receipts). For UI display only. */ risk: Risk; /** @format int64 */ creation_date: number; signed_by: string[]; /** * @format address * @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ multisig_address: string; changing_parameters?: { /** @format int32 */ threshold: number; signers: string[]; proposers: string[]; }; } export interface Refund { /** @example "DNS.ton" */ type: "DNS.ton" | "DNS.tg" | "GetGems"; /** @example "0:da6b1b6663a0e4d18cc8574ccd9db5296e367dd9324706f3bbd9eb1cd2caf0bf" */ origin: string; } export interface ValueFlow { account: AccountAddress; /** * this field will gone after Sept. 2026, use gram instead * @deprecated * @format int64 * @example 80 */ ton?: number; /** * @format int64 * @example 80 */ gram: number; /** * @format int64 * @example 10 */ fees: number; jettons?: { account: AccountAddress; jetton: JettonPreview; /** @example "200" */ qty: string; /** * @deprecated * @format int64 * @example 10 */ quantity: number; }[]; } export interface Action { /** @example "TonTransfer" */ type: "TonTransfer" | "ExtraCurrencyTransfer" | "ContractDeploy" | "JettonTransfer" | "FlawedJettonTransfer" | "JettonBurn" | "JettonMint" | "NftItemTransfer" | "Subscribe" | "UnSubscribe" | "AuctionBid" | "NftPurchase" | "DepositStake" | "WithdrawStake" | "WithdrawStakeRequest" | "ElectionsDepositStake" | "ElectionsRecoverStake" | "JettonSwap" | "SmartContractExec" | "DomainRenew" | "Purchase" | "AddExtension" | "RemoveExtension" | "SetSignatureAllowedAction" | "GasRelay" | "DepositTokenStake" | "WithdrawTokenStakeRequest" | "LiquidityDeposit" | "OracleRequest" | "DepositXTR" | "WithdrawXTR" | "Unknown"; /** @example "ok" */ status: "ok" | "failed"; TonTransfer?: TonTransferAction; ExtraCurrencyTransfer?: ExtraCurrencyTransferAction; ContractDeploy?: ContractDeployAction; JettonTransfer?: JettonTransferAction; FlawedJettonTransfer?: FlawedJettonTransferAction; JettonBurn?: JettonBurnAction; JettonMint?: JettonMintAction; NftItemTransfer?: NftItemTransferAction; Subscribe?: SubscriptionAction; UnSubscribe?: UnSubscriptionAction; AuctionBid?: AuctionBidAction; NftPurchase?: NftPurchaseAction; /** validator's participation in elections */ DepositStake?: DepositStakeAction; /** validator's participation in elections */ WithdrawStake?: WithdrawStakeAction; /** validator's participation in elections */ WithdrawStakeRequest?: WithdrawStakeRequestAction; ElectionsDepositStake?: ElectionsDepositStakeAction; ElectionsRecoverStake?: ElectionsRecoverStakeAction; JettonSwap?: JettonSwapAction; SmartContractExec?: SmartContractAction; DomainRenew?: DomainRenewAction; Purchase?: PurchaseAction; AddExtension?: AddExtensionAction; RemoveExtension?: RemoveExtensionAction; SetSignatureAllowedAction?: SetSignatureAllowedAction; GasRelay?: GasRelayAction; DepositTokenStake?: DepositTokenStakeAction; WithdrawTokenStakeRequest?: WithdrawTokenStakeRequestAction; LiquidityDeposit?: LiquidityDepositAction; OracleRequest?: OracleRequestAction; WithdrawXTR?: WithdrawXTRAction; DepositXTR?: DepositXTRAction; /** shortly describes what this action is about. */ simple_preview: ActionSimplePreview; base_transactions: string[]; } export interface TonTransferAction { sender: AccountAddress; recipient: AccountAddress; /** * amount in nanograms * @format int64 * @example 123456789 */ amount: number; /** * @example "Hi! This is your salary. * From accounting with love." */ comment?: string; encrypted_comment?: EncryptedComment; refund?: Refund; } export interface OracleRequestAction { requester: AccountAddress; response_to: AccountAddress; price_feeds: OraclePriceFeed[]; } export interface OraclePriceFeed { /** @example "e62df6c8b4a85fe1a67f1c4d1f1e1d4335c04d1d7e2c50e0d7da7ad911f2d4" */ id: string; /** @example "GRAM/USD" */ display_symbol: string; /** * @format double * @example 5.24 */ rate?: number; } export interface DepositXTRAction { recipient: AccountAddress; /** @example "123000000000" */ amount: string; } export interface WithdrawXTRAction { user: AccountAddress; /** @example "123000000000" */ amount: string; } export interface ExtraCurrencies { extra_currencies: EcPreview[]; } export interface EcPreview { /** * @format int32 * @example 239 */ id: number; /** @example "FMS" */ symbol: string; /** @example 5 */ decimals: number; /** @example "https://cache.tonapi.io/images/extra.jpg" */ image: string; } export interface ExtraCurrencyTransferAction { sender: AccountAddress; recipient: AccountAddress; /** * amount in quanta of tokens * @example "1000000000" */ amount: string; /** * @example "Hi! This is your salary. * From accounting with love." */ comment?: string; encrypted_comment?: EncryptedComment; currency: EcPreview; } export interface SmartContractAction { executor: AccountAddress; contract: AccountAddress; /** * amount in nanograms * @deprecated * @format int64 * @example 123456789 */ t