UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

45 lines (44 loc) 3.13 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 EvmTvmBaseEventDetails, type EvmTvmBaseEventInitData } from '../../models/evm-tvm-base-event'; import { type EvmTvmEventAlienAbi } from '../../models/evm-tvm-event-alien/abi'; export interface EvmTvmEventAlienDecodedData { amount: string; baseChainId: string; baseToken: string; decimals: number; expectedGas: string; name: string; payload: string; proxyAddress: Address; recipientAddress: Address; symbol: string; tokenAddress: Address; value: string; } export interface EvmTvmEventAlienDetails extends EvmTvmBaseEventDetails { } export interface EvmTvmEventAlienInitData extends EvmTvmBaseEventInitData { } export interface EvmTvmEventAlienTransitionalData { canonicalAddress: Address; poolAddress: Address; proxyAddress: Address; routerAddress: Address; targetAmount: string; targetTokenAddress: Address; tokenAddress: Address; } export type EvmTvmEventAlienDecodedEvent = DecodedEvent<typeof EvmTvmEventAlienAbi, AbiEventName<typeof EvmTvmEventAlienAbi>>; export type EvmTvmEventAlienDecodedTransaction = DecodedTransaction<typeof EvmTvmEventAlienAbi, AbiFunctionName<typeof EvmTvmEventAlienAbi>>; export declare abstract class EvmTvmEventAlienUtils { static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTvmEventAlienDecodedData>; static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTvmEventAlienDetails>; static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTvmEventAlienInitData>; static getTransitionalData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTvmEventAlienTransitionalData>; static nonce(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 decodeEvent(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeEventParams<typeof EvmTvmEventAlienAbi>): Promise<EvmTvmEventAlienDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof EvmTvmEventAlienAbi>): Promise<EvmTvmEventAlienDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<EvmTvmEventAlienDecodedEvent[]>; }