PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-coin-dot/dist/src/lib
Просмотр файла: transactionBuilder.d.ts
import { BaseAddress, BaseKey, BaseTransactionBuilder, FeeOptions, PublicKey as BasePublicKey, SequenceId, Signature, TransactionType, ValidityWindow } from '@bitgo/sdk-core';
import { BaseCoin as CoinConfig } from '@bitgo/statics';
import { UnsignedTransaction } from '@substrate/txwrapper-core';
import { DecodedSignedTx, DecodedSigningPayload, TypeRegistry } from '@substrate/txwrapper-core/lib/types';
import BigNumber from 'bignumber.js';
import { CreateBaseTxInfo, Material, TxMethod } from './iface';
import { KeyPair } from './keyPair';
import { Transaction } from './transaction';
export declare abstract class TransactionBuilder extends BaseTransactionBuilder {
protected _transaction: Transaction;
protected _keyPair: KeyPair;
protected _signature?: string;
protected _sender: string;
protected _blockNumber: number;
protected _referenceBlock: string;
protected _nonce: number;
protected _tip?: number;
protected _eraPeriod?: number;
protected _registry: TypeRegistry;
protected _method?: TxMethod;
protected __material?: Material;
protected _signatures: Signature[];
constructor(_coinConfig: Readonly<CoinConfig>);
/**
* Sets the address of sending account.
*
* @param {BaseAddress} address The SS58-encoded address.
* @returns {TransactionBuilder} This transaction builder.
*
* @see https://wiki.polkadot.network/docs/build-transaction-construction
*/
sender({ address }: BaseAddress): this;
/**
* The nonce for this transaction.
*
* @param {number} nonce
* @returns {TransactionBuilder} This transaction builder.
*
* @see https://wiki.polkadot.network/docs/build-transaction-construction
*/
sequenceId(nonce: SequenceId): this;
/**
* The tip to increase transaction priority.
*
* @param {number | undefined} [fee.type] options for building fee tx
* @returns {TransactionBuilder} This transaction builder.
*
* @see https://wiki.polkadot.network/docs/build-transaction-construction
*/
fee(fee: FeeOptions): this;
/**
* The number of the checkpoint block after which the transaction is valid
*
* @param {ValidityWindow} firstValid block checkpoint where transaction is first valid
* @param {ValidityWindow} maxDuration number of blocks after checkpoint for which transaction is valid
* @returns {TransactionBuilder} This transaction builder.
*
* @see https://wiki.polkadot.network/docs/build-transaction-construction
*/
validity({ firstValid, maxDuration }: ValidityWindow): this;
/**
* The hash of the checkpoint block.
*
* @param {number} referenceBlock block hash checkpoint from where the transaction is valid
* @returns {TransactionBuilder} This transaction builder.
*
* @see https://wiki.polkadot.network/docs/build-transaction-construction
* @see https://wiki.polkadot.network/docs/build-protocol-info#transaction-mortality
*/
referenceBlock(referenceBlock: string): this;
/**
* The current version for transaction format.
*
* @param {number} transactionVersion
* @returns {TransactionBuilder} This transaction builder.
*
* @see https://wiki.polkadot.network/docs/build-transaction-construction
* @deprecated This field was added in material data.
*/
version(transactionVersion: number): this;
private method;
/**
* The material data for the block.
*
* @param {Material} material
* @returns {TransactionBuilder} This transaction builder.
*
* @see https://wiki.polkadot.network/docs/build-transaction-construction
*/
material(material: Material): this;
protected get _material(): Material;
/** @inheritdoc */
protected get transaction(): Transaction;
/** @inheritdoc */
protected set transaction(transaction: Transaction);
/** @inheritdoc */
protected fromImplementation(rawTransaction: string): Transaction;
getMethodAndArguments(): string;
/** @inheritdoc */
protected buildImplementation(): Promise<Transaction>;
protected createBaseTxInfo(): CreateBaseTxInfo;
/**
* Builds the specific transaction builder internally
* using the @substrate/txwrapper builder.
*/
protected abstract buildTransaction(): UnsignedTransaction;
/**
* The transaction type.
*/
protected abstract get transactionType(): TransactionType;
/** @inheritdoc */
validateAddress(address: BaseAddress, addressFormat?: string): void;
/** @inheritdoc */
validateKey({ key }: BaseKey): void;
/**
* Validates the specific transaction builder internally
*/
protected abstract validateDecodedTransaction(decodedTxn: DecodedSigningPayload | DecodedSignedTx, rawTransaction?: string): void;
/** @inheritdoc */
validateRawTransaction(rawTransaction: string): void;
/** @inheritdoc */
validateTransaction(_: Transaction): void;
private validateBaseFields;
/** @inheritdoc */
validateValue(value: BigNumber): void;
/** @inheritdoc */
addSignature(publicKey: BasePublicKey, signature: Buffer): void;
/** @inheritdoc */
protected signImplementation({ key }: BaseKey): Transaction;
}
//# sourceMappingURL=transactionBuilder.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!