PHP WebShell

Текущая директория: /opt/BitGoJS/modules/sdk-coin-tao/dist/src/lib

Просмотр файла: stakingBuilder.d.ts

import { BaseCoin as CoinConfig } from '@bitgo/statics';
import { UnsignedTransaction, DecodedSignedTx, DecodedSigningPayload } from '@substrate/txwrapper-core';
import { TransactionType, BaseAddress } from '@bitgo/sdk-core';
import { Transaction, TransactionBuilder } from '@bitgo/abstract-substrate';
export declare class StakingBuilder extends TransactionBuilder {
    protected _amount: string;
    protected _hotkey: string;
    protected _netuid: string;
    constructor(_coinConfig: Readonly<CoinConfig>);
    /**
     * Construct a transaction to stake
     * @returns {UnsignedTransaction} an unsigned stake TAO transaction
     *
     * @see https://polkadot.js.org/docs/substrate/extrinsics/#staking
     */
    protected buildTransaction(): UnsignedTransaction;
    /** @inheritdoc */
    protected get transactionType(): TransactionType;
    /**
     * Set the amount to stake
     * @param {string} amount to stake
     * @returns {StakingBuilder} This staking builder.
     *
     * @see https://wiki.polkadot.network/docs/learn-nominator#required-minimum-stake
     */
    amount(amount: string): this;
    /**
     * Set the validator hot key address
     * @param {string} hotkey address of validator
     * @returns {StakingBuilder} This staking builder.
     *
     * @see https://wiki.polkadot.network/docs/learn-staking#accounts
     */
    hotkey({ address }: BaseAddress): this;
    /**
     * Set netuid of the subnet (root network is 0)
     * @param {string} netuid of subnet
     * @returns {StakingBuilder} This staking builder.
     */
    netuid(netuid: string): this;
    /** @inheritdoc */
    protected fromImplementation(rawTransaction: string): Transaction;
    /** @inheritdoc */
    validateTransaction(_: Transaction): void;
    /**
     * Helper method to validate whether stake params have the correct type and format
     * @param {string} amountStaked amount to stake
     * @param {string} hotkey hotkey address of the validator
     * @param {string} netuid netuid of the subnet
     */
    private validateFields;
    /** @inheritdoc */
    validateDecodedTransaction(decodedTxn: DecodedSigningPayload | DecodedSignedTx, rawTransaction: string): void;
    /**
     * Construct a transaction to stake
     *
     * @param {Interface.AddStakeArgs} Stake arguments to be passed to the addStake method
     * @param {Interface.CreateBaseTxInfo} Base txn info required to construct the addStake txn
     * @returns {UnsignedTransaction} an unsigned stake TAO transaction
     */
    private addStake;
}
//# sourceMappingURL=stakingBuilder.d.ts.map

Выполнить команду


Для локальной разработки. Не используйте в интернете!