PHP WebShell
Текущая директория: /opt/BitGoJS/modules/sdk-coin-avaxp/dist/src/lib
Просмотр файла: delegatorTxBuilder.d.ts
import { TransactionType } from '@bitgo/sdk-core';
import { BaseCoin as CoinConfig } from '@bitgo/statics';
import { DeprecatedTransactionBuilder } from './deprecatedTransactionBuilder';
import { AddDelegatorTx, ParseableOutput, TransferableInput, TransferableOutput } from 'avalanche/dist/apis/platformvm';
import { BN } from 'avalanche';
import { DeprecatedTx, DeprecatedBaseTx } from './iface';
import { Credential } from 'avalanche/dist/common';
export declare class DelegatorTxBuilder extends DeprecatedTransactionBuilder {
protected _nodeID: string;
protected _startTime: BN;
protected _endTime: BN;
protected _stakeAmount: BN;
/**
*
* @param coinConfig
*/
constructor(coinConfig: Readonly<CoinConfig>);
/**
* get transaction type
* @protected
*/
protected get transactionType(): TransactionType;
/**
* Addresses where reward should be deposit
* @param {string | string[]} address - single address or array of addresses to receive rewards
*/
rewardAddresses(address: string | string[]): this;
/**
*
* @param nodeID
*/
nodeID(value: string): this;
/**
* start time of staking period
* @param value
*/
startTime(value: string | number): this;
/**
* end time of staking period
* @param value
*/
endTime(value: string | number): this;
/**
*
* @param value
*/
stakeAmount(value: BN | string): this;
/**
* validates a correct NodeID is used
* @param nodeID
*/
validateNodeID(nodeID: string): void;
/**
*
* protected _startTime: Date;
* protected _endTime: Date;
* 2 weeks = 1209600
* 1 year = 31556926
* unix time stamp based off seconds
*/
validateStakeDuration(startTime: BN, endTime: BN): void;
/**
*
* @param amount
*/
validateStakeAmount(amount: BN): void;
/** @inheritdoc */
initBuilder(tx: DeprecatedTx): this;
static verifyTxType(baseTx: DeprecatedBaseTx): baseTx is AddDelegatorTx;
verifyTxType(baseTx: DeprecatedBaseTx): baseTx is AddDelegatorTx;
/**
*
* @protected
*/
protected buildAvaxTransaction(): void;
/**
* Create the StakeOut where the recipient address are the sender.
* @protected
*
*/
protected stakeTransferOut(): TransferableOutput;
protected rewardOwnersOutput(): ParseableOutput;
/**
* Threshold must be 2 and since output always get reordered we want to make sure we can always add signatures in the correct location
* To find the correct location for the signature, we use the ouput's addresses to create the signatureIdx in the order that we desire
* 0: user key, 1: hsm key, 2: recovery key
* @protected
*/
protected createInputOutput(): {
inputs: TransferableInput[];
outputs: TransferableOutput[];
credentials: Credential[];
};
}
//# sourceMappingURL=delegatorTxBuilder.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!