Skip to content

Commit

Permalink
Merge pull request #16 from bitcoinerlab/chore/update-explorer-to-v0.4.0
Browse files Browse the repository at this point in the history
chore: update to @bitcoinerlab/explorer v0.4.0 and adapt API usage
  • Loading branch information
landabaso authored Nov 15, 2024
2 parents ed6d9d1 + d30b41d commit c7ca380
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ To get started, follow the steps below:
await explorer.connect();
const discovery = new Discovery();
// Perform discovery operations...
await explorer.close();
explorer.close();
```
The [`Discovery` constructor](https://bitcoinerlab.com/modules/discovery/api/classes/_Internal_.Discovery.html#constructor), `new Discovery({ descriptorsCacheSize, outputsPerDescriptorCacheSize })`, accepts an optional object with two properties that are crucial for managing the application's memory usage:
Expand Down
53 changes: 26 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@bitcoinerlab/discovery",
"description": "A TypeScript library for retrieving Bitcoin funds from ranged descriptors, leveraging @bitcoinerlab/explorer for standardized access to multiple blockchain explorers.",
"homepage": "https://github.com/bitcoinerlab/discovery",
"version": "1.2.6",
"version": "1.3.0",
"author": "Jose-Luis Landabaso",
"license": "MIT",
"prettier": "@bitcoinerlab/configs/prettierConfig.json",
Expand Down Expand Up @@ -44,7 +44,7 @@
],
"dependencies": {
"@bitcoinerlab/descriptors": "^2.2.0",
"@bitcoinerlab/explorer": "^0.3.2",
"@bitcoinerlab/explorer": "^0.4.0",
"@bitcoinerlab/secp256k1": "^1.1.1",
"@types/memoizee": "^0.4.8",
"bitcoinjs-lib": "^6.1.5",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/discovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ for (const network of [networks.bitcoin]) {
//);
}
//console.log(JSON.stringify(discovery.getDiscoveryInfo(), null, 2));
await explorerAndInfo.explorer.close();
explorerAndInfo.explorer.close();
},
180 * 10 * 1000 //30 minutes
);
Expand Down
6 changes: 3 additions & 3 deletions test/integration/regtest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,9 @@ describe('Discovery on regtest', () => {
}

for (const { explorer, name } of discoverers) {
test(`Closes ${name}`, async () => {
expect(async () => {
await explorer.close();
test(`Closes ${name}`, () => {
expect(() => {
explorer.close();
}).not.toThrow();
});
}
Expand Down

0 comments on commit c7ca380

Please sign in to comment.