@broxus/js-core
Version:
MobX-based JavaScript Core library
74 lines (73 loc) • 5.19 kB
TypeScript
import { type Address, type DecodeTransactionParams, type ProviderRpcClient, type SendExternalDelayedParams, type SendInternalParams, type Subscriber, type Transaction } from 'everscale-inpage-provider';
import { SmartContractModel } from '../../core';
import { type VoteEscrowProposalAbi } from '../../models/vote-escrow-proposal/abi';
import { type VoteEscrowProposalActions, type VoteEscrowProposalConfig, type VoteEscrowProposalDecodedEvent, type VoteEscrowProposalDecodedTransaction, type VoteEscrowProposalOverview, VoteEscrowProposalUtils } from '../../models/vote-escrow-proposal/VoteEscrowProposalUtils';
import { type CallId, type Forceable, type SendMessageCallback, type Silentable, type Syncable, type TransactionCallbacks, type TransactionFailureReason, type TransactionSentDetails, type TransactionSuccessResult, type Watchable } from '../../types';
type VoteEscrowProposalCallbacks<SendParams = any, SuccessParams = any, FailureParams = any> = SendMessageCallback<SendParams> & TransactionCallbacks<TransactionSuccessResult<SuccessParams>, TransactionFailureReason<FailureParams>, TransactionSentDetails>;
export interface VoteEscrowProposalCancelCallbacks extends VoteEscrowProposalCallbacks {
}
export interface VoteEscrowProposalCancelParams extends Partial<CallId>, VoteEscrowProposalCancelCallbacks {
}
export interface VoteEscrowProposalExecuteCallbacks extends VoteEscrowProposalCallbacks {
}
export interface VoteEscrowProposalExecuteParams extends Partial<CallId>, VoteEscrowProposalExecuteCallbacks {
}
export interface VoteEscrowProposalQueuedSuccessResult {
executionTime: number;
}
export interface VoteEscrowProposalQueueCallbacks extends VoteEscrowProposalCallbacks<unknown, VoteEscrowProposalQueuedSuccessResult> {
}
export interface VoteEscrowProposalQueueParams extends Partial<CallId>, VoteEscrowProposalQueueCallbacks {
}
export interface VoteEscrowProposalCtorParams {
watchDebounceDelay?: number;
}
export interface VoteEscrowProposalCreateOptions extends VoteEscrowProposalCtorParams, Syncable, Watchable {
watchCallback?: VoidFunction;
}
export interface VoteEscrowProposalData extends VoteEscrowProposalOverview, VoteEscrowProposalActions, VoteEscrowProposalConfig {
}
export declare class VoteEscrowProposal extends SmartContractModel<VoteEscrowProposalData> {
/** Standalone RPC client that doesn't require connection to the TVM wallet provider */
protected readonly _connection: ProviderRpcClient;
/** VoteEscrowProposal Smart Contract Model options */
protected readonly options?: Readonly<VoteEscrowProposalCtorParams> | undefined;
/** RPC provider that require connection to the TVM wallet */
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof VoteEscrowProposalUtils;
constructor(
/** Standalone RPC client that doesn't require connection to the TVM wallet provider */
_connection: ProviderRpcClient,
/** VoteEscrowProposal root address */
address: Address | string,
/** VoteEscrowProposal Smart Contract Model options */
options?: Readonly<VoteEscrowProposalCtorParams> | undefined,
/** RPC provider that require connection to the TVM wallet */
_provider?: ProviderRpcClient | undefined);
static create(connection: ProviderRpcClient, address: Address | string, options?: VoteEscrowProposalCreateOptions, provider?: ProviderRpcClient): Promise<VoteEscrowProposal>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: VoidFunction): Promise<Subscriber>;
unwatch(): Promise<void>;
cancel(params: VoteEscrowProposalCancelParams, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<Transaction | undefined>;
execute(params: VoteEscrowProposalExecuteParams, args: SendExternalDelayedParams): Promise<Transaction | undefined>;
queue(params: VoteEscrowProposalQueueParams, args: SendExternalDelayedParams): Promise<Transaction | undefined>;
get evmActions(): VoteEscrowProposalData['evmActions'];
get tvmActions(): VoteEscrowProposalData['tvmActions'];
get gracePeriod(): VoteEscrowProposalData['gracePeriod'];
get quorumVotes(): VoteEscrowProposalData['quorumVotes'];
get threshold(): VoteEscrowProposalData['threshold'];
get timeLock(): VoteEscrowProposalData['timeLock'];
get votingDelay(): VoteEscrowProposalData['votingDelay'];
get votingPeriod(): VoteEscrowProposalData['votingPeriod'];
get againstVotes(): VoteEscrowProposalData['againstVotes'];
get description(): VoteEscrowProposalData['description'];
get endTime(): VoteEscrowProposalData['endTime'];
get executionTime(): VoteEscrowProposalData['executionTime'];
get forVotes(): VoteEscrowProposalData['forVotes'];
get proposer(): VoteEscrowProposalData['proposer'];
get startTime(): VoteEscrowProposalData['startTime'];
get state(): VoteEscrowProposalData['state'];
decodeTransaction(args: DecodeTransactionParams<typeof VoteEscrowProposalAbi>): Promise<VoteEscrowProposalDecodedTransaction | undefined>;
decodeTransactionEvents(transaction: Transaction): Promise<VoteEscrowProposalDecodedEvent[]>;
}
export {};