UNPKG

@q-dev/q-js-sdk

Version:

Typescript Library to interact with Q System Contracts

43 lines (42 loc) 2 kB
import type { ContractTransaction } from 'ethers'; import { Vesting } from '../../ethers-contracts/Vesting'; import { VotingLockInfo, QNonPayableTx, SignerOrProvider } from '../../types'; import { TimeLockHelperInstance } from '../TimeLockHelperInstance'; /** * Vesting instance to interact with Vesting contract. * See [onchain documentation](@system-contracts-repo/@network/Vesting/) for more details. * An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.vesting} */ export declare class VestingInstance extends TimeLockHelperInstance<Vesting> { static readonly registryKey = "tokeneconomics.vesting"; static readonly abi = "Vesting.json"; constructor(signerOrProvider: SignerOrProvider, address: string); /** * [External documentation](@system-contracts-repo/@network/Vesting/#lock) */ lock(amount: string, txOptions?: QNonPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/Vesting/#announceunlock) */ announceUnlock(amount: string, txOptions?: QNonPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/Vesting/#unlock) */ unlock(amount: string, txOptions?: QNonPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/Vesting/#withdraw) */ withdraw(amount: string, txOptions?: QNonPayableTx): Promise<ContractTransaction>; /** * [External documentation](@system-contracts-repo/@network/Vesting/#balanceof) */ balanceOf(userAddress: string): Promise<string>; /** * [External documentation](@system-contracts-repo/@network/Vesting/#withdrawablebalanceof) */ withdrawableBalanceOf(account: string): Promise<string>; /** * [External documentation](@system-contracts-repo/@network/Vesting/#getlockinfo) */ getLockInfo(user: string): Promise<VotingLockInfo>; }