diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d269133..9b2c2c0 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,17 +1,23 @@ name: Node CI - -on: [push, pull_request] +on: + - push + - pull_request jobs: test: - name: v20 @ ubuntu-latest + name: v${{ matrix.node }} @ ubuntu-latest runs-on: ubuntu-latest + strategy: + matrix: + node: + - 18 + - 20 steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@v3 - with: - node-version: 20 - - run: npm install - - run: npm run build --if-present - - run: npm test - - run: npm run lint --if-present + - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 + with: + node-version: ${{ matrix.node }} + - run: npm install + - run: npm run build --if-present + - run: npm test + - run: npm run lint --if-present diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 3438a7f..339e831 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,23 +1,23 @@ name: Publish Package to npm on: - release: - types: [created] + release: + types: [created] jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 - with: - node-version: 20 - registry-url: 'https://registry.npmjs.org' - cache: npm - - run: npm install -g npm - - run: npm ci - - run: npm run build - - run: npm publish --provenance --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 + - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + cache: npm + - run: npm install -g npm + - run: npm ci + - run: npm run build + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/README.md b/README.md index 29530b5..d0ab5aa 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Audited & minimal implementation of BIP32 hierarchical deterministic (HD) wallet [noble-curves](https://github.com/paulmillr/noble-curves), [noble-hashes](https://github.com/paulmillr/noble-hashes), and [scure-base](https://github.com/paulmillr/scure-base) -- 🪶 Only 418KB all-bundled: much smaller than similar libraries +- 🪶 300 lines. 90KB with all dependencies Check out [scure-bip39](https://github.com/paulmillr/scure-bip39) if you need mnemonic phrases. See [ed25519-keygen](https://github.com/paulmillr/ed25519-keygen) if you need SLIP-0010/BIP32 ed25519 hdkey implementation.