@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
37 lines (36 loc) • 2.98 kB
TypeScript
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 TvmEvmEventAlienAbi } from '../../models/tvm-evm-event-alien/abi';
export interface TvmEvmEventAlienDecodedData {
amount: string;
baseChainId: string;
baseToken: string;
callback: {
payload: string;
recipient: string;
strict: boolean;
};
proxyAddress: Address;
recipientAddress: string;
remainingGasTo: Address;
tokenAddress: Address;
}
export interface TvmEvmEventAlienDetails extends TvmEvmBaseEventDetails {
}
export interface TvmEvmEventAlienInitData extends TvmEvmBaseEventInitData {
}
export type TvmEvmEventAlienDecodedEvent = DecodedEvent<typeof TvmEvmEventAlienAbi, AbiEventName<typeof TvmEvmEventAlienAbi>>;
export type TvmEvmEventAlienDecodedTransaction = DecodedTransaction<typeof TvmEvmEventAlienAbi, AbiFunctionName<typeof TvmEvmEventAlienAbi>>;
export declare abstract class TvmEvmEventAlienUtils {
static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmEvmEventAlienDecodedData>;
static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmEvmEventAlienDetails>;
static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmEvmEventAlienInitData>;
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 TvmEvmEventAlienAbi>): Promise<TvmEvmEventAlienDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TvmEvmEventAlienAbi>): Promise<TvmEvmEventAlienDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TvmEvmEventAlienDecodedEvent[]>;
}