UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

50 lines (49 loc) 3.75 kB
import { type Address, type DecodeTransactionParams, type DecodedAbiEventData, type ProviderRpcClient, type SendInternalParams, type Subscriber, type Transaction } from 'everscale-inpage-provider'; import { SmartContractModel } from '../../core'; import { type VoteEscrowDaoRootAbi } from '../../models/vote-escrow-dao-root/abi'; import { type VoteEscrowCalcTvmActionsValueAbiParams, type VoteEscrowDaoRootDecodedEvent, type VoteEscrowDaoRootDecodedTransaction, type VoteEscrowDaoRootProposalConfiguration, type VoteEscrowDaoRootProposeAbiParams, VoteEscrowDaoRootUtils } from '../../models/vote-escrow-dao-root/VoteEscrowDaoRootUtils'; import { type CallId, type Forceable, type SendMessageCallback, type Silentable, type Syncable, type TransactionCallbacks, type TransactionFailureReason, type TransactionSuccessResult, type Watchable } from '../../types'; export type VoteEscrowDaoRootProposeSuccessResult = DecodedAbiEventData<typeof VoteEscrowDaoRootAbi, 'ProposalCreated'>; export interface VoteEscrowDaoRootProposeCallbacks extends SendMessageCallback, TransactionCallbacks<TransactionSuccessResult<VoteEscrowDaoRootProposeSuccessResult>, TransactionFailureReason> { } export interface VoteEscrowDaoRootProposeParams extends VoteEscrowDaoRootProposeAbiParams, Partial<CallId>, VoteEscrowDaoRootProposeCallbacks { } export interface VoteEscrowDaoRootCtorOptions { watchDebounceDelay?: number; } export interface VoteEscrowDaoRootCreateOptions extends VoteEscrowDaoRootCtorOptions, Syncable, Watchable { watchCallback?: VoidFunction; } export interface VoteEscrowDaoRootData { proposalConfiguration: VoteEscrowDaoRootProposalConfiguration; voteEscrowRoot: Address; } export declare class VoteEscrowDaoRoot extends SmartContractModel<VoteEscrowDaoRootData> { /** Standalone RPC client that doesn't require connection to the TVM wallet provider */ protected readonly _connection: ProviderRpcClient; /** VoteEscrowDaoRoot Smart Contract Model options */ protected readonly options?: Readonly<VoteEscrowDaoRootCtorOptions> | undefined; /** RPC provider that require connection to the TVM wallet */ protected readonly _provider?: ProviderRpcClient | undefined; static Utils: typeof VoteEscrowDaoRootUtils; constructor( /** Standalone RPC client that doesn't require connection to the TVM wallet provider */ _connection: ProviderRpcClient, /** VoteEscrowDaoRoot root address */ address: Address | string, /** VoteEscrowDaoRoot Smart Contract Model options */ options?: Readonly<VoteEscrowDaoRootCtorOptions> | undefined, /** RPC provider that require connection to the TVM wallet */ _provider?: ProviderRpcClient | undefined); static create(connection: ProviderRpcClient, address: Address | string, options?: VoteEscrowDaoRootCreateOptions, provider?: ProviderRpcClient): Promise<VoteEscrowDaoRoot>; sync(options?: Forceable & Silentable): Promise<void>; watch(callback?: VoidFunction): Promise<Subscriber>; unwatch(): Promise<void>; propose(params: VoteEscrowDaoRootProposeParams, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<Transaction | undefined>; get proposalConfiguration(): VoteEscrowDaoRootData['proposalConfiguration']; get voteEscrowRoot(): VoteEscrowDaoRootData['voteEscrowRoot']; calcTonActionsValue(args: VoteEscrowCalcTvmActionsValueAbiParams): Promise<string>; expectedProposalAddress(proposalId: string | number): Promise<Address>; decodeTransaction(args: DecodeTransactionParams<typeof VoteEscrowDaoRootAbi>): Promise<VoteEscrowDaoRootDecodedTransaction | undefined>; decodeTransactionEvents(transaction: Transaction): Promise<VoteEscrowDaoRootDecodedEvent[]>; }