PHP WebShell

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

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

import { BaseCoin as CoinConfig } from '@bitgo/statics';
import { StakingOperationTypes } from '@bitgo/sdk-core';
import { StakingCall } from './stakingCall';
export declare class StakingBuilder {
    private readonly DEFAULT_ADDRESS;
    private _amount;
    private _validatorGroup;
    private _lesser;
    private _greater;
    private _index;
    private _type;
    private _coinConfig;
    constructor(coinConfig: Readonly<CoinConfig>, serializedData?: string);
    type(type: StakingOperationTypes): this;
    amount(value: string): this;
    group(validatorGroup: string): this;
    lesser(lesser: string): this;
    greater(greater: string): this;
    index(index: number): this;
    build(): StakingCall;
    /**
     * Builds a lock gold operation sending the amount on the transaction value field
     *
     * @returns {StakingCall} a lock gold operation using the LockedGold contract
     */
    private buildLockStaking;
    /**
     * Builds an unlock gold operation sending the amount encoded on the data field
     *
     * params
     * amount: amount of locked gold to be unlocked
     *
     * @returns {StakingCall} an unlock gold operation using the LockedGold contract
     */
    private buildUnlockStaking;
    /**
     * Builds a vote operation that uses locked gold to add pending votes for a validator group.
     *
     * params
     * validatorGroup: group to vote for
     * amount: amount of votes (locked gold) for the group
     * lesser: validator group that has less votes than the validatorGroup
     * greater: validator group that has more vots than the validatorGroup
     *
     * @returns {StakingCall} an vote operation using the Election contract
     */
    private buildVoteStaking;
    /**
     * Builds an unvote operation to revoke active votes for a validator group.
     *
     * params
     * validatorGroup: group whose votes will be revoked
     * amount: amount of votes (locked gold) that will be revoked
     * lesser: validator group that has less votes than the validatorGroup
     * greater: validator group that has more vots than the validatorGroup
     * index: index of the validatorGroup on the list of groups the address has voted for
     *
     * @returns {StakingCall} an vote operation using the Election contract
     */
    private buildUnvoteStaking;
    /**
     * Builds an activate vote operation to change all the votes casted for a validator
     * from 'pending' to 'active'
     *
     * params
     * validatorGroup: group whose votes will be activated
     *
     * @returns {StakingCall} an activate votes operation
     */
    private buildActivateStaking;
    /**
     * Builds a withdraw operation for locked gold that has been unlocked
     * after the unlocking period has passed.
     *
     * params
     * index: index of the unlock operation whose unlocking period has passed.
     *
     * @returns {StakingCall} an activate votes operation
     */
    private buildWithdrawStaking;
    private validateMandatoryFields;
    private validateElectionFields;
    private validateIndex;
    private validateAmount;
    private validateUnvoteFields;
    private validateGroup;
    private decodeStakingData;
    private validateDecodedDataLength;
    private classifyStakingType;
}
//# sourceMappingURL=stakingBuilder.d.ts.map

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


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