@broxus/js-core
Version:
MobX-based JavaScript Core library
57 lines (56 loc) • 3.77 kB
TypeScript
import { type Address, type DecodeTransactionParams, type ProviderRpcClient, type SendInternalParams, type Subscriber, type Transaction } from 'everscale-inpage-provider';
import { type SmartContractWatchCallback, SmartContractModel } from '../../core';
import { type VoteEscrowDaoRootAbi } from '../../models/vote-escrow-dao-root/abi';
import { type VoteEscrowCalcTvmActionsValueAbiParams, type VoteEscrowDaoRootDecodedEvent, type VoteEscrowDaoRootDecodedTransaction, type VoteEscrowDaoRootProposeParams } from '../../models/vote-escrow-dao-root/types';
import { type VoteEscrowDaoRootProposalConfiguration, VoteEscrowDaoRootUtils } from '../../models/vote-escrow-dao-root/VoteEscrowDaoRootUtils';
import { type Forceable, type Silentable, type Syncable, type Watchable } from '../../types';
export interface VoteEscrowDaoRootCtorOptions {
watchDebounceDelay?: number;
}
export interface VoteEscrowDaoRootCreateOptions extends Syncable, VoteEscrowDaoRootCtorOptions, Watchable {
watchCallback?: VoidFunction;
}
export interface VoteEscrowDaoRootData {
proposalConfiguration?: VoteEscrowDaoRootProposalConfiguration;
voteEscrowRoot?: Address;
}
export declare class VoteEscrowDaoRoot extends SmartContractModel<VoteEscrowDaoRootData> {
protected readonly _connection: ProviderRpcClient;
protected readonly options?: Readonly<VoteEscrowDaoRootCtorOptions> | undefined;
protected readonly _provider?: ProviderRpcClient | undefined;
static Utils: typeof VoteEscrowDaoRootUtils;
/**
*
* @param {ProviderRpcClient} _connection
* Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address
* VoteEscrowDaoRoot root address
* @param {Readonly<VoteEscrowDaoRootCtorOptions>} [options]
* (optional) VoteEscrowDaoRoot Smart Contract Model options
* @param {ProviderRpcClient} [_provider]
* (optional) RPC provider that require connection to the TVM wallet
*/
constructor(_connection: ProviderRpcClient, address: Address | string, options?: Readonly<VoteEscrowDaoRootCtorOptions> | undefined, _provider?: ProviderRpcClient | undefined);
/**
*
* @param {ProviderRpcClient} connection
* Standalone RPC client that doesn't require connection to the TVM wallet provider
* @param {Address | string} address
* VoteEscrowDaoRoot root address
* @param {Readonly<VoteEscrowDaoRootCreateOptions>} [options]
* (optional) VoteEscrowDaoRoot Smart Contract Model options
* @param {ProviderRpcClient} [provider]
* (optional) RPC provider that require connection to the TVM wallet
*/
static create(connection: ProviderRpcClient, address: Address | string, options?: Readonly<VoteEscrowDaoRootCreateOptions>, provider?: ProviderRpcClient): Promise<VoteEscrowDaoRoot>;
sync(options?: Forceable & Silentable): Promise<void>;
watch(callback?: SmartContractWatchCallback<VoteEscrowDaoRootData>): 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[]>;
}