UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

64 lines (63 loc) 5.13 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 TvmTvmBaseEventDetails, type TvmTvmBaseEventInitData } from '../../models/tvm-tvm-base-event'; import { type TvmTvmEventAlienAbi } from '../../models/tvm-tvm-event-alien/abi'; export interface TvmTvmEventAlienCancelAbiParams { eventPayload: string | null; expectedGas: string | number; expectedGasReceiver: Address | string; newRecipient: Address | string; predeployedTokenData?: string | null; remainingGasTo: Address | string; } export interface TvmTvmEventAlienDecodedData { amount: string; attachedGas: string; baseChainId: string; baseNativeProxyWallet: Address; baseToken: Address; decimals: number; expectedGas: string; name: string; payload?: string | null; proxyAddress: Address; proxyTokenWalletAddress?: Address | null; recipientAddress: Address; symbol: string; tokenAddress: Address; } export interface TvmTvmEventAlienDetails extends TvmTvmBaseEventDetails { } export interface TvmTvmEventAlienInitData extends TvmTvmBaseEventInitData { } export interface TvmTvmEventAlienTransitionalData { canonicalAddress: Address; nativeProxy: Address; nativeProxyTokenWallet?: Address | null; poolAddress: Address; proxyAddress: Address; routerAddress: Address; targetAmount: string; targetTokenAddress: Address; tokenAddress: Address; } export type TvmTvmEventAlienDecodedEvent = DecodedEvent<typeof TvmTvmEventAlienAbi, AbiEventName<typeof TvmTvmEventAlienAbi>>; export type TvmTvmEventAlienDecodedTransaction = DecodedTransaction<typeof TvmTvmEventAlienAbi, AbiFunctionName<typeof TvmTvmEventAlienAbi>>; export declare abstract class TvmTvmEventAlienUtils { 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: TvmTvmEventAlienCancelAbiParams, 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 setBounty(provider: ProviderRpcClient, eventAddress: Address | string, bounty: string | number, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>; static getDecodedData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmTvmEventAlienDecodedData>; static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmTvmEventAlienDetails>; static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmTvmEventAlienInitData>; static getTransitionalData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmTvmEventAlienTransitionalData>; static bounty(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>; static eventInitialBalance(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>; static eventTokenWallet(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>; static limitApprover(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>; static nonce(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>; static decodeEvent(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeEventParams<typeof TvmTvmEventAlienAbi>): Promise<TvmTvmEventAlienDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TvmTvmEventAlienAbi>): Promise<TvmTvmEventAlienDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TvmTvmEventAlienDecodedEvent[]>; }