mempool/examples/nodejs/addresses.ts
Miguel Medeiros f39361263a
v2.2.0 - new major version for mempool-js (#2)
* - Refactoring code.
- Refactoring folder structure.
- Adding apiEndpoint and websocketEndpoint to Mempool config.
- Adding brownserify feature.
- Adding MIT LICENSE

* - Changing package.json information.
- Reorganizing README.md information.
- Default export for CommonJs and ES6 Modules.
- Changing default variable to mempoolJS.
- Organizing the API and WS providers.
- Splitting websocket connection types: client and server.

* Change version to 2.2.0.
Reorder keywords in alphabetical order.
2021-04-08 10:15:30 -03:00

24 lines
665 B
TypeScript

import mempoolJS from '../../src/index';
const init = async () => {
const { addresses } = mempoolJS();
const address = '1wizSAYSbuyXbt9d8JV8ytm5acqq2TorC';
const addressTest = await addresses.getAddress(address);
console.log(addressTest);
const addressTxs = await addresses.getAddressTxs(address);
console.log(addressTxs);
const addressTxsChain = await addresses.getAddressTxsChain(address);
console.log(addressTxsChain);
const addressTxsMempool = await addresses.getAddressTxsMempool(address);
console.log(addressTxsMempool);
const addressTxsUtxo = await addresses.getAddressTxsUtxo(address);
console.log(addressTxsUtxo);
};
init();