PHP WebShell
Текущая директория: /opt/BitGoJS/modules/sdk-coin-hbar/dist/src/lib
Просмотр файла: transaction.d.ts
import { BaseCoin as CoinConfig } from '@bitgo/statics';
import { BaseKey, BaseTransaction, TransactionType } from '@bitgo/sdk-core';
import { proto } from '@hashgraph/proto';
import { TxData } from './iface';
import { KeyPair } from './';
export declare class Transaction extends BaseTransaction {
private _hederaTx;
private _txBody;
protected _type: TransactionType;
constructor(_coinConfig: Readonly<CoinConfig>);
/** @inheritdoc */
canSign(key: BaseKey): boolean;
sign(keyPair: KeyPair): Promise<void>;
/**
* Add a signature to this transaction
*
* @param {string} signature - The signature to add, in string hex format
* @param {KeyPair} key - The key of the key that created the signature
*/
addSignature(signature: string, key: KeyPair): void;
/** @inheritdoc */
toBroadcastFormat(): string;
/**
* Sets this transaction payload
*
* @param rawTransaction
*/
fromRawTransaction(rawTransaction: Uint8Array | string): void;
/** @inheritdoc */
toJson(): TxData;
/**
* Get the recipient account and the amount
* transferred on this transaction
*
* @returns { tokenName, Recipient[]} is object consisting of tokenName if it's a token transfer and recipients consisting
* the recipient address, the transfer amount, and the token name for token transfer
*/
private getTransferData;
/**
* Get the recipient account and the amount
* transferred on this transaction
*
* @returns { accountId: string; tokenNames[]} is an object consisting of accountId for the token owner
* and list of tokenNames that will be enabled
*/
private getAccountAssociateData;
get txBody(): proto.TransactionBody;
get hederaTx(): proto.Transaction;
/**
* Sets this transaction body components
*
* @param {proto.Transaction} tx - Body Transaction
*/
body(tx: proto.Transaction): void;
/**
* Set the transaction type
*
* @param {TransactionType} transactionType - The transaction type to be set
*/
setTransactionType(transactionType: TransactionType): void;
/**
* Decode previous signatures from the inner hedera transaction
* and save them into the base transaction signature list.
*/
loadPreviousSignatures(): void;
/**
* Load the input and output data on this transaction using the transaction json
* if there are outputs. For transactions without outputs (e.g. wallet initializations),
* this function will not do anything
*/
loadInputsAndOutputs(): void;
/**
* Sets this transaction body components
*
* @param {Uint8Array} bytes - Encoded body transaction
*/
bodyBytes(bytes: Uint8Array): void;
/**
* Returns this hedera transaction id components in a readable format
*
* @returns {[string, string]} - Transaction id parts [<account id>, <startTime in seconds>]
*/
getTxIdParts(): [string, string];
/**
* Returns this transaction hash
*
* @returns {string} - The transaction hash
*/
getTxHash(): string;
/**
* Encode an object using the given encoder class
*
* @param {proto} obj - The object to be encoded, must be in proto namespace
* @param encoder - Object encoder
* @returns {Uint8Array} - Encoded object byte array
*/
private encode;
/**
* Returns a sha-384 hash
*
* @param {Uint8Array} bytes - Bytes to be hashed
* @returns {string} - The resulting hash string
*/
sha(bytes: Uint8Array): string;
}
//# sourceMappingURL=transaction.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!