@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
74 lines (73 loc) • 5.22 kB
TypeScript
import { type Forceable, type Silentable, type SmartContractWatchCallback, type Syncable, type Watchable, SmartContractModel } from '@broxus/js-core';
import { type Address, type DecodeEventParams, type DecodeTransactionParams, type DelayedMessageExecution, type ProviderRpcClient, type SendInternalParams, type Subscriber, type Transaction } from 'everscale-inpage-provider';
import { type EvmTonEventNativeAbi } from '../../models/evm-ton-event-native/abi';
import { type EvmTonEventNativeCancelAbiParams, type EvmTonEventNativeDecodedData, type EvmTonEventNativeDecodedEvent, type EvmTonEventNativeDecodedTransaction, type EvmTonEventNativeDetails, EvmTonEventNativeUtils } from '../../models/evm-ton-event-native/EvmTonEventNativeUtils';
export interface EvmTonEventNativeCtorOptions {
watchDebounceDelay?: number;
}
export interface EvmTonEventNativeCreateOptions extends EvmTonEventNativeCtorOptions, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export interface EvmTonEventNativeData extends EvmTonEventNativeDetails {
bounty: string;
decodedData: EvmTonEventNativeDecodedData;
eventTokenWalletAddress: Address;
limitApproverAddress: Address;
recipient: Address;
}
export declare class EvmTonEventNative extends SmartContractModel<EvmTonEventNativeData> {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<EvmTonEventNativeCtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof EvmTonEventNativeUtils;
/**
* @param {ProviderRpcClient} _connection
* Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address
* Native Event root address
* @param {Readonly<EvmTonEventNativeCtorOptions>} [options]
* (optional) Native Event ABI Wrapper options
* @param {ProviderRpcClient} [_provider]
* (optional) RPC provider that require connection to the TVM wallet
*/
constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<EvmTonEventNativeCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined);
/**
* @param {ProviderRpcClient} connection
* Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address
* Native Event root address
* @param {Readonly<EvmTonEventNativeCreateOptions>} [options]
* (optional) Native Event ABI Wrapper options
* @param {ProviderRpcClient} [provider]
* (optional) RPC provider that require connection to the TVM wallet
*/
static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<EvmTonEventNativeCreateOptions>, provider?: ProviderRpcClient): Promise<EvmTonEventNative>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: SmartContractWatchCallback<EvmTonEventNativeData>): Promise<Subscriber>;
unwatch(): Promise<void>;
approveLimit(args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>;
cancel(params: EvmTonEventNativeCancelAbiParams, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>;
rejectLimit(expectedGasReceiver: Address | string, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>;
retry(args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>;
setBounty(bounty: string | number, args: Pick<SendInternalParams, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | 'from'>): Promise<DelayedMessageExecution>;
nonce(): Promise<string>;
relayRound(): Promise<Address>;
roundNumber(): Promise<number>;
get balance(): EvmTonEventNativeData['balance'];
get bounty(): EvmTonEventNativeData['bounty'];
get confirms(): EvmTonEventNativeData['confirms'];
get decodedData(): EvmTonEventNativeData['decodedData'];
get empty(): EvmTonEventNativeData['empty'];
get eventInitData(): EvmTonEventNativeData['eventInitData'];
get eventTokenWalletAddress(): EvmTonEventNativeData['eventTokenWalletAddress'];
get initializer(): EvmTonEventNativeData['initializer'];
get limitApproverAddress(): EvmTonEventNativeData['limitApproverAddress'];
get meta(): EvmTonEventNativeData['meta'];
get recipient(): EvmTonEventNativeData['recipient'];
get rejects(): EvmTonEventNativeData['rejects'];
get requiredVotes(): EvmTonEventNativeData['requiredVotes'];
get status(): EvmTonEventNativeData['status'];
decodeEvent(args: DecodeEventParams<typeof EvmTonEventNativeAbi>): Promise<EvmTonEventNativeDecodedEvent | undefined>;
decodeTransaction(args: DecodeTransactionParams<typeof EvmTonEventNativeAbi>): Promise<EvmTonEventNativeDecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<EvmTonEventNativeDecodedEvent[]>;
}