PHP WebShell
Текущая директория: /opt/BitGoJS/modules/abstract-cosmos/dist/src/lib
Просмотр файла: transactionBuilder.d.ts
import { BaseAddress, BaseKey, BaseTransactionBuilder, PublicKey as BasePublicKey, TransactionType } from '@bitgo/sdk-core';
import { BaseCoin as CoinConfig } from '@bitgo/statics';
import BigNumber from 'bignumber.js';
import { CosmosTransactionMessage, FeeData, MessageData } from './iface';
import { CosmosKeyPair as KeyPair } from './keyPair';
import { CosmosTransaction } from './transaction';
import { CosmosUtils } from './utils';
export declare abstract class CosmosTransactionBuilder<CustomMessage = never> extends BaseTransactionBuilder {
protected _transaction: CosmosTransaction<CustomMessage>;
protected _sequence: number;
protected _messages: MessageData<CustomMessage>[];
protected _gasBudget: FeeData;
protected _accountNumber?: number;
protected _signature: Buffer;
protected _chainId?: string;
protected _publicKey?: string;
protected _signer: KeyPair;
protected _memo?: string;
protected _utils: CosmosUtils<CustomMessage>;
constructor(_coinConfig: Readonly<CoinConfig>, _utils: CosmosUtils<CustomMessage>);
/**
* The transaction type.
*/
protected abstract get transactionType(): TransactionType;
/** @inheritdoc */
protected get transaction(): CosmosTransaction<CustomMessage>;
/** @inheritdoc */
protected set transaction(transaction: CosmosTransaction<CustomMessage>);
/** @inheritDoc */
addSignature(publicKey: BasePublicKey, signature: Buffer): void;
/**
* Sets sequence of this transaction.
* @param {number} sequence - sequence data for tx signer
* @returns {TransactionBuilder} This transaction builder
*/
sequence(sequence: number): this;
/**
* Sets messages to the transaction body. Message type will be different based on the transaction type
* - For @see TransactionType.StakingActivate required type is @see DelegateOrUndelegeteMessage
* - For @see TransactionType.StakingDeactivate required type is @see DelegateOrUndelegeteMessage
* - For @see TransactionType.Send required type is @see SendMessage
* - For @see TransactionType.StakingWithdraw required type is @see WithdrawDelegatorRewardsMessage
* - For @see TransactionType.ContractCall required type is @see ExecuteContractMessage
* @param {CosmosTransactionMessage[]} messages
* @returns {TransactionBuilder} This transaction builder
*/
abstract messages(messages: CosmosTransactionMessage<CustomMessage>[]): this;
publicKey(publicKey: string | undefined): this;
accountNumber(accountNumber: number | undefined): this;
chainId(chainId: string | undefined): this;
memo(memo: string | undefined): this;
/** @inheritdoc */
protected signImplementation(key: BaseKey): CosmosTransaction<CustomMessage>;
/** @inheritdoc */
validateValue(value: BigNumber): void;
/** @inheritdoc */
validateKey(key: BaseKey): void;
/**
* Sets gas budget of this transaction
* Gas budget consist of fee amount and gas limit. Division feeAmount/gasLimit represents
* the gas-fee and it should be more than minimum required gas-fee to process the transaction
* @param {FeeData} gasBudget
* @returns {TransactionBuilder} this transaction builder
*/
gasBudget(gasBudget: FeeData): this;
/**
* Initialize the transaction builder fields using the decoded transaction data
* @param {CosmosTransaction} tx the transaction data
*/
initBuilder(tx: CosmosTransaction<CustomMessage>): void;
/**
* Creates a new CosmosTransaction instance
*/
protected newTransaction(): CosmosTransaction<CustomMessage>;
/** @inheritdoc */
protected fromImplementation(rawTransaction: string): CosmosTransaction<CustomMessage>;
/** @inheritdoc */
protected buildImplementation(): Promise<CosmosTransaction<CustomMessage>>;
/** @inheritdoc */
validateAddress(address: BaseAddress, addressFormat?: string): void;
/** @inheritdoc */
validateRawTransaction(rawTransaction: string): void;
/** @inheritdoc */
validateTransaction(transaction: CosmosTransaction<CustomMessage>): void;
}
//# sourceMappingURL=transactionBuilder.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!