noob-ethereum
Version:
A simple Ethereum library
33 lines • 1.67 kB
TypeScript
/// <reference types="node" />
/**
* Serialise a transaction via RLP-encoding scheme
* @param {RawTransaction} tx - transaction object (can be legacy, 2930, 1559 type transaction bodies)
* @returns {Buffer} - RLP-encoded transaction
*/
declare function serialiseTransaction(tx: RawTransaction): Buffer;
/**
* Serialise an array of transaction objects via RLP-encoding scheme
* @param {RawTransactions} arr - array of transaction objects
* @returns {Buffer[]} - array of RLP-encoded transactions
*/
declare function serialiseTransactions(arr: RawTransactions): Buffer[];
/**
* Calculate transaction hash generated by a transaction object
* @param {Raw Transaction} tx - transaction object (can be legacy, 2930, 1559 type transaction bodies)
* @returns {string} - transaction hash computed
*/
declare function calculateTransactionHash(tx: RawTransaction): string;
/**
* Calculate transaction hashes generated from an array of transactions provided
* @param {RawTransactions} arr - array of transaction objects
* @returns {string[]} - array of transaction hashes computed
*/
declare function calculateTransactionHashes(arr: RawTransactions): string[];
/**
* Given a raw block (with full transaction objects), return the calculated transaction hashes
* @param {IRawBlock} block - raw block including full transaction records
* @returns {string[]} - an array of transaction hash strings
*/
declare function calculateBlockTransactionHashes(block: IRawBlock): string[];
export { serialiseTransaction, serialiseTransactions, calculateTransactionHash, calculateTransactionHashes, calculateBlockTransactionHashes, };
//# sourceMappingURL=transaction.d.ts.map