@broxus/js-bridge-essentials
Version:
Bridge JavaScript Essentials library
44 lines (43 loc) • 2.64 kB
TypeScript
import { type AbiEventName, type AbiFunctionName, type Address, type DecodedEvent, type DecodedTransaction, type DecodeEventParams, type DecodeTransactionParams, type FullContractState, type ProviderRpcClient, type Transaction } from 'everscale-inpage-provider';
import { type SolTvmBaseEventAbi } from '../../models/sol-tvm-base-event/abi';
export interface SolTvmBaseEventVoteData {
accountSeed: string;
blockTime: number;
eventData: string;
slot: string;
txSignature: string;
}
export interface SolTvmBaseEventInitData {
configuration: Address;
staking: Address;
voteData: SolTvmBaseEventVoteData;
}
export declare enum SolTvmBaseEventStatus {
Initializing = "0",
Pending = "1",
Confirmed = "2",
Rejected = "3"
}
export interface SolTvmBaseEventDetails {
balance: string;
confirms: string[];
empty: string[];
eventInitData: SolTvmBaseEventInitData;
initializer: Address;
meta: string;
rejects: string[];
requiredVotes: number;
status: SolTvmBaseEventStatus;
}
export type SolTvmBaseEventDecodedEvent = DecodedEvent<typeof SolTvmBaseEventAbi, AbiEventName<typeof SolTvmBaseEventAbi>>;
export type SolTvmBaseEventDecodedTransaction = DecodedTransaction<typeof SolTvmBaseEventAbi, AbiFunctionName<typeof SolTvmBaseEventAbi>>;
export declare abstract class SolTvmBaseEventUtils {
static getDetails(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<SolTvmBaseEventDetails>;
static getEventInitData(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<SolTvmBaseEventInitData>;
static nonce(connection: ProviderRpcClient, eventAddress: Address | string, cachedState?: FullContractState): Promise<string>;
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 SolTvmBaseEventAbi>): Promise<SolTvmBaseEventDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, eventAddress: Address | string, args: DecodeTransactionParams<typeof SolTvmBaseEventAbi>): Promise<SolTvmBaseEventDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, eventAddress: Address | string, transaction: Transaction): Promise<SolTvmBaseEventDecodedEvent[]>;
}