UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

36 lines (35 loc) 3.02 kB
import { type PublicKey } from '@solana/web3.js'; 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 TvmSolBaseEventDetails, type TvmSolBaseEventInitData } from '../../models/tvm-sol-base-event'; import { type TvmSolEventNativeAbi } from '../../models/tvm-sol-event-native/abi'; export interface TvmSolEventNativeDecodedData { amount: string; decimals: number; name: string; proxyAddress: Address; recipientAddress: string; remainingGasTo: Address; solanaPayload: string; symbol: string; tokenAddress: Address; tokenWalletAddress: Address; } export interface TvmSolEventNativeDetails extends TvmSolBaseEventDetails { } export interface TvmSolEventNativeInitData extends TvmSolBaseEventInitData { } export type TvmSolEventNativeDecodedEvent = DecodedEvent<typeof TvmSolEventNativeAbi, AbiEventName<typeof TvmSolEventNativeAbi>>; export type TvmSolEventNativeDecodedTransaction = DecodedTransaction<typeof TvmSolEventNativeAbi, AbiFunctionName<typeof TvmSolEventNativeAbi>>; export declare abstract class TvmSolEventNativeUtils { static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmSolEventNativeDecodedData>; static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmSolEventNativeDetails>; static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmSolEventNativeInitData>; 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 TvmSolEventNativeAbi>): Promise<TvmSolEventNativeDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TvmSolEventNativeAbi>): Promise<TvmSolEventNativeDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TvmSolEventNativeDecodedEvent[]>; }