Fix readme instructions.
This commit is contained in:
parent
b3606e46c1
commit
920622137b
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Interface to access the Bisq API.
|
Interface to access the Bisq API.
|
||||||
|
|
||||||
[Back to home](./README-bitcoin.md)
|
[Back to home](./README.md)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Interface to access the Bitcoin `mainet`, `testnet`, `signet` APIs.
|
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);
|
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**
|
### **Get Mempool**
|
||||||
|
|
||||||
Returns current mempool backlog statistics.
|
Returns current mempool backlog statistics.
|
||||||
|
12
README.md
12
README.md
@ -35,9 +35,10 @@ import mempoolJS from '@mempool/mempool.js';
|
|||||||
// default mempool.space endpoints
|
// default mempool.space endpoints
|
||||||
const { bitcoin, bisq, liquid } = mempoolJS();
|
const { bitcoin, bisq, liquid } = mempoolJS();
|
||||||
|
|
||||||
// (alternative) your custom endpoints
|
// (optional) your custom endpoints
|
||||||
const { bitcoin, bisq, liquid } = mempoolJS({
|
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.
|
|||||||
<script type="text/javascript" src="https://mempool.space/mempool.js"></script>
|
<script type="text/javascript" src="https://mempool.space/mempool.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
Call `mempoolJS` function to access the API methods.
|
Call `mempoolJS()` function to access the API methods.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// default mempool.space endpoints
|
// default mempool.space endpoints
|
||||||
const { bitcoin, bisq, liquid } = mempoolJS();
|
const { bitcoin, bisq, liquid } = mempoolJS();
|
||||||
|
|
||||||
// (alternative) your custom endpoints
|
// (optional) your custom endpoints
|
||||||
const { bitcoin, bisq, liquid } = mempoolJS({
|
const { bitcoin, bisq, liquid } = mempoolJS({
|
||||||
homespace: 'mempool.space',
|
hostname: 'mempool.space',
|
||||||
|
network: 'testnet' // 'signet' | 'testnet' | 'mainnet'
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user