UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

40 lines (39 loc) 3.06 kB
import { type AbiEventName, type AbiFunctionName, type Address, type DecodeEventParams, type DecodeTransactionParams, type DecodedEvent, type DecodedTransaction, type FullContractState, type ProviderRpcClient, type Transaction } from 'everscale-inpage-provider'; import { type TonEvmBaseEventDetails, type TonEvmBaseEventInitData } from '../../models/ton-evm-base-event'; import { type TonEvmEventNativeAbi } from '../../models/ton-evm-event-native/abi'; export interface TonEvmEventNativeDecodedData { amount: string; callback: { payload: string; recipient: string; strict: boolean; }; chainId: string; decimals: number; name: string; proxyAddress: Address; recipientAddress: string; remainingGasTo: Address; symbol: string; tokenAddress: Address; tokenWalletAddress: Address; } export interface TonEvmEventNativeDetails extends TonEvmBaseEventDetails { } export interface TonEvmEventNativeInitData extends TonEvmBaseEventInitData { } export type TonEvmEventNativeDecodedEvent = DecodedEvent<typeof TonEvmEventNativeAbi, AbiEventName<typeof TonEvmEventNativeAbi>>; export type TonEvmEventNativeDecodedTransaction = DecodedTransaction<typeof TonEvmEventNativeAbi, AbiFunctionName<typeof TonEvmEventNativeAbi>>; export declare abstract class TonEvmEventNativeUtils { static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TonEvmEventNativeDecodedData>; static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TonEvmEventNativeDetails>; static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TonEvmEventNativeInitData>; static nonce(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>; static recipient(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>; static relayRound(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>; static roundNumber(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<number>; static sender(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>; static decodeEvent(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeEventParams<typeof TonEvmEventNativeAbi>): Promise<TonEvmEventNativeDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TonEvmEventNativeAbi>): Promise<TonEvmEventNativeDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TonEvmEventNativeDecodedEvent[]>; }