UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

34 lines (33 loc) 2.68 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 SolTvmBaseEventDetails, type SolTvmBaseEventInitData } from '../../models/sol-tvm-base-event'; import { type SolTvmEventAlienAbi } from '../../models/sol-tvm-event-alien/abi'; export interface SolTvmEventAlienDecodedData { amount: string; baseToken: string; decimals: number; expectedGas: string; name: string; payload: string; proxyAddress: Address; recipientAddress: Address; symbol: string; tokenAddress: Address; value: string; } export interface SolTvmEventAlienDetails extends SolTvmBaseEventDetails { } export interface SolTvmEventAlienInitData extends SolTvmBaseEventInitData { } export type SolTvmEventAlienDecodedEvent = DecodedEvent<typeof SolTvmEventAlienAbi, AbiEventName<typeof SolTvmEventAlienAbi>>; export type SolTvmEventAlienDecodedTransaction = DecodedTransaction<typeof SolTvmEventAlienAbi, AbiFunctionName<typeof SolTvmEventAlienAbi>>; export declare abstract class SolTvmEventAlienUtils { static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<SolTvmEventAlienDecodedData>; static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<SolTvmEventAlienDetails>; static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<SolTvmEventAlienInitData>; 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 SolTvmEventAlienAbi>): Promise<SolTvmEventAlienDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof SolTvmEventAlienAbi>): Promise<SolTvmEventAlienDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<SolTvmEventAlienDecodedEvent[]>; }