Skip to content

Commit

Permalink
Merge pull request #20 from algorandfoundation/main
Browse files Browse the repository at this point in the history
fix: adds legacy keys for CJS clarification
  • Loading branch information
HashMapsData2Value authored Jan 21, 2025
2 parents 49dcd58 + 885d2e5 commit b4440fd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README.md
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.0.3-canary.1](https://github.com/algorandfoundation/xHD-Wallet-API-ts/compare/v1.0.2...v1.0.3-canary.1) (2025-01-21)


### Bug Fixes

* include instructions for CJS ([7cbdf23](https://github.com/algorandfoundation/xHD-Wallet-API-ts/commit/7cbdf2375782c57b6a4bff99e68d326494849d99))

## [1.0.2](https://github.com/algorandfoundation/xHD-Wallet-API-ts/compare/v1.0.1...v1.0.2) (2024-10-18)


Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,28 @@ $ yarn
$ yarn test
```

## Regarding CJS

This library can be used in a CommonJS environment as a dynamic import:

```ts
;(async function () {
const hd = await import("@algorandfoundation/xhd-wallet-api");
})();
```

Make sure to set your tsconfig.json so it is at least:

```json
{
"target": "es2020",
"module": "Node16",
"moduleResolution": "Node16"
}
```

# Test

## Output

```shell
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"name": "@algorandfoundation/xhd-wallet-api",
"version": "1.0.2",
"version": "1.0.3-canary.1",
"description": "A Typescript implementation of Algorand ARC-52 extended hierarchical determinstic wallets.",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
"scripts": {
"build": "tsc && tsc-alias -p tsconfig.json -f",
Expand Down

0 comments on commit b4440fd

Please sign in to comment.