@broxus/js-core
Version:
MobX-based JavaScript Core library
67 lines (66 loc) • 4.71 kB
TypeScript
import { type Address, type DecodeTransactionParams, type ProviderRpcClient, type SendExternalDelayedParams, type SendInternalParams, type Subscriber, type Transaction } from 'everscale-inpage-provider';
import { type SmartContractWatchCallback, SmartContractModel } from '../../core';
import { type VoteEscrowProposalAbi } from '../../models/vote-escrow-proposal/abi';
import { type VoteEscrowProposalCancelParams, type VoteEscrowProposalDecodedEvent, type VoteEscrowProposalDecodedTransaction, type VoteEscrowProposalExecuteParams, type VoteEscrowProposalQueueParams } from '../../models/vote-escrow-proposal/types';
import { type VoteEscrowProposalActions, type VoteEscrowProposalConfig, type VoteEscrowProposalOverview, VoteEscrowProposalUtils } from '../../models/vote-escrow-proposal/VoteEscrowProposalUtils';
import { type Forceable, type Silentable, type Syncable, type Watchable } from '../../types';
export interface VoteEscrowProposalCtorParams {
watchDebounceDelay?: number;
}
export interface VoteEscrowProposalCreateOptions extends Syncable, VoteEscrowProposalCtorParams, Watchable {
watchCallback?: VoidFunction;
}
export interface VoteEscrowProposalData extends VoteEscrowProposalActions, VoteEscrowProposalConfig, VoteEscrowProposalOverview {
}
export declare class VoteEscrowProposal extends SmartContractModel<VoteEscrowProposalData> {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<VoteEscrowProposalCtorParams> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof VoteEscrowProposalUtils;
/**
* @param {ProviderRpcClient} _connection
* Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address
* VoteEscrowProposal root address
* @param {Readonly<VoteEscrowProposalCtorParams>} [options]
* VoteEscrowProposal Smart Contract Model options
* @param {ProviderRpcClient} [_provider]
* RPC provider that require connection to the TVM wallet
*/
constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<VoteEscrowProposalCtorParams> | undefined, _provider?: ProviderRpcClient | undefined);
/**
* @param {ProviderRpcClient} connection
* Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address
* VoteEscrowProposal root address
* @param {Readonly<VoteEscrowProposalCreateOptions>} [options]
* VoteEscrowProposal Smart Contract Model options
* @param {ProviderRpcClient} [provider]
* RPC provider that require connection to the TVM wallet
*/
static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<VoteEscrowProposalCreateOptions>, provider?: ProviderRpcClient): Promise<VoteEscrowProposal>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: SmartContractWatchCallback<VoteEscrowProposalData>): 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[]>;
}