@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 DecodedEvent, type DecodedTransaction, type DecodeEventParams, type DecodeTransactionParams, type FullContractState, type ProviderRpcClient, type Transaction } from 'everscale-inpage-provider';
import { type TonEvmBaseEventDetails, type TonEvmBaseEventInitData } from '../../models/ton-evm-base-event';
import { type TonEvmEventAlienAbi } from '../../models/ton-evm-event-alien/abi';
export interface TonEvmEventAlienDecodedData {
amount: string;
baseChainId: string;
baseToken: string;
callback: {
payload: string;
recipient: string;
strict: boolean;
};
proxyAddress: Address;
recipientAddress: string;
remainingGasTo: Address;
tokenAddress: Address;
}
export interface TonEvmEventAlienDetails extends TonEvmBaseEventDetails {
}
export interface TonEvmEventAlienInitData extends TonEvmBaseEventInitData {
}
export type TonEvmEventAlienDecodedEvent = DecodedEvent<typeof TonEvmEventAlienAbi, AbiEventName<typeof TonEvmEventAlienAbi>>;
export type TonEvmEventAlienDecodedTransaction = DecodedTransaction<typeof TonEvmEventAlienAbi, AbiFunctionName<typeof TonEvmEventAlienAbi>>;
export declare abstract class TonEvmEventAlienUtils {
static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TonEvmEventAlienDecodedData>;
static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TonEvmEventAlienDetails>;
static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TonEvmEventAlienInitData>;
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 TonEvmEventAlienAbi>): Promise<TonEvmEventAlienDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TonEvmEventAlienAbi>): Promise<TonEvmEventAlienDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TonEvmEventAlienDecodedEvent[]>;
}