PHP WebShell
Текущая директория: /opt/BitGoJS/modules/sdk-coin-avaxp/dist/src/lib
Просмотр файла: deprecatedTransactionBuilder.d.ts
import { BaseCoin as CoinConfig } from '@bitgo/statics';
import BigNumber from 'bignumber.js';
import { BaseAddress, BaseKey, BaseTransactionBuilder, TransactionType, BaseTransaction } from '@bitgo/sdk-core';
import { DeprecatedTransaction } from './deprecatedTransaction';
import { KeyPair } from './keyPair';
import { BN, Buffer as BufferAvax } from 'avalanche';
import { DecodedUtxoObj, DeprecatedTx } from './iface';
export declare abstract class DeprecatedTransactionBuilder extends BaseTransactionBuilder {
private _transaction;
_signer: KeyPair[];
protected recoverSigner: boolean;
constructor(_coinConfig: Readonly<CoinConfig>);
/**
* Initialize the transaction builder fields using the decoded transaction data
*
* @param {DeprecatedTx} tx the transaction data
* @returns itself
*/
initBuilder(tx: DeprecatedTx): this;
/** @inheritdoc */
protected fromImplementation(rawTransaction: string): DeprecatedTransaction;
/** @inheritdoc */
protected buildImplementation(): Promise<DeprecatedTransaction>;
/**
* Builds the avax transaction. transaction field is changed.
*/
protected abstract buildAvaxTransaction(): void;
/**
* When using recovery key must be set here
* TODO: STLX-17317 recovery key signing
* @param {boolean} true if it's recovery signer, default true.
*/
recoverMode(recoverSigner?: boolean): this;
/**
* Threshold is an int that names the number of unique signatures required to spend the output.
* Must be less than or equal to the length of Addresses.
* @param {number}
*/
threshold(value: number): this;
/**
* Locktime is a long that contains the unix timestamp that this output can be spent after.
* The unix timestamp is specific to the second.
* @param value
*/
locktime(value: string | number): this;
/**
* fromPubKey is a list of unique addresses that correspond to the private keys that can be used to spend this output.
* @param {string | stirng[]} senderPubKey
*/
fromPubKey(senderPubKey: string | string[]): this;
/**
* List of UTXO required as inputs.
* A UTXO is a standalone representation of a transaction output.
*
* @param {DecodedUtxoObj[]} list of UTXOS
*/
utxos(value: DecodedUtxoObj[]): this;
/**
* Getter for know if build should sign
*/
get hasSigner(): boolean;
/** @inheritdoc */
protected get transaction(): DeprecatedTransaction;
protected set transaction(transaction: DeprecatedTransaction);
/** @inheritdoc */
protected signImplementation({ key }: BaseKey): BaseTransaction;
protected abstract get transactionType(): TransactionType;
/**
* Validates the threshold
* @param threshold
*/
validateThreshold(threshold: number): void;
/**
* Validates locktime
* @param locktime
*/
validateLocktime(locktime: BN): void;
/** @inheritdoc */
validateAddress(address: BaseAddress, addressFormat?: string): void;
/** @inheritdoc */
validateKey({ key }: BaseKey): void;
/**
* Check the raw transaction has a valid format in the blockchain context, throw otherwise.
* It overrides abstract method from BaseTransactionBuilder
*
* @param rawTransaction Transaction in any format
*/
validateRawTransaction(rawTransaction: string): void;
/** @inheritdoc */
validateTransaction(transaction?: DeprecatedTransaction): void;
/** @inheritdoc */
validateValue(value: BigNumber): void;
/**
* Check the list of UTXOS is empty and check each UTXO.
* @param values
*/
validateUtxos(values: DecodedUtxoObj[]): void;
/**
* Check the UTXO has expected fields.
* @param UTXO
*/
validateUtxo(value: DecodedUtxoObj): void;
/**
* Check the amount is positive.
* @param amount
*/
validateAmount(amount: BN): void;
/**
* Check the buffer has 32 byte long.
* @param chainID
*/
validateChainId(chainID: BufferAvax): void;
}
//# sourceMappingURL=deprecatedTransactionBuilder.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!