@vafanassieff/bitcoin-cli-ts
Version:
Auto-generated Bitcoin client library for bitcoind JSON-RPC API
20 lines • 1.11 kB
JavaScript
// Auto synced from github actions. Don't change this file
import request from '../../rpc-request.js';
/**
* getrawtransaction "txid" ( verbosity "blockhash" )
*
* By default, this call only returns a transaction if it is in the mempool. If -txindex is enabled
* and no blockhash argument is passed, it will return the transaction if it is in the mempool or any block.
* If a blockhash argument is passed, it will return the transaction if
* the specified block is available and the transaction is in that block.
* Hint: Use gettransaction for wallet transactions.
* If verbosity is 0 or omitted, returns the serialized transaction as a hex-encoded string.
* If verbosity is 1, returns a JSON Object with information about the transaction.
* If verbosity is 2, returns a JSON Object with information about the transaction, including fee and prevout information.
*
*/
export function getRawTransaction(params) {
const { bitcoind, ...methodParams } = params;
return request({ method: 'getrawtransaction', params: methodParams }, bitcoind);
}
//# sourceMappingURL=get-raw-transaction.js.map