diff --git a/README-bisq.md b/README-bisq.md index 4f41e3816..d120fb178 100644 --- a/README-bisq.md +++ b/README-bisq.md @@ -2,7 +2,7 @@ Interface to access the Bisq API. -[Back to home](./README-bitcoin.md) +[Back to home](./README.md) --- diff --git a/README-bitcoin.md b/README-bitcoin.md index ba678e1ff..f404713a6 100644 --- a/README-bitcoin.md +++ b/README-bitcoin.md @@ -2,7 +2,7 @@ Interface to access the Bitcoin `mainet`, `testnet`, `signet` APIs. -[Back to home](#) +[Back to home](./README.md) --- @@ -386,6 +386,22 @@ const feesMempoolBlocks = await fees.getFeesMempoolBlocks(); console.log(feesMempoolBlocks); ``` +### **Get Children Pay for Parent** + +Returns current mempool as projected blocks. + +[ [NodeJS Example](examples/nodejs/bitcoin/fees.ts) ] [ [HTML Example](examples/html/bitcoin/fees.html) ] [ [Top](#features) ] + +```js + const { + bitcoin: { fees }, + } = mempoolJS(); + const txid = 'txid'; + + const feesCPFP = await fees.getCPFP({ txid }); + console.log(feesCPFP); +``` + ### **Get Mempool** Returns current mempool backlog statistics. diff --git a/README.md b/README.md index c9c12da50..aa9cf6839 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,10 @@ import mempoolJS from '@mempool/mempool.js'; // default mempool.space endpoints const { bitcoin, bisq, liquid } = mempoolJS(); -// (alternative) your custom endpoints +// (optional) your custom endpoints const { bitcoin, bisq, liquid } = mempoolJS({ - homespace: 'mempool.space', + hostname: 'mempool.space', + network: 'testnet' // 'signet' | 'testnet' | 'mainnet' }); ``` @@ -49,15 +50,16 @@ Include the line below in the `head` tag of your html file. ``` -Call `mempoolJS` function to access the API methods. +Call `mempoolJS()` function to access the API methods. ```js // default mempool.space endpoints const { bitcoin, bisq, liquid } = mempoolJS(); -// (alternative) your custom endpoints +// (optional) your custom endpoints const { bitcoin, bisq, liquid } = mempoolJS({ - homespace: 'mempool.space', + hostname: 'mempool.space', + network: 'testnet' // 'signet' | 'testnet' | 'mainnet' }); ```