@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
34 lines (33 loc) • 2.96 kB
TypeScript
import { type PublicKey } from '@solana/web3.js';
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 TvmSolBaseEventDetails, type TvmSolBaseEventInitData } from '../../models/tvm-sol-base-event';
import { type TvmSolEventAlienAbi } from '../../models/tvm-sol-event-alien/abi';
export interface TvmSolEventAlienDecodedData {
amount: string;
baseToken: string;
proxyAddress: Address;
recipientAddress: string;
remainingGasTo: Address;
solanaPayload: string;
tokenAddress: Address;
tokenWalletAddress: Address;
}
export interface TvmSolEventAlienDetails extends TvmSolBaseEventDetails {
}
export interface TvmSolEventAlienInitData extends TvmSolBaseEventInitData {
}
export type TvmSolEventAlienDecodedEvent = DecodedEvent<typeof TvmSolEventAlienAbi, AbiEventName<typeof TvmSolEventAlienAbi>>;
export type TvmSolEventAlienDecodedTransaction = DecodedTransaction<typeof TvmSolEventAlienAbi, AbiFunctionName<typeof TvmSolEventAlienAbi>>;
export declare abstract class TvmSolEventAlienUtils {
static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmSolEventAlienDecodedData>;
static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmSolEventAlienDetails>;
static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmSolEventAlienInitData>;
static nonce(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>;
static recipient(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<PublicKey>;
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 TvmSolEventAlienAbi>): Promise<TvmSolEventAlienDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TvmSolEventAlienAbi>): Promise<TvmSolEventAlienDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TvmSolEventAlienDecodedEvent[]>;
}