UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

30 lines (29 loc) 3.36 kB
import { type AbiEventName, type AbiFunctionName, type Address, type DecodeEventParams, type DecodeTransactionParams, type DecodedAbiFunctionInputs, type DecodedAbiFunctionOutputs, 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: DecodedAbiFunctionOutputs<typeof TonEvmEventConfigurationAbi, 'getDetails'>['_basicConfiguration']; meta: DecodedAbiFunctionOutputs<typeof TonEvmEventConfigurationAbi, 'getDetails'>['_meta']; networkConfiguration: { endTimestamp: number; eventEmitter: DecodedAbiFunctionOutputs<typeof TonEvmEventConfigurationAbi, 'getDetails'>['_networkConfiguration']['eventEmitter']; proxy: DecodedAbiFunctionOutputs<typeof TonEvmEventConfigurationAbi, 'getDetails'>['_networkConfiguration']['proxy']; 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, 'amount' | 'from'> & Omit<Partial<SendInternalParams>, 'amount' | '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[]>; }