@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
54 lines (53 loc) • 4.93 kB
TypeScript
import { type AbiEventName, type AbiFunctionName, type Address, type DecodeEventParams, type DecodeTransactionParams, type DecodedEvent, type DecodedTransaction, 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 EvmTonEventNativeAbi } from '../../models/evm-ton-event-native/abi';
export interface EvmTonEventNativeCancelAbiParams {
callback: {
payload: string;
recipient: string;
strict: boolean;
};
decimals: number;
expectedGasReceiver: Address | string;
name: string;
newRecipient: string;
remainingGasTo: Address | string;
symbol: string;
}
export interface EvmTonEventNativeDecodedData {
amount: string;
expectedGas: string;
payload: string;
proxyAddress: Address;
recipientAddress: Address;
tokenAddress: Address;
tokenWalletAddress: Address;
value: string;
}
export interface EvmTonEventNativeDetails extends EvmTonBaseEventDetails {
}
export interface EvmTonEventNativeInitData extends EvmTonBaseEventInitData {
}
export type EvmTonEventNativeDecodedEvent = DecodedEvent<typeof EvmTonEventNativeAbi, AbiEventName<typeof EvmTonEventNativeAbi>>;
export type EvmTonEventNativeDecodedTransaction = DecodedTransaction<typeof EvmTonEventNativeAbi, AbiFunctionName<typeof EvmTonEventNativeAbi>>;
export declare abstract class EvmTonEventNativeUtils {
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: EvmTonEventNativeCancelAbiParams, 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<EvmTonEventNativeDecodedData>;
static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTonEventNativeDetails>;
static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<EvmTonEventNativeInitData>;
static bounty(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>;
static eventTokenWallet(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>;
static expectedGas(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>;
static limitApprover(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>;
static nonce(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>;
static recipient(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>;
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 EvmTonEventNativeAbi>): Promise<EvmTonEventNativeDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof EvmTonEventNativeAbi>): Promise<EvmTonEventNativeDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<EvmTonEventNativeDecodedEvent[]>;
}