@vafanassieff/bitcoin-cli-ts
Version:
Auto-generated Bitcoin client library for bitcoind JSON-RPC API
26 lines (22 loc) • 691 B
text/typescript
// Auto synced from github actions. Don't change this file
import { Bitcoind } from '../../types.js'
import request from '../../rpc-request.js'
type GetTxOutParams = {
bitcoind: Bitcoind
/* The transaction id */
txid: string
/* vout number */
n: number
/* Whether to include the mempool. Note that an unspent output that is spent in the mempool won't appear. */
include_mempool?: boolean
}
/**
* gettxout "txid" n ( include_mempool )
*
* Returns details about an unspent transaction output.
*
*/
export function getTxOut(params: GetTxOutParams) {
const { bitcoind, ...methodParams } = params
return request({ method: 'gettxout', params: methodParams }, bitcoind)
}