@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
35 lines (34 loc) • 3.04 kB
TypeScript
import { type AbiEventName, type AbiFunctionName, type Address, type DecodeEventParams, type DecodeTransactionParams, type DecodedAbiFunctionInputs, type DecodedEvent, type DecodedTransaction, type DelayedMessageExecution, type FullContractState, type ProviderRpcClient, type SendInternalParams, type Transaction } from 'everscale-inpage-provider';
import { type TonEvmEventConfigurationAbi } from '../../models/ton-evm-event-configuration/abi';
export interface TonEvmEventConfigurationDeployEventAbiParams {
eventVoteData: DecodedAbiFunctionInputs<typeof TonEvmEventConfigurationAbi, 'deployEvent'>['eventVoteData'];
}
export interface TonEvmEventConfigurationDeriveEventAddressAbiParams {
eventVoteData: DecodedAbiFunctionInputs<typeof TonEvmEventConfigurationAbi, 'deriveEventAddress'>['eventVoteData'];
}
export interface TonEvmEventConfigurationDetails {
basicConfiguration: {
eventABI: string;
eventCode: string;
eventInitialBalance: string;
roundDeployer: Address;
};
meta: string;
networkConfiguration: {
endTimestamp: number;
eventEmitter: Address;
proxy: string;
startTimestamp: number;
};
}
export type TonEvmEventConfigurationDecodedEvent = DecodedEvent<typeof TonEvmEventConfigurationAbi, AbiEventName<typeof TonEvmEventConfigurationAbi>>;
export type TonEvmEventConfigurationDecodedTransaction = DecodedTransaction<typeof TonEvmEventConfigurationAbi, AbiFunctionName<typeof TonEvmEventConfigurationAbi>>;
export declare abstract class TonEvmEventConfigurationUtils {
static deployEvent(provider: ProviderRpcClient, eventConfigurationAddress: Address | string, params: TonEvmEventConfigurationDeployEventAbiParams, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<DelayedMessageExecution>;
static deriveEventAddress(connection: ProviderRpcClient, eventConfigurationAddress: Address | string, params: TonEvmEventConfigurationDeriveEventAddressAbiParams, cachedState?: FullContractState): Promise<Address>;
static getDetails(connection: ProviderRpcClient, eventConfigurationAddress: Address | string, cachedState?: FullContractState): Promise<TonEvmEventConfigurationDetails>;
static getFlags(connection: ProviderRpcClient, eventConfigurationAddress: Address | string, cachedState?: FullContractState): Promise<string | undefined>;
static decodeEvent(connection: ProviderRpcClient, eventConfigurationAddress: Address | string, args: DecodeEventParams<typeof TonEvmEventConfigurationAbi>): Promise<TonEvmEventConfigurationDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, eventConfigurationAddress: Address | string, args: DecodeTransactionParams<typeof TonEvmEventConfigurationAbi>): Promise<TonEvmEventConfigurationDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, eventConfigurationAddress: Address | string, transaction: Transaction): Promise<TonEvmEventConfigurationDecodedEvent[]>;
}