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 TvmEvmBaseEventDetails, type TvmEvmBaseEventInitData } from '../../models/tvm-evm-base-event'; import { type TvmEvmEventNativeAbi } from '../../models/tvm-evm-event-native/abi'; export interface TvmEvmEventNativeDecodedData { 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 TvmEvmEventNativeDetails extends TvmEvmBaseEventDetails { } export interface TvmEvmEventNativeInitData extends TvmEvmBaseEventInitData { } export type TvmEvmEventNativeDecodedEvent = DecodedEvent<typeof TvmEvmEventNativeAbi, AbiEventName<typeof TvmEvmEventNativeAbi>>; export type TvmEvmEventNativeDecodedTransaction = DecodedTransaction<typeof TvmEvmEventNativeAbi, AbiFunctionName<typeof TvmEvmEventNativeAbi>>; export declare abstract class TvmEvmEventNativeUtils { static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmEvmEventNativeDecodedData>; static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmEvmEventNativeDetails>; static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmEvmEventNativeInitData>; 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 TvmEvmEventNativeAbi>): Promise<TvmEvmEventNativeDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TvmEvmEventNativeAbi>): Promise<TvmEvmEventNativeDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TvmEvmEventNativeDecodedEvent[]>; }