Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: polkadot-js/common
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v11.1.3
Choose a base ref
...
head repository: polkadot-js/common
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v12.0.1
Choose a head ref

Commits on Apr 2, 2023

  1. Copy the full SHA
    6ba4508 View commit details
  2. [CI Skip] bump/beta 11.1.4-0-x

    skip-checks: true
    github-actions[bot] committed Apr 2, 2023
    Copy the full SHA
    2999987 View commit details

Commits on Apr 4, 2023

  1. Update lock wf (#1791)

    jacogr authored Apr 4, 2023
    Copy the full SHA
    7bf1706 View commit details
  2. [CI Skip] bump/beta 11.1.4-1-x

    skip-checks: true
    github-actions[bot] committed Apr 4, 2023
    Copy the full SHA
    ef839a7 View commit details

Commits on Apr 8, 2023

  1. Bump TypeScript (#1793)

    * Bump TypeScript
    
    * Bump dev
    
    * Bump dev, no npm:
    jacogr authored Apr 8, 2023
    Copy the full SHA
    7dcdef1 View commit details
  2. [CI Skip] bump/beta 11.1.4-2-x

    skip-checks: true
    github-actions[bot] committed Apr 8, 2023
    Copy the full SHA
    c096a49 View commit details

Commits on Apr 10, 2023

  1. Copy the full SHA
    a767ef6 View commit details
  2. [CI Skip] bump/beta 11.1.4-3-x

    skip-checks: true
    github-actions[bot] committed Apr 10, 2023
    Copy the full SHA
    5964f79 View commit details

Commits on Apr 11, 2023

  1. Bump dev (w/ lint updates) (#1795)

    * Bump dev (w/ lint updates)
    
    * Bump dev
    
    * Adjust behavior for global setting
    
    * Adjust versionDetect expectations
    jacogr authored Apr 11, 2023
    Copy the full SHA
    de85d06 View commit details
  2. [CI Skip] bump/beta 11.1.4-4-x

    skip-checks: true
    github-actions[bot] committed Apr 11, 2023
    Copy the full SHA
    23e0558 View commit details

Commits on Apr 12, 2023

  1. Copy the full SHA
    997f8f6 View commit details
  2. [CI Skip] bump/beta 11.1.4-5-x

    skip-checks: true
    github-actions[bot] committed Apr 12, 2023
    Copy the full SHA
    a990b4e View commit details
  3. Copy the full SHA
    5abab5b View commit details
  4. Copy the full SHA
    2607203 View commit details
  5. Copy the full SHA
    5004d1d View commit details
  6. Copy the full SHA
    cd7a32c View commit details
  7. Copy the full SHA
    103745f View commit details
  8. Import box functionality from tweetnacl (#1785)

    * Import box functionality from tweetnacl
    
    * Remove box/boxOpen functionality
    
    * Additional comment
    
    * Import secretbox test vectors
    
    * Allow empty base64 input
    
    * Combine non-xor crypto_stream usage with xor
    
    * Adjust
    
    * inline let
    
    * Rename tests, extract test vectors
    
    * Adjust chnages comments
    
    * Remove box keypair
    
    * Remove rng set operation
    
    * Inline adjust
    
    * Verify adjustment
    jacogr authored Apr 12, 2023
    Copy the full SHA
    29551e4 View commit details
  9. [CI Skip] bump/beta 11.1.4-6-x

    skip-checks: true
    github-actions[bot] committed Apr 12, 2023
    Copy the full SHA
    9d43b78 View commit details
  10. Use @noble/curves (secp256k1 + ed25519) (#1776)

    * Use @noble/curves (secp256k1 only for now)
    
    * Re-add canonical signatures (now lowS)
    
    * Swap tweetnacl usage for ed25519
    
    * Adjust previously failing tests
    
    * Adjust test for ethereum encoding
    
    * hasBigInt for ed25519 operations
    
    * CHANGELOG
    
    * Publich beta to npm for size check
    jacogr authored Apr 12, 2023
    Copy the full SHA
    455ae2c View commit details
  11. [CI Skip] release/beta 11.1.4-7

    skip-checks: true
    github-actions[bot] committed Apr 12, 2023
    Copy the full SHA
    91a2eac View commit details
  12. Copy the full SHA
    3fd8074 View commit details
  13. [CI Skip] bump/beta 11.1.4-8-x

    skip-checks: true
    github-actions[bot] committed Apr 12, 2023
    Copy the full SHA
    667fe8f View commit details
  14. Add genesis hash for Cere Network (#1806)

    * Add genesis hash for Cere Network
    
    * Put Cere Network in correct alphabet order
    
    * Rename CereNetwork to Cere
    shamilkhan authored Apr 12, 2023
    Copy the full SHA
    56e3458 View commit details
  15. [CI Skip] bump/beta 11.1.4-9-x

    skip-checks: true
    github-actions[bot] committed Apr 12, 2023
    Copy the full SHA
    f0f561e View commit details

Commits on Apr 13, 2023

  1. Copy the full SHA
    efe4ce8 View commit details
  2. [CI Skip] bump/beta 11.1.4-10-x

    skip-checks: true
    github-actions[bot] committed Apr 13, 2023
    Copy the full SHA
    8920045 View commit details
  3. x-randomvalues w/ shared base64 decoding (#1807)

    * x-randomvalues w/ shared base64 decoding
    
    * Adjust
    
    * npm publish
    jacogr authored Apr 13, 2023
    Copy the full SHA
    e1a2ea4 View commit details
  4. [CI Skip] release/beta 11.1.4-11

    skip-checks: true
    github-actions[bot] committed Apr 13, 2023
    Copy the full SHA
    3c9b20e View commit details
  5. Add missing peerDependencies for x-randomvalues (#1808)

    * Add missing peerDependencies for x-randomvalues
    
    * publish
    jacogr authored Apr 13, 2023
    Copy the full SHA
    bb6a2b4 View commit details
  6. [CI Skip] release/beta 11.1.4-12

    skip-checks: true
    github-actions[bot] committed Apr 13, 2023
    Copy the full SHA
    38ac052 View commit details

Commits on Apr 14, 2023

  1. Copy the full SHA
    4ec2cf9 View commit details
  2. [CI Skip] bump/beta 11.1.4-13-x

    skip-checks: true
    github-actions[bot] committed Apr 14, 2023
    Copy the full SHA
    ed73a79 View commit details

Commits on Apr 15, 2023

  1. Adjust isCodec with better API alignment (#1810)

    * Adjust isCodec with better API alignment
    
    * Adjust tests
    
    * Remove test dupes
    jacogr authored Apr 15, 2023
    Copy the full SHA
    3ee8109 View commit details
  2. [CI Skip] bump/beta 11.1.4-14-x

    skip-checks: true
    github-actions[bot] committed Apr 15, 2023
    Copy the full SHA
    6ce32b8 View commit details
  3. CHANGELOG (#1811)

    jacogr authored Apr 15, 2023
    Copy the full SHA
    a0e5d48 View commit details
  4. [CI Skip] bump/beta 11.1.4-15-x

    skip-checks: true
    github-actions[bot] committed Apr 15, 2023
    Copy the full SHA
    1f8b573 View commit details

Commits on Apr 20, 2023

  1. Bump deps (#1812)

    jacogr authored Apr 20, 2023
    Copy the full SHA
    b4bed3d View commit details
  2. [CI Skip] bump/beta 11.1.4-16-x

    skip-checks: true
    github-actions[bot] committed Apr 20, 2023
    Copy the full SHA
    e3b1136 View commit details

Commits on Apr 21, 2023

  1. Bump dev (w/ Node 16+ only) (#1813)

    * Bump dev (w/ Node 16+ only)
    
    * Lint
    
    * Fix build
    jacogr authored Apr 21, 2023
    Copy the full SHA
    51a7263 View commit details
  2. [CI Skip] bump/beta 11.1.4-17-x

    skip-checks: true
    github-actions[bot] committed Apr 21, 2023
    Copy the full SHA
    f5a3a6f View commit details
  3. Align x-randomvalues with webCrypto (#1782)

    * Align x-randomvalues with webCrypto
    
    * Deno export from browser
    
    * export * for x-ws
    
    * export * from RN
    
    * CHANGELOG
    jacogr authored Apr 21, 2023
    Copy the full SHA
    dfd07e0 View commit details
  4. [CI Skip] bump/beta 11.1.4-18-x

    skip-checks: true
    github-actions[bot] committed Apr 21, 2023
    Copy the full SHA
    cdf6cc6 View commit details
  5. Copy the full SHA
    b5d83f8 View commit details
  6. [CI Skip] bump/beta 11.1.4-19-x

    skip-checks: true
    github-actions[bot] committed Apr 21, 2023
    Copy the full SHA
    db4dde0 View commit details

Commits on Apr 22, 2023

  1. 12.0.1 (#1815)

    * 12.0.1
    
    * Inline xxhash single-use
    
    * Adjust comments
    jacogr authored Apr 22, 2023
    Copy the full SHA
    2d2a1a5 View commit details
  2. [CI Skip] release/stable 12.0.1

    skip-checks: true
    github-actions[bot] committed Apr 22, 2023
    Copy the full SHA
    bead42c View commit details
Showing with 6,978 additions and 1,253 deletions.
  1. +4 −4 .github/workflows/lock.yml
  2. +18 −0 CHANGELOG.md
  3. +2 −1 CONTRIBUTORS
  4. +6 −6 package.json
  5. +7 −7 packages/hw-ledger-transports/package.json
  6. +1 −1 packages/hw-ledger-transports/src/packageInfo.ts
  7. +4 −11 packages/hw-ledger-transports/src/types.ts
  8. +5 −5 packages/hw-ledger/package.json
  9. +8 −3 packages/hw-ledger/src/bundle.ts
  10. +1 −1 packages/hw-ledger/src/packageInfo.ts
  11. +6 −6 packages/keyring/package.json
  12. +2 −2 packages/keyring/src/keyring.ts
  13. +1 −1 packages/keyring/src/packageInfo.ts
  14. +1 −1 packages/keyring/src/pair/types.ts
  15. +4 −4 packages/networks/package.json
  16. +3 −0 packages/networks/src/defaults/genesis.ts
  17. +1 −1 packages/networks/src/packageInfo.ts
  18. +11 −11 packages/util-crypto/package.json
  19. +3 −1 packages/util-crypto/src/blake2/asU8a.ts
  20. +0 −10 packages/util-crypto/src/bundleInit.ts
  21. +9 −4 packages/util-crypto/src/ed25519/pair/fromSecret.ts
  22. +9 −3 packages/util-crypto/src/ed25519/pair/fromSeed.ts
  23. +8 −5 packages/util-crypto/src/ed25519/sign.ts
  24. +9 −5 packages/util-crypto/src/ed25519/verify.ts
  25. +3 −1 packages/util-crypto/src/key/extractPath.spec.ts
  26. +3 −1 packages/util-crypto/src/key/extractSuri.spec.ts
  27. +2 −1 packages/util-crypto/src/key/extractSuri.ts
  28. +1 −1 packages/util-crypto/src/key/fromPath.ts
  29. +1 −2 packages/util-crypto/src/key/hdkdDerive.ts
  30. +1 −1 packages/util-crypto/src/key/hdkdSr25519.ts
  31. +65 −12 packages/util-crypto/src/mnemonic/bip39.spec.ts
  32. +13 −9 packages/util-crypto/src/mnemonic/bip39.ts
  33. +20 −3 packages/util-crypto/src/mnemonic/generate.spec.ts
  34. +3 −3 packages/util-crypto/src/mnemonic/generate.ts
  35. +13 −1 packages/util-crypto/src/mnemonic/toEntropy.spec.ts
  36. +3 −3 packages/util-crypto/src/mnemonic/toEntropy.ts
  37. +17 −5 packages/util-crypto/src/mnemonic/toMiniSecret.spec.ts
  38. +4 −6 packages/util-crypto/src/mnemonic/toMiniSecret.ts
  39. +2 −2 packages/util-crypto/src/mnemonic/toMiniSecretCmp.spec.ts
  40. +14 −2 packages/util-crypto/src/mnemonic/validate.spec.ts
  41. +3 −3 packages/util-crypto/src/mnemonic/validate.ts
  42. 0 packages/util-crypto/src/mnemonic/{bip39-en.ts → wordlists/en.ts}
  43. +7 −0 packages/util-crypto/src/mnemonic/wordlists/es.ts
  44. +7 −0 packages/util-crypto/src/mnemonic/wordlists/fr.ts
  45. +11 −0 packages/util-crypto/src/mnemonic/wordlists/index.ts
  46. +7 −0 packages/util-crypto/src/mnemonic/wordlists/it.ts
  47. +7 −0 packages/util-crypto/src/mnemonic/wordlists/jp.ts
  48. +7 −0 packages/util-crypto/src/mnemonic/wordlists/ko.ts
  49. +7 −0 packages/util-crypto/src/mnemonic/wordlists/zh-s.ts
  50. +7 −0 packages/util-crypto/src/mnemonic/wordlists/zh-t.ts
  51. +0 −29 packages/util-crypto/src/nacl/box/fromSecret.spec.ts
  52. +0 −24 packages/util-crypto/src/nacl/box/fromSecret.ts
  53. +2 −2 packages/util-crypto/src/nacl/decrypt.ts
  54. +2 −3 packages/util-crypto/src/nacl/encrypt.ts
  55. +0 −3 packages/util-crypto/src/nacl/index.ts
  56. +0 −102 packages/util-crypto/src/nacl/open.spec.ts
  57. +0 −22 packages/util-crypto/src/nacl/open.ts
  58. +0 −26 packages/util-crypto/src/nacl/seal.spec.ts
  59. +0 −32 packages/util-crypto/src/nacl/seal.ts
  60. +4,629 −0 packages/util-crypto/src/nacl/tweetnacl-secretbox-data.spec.ts
  61. +161 −0 packages/util-crypto/src/nacl/tweetnacl-secretbox.spec.ts
  62. +1,159 −0 packages/util-crypto/src/nacl/tweetnacl.ts
  63. +1 −1 packages/util-crypto/src/packageInfo.ts
  64. +3 −4 packages/util-crypto/src/secp256k1/compress.spec.ts
  65. +2 −2 packages/util-crypto/src/secp256k1/compress.ts
  66. +3 −4 packages/util-crypto/src/secp256k1/expand.spec.ts
  67. +4 −4 packages/util-crypto/src/secp256k1/expand.ts
  68. +2 −2 packages/util-crypto/src/secp256k1/pair/fromSeed.ts
  69. +6 −2 packages/util-crypto/src/secp256k1/recover.ts
  70. +5 −6 packages/util-crypto/src/secp256k1/sign.ts
  71. +14 −20 packages/util-crypto/src/xxhash/xxhash64.ts
  72. +7 −7 packages/util/package.json
  73. +1 −1 packages/util/src/bi/toHex.ts
  74. +2 −1 packages/util/src/bn/min.ts
  75. +8 −8 packages/util/src/format/formatBalance.ts
  76. +4 −9 packages/util/src/is/codec.spec.ts
  77. +6 −4 packages/util/src/is/codec.ts
  78. +1 −1 packages/util/src/packageInfo.ts
  79. +2 −1 packages/util/src/u8a/toHex.spec.ts
  80. +2 −1 packages/util/src/u8a/toHexBuffer.spec.ts
  81. +9 −9 packages/util/src/versionDetect.spec.ts
  82. +7 −10 packages/util/src/versionDetect.ts
  83. +3 −3 packages/x-bigint/package.json
  84. +16 −4 packages/x-bigint/src/index.ts
  85. +1 −5 packages/x-bigint/src/mod.ts
  86. +1 −1 packages/x-bigint/src/packageInfo.ts
  87. +3 −3 packages/x-bundle/package.json
  88. +1 −1 packages/x-bundle/src/packageInfo.ts
  89. +3 −3 packages/x-fetch/package.json
  90. +1 −5 packages/x-fetch/src/mod.ts
  91. +1 −1 packages/x-fetch/src/packageInfo.ts
  92. +1 −1 packages/x-fetch/src/react-native.ts
  93. +2 −2 packages/x-global/package.json
  94. +1 −1 packages/x-global/src/packageInfo.ts
  95. +9 −7 packages/x-randomvalues/package.json
  96. +0 −52 packages/x-randomvalues/src/base64.spec.ts
  97. +0 −37 packages/x-randomvalues/src/base64.ts
  98. +5 −4 packages/x-randomvalues/src/browser.ts
  99. +1 −0 packages/x-randomvalues/src/fallback.ts
  100. +1 −5 packages/x-randomvalues/src/mod.ts
  101. +9 −8 packages/x-randomvalues/src/node.ts
  102. +1 −1 packages/x-randomvalues/src/packageInfo.ts
  103. +23 −19 packages/x-randomvalues/src/react-native.ts
  104. +7 −0 packages/x-randomvalues/src/shim.ts
  105. +3 −6 packages/x-textdecoder/package.json
  106. +1 −5 packages/x-textdecoder/src/mod.ts
  107. +1 −1 packages/x-textdecoder/src/node.ts
  108. +1 −1 packages/x-textdecoder/src/packageInfo.ts
  109. +1 −1 packages/x-textdecoder/src/react-native.ts
  110. +3 −6 packages/x-textencoder/package.json
  111. +1 −5 packages/x-textencoder/src/mod.ts
  112. +1 −1 packages/x-textencoder/src/node.ts
  113. +1 −1 packages/x-textencoder/src/packageInfo.ts
  114. +1 −1 packages/x-textencoder/src/react-native.ts
  115. +3 −3 packages/x-ws/package.json
  116. +1 −5 packages/x-ws/src/mod.ts
  117. +1 −1 packages/x-ws/src/packageInfo.ts
  118. +1 −1 packages/x-ws/src/react-native.ts
  119. +475 −563 yarn.lock
8 changes: 4 additions & 4 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
@@ -13,13 +13,13 @@ jobs:
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836
with:
github-token: ${{ secrets.GH_PAT_BOT }}
issue-lock-inactive-days: '7'
issue-lock-comment: >
issue-inactive-days: '7'
issue-comment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue
if you think you have a related problem or query.
pr-lock-inactive-days: '2'
pr-lock-comment: >
pr-inactive-days: '2'
pr-comment: >
This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# CHANGELOG

## 12.0.1 Apr 22, 2023

Contributed:

- Add Cere genesisHash (Thanks to https://github.com/shamilkhan)

Changes:

- Swap secp256k1 functionality to `@noble/curves`
- Swap ed25519 functionality to `@noble/curves`
- Replace `tweetnacl` secretbox usage with slimmer local version
- Adjust `isCodec` helper with closer API alignment
- Initial steps to multi-language bip39 support
- Use Node webcrypto for Node `getRandomValues` support
- Upgrade dependencies to latest stable versions
- Drop support for Node 14 (EOL 30 Apr 2023)


## 11.1.3 Apr 1, 2023

Contributed:
3 changes: 2 additions & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1577 Jaco 11.1.3 (#1789)
1602 Jaco 12.0.1 (#1815)
12 Carlo Sala feat(networks): support ledger for pendulum (#1739)
9 Antoine Estienne Add eth uri keyring test (#1291)
6 Amaury Martiny Add tests from Rust (#283)
@@ -48,6 +48,7 @@
1 Raymond Zhong Add Edgeware ledger app (#1006)
1 Reto Trinkler Adding 4 as address type of ss58 for Katal Chain (#639)
1 Rocco Musolino remove doc broken link (#697)
1 Shamilkhan Add genesis hash for Cere Network (#1806)
1 Song Zhou Add in ability to encrypt/decrypt msg with keyring (#1070)
1 Thibaut Sardan add hasLedgerSupport prop to networks (#835)
1 Tomokazu Kozuma fix comment (#1119)
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -14,10 +14,10 @@
},
"sideEffects": false,
"type": "module",
"version": "11.1.3",
"version": "12.0.1",
"versions": {
"git": "11.1.3",
"npm": "11.1.3"
"git": "12.0.1",
"npm": "12.0.1"
},
"workspaces": [
"packages/*"
@@ -37,10 +37,10 @@
"test:one": "polkadot-dev-run-test --env browser"
},
"devDependencies": {
"@polkadot/dev": "^0.72.29",
"@types/node": "^18.15.11"
"@polkadot/dev": "^0.73.2",
"@types/node": "^18.15.13"
},
"resolutions": {
"typescript": "^5.0.3"
"typescript": "^5.0.4"
}
}
14 changes: 7 additions & 7 deletions packages/hw-ledger-transports/package.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/common/issues",
"engines": {
"node": ">=14"
"node": ">=16"
},
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/hw-ledger-transports#readme",
"license": "Apache-2.0",
@@ -14,18 +14,18 @@
},
"sideEffects": false,
"type": "module",
"version": "11.1.3",
"version": "12.0.1",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"dependencies": {
"@ledgerhq/hw-transport": "^6.28.1",
"@ledgerhq/hw-transport-webhid": "^6.27.12",
"@ledgerhq/hw-transport-webusb": "^6.27.12",
"@polkadot/util": "11.1.3",
"@ledgerhq/hw-transport": "^6.28.2",
"@ledgerhq/hw-transport-webhid": "^6.27.13",
"@ledgerhq/hw-transport-webusb": "^6.27.13",
"@polkadot/util": "12.0.1",
"tslib": "^2.5.0"
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid-singleton": "^6.28.9"
"@ledgerhq/hw-transport-node-hid-singleton": "^6.28.10"
}
}
2 changes: 1 addition & 1 deletion packages/hw-ledger-transports/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '11.1.3' };
export const packageInfo = { name: '@polkadot/hw-ledger-transports', path: 'auto', type: 'auto', version: '12.0.1' };
15 changes: 4 additions & 11 deletions packages/hw-ledger-transports/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
// Copyright 2017-2023 @polkadot/hw-ledger authors & contributors
// SPDX-License-Identifier: Apache-2.0

// CJS, so we use import * syntax
import type * as HwTransport from '@ledgerhq/hw-transport';

// u2f is deprecated an therefore not added
export type TransportType = 'hid' | 'webusb';

// The actual namespaced Transport interface, imported via
//
// import type Transport from '@ledgerhq/hw-transport';
//
// does not work on moduleResolution: nodenext, so we just go with a
// very light interface for Transport (and then TransportStatic).

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Transport {
// empty on purpose, just a stub
}
export type Transport = HwTransport.default;

export interface TransportDef {
/** Create a transport to be used in Ledger operations */
10 changes: 5 additions & 5 deletions packages/hw-ledger/package.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/common/issues",
"engines": {
"node": ">=14"
"node": ">=16"
},
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/hw-ledger#readme",
"license": "Apache-2.0",
@@ -17,12 +17,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "11.1.3",
"version": "12.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/hw-ledger-transports": "11.1.3",
"@polkadot/util": "11.1.3",
"@zondax/ledger-substrate": "^0.40.6",
"@polkadot/hw-ledger-transports": "12.0.1",
"@polkadot/util": "12.0.1",
"@zondax/ledger-substrate": "^0.40.7",
"tslib": "^2.5.0"
}
}
11 changes: 8 additions & 3 deletions packages/hw-ledger/src/bundle.ts
Original file line number Diff line number Diff line change
@@ -30,9 +30,14 @@ async function wrapError <T extends WrappedResult> (promise: Promise<T>): Promis
return result;
}

// A very basic wrapper for a ledger app -
// - it connects automatically, creating an app as required
// - Promises return errors (instead of wrapper errors)
/**
* @name Ledger
*
* @description
* A very basic wrapper for a ledger app -
* - it connects automatically on use, creating an underlying interface as required
* - Promises reject with errors (unwrapped errors from @zondax/ledger-substrate)
*/
export class Ledger {
#app: SubstrateApp | null = null;

2 changes: 1 addition & 1 deletion packages/hw-ledger/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '11.1.3' };
export const packageInfo = { name: '@polkadot/hw-ledger', path: 'auto', type: 'auto', version: '12.0.1' };
12 changes: 6 additions & 6 deletions packages/keyring/package.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"bugs": "https://github.com/polkadot-js/common/issues",
"description": "Keyring management",
"engines": {
"node": ">=14"
"node": ">=16"
},
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/keyring#readme",
"license": "Apache-2.0",
@@ -18,15 +18,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "11.1.3",
"version": "12.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/util": "11.1.3",
"@polkadot/util-crypto": "11.1.3",
"@polkadot/util": "12.0.1",
"@polkadot/util-crypto": "12.0.1",
"tslib": "^2.5.0"
},
"peerDependencies": {
"@polkadot/util": "11.1.3",
"@polkadot/util-crypto": "11.1.3"
"@polkadot/util": "12.0.1",
"@polkadot/util-crypto": "12.0.1"
}
}
4 changes: 2 additions & 2 deletions packages/keyring/src/keyring.ts
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ export class Keyring implements KeyringInstance {

readonly #type: KeypairType;

#ss58?: number;
#ss58?: number | undefined;

public decodeAddress = decodeAddress;

@@ -246,7 +246,7 @@ export class Keyring implements KeyringInstance {
public encodeAddress = (address: Uint8Array | string, ss58Format?: number): string => {
return this.type === 'ethereum'
? ethereumEncode(address)
: encodeAddress(address, ss58Format === undefined ? this.#ss58 : ss58Format);
: encodeAddress(address, ss58Format ?? this.#ss58);
};

/**
2 changes: 1 addition & 1 deletion packages/keyring/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '11.1.3' };
export const packageInfo = { name: '@polkadot/keyring', path: 'auto', type: 'auto', version: '12.0.1' };
2 changes: 1 addition & 1 deletion packages/keyring/src/pair/types.ts
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@

export interface PairInfo {
publicKey: Uint8Array;
secretKey?: Uint8Array;
secretKey?: Uint8Array | undefined;
seed?: Uint8Array | null;
}
8 changes: 4 additions & 4 deletions packages/networks/package.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"bugs": "https://github.com/polkadot-js/common/issues",
"description": "A list of all available Substrate networks and their applicable prefixes",
"engines": {
"node": ">=14"
"node": ">=16"
},
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/networks#readme",
"license": "Apache-2.0",
@@ -15,14 +15,14 @@
},
"sideEffects": false,
"type": "module",
"version": "11.1.3",
"version": "12.0.1",
"main": "index.js",
"dependencies": {
"@polkadot/util": "11.1.3",
"@polkadot/util": "12.0.1",
"@substrate/ss58-registry": "^1.39.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/hw-ledger": "11.1.3"
"@polkadot/hw-ledger": "12.0.1"
}
}
3 changes: 3 additions & 0 deletions packages/networks/src/defaults/genesis.ts
Original file line number Diff line number Diff line change
@@ -36,6 +36,9 @@ export const knownGenesis: KnownGenesis = {
'0xb3db41421702df9a7fcac62b53ffeac85f7853cc4e689e0b93aeb3db18c09d82',
'0x67dddf2673b69e5f875f6f25277495834398eafd67f492e09f3f3345e003d1b5'
],
cere: [
'0x81443836a9a24caaa23f1241897d1235717535711d1d3fe24eae4fdc942c092c'
],
composable: [
'0xdaab8df776eb52ec604a5df5d388bb62a050a0aaec4556a64265b9d42755552d'
],
2 changes: 1 addition & 1 deletion packages/networks/src/packageInfo.ts
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '11.1.3' };
export const packageInfo = { name: '@polkadot/networks', path: 'auto', type: 'auto', version: '12.0.1' };
22 changes: 11 additions & 11 deletions packages/util-crypto/package.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"bugs": "https://github.com/polkadot-js/common/issues",
"description": "A collection of useful crypto utilities for @polkadot",
"engines": {
"node": ">=14"
"node": ">=16"
},
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/util-crypto#readme",
"license": "Apache-2.0",
@@ -20,25 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "11.1.3",
"version": "12.0.1",
"browser": {
"crypto": false,
"stream": false
},
"main": "index.js",
"dependencies": {
"@noble/curves": "1.0.0",
"@noble/hashes": "1.3.0",
"@noble/secp256k1": "1.7.1",
"@polkadot/networks": "11.1.3",
"@polkadot/util": "11.1.3",
"@polkadot/wasm-crypto": "^7.0.3",
"@polkadot/x-bigint": "11.1.3",
"@polkadot/x-randomvalues": "11.1.3",
"@polkadot/networks": "12.0.1",
"@polkadot/util": "12.0.1",
"@polkadot/wasm-crypto": "^7.1.1",
"@polkadot/wasm-util": "^7.1.1",
"@polkadot/x-bigint": "12.0.1",
"@polkadot/x-randomvalues": "12.0.1",
"@scure/base": "1.1.1",
"tslib": "^2.5.0",
"tweetnacl": "^1.0.3"
"tslib": "^2.5.0"
},
"peerDependencies": {
"@polkadot/util": "11.1.3"
"@polkadot/util": "12.0.1"
}
}
4 changes: 3 additions & 1 deletion packages/util-crypto/src/blake2/asU8a.ts
Original file line number Diff line number Diff line change
@@ -30,7 +30,9 @@ export function blake2AsU8a (data: HexString | Uint8Array | string, bitLength: 6

return !hasBigInt || (!onlyJs && isReady())
? blake2b(u8a, u8aToU8a(key), byteLength)
: blake2bJs(u8a, { dkLen: byteLength, key: key || undefined });
: key
? blake2bJs(u8a, { dkLen: byteLength, key })
: blake2bJs(u8a, { dkLen: byteLength });
}

/**
10 changes: 0 additions & 10 deletions packages/util-crypto/src/bundleInit.ts
Original file line number Diff line number Diff line change
@@ -3,18 +3,8 @@

import '@polkadot/x-bigint/shim';

import { utils as utilsNobleSecp256k1 } from '@noble/secp256k1';

import { u8aConcat } from '@polkadot/util';

import { hmacSha256AsU8a } from './hmac/index.js';
import { cryptoWaitReady } from './crypto.js';

// Set overrides on the secp256k1 utils
// - hmacShaSync - This needs to be set, unset by default
utilsNobleSecp256k1.hmacSha256Sync = (key: Uint8Array, ...messages: Uint8Array[]) =>
hmacSha256AsU8a(key, u8aConcat(...messages));

// start init process immediately
cryptoWaitReady().catch((): void => {
// shouldn't happen, logged and caught inside cryptoWaitReady
Loading