UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

60 lines (59 loc) 4.55 kB
import { type AbiEventName, type AbiFunctionName, type Address, type DecodedEvent, type DecodedTransaction, type DecodeEventParams, type DecodeTransactionParams, type DelayedMessageExecution, type FullContractState, type ProviderRpcClient, type SendInternalParams, type Transaction } from 'everscale-inpage-provider'; import { type EvmTonBaseEventDetails, type EvmTonBaseEventInitData } from '../../models/evm-ton-base-event'; import { type EvmTonEventAlienAbi } from '../../models/evm-ton-event-alien/abi'; export interface EvmTonEventAlienCancelAbiParams { callback: { payload: string; recipient: string; strict: boolean; }; expectedGasReceiver: Address | string; newRecipient: string; remainingGasTo: Address | string; } export interface EvmTonEventAlienDecodedData { amount: string; baseChainId: string; baseToken: string; decimals: number; expectedGas: string; name: string; payload: string; proxyAddress: Address; recipientAddress: Address; symbol: string; tokenAddress: Address; value: string; } export interface EvmTonEventAlienDetails extends EvmTonBaseEventDetails { } export interface EvmTonEventAlienInitData extends EvmTonBaseEventInitData { } export interface EvmTonEventAlienTransitionalData { canonicalAddress: Address; poolAddress: Address; proxyAddress: Address; routerAddress: Address; targetAmount: string; targetTokenAddress: Address; tokenAddress: Address; } export type EvmTonEventAlienDecodedEvent = DecodedEvent<typeof EvmTonEventAlienAbi, AbiEventName<typeof EvmTonEventAlienAbi>>; export type EvmTonEventAlienDecodedTransaction = DecodedTransaction<typeof EvmTonEventAlienAbi, AbiFunctionName<typeof EvmTonEventAlienAbi>>; export declare abstract class EvmTonEventAlienUtils { static approveLimit(provider: ProviderRpcClient, eventAddress: Address | string, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; static cancel(provider: ProviderRpcClient, eventAddress: Address | string, params: EvmTonEventAlienCancelAbiParams, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; static rejectLimit(provider: ProviderRpcClient, eventAddress: Address | string, expectedGasReceiver: Address | string, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; static retry(provider: ProviderRpcClient, eventAddress: Address | string, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTonEventAlienDecodedData>; static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTonEventAlienDetails>; static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTonEventAlienInitData>; static getTransitionalData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTonEventAlienTransitionalData>; static limitApprover(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>; 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 EvmTonEventAlienAbi>): Promise<EvmTonEventAlienDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof EvmTonEventAlienAbi>): Promise<EvmTonEventAlienDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<EvmTonEventAlienDecodedEvent[]>; }