@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
52 lines (51 loc) • 4.94 kB
TypeScript
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 TvmTvmEventNativeAbi } from '../../models/tvm-tvm-event-native/abi';
export interface TvmTvmEventNativeCancelAbiParams {
eventPayload: string | null;
expectedGas: string | number;
expectedGasReceiver: Address | string;
newRecipient: Address | string;
remainingGasTo: Address | string;
}
export interface TvmTvmEventNativeDecodedData {
amount: string;
bounty: string;
decimals: number;
expectedGas: string;
name: string;
payload?: string | null;
proxyAddress: Address;
recipientAddress: Address;
symbol: string;
tokenAddress: Address;
tokenWalletAddress: Address;
value: string;
}
export interface TvmTvmEventNativeDetails extends TvmTvmBaseEventDetails {
}
export interface TvmTvmEventNativeInitData extends TvmTvmBaseEventInitData {
}
export type TvmTvmEventNativeDecodedEvent = DecodedEvent<typeof TvmTvmEventNativeAbi, AbiEventName<typeof TvmTvmEventNativeAbi>>;
export type TvmTvmEventNativeDecodedTransaction = DecodedTransaction<typeof TvmTvmEventNativeAbi, AbiFunctionName<typeof TvmTvmEventNativeAbi>>;
export declare abstract class TvmTvmEventNativeUtils {
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: TvmTvmEventNativeCancelAbiParams, 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<TvmTvmEventNativeDecodedData>;
static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmTvmEventNativeDetails>;
static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmTvmEventNativeInitData>;
static bounty(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>;
static eventTokenWallet(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>;
static eventInitialBalance(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>;
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 sender(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<Address>;
static decodeEvent(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeEventParams<typeof TvmTvmEventNativeAbi>): Promise<TvmTvmEventNativeDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TvmTvmEventNativeAbi>): Promise<TvmTvmEventNativeDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TvmTvmEventNativeDecodedEvent[]>;
}