UNPKG

@broxus/js-bridge-essentials

Version:

Bridge JavaScript Essentials library

49 lines (48 loc) 2.75 kB
import { type AbiEventName, type AbiFunctionName, type Address, type DecodeEventParams, type DecodeTransactionParams, type DecodedEvent, type DecodedTransaction, type FullContractState, type ProviderRpcClient, type Transaction } from 'everscale-inpage-provider'; import { type TvmSolBaseEventAbi } from '../../models/tvm-sol-base-event/abi'; export interface TvmSolBaseEventExecuteAccount { account: string; isSigner: boolean; readOnly: boolean; } export interface TvmSolBaseEventVoteData { eventData: string; eventTimestamp: number; eventTransactionLt: string; executeAccounts: TvmSolBaseEventExecuteAccount[]; executePayloadAccounts: TvmSolBaseEventExecuteAccount[]; executePayloadNeeded: boolean; } export interface TvmSolBaseEventInitData { configuration: Address; staking: Address; voteData: TvmSolBaseEventVoteData; } export declare enum TvmSolBaseEventStatus { Initializing = "0", Pending = "1", Confirmed = "2", Rejected = "3" } export interface TvmSolBaseEventDetails { balance: string; confirms: string[]; empty: string[]; eventInitData: TvmSolBaseEventInitData; initializer: Address; meta: string; rejects: string[]; requiredVotes: number; status: TvmSolBaseEventStatus; } export type TvmSolBaseEventDecodedEvent = DecodedEvent<typeof TvmSolBaseEventAbi, AbiEventName<typeof TvmSolBaseEventAbi>>; export type TvmSolBaseEventDecodedTransaction = DecodedTransaction<typeof TvmSolBaseEventAbi, AbiFunctionName<typeof TvmSolBaseEventAbi>>; export declare abstract class TvmSolBaseEventUtils { static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmSolBaseEventDetails>; static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<TvmSolBaseEventInitData>; 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 TvmSolBaseEventAbi>): Promise<TvmSolBaseEventDecodedEvent | undefined>; static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof TvmSolBaseEventAbi>): Promise<TvmSolBaseEventDecodedTransaction | undefined>; static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<TvmSolBaseEventDecodedEvent[]>; }