PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-coin-near/dist/src/lib
Просмотр файла: transaction.d.ts
import * as nearAPI from 'near-api-js';
import { BaseKey, BaseTransaction, TransactionType } from '@bitgo/sdk-core';
import { BaseCoin as CoinConfig } from '@bitgo/statics';
import { Action, TransactionExplanation, TxData } from './iface';
import { KeyPair } from './keyPair';
export declare class Transaction extends BaseTransaction {
private _nearTransaction;
private _nearSignedTransaction;
constructor(coinConfig: Readonly<CoinConfig>);
get nearTransaction(): nearAPI.transactions.Transaction;
set nearTransaction(tx: nearAPI.transactions.Transaction);
/** @inheritdoc */
canSign(key: BaseKey): boolean;
/** @inheritdoc */
toBroadcastFormat(): string;
/** @inheritdoc */
toJson(): TxData;
/**
* Set the transaction type.
*
* @param {TransactionType} transactionType The transaction type to be set.
*/
setTransactionType(transactionType: TransactionType): void;
/**
* Sets this transaction payload
*
* @param rawTx
*/
fromRawTransaction(rawTx: string): void;
/**
* Sign this transaction
*
* @param {KeyPair} signer key
*/
sign(signer: KeyPair): void;
/**
* set transaction type by staking contract method names.
* @param methodName method name to match and set the transaction type
*/
private setTypeByFunctionCall;
/**
* Check if method is allowed on Near account-lib implementation.
* This method should check on all contracts added to Near.
* @param methodName contract call method name to check if it's allowed.
*/
private validateMethodAllowed;
/**
* Check if valid methods are present for batching of actions
*
* @param {TxAction[]} actions list of near transaction actions
* @returns {void}
*/
private validateBatchingMethods;
/**
* Build input and output field for this transaction
*
*/
loadInputsAndOutputs(): void;
/**
* Returns a complete explanation for a transfer transaction
* @param {TxData} json The transaction data in json format
* @param {TransactionExplanation} explanationResult The transaction explanation to be completed
* @returns {TransactionExplanation}
*/
explainTransferTransaction(json: TxData, explanationResult: TransactionExplanation): TransactionExplanation;
/**
* Returns a complete explanation for a staking activate transaction
* @param {TxData} json The transaction data in json format
* @param {TransactionExplanation} explanationResult The transaction explanation to be completed
* @returns {TransactionExplanation}
*/
explainStakingActivateTransaction(json: TxData, explanationResult: TransactionExplanation): TransactionExplanation;
/**
* Returns a complete explanation for a staking withdraw transaction
* @param {TxData} json The transaction data in json format
* @param {TransactionExplanation} explanationResult The transaction explanation to be completed
* @returns {TransactionExplanation}
*/
explainStakingWithdrawTransaction(json: TxData, explanationResult: TransactionExplanation): TransactionExplanation;
/**
* Calculates the total fungible token amount & total native near amount
*
* @param {Action[]} actions the list of delegate transaction actions
* @returns {String} either native near amount or fungible token amount
*/
calculateTotalOutputAmount(actions: Action[]): string;
/**
* Returns a complete explanation for a token transfer transaction
* @param {TxData} json The transaction data in json format
* @param {TransactionExplanation} explanationResult The transaction explanation to be completed
* @returns {TransactionExplanation}
*/
explainTokenTransferTransaction(json: TxData, explanationResult: TransactionExplanation): TransactionExplanation;
/**
* Returns a complete explanation for a storage deposit transaction
* @param {TxData} json The transaction data in json format
* @param {TransactionExplanation} explanationResult The transaction explanation to be completed
* @returns {TransactionExplanation}
*/
explainStorageDepositTransaction(json: TxData, explanationResult: TransactionExplanation): TransactionExplanation;
/** @inheritdoc */
explainTransaction(): TransactionExplanation;
private getTransactionHash;
get signablePayload(): Buffer;
/**
* Constructs a signed payload using construct.signTx
* This method will be called during the build step if a TSS signature
* is added and will set the signTransaction which is the txHex that will be broadcasted
* As well as add the signature used to sign to the signature array in hex format
*
* @param {Buffer} signature The signature to be added to a near transaction
*/
constructSignedPayload(signature: Buffer): void;
/** @inheritdoc **/
get signature(): string[];
}
//# sourceMappingURL=transaction.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!