mirror of
https://github.com/pezkuwichain/pezkuwi-wasm.git
synced 2026-04-21 23:48:00 +00:00
chore: complete rebrand to PezkuwiChain - replace polkadot/substrate with pezkuwi/bizinikiwi
This commit is contained in:
+38
-38
@@ -4,48 +4,48 @@
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Bump polkadot-js dependencies ([#605](https://github.com/polkadot-js/wasm/pull/605))
|
- Bump pezkuwi dependencies ([#605](https://github.com/pezkuwichain/pezkuwi-wasm/pull/605))
|
||||||
|
|
||||||
|
|
||||||
## 7.5.3 Nov 24, 2025
|
## 7.5.3 Nov 24, 2025
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Bump @polkadot dependencies ([#603](https://github.com/polkadot-js/wasm/pull/603))
|
- Bump @pezkuwi dependencies ([#603](https://github.com/pezkuwichain/pezkuwi-wasm/pull/603))
|
||||||
|
|
||||||
|
|
||||||
## 7.5.2 Nov 10, 2025
|
## 7.5.2 Nov 10, 2025
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Fix/Revert asm build ([#599](https://github.com/polkadot-js/wasm/pull/599))
|
- Fix/Revert asm build ([#599](https://github.com/pezkuwichain/pezkuwi-wasm/pull/599))
|
||||||
- Bump @polkadot dependencies ([#601](https://github.com/polkadot-js/wasm/pull/601))
|
- Bump @pezkuwi dependencies ([#601](https://github.com/pezkuwichain/pezkuwi-wasm/pull/601))
|
||||||
|
|
||||||
|
|
||||||
## 7.5.1 aug 25, 2025
|
## 7.5.1 aug 25, 2025
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Bump yarn to 4.5.1 ([#573](https://github.com/polkadot-js/wasm/pull/573))
|
- Bump yarn to 4.5.1 ([#573](https://github.com/pezkuwichain/pezkuwi-wasm/pull/573))
|
||||||
- Update comments and labels from 2024 to 2025 ([#574](https://github.com/polkadot-js/wasm/pull/574))
|
- Update comments and labels from 2024 to 2025 ([#574](https://github.com/pezkuwichain/pezkuwi-wasm/pull/574))
|
||||||
- Bump yarn to 4.6.0 ([#575](https://github.com/polkadot-js/wasm/pull/575))
|
- Bump yarn to 4.6.0 ([#575](https://github.com/pezkuwichain/pezkuwi-wasm/pull/575))
|
||||||
- Set execute for build script in CI ([#576](https://github.com/polkadot-js/wasm/pull/576))
|
- Set execute for build script in CI ([#576](https://github.com/pezkuwichain/pezkuwi-wasm/pull/576))
|
||||||
- Set permissions on all scripts ([#577](https://github.com/polkadot-js/wasm/pull/577))
|
- Set permissions on all scripts ([#577](https://github.com/pezkuwichain/pezkuwi-wasm/pull/577))
|
||||||
- Bump dev to 0.83.2 ([#578](https://github.com/polkadot-js/wasm/pull/578))
|
- Bump dev to 0.83.2 ([#578](https://github.com/pezkuwichain/pezkuwi-wasm/pull/578))
|
||||||
- chore: added check in ext_secp_recover for signature normalization ([#579](https://github.com/polkadot-js/wasm/pull/579))
|
- chore: added check in ext_secp_recover for signature normalization ([#579](https://github.com/pezkuwichain/pezkuwi-wasm/pull/579))
|
||||||
- chore: Improve CI ([#580](https://github.com/polkadot-js/wasm/pull/580))
|
- chore: Improve CI ([#580](https://github.com/pezkuwichain/pezkuwi-wasm/pull/580))
|
||||||
- Revert CI improvements and wasm-bindgen version ([#583](https://github.com/polkadot-js/wasm/pull/583))
|
- Revert CI improvements and wasm-bindgen version ([#583](https://github.com/pezkuwichain/pezkuwi-wasm/pull/583))
|
||||||
- Added validation checks in PBKDF2 and Scrypt hashing functions ([#584](https://github.com/polkadot-js/wasm/pull/584))
|
- Added validation checks in PBKDF2 and Scrypt hashing functions ([#584](https://github.com/pezkuwichain/pezkuwi-wasm/pull/584))
|
||||||
- Rollback wasm-bindgen version change ([#586](https://github.com/polkadot-js/wasm/pull/586))
|
- Rollback wasm-bindgen version change ([#586](https://github.com/pezkuwichain/pezkuwi-wasm/pull/586))
|
||||||
- Fix rust version to 1.84 ([#587](https://github.com/polkadot-js/wasm/pull/587))
|
- Fix rust version to 1.84 ([#587](https://github.com/pezkuwichain/pezkuwi-wasm/pull/587))
|
||||||
- Default to installed rust version ([#588](https://github.com/polkadot-js/wasm/pull/588))
|
- Default to installed rust version ([#588](https://github.com/pezkuwichain/pezkuwi-wasm/pull/588))
|
||||||
- Default to nightly rust version ([#589](https://github.com/polkadot-js/wasm/pull/589))
|
- Default to nightly rust version ([#589](https://github.com/pezkuwichain/pezkuwi-wasm/pull/589))
|
||||||
- Ci Fix ([#590](https://github.com/polkadot-js/wasm/pull/590))
|
- Ci Fix ([#590](https://github.com/pezkuwichain/pezkuwi-wasm/pull/590))
|
||||||
- Read lock file ([#591](https://github.com/polkadot-js/wasm/pull/591))
|
- Read lock file ([#591](https://github.com/pezkuwichain/pezkuwi-wasm/pull/591))
|
||||||
- Setup nightly as default ([#592](https://github.com/polkadot-js/wasm/pull/592))
|
- Setup nightly as default ([#592](https://github.com/pezkuwichain/pezkuwi-wasm/pull/592))
|
||||||
- Tweak install-build-deps.sh script ([#593](https://github.com/polkadot-js/wasm/pull/593))
|
- Tweak install-build-deps.sh script ([#593](https://github.com/pezkuwichain/pezkuwi-wasm/pull/593))
|
||||||
- Remove ASM build ([#594](https://github.com/polkadot-js/wasm/pull/594))
|
- Remove ASM build ([#594](https://github.com/pezkuwichain/pezkuwi-wasm/pull/594))
|
||||||
- Bump @polkadot deps ([#595](https://github.com/polkadot-js/wasm/pull/595))
|
- Bump @pezkuwi deps ([#595](https://github.com/pezkuwichain/pezkuwi-wasm/pull/595))
|
||||||
|
|
||||||
|
|
||||||
## 7.4.1 Oct 20, 2024
|
## 7.4.1 Oct 20, 2024
|
||||||
@@ -115,7 +115,7 @@ Changes:
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Update to latest `@polkadot/dev` (w/ tsc jsx detection output changes)
|
- Update to latest `@pezkuwi/dev` (w/ tsc jsx detection output changes)
|
||||||
|
|
||||||
|
|
||||||
## 7.0.1 Mar 4, 2023
|
## 7.0.1 Mar 4, 2023
|
||||||
@@ -217,7 +217,7 @@ Changes:
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Swap from `libsecp256k1` to `secp256k1` (this aligns with the Substrate use)
|
- Swap from `libsecp256k1` to `secp256k1` (this aligns with the Bizinikiwi use)
|
||||||
- Adjust `wasm-crypto/init*` to also export `initWasm(): Promise<void>` (optional manual init)
|
- Adjust `wasm-crypto/init*` to also export `initWasm(): Promise<void>` (optional manual init)
|
||||||
- Allow for `wasm-crypto/initNone` with no defined Wasm or Asm interfaces
|
- Allow for `wasm-crypto/initNone` with no defined Wasm or Asm interfaces
|
||||||
- Fix initialization on React Native with only ASM
|
- Fix initialization on React Native with only ASM
|
||||||
@@ -225,12 +225,12 @@ Changes:
|
|||||||
|
|
||||||
## 5.0.1 Mar 19, 2022
|
## 5.0.1 Mar 19, 2022
|
||||||
|
|
||||||
- **Breaking change** For users of React Native, you are now required to add `import '@polkadot/wasm-crypto/initOnlyAsm'` at your project top-level to ensure that asm.js is initialized. (Or alternatively `import '@polkadot/wasm-crypto/initWasmAsm'` to future-proof when WASM does become available)
|
- **Breaking change** For users of React Native, you are now required to add `import '@pezkuwi/wasm-crypto/initOnlyAsm'` at your project top-level to ensure that asm.js is initialized. (Or alternatively `import '@pezkuwi/wasm-crypto/initWasmAsm'` to future-proof when WASM does become available)
|
||||||
- **Breaking change** For users who used to map the `data` and `empty` of the internal `wasm-crypto-{wasm, asmjs}` packages in their bundlers, swap to one of the `@polkadot/wasm-crypto/init*` top-level imports to set the type of interfaces you would prefer. A full writeup of the rationale and other options can be found [in the FAQ](https://polkadot.js.org/docs/util-crypto/FAQ#i-dont-have-wasm-available-in-my-environment)
|
- **Breaking change** For users who used to map the `data` and `empty` of the internal `wasm-crypto-{wasm, asmjs}` packages in their bundlers, swap to one of the `@pezkuwi/wasm-crypto/init*` top-level imports to set the type of interfaces you would prefer. A full writeup of the rationale and other options can be found [in the FAQ](https://js.pezkuwichain.io/docs/util-crypto/FAQ#i-dont-have-wasm-available-in-my-environment)
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Add (optional) `@polkadot/wasm-crypto/init{OnlyAsm, OnlyWasm, WasmAsm}` to allow specific interface types
|
- Add (optional) `@pezkuwi/wasm-crypto/init{OnlyAsm, OnlyWasm, WasmAsm}` to allow specific interface types
|
||||||
- Add work-around for lazy secp256k1 init in asm.js environments
|
- Add work-around for lazy secp256k1 init in asm.js environments
|
||||||
- Optimize asm.js output size
|
- Optimize asm.js output size
|
||||||
- Use latest `wasm-bindgen`, `binaryen` & `wabt` packages in build
|
- Use latest `wasm-bindgen`, `binaryen` & `wabt` packages in build
|
||||||
@@ -292,7 +292,7 @@ Changes:
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Bump `@polkadot/dev` to allow for bundles with new-format
|
- Bump `@pezkuwi/dev` to allow for bundles with new-format
|
||||||
|
|
||||||
|
|
||||||
## 4.1.1 Jul 7, 2021
|
## 4.1.1 Jul 7, 2021
|
||||||
@@ -363,13 +363,13 @@ Changes:
|
|||||||
|
|
||||||
## 3.0.1 Dec 13, 2020
|
## 3.0.1 Dec 13, 2020
|
||||||
|
|
||||||
**Important** This assumes `@polkadot/util` 5+ peerDependencies
|
**Important** This assumes `@pezkuwi/util` 5+ peerDependencies
|
||||||
**Important** While this package contains no external interface changes, it doe now compile and ship both cjs and esm modules. This means that modern bundlers will have more information for tree-shaking available. Additionally when using Node with `.mjs` extensions, the esm version imports will be used on recent Node versions. Adding an export map, as here, may have some impacts so a major semver bump is advised. There may be (small) dragons hiding in the dark corners...
|
**Important** While this package contains no external interface changes, it doe now compile and ship both cjs and esm modules. This means that modern bundlers will have more information for tree-shaking available. Additionally when using Node with `.mjs` extensions, the esm version imports will be used on recent Node versions. Adding an export map, as here, may have some impacts so a major semver bump is advised. There may be (small) dragons hiding in the dark corners...
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Build and expose both cjs and esm via exports map
|
- Build and expose both cjs and esm via exports map
|
||||||
- Split wasm and asmjs files into the `@polkadot/wasm-crypto-{wasm,asmjs}` packages
|
- Split wasm and asmjs files into the `@pezkuwi/wasm-crypto-{wasm,asmjs}` packages
|
||||||
- Add fflate WASM compression, with 180K raw savings (37K over-the-wire)
|
- Add fflate WASM compression, with 180K raw savings (37K over-the-wire)
|
||||||
- Convert the package to full TypeScript sources
|
- Convert the package to full TypeScript sources
|
||||||
|
|
||||||
@@ -379,7 +379,7 @@ Changes:
|
|||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Rework generation of WASM interfaces (proper cross-platform JS support)
|
- Rework generation of WASM interfaces (proper cross-platform JS support)
|
||||||
- Remove explicit `crypto` dependency, this is now applied by `@polkadot/x-randomvalues`
|
- Remove explicit `crypto` dependency, this is now applied by `@pezkuwi/x-randomvalues`
|
||||||
- Build via xargo for panic abort, an overall small sizes without stack (Pinned nightly)
|
- Build via xargo for panic abort, an overall small sizes without stack (Pinned nightly)
|
||||||
- Move Rust library sources in to `rs/` subfolder
|
- Move Rust library sources in to `rs/` subfolder
|
||||||
|
|
||||||
@@ -396,7 +396,7 @@ Changes:
|
|||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Add `scrypt` function for KDF generation
|
- Add `scrypt` function for KDF generation
|
||||||
- Remove `bip39ToSeed`, we only use the `bip39ToMiniSecret` variant in Substrate
|
- Remove `bip39ToSeed`, we only use the `bip39ToMiniSecret` variant in Bizinikiwi
|
||||||
- Update ed25519-dalek to 1.0.0-pre.4
|
- Update ed25519-dalek to 1.0.0-pre.4
|
||||||
- Rework generation based on latest wasm-pack generator
|
- Rework generation based on latest wasm-pack generator
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ Changes:
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Pull in schnorrkel 0.8.5 for full Substrate 2.x compatibility
|
- Pull in schnorrkel 0.8.5 for full Bizinikiwi 2.x compatibility
|
||||||
|
|
||||||
|
|
||||||
## 0.14.1 Sep 09, 2019
|
## 0.14.1 Sep 09, 2019
|
||||||
@@ -452,7 +452,7 @@ Changes:
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Remove deprecated `@polkadot/wasm-schnorrkel` & `@polkadot/wasm-dalek-ed25519` source (all combined in `@polkadot/wasm-crypto`, was kept for historical purposes)
|
- Remove deprecated `@pezkuwi/wasm-schnorrkel` & `@pezkuwi/wasm-dalek-ed25519` source (all combined in `@pezkuwi/wasm-crypto`, was kept for historical purposes)
|
||||||
- Security dependency bumps
|
- Security dependency bumps
|
||||||
- Updated Rust `hex-literal` for recent versions of the compiler (used in tests only)
|
- Updated Rust `hex-literal` for recent versions of the compiler (used in tests only)
|
||||||
|
|
||||||
@@ -468,7 +468,7 @@ Changes:
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- w3f/schnorrkel updated to 0.1.1 as per substrate
|
- w3f/schnorrkel updated to 0.1.1 as per bizinikiwi
|
||||||
- Added known subkey signature test (Rust & JS)
|
- Added known subkey signature test (Rust & JS)
|
||||||
|
|
||||||
|
|
||||||
@@ -483,7 +483,7 @@ Changes:
|
|||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Pull ed25519 & sr25519 into `@polkadot/wasm-crypto` as well (smaller final size)
|
- Pull ed25519 & sr25519 into `@pezkuwi/wasm-crypto` as well (smaller final size)
|
||||||
- Disable build/publish of `wasm-dalek-ed25519` & `wasm-schnorrkel`
|
- Disable build/publish of `wasm-dalek-ed25519` & `wasm-schnorrkel`
|
||||||
- Improve error messaging, instead of `__wasm_malloc of null`
|
- Improve error messaging, instead of `__wasm_malloc of null`
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# @polkadot/wasm
|
# @pezkuwi/wasm
|
||||||
|
|
||||||
Various WASM wrappers around Rust crates
|
Various WASM wrappers around Rust crates
|
||||||
|
|
||||||
@@ -8,10 +8,10 @@ It is split up into a number of internal packages, namely utilities -
|
|||||||
|
|
||||||
- [wasm-crypto](packages/wasm-crypto/) Various hashing functions, sr25519 & ed25519 crypto
|
- [wasm-crypto](packages/wasm-crypto/) Various hashing functions, sr25519 & ed25519 crypto
|
||||||
|
|
||||||
These are split from the `polkadot-js/util` repo where it is heavily used as part of `@polkadot/util-crypto`. (There JS fallbacks are available for some interfaces, e.g. hashing, but for sr25519 WASM is the only interface). Since these don't undergo massive changes on a daily basis and has a build overhead (WASM compilation & optimisation), it is better managed as a seperate repo with a specific CI configuration.
|
These are split from the `pezkuwi/util` repo where it is heavily used as part of `@pezkuwi/util-crypto`. (There JS fallbacks are available for some interfaces, e.g. hashing, but for sr25519 WASM is the only interface). Since these don't undergo massive changes on a daily basis and has a build overhead (WASM compilation & optimisation), it is better managed as a seperate repo with a specific CI configuration.
|
||||||
|
|
||||||
## development
|
## development
|
||||||
|
|
||||||
Contributions are welcome!
|
Contributions are welcome!
|
||||||
|
|
||||||
To start off, this repo (along with others in the [@polkadot](https://github.com/polkadot-js/) family) uses yarn workspaces to organise the code. As such, after cloning, its dependencies _should_ be installed via `yarn`, not via npm; the latter will result in broken dependencies.
|
To start off, this repo (along with others in the [@pezkuwi](https://github.com/pezkuwi/) family) uses yarn workspaces to organise the code. As such, after cloning, its dependencies _should_ be installed via `yarn`, not via npm; the latter will result in broken dependencies.
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import baseConfig from '@polkadot/dev/config/eslint';
|
import baseConfig from '@pezkuwi/dev/config/eslint';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
...baseConfig,
|
...baseConfig,
|
||||||
|
|||||||
+6
-6
@@ -25,26 +25,26 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn build:wasm",
|
"build": "yarn build:wasm",
|
||||||
"build:js": "./scripts/build-js.sh",
|
"build:js": "./scripts/build-js.sh",
|
||||||
"build:release": "polkadot-ci-ghact-build",
|
"build:release": "pezkuwi-ci-ghact-build",
|
||||||
"build:rollup": "polkadot-exec-rollup --config",
|
"build:rollup": "pezkuwi-exec-rollup --config",
|
||||||
"build:wasm": "./scripts/build.sh",
|
"build:wasm": "./scripts/build.sh",
|
||||||
"clean": "./scripts/clean.sh",
|
"clean": "./scripts/clean.sh",
|
||||||
"deno": "yarn deno:build && yarn deno:check",
|
"deno": "yarn deno:build && yarn deno:check",
|
||||||
"deno:build": "WITH_DENO=1 yarn build",
|
"deno:build": "WITH_DENO=1 yarn build",
|
||||||
"deno:check": "deno check --import-map=import_map.json mod.ts",
|
"deno:check": "deno check --import-map=import_map.json mod.ts",
|
||||||
"lint": "polkadot-dev-run-lint",
|
"lint": "pezkuwi-dev-run-lint",
|
||||||
"postinstall": "polkadot-dev-yarn-only",
|
"postinstall": "pezkuwi-dev-yarn-only",
|
||||||
"test": "yarn test:wasm-crypto:rust",
|
"test": "yarn test:wasm-crypto:rust",
|
||||||
"test:js": "yarn test:wasm-crypto:js",
|
"test:js": "yarn test:wasm-crypto:js",
|
||||||
"test:wasm-crypto:deno": "deno test --allow-read --import-map=import_map.json packages/wasm-crypto/test/deno.ts",
|
"test:wasm-crypto:deno": "deno test --allow-read --import-map=import_map.json packages/wasm-crypto/test/deno.ts",
|
||||||
"test:wasm-crypto:js": "yarn test:wasm-crypto:js:jest && yarn test:wasm-crypto:js:node",
|
"test:wasm-crypto:js": "yarn test:wasm-crypto:js:jest && yarn test:wasm-crypto:js:node",
|
||||||
"test:wasm-crypto:js:jest": "polkadot-dev-run-test --env node --loader ./packages/wasm-crypto/test/loader-build.js",
|
"test:wasm-crypto:js:jest": "pezkuwi-dev-run-test --env node --loader ./packages/wasm-crypto/test/loader-build.js",
|
||||||
"test:wasm-crypto:js:node": "node --no-warnings --loader ./packages/wasm-crypto/test/loader-build.js ./packages/wasm-crypto/test/wasm.js && node --no-warnings --loader ./packages/wasm-crypto/test/loader-build.js ./packages/wasm-crypto/test/asm.js",
|
"test:wasm-crypto:js:node": "node --no-warnings --loader ./packages/wasm-crypto/test/loader-build.js ./packages/wasm-crypto/test/wasm.js && node --no-warnings --loader ./packages/wasm-crypto/test/loader-build.js ./packages/wasm-crypto/test/asm.js",
|
||||||
"test:wasm-crypto:rust": "cd packages/wasm-crypto && RUST_BACKTRACE=full cargo test --release -- --test-threads=1 --nocapture"
|
"test:wasm-crypto:rust": "cd packages/wasm-crypto && RUST_BACKTRACE=full cargo test --release -- --test-threads=1 --nocapture"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@pezkuwi/util": "^14.0.1",
|
"@pezkuwi/util": "^14.0.1",
|
||||||
"@polkadot/dev": "^0.83.3",
|
"@pezkuwi/dev": "^0.83.3",
|
||||||
"@types/node": "^20.16.1",
|
"@types/node": "^20.16.1",
|
||||||
"fflate": "^0.8.2"
|
"fflate": "^0.8.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const valid = verify(message, signature, publicKey);
|
|||||||
|
|
||||||
## Difference from @scure/sr25519
|
## Difference from @scure/sr25519
|
||||||
|
|
||||||
This package uses `bizinikiwi` as the signing context instead of `substrate`.
|
This package uses `bizinikiwi` as the signing context instead of `bizinikiwi`.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* Minimal JS implementation of sr25519 cryptography for Polkadot.
|
* Minimal JS implementation of sr25519 cryptography for Pezkuwi.
|
||||||
*
|
*
|
||||||
* Uses [Merlin](https://merlin.cool/index.html),
|
* Uses [Merlin](https://merlin.cool/index.html),
|
||||||
* a transcript construction, built on [Strobe](https://strobe.sourceforge.io).
|
* a transcript construction, built on [Strobe](https://strobe.sourceforge.io).
|
||||||
* Merlin ensures two parties agree on the same state when communicating.
|
* Merlin ensures two parties agree on the same state when communicating.
|
||||||
*
|
*
|
||||||
* More: https://wiki.polkadot.network/docs/learn-cryptography.
|
* More: https://wiki.pezkuwi.network/docs/learn-cryptography.
|
||||||
*/
|
*/
|
||||||
import { mod } from '@noble/curves/abstract/modular.js';
|
import { mod } from '@noble/curves/abstract/modular.js';
|
||||||
import { aInRange, bitMask, bytesToNumberLE, equalBytes, isBytes, numberToBytesLE, } from '@noble/curves/abstract/utils.js';
|
import { aInRange, bitMask, bytesToNumberLE, equalBytes, isBytes, numberToBytesLE, } from '@noble/curves/abstract/utils.js';
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ exports.sign = sign;
|
|||||||
exports.verify = verify;
|
exports.verify = verify;
|
||||||
exports.getSharedSecret = getSharedSecret;
|
exports.getSharedSecret = getSharedSecret;
|
||||||
/**
|
/**
|
||||||
* Minimal JS implementation of sr25519 cryptography for Polkadot.
|
* Minimal JS implementation of sr25519 cryptography for Pezkuwi.
|
||||||
*
|
*
|
||||||
* Uses [Merlin](https://merlin.cool/index.html),
|
* Uses [Merlin](https://merlin.cool/index.html),
|
||||||
* a transcript construction, built on [Strobe](https://strobe.sourceforge.io).
|
* a transcript construction, built on [Strobe](https://strobe.sourceforge.io).
|
||||||
* Merlin ensures two parties agree on the same state when communicating.
|
* Merlin ensures two parties agree on the same state when communicating.
|
||||||
*
|
*
|
||||||
* More: https://wiki.polkadot.network/docs/learn-cryptography.
|
* More: https://wiki.pezkuwi.network/docs/learn-cryptography.
|
||||||
*/
|
*/
|
||||||
const modular_js_1 = require("@noble/curves/abstract/modular.js");
|
const modular_js_1 = require("@noble/curves/abstract/modular.js");
|
||||||
const utils_js_1 = require("@noble/curves/abstract/utils.js");
|
const utils_js_1 = require("@noble/curves/abstract/utils.js");
|
||||||
|
|||||||
@@ -17,8 +17,11 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pezkuwichain/pezkuwi-scure-sr25519"
|
"url": "https://github.com/pezkuwichain/pezkuwi-wasm.git",
|
||||||
|
"directory": "packages/scure-sr25519"
|
||||||
},
|
},
|
||||||
|
"bugs": "https://github.com/pezkuwichain/pezkuwi-wasm/issues",
|
||||||
|
"homepage": "https://github.com/pezkuwichain/pezkuwi-wasm/tree/main/packages/scure-sr25519#readme",
|
||||||
"author": "PezkuwiChain",
|
"author": "PezkuwiChain",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# @polkadot/wasm-bridge
|
# @pezkuwi/wasm-bridge
|
||||||
|
|
||||||
A re-usable bridge between JS & WASM interfaces. It is used internally by `@polkadot/wasm-crypto`.
|
A re-usable bridge between JS & WASM interfaces. It is used internally by `@pezkuwi/wasm-crypto`.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// A number of functions are "unsafe" and purposefully so - it is
|
// A number of functions are "unsafe" and purposefully so - it is
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export * from './bridge.js';
|
export * from './bridge.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import './packageDetect.js';
|
import './packageDetect.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { InitFn, InitPromise, InitResult, WasmBaseInstance, WasmImports } from './types.js';
|
import type { InitFn, InitPromise, InitResult, WasmBaseInstance, WasmImports } from './types.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export * from './index.js';
|
export * from './index.js';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
// (packageInfo imports will be kept as-is, user-editable)
|
// (packageInfo imports will be kept as-is, user-editable)
|
||||||
|
|
||||||
import { detectPackage } from '@pezkuwi/util';
|
import { detectPackage } from '@pezkuwi/util';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@pezkuwi/wasm-bridge', path: 'auto', type: 'auto', version: '7.5.4' };
|
export const packageInfo = { name: '@pezkuwi/wasm-bridge', path: 'auto', type: 'auto', version: '7.5.4' };
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Use non-strong types instead of WasmImports which may not
|
// Use non-strong types instead of WasmImports which may not
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-bridge authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-bridge authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { BridgeBase, WasmBaseInstance } from './types.js';
|
import type { BridgeBase, WasmBaseInstance } from './types.js';
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
## @polkadot/wasm-crypto-asmjs
|
## @pezkuwi/wasm-crypto-asmjs
|
||||||
|
|
||||||
Asm.js build outputs.
|
Asm.js build outputs.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export { asmJsInit } from './cjs/data.js';
|
export { asmJsInit } from './cjs/data.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-wasm authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-wasm authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
const data = require('../data.js');
|
const data = require('../data.js');
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export declare const asmJsInit: null;
|
export declare const asmJsInit: null;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
const asmJsInit = null;
|
const asmJsInit = null;
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export declare const asmJsInit: null;
|
export declare const asmJsInit: null;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export const asmJsInit = null;
|
export const asmJsInit = null;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import './packageDetect.js';
|
import './packageDetect.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export * from './index.js';
|
export * from './index.js';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
// (packageInfo imports will be kept as-is, user-editable)
|
// (packageInfo imports will be kept as-is, user-editable)
|
||||||
|
|
||||||
import { detectPackage } from '@pezkuwi/util';
|
import { detectPackage } from '@pezkuwi/util';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-crypto-asmjs authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@pezkuwi/wasm-crypto-asmjs', path: 'auto', type: 'auto', version: '7.5.4' };
|
export const packageInfo = { name: '@pezkuwi/wasm-crypto-asmjs', path: 'auto', type: 'auto', version: '7.5.4' };
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
## @polkadot/wasm-crypto-init
|
## @pezkuwi/wasm-crypto-init
|
||||||
|
|
||||||
Internal `@polkadot/wasm-crypto` initialization functions for Browser, Node & RN.
|
Internal `@pezkuwi/wasm-crypto` initialization functions for Browser, Node & RN.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export * from './wasm.js';
|
export * from './wasm.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export * from './wasm.js';
|
export * from './wasm.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
// (packageInfo imports will be kept as-is, user-editable)
|
// (packageInfo imports will be kept as-is, user-editable)
|
||||||
|
|
||||||
import { detectPackage } from '@pezkuwi/util';
|
import { detectPackage } from '@pezkuwi/util';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@pezkuwi/wasm-crypto-init', path: 'auto', type: 'auto', version: '7.5.4' };
|
export const packageInfo = { name: '@pezkuwi/wasm-crypto-init', path: 'auto', type: 'auto', version: '7.5.4' };
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { WasmBaseInstance } from '@pezkuwi/wasm-bridge/types';
|
import type { WasmBaseInstance } from '@pezkuwi/wasm-bridge/types';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-init authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-init authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
## @polkadot/wasm-crypto-wasm
|
## @pezkuwi/wasm-crypto-wasm
|
||||||
|
|
||||||
Wasm build outputs.
|
Wasm build outputs.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto-wasm authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto-wasm authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { base64Decode, unzlibSync } from '@pezkuwi/wasm-util';
|
import { base64Decode, unzlibSync } from '@pezkuwi/wasm-util';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-crypto-wasm authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-crypto-wasm authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @pezkuwi/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
# @polkadot/wasm-crypto
|
# @pezkuwi/wasm-crypto
|
||||||
|
|
||||||
Wrapper around crypto hashing functions
|
Wrapper around crypto hashing functions
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Install the package (also requires `@polkadot/util` for `TextEncoder` polyfills - not included here as a dependency to keep the tree lean)
|
Install the package (also requires `@pezkuwi/util` for `TextEncoder` polyfills - not included here as a dependency to keep the tree lean)
|
||||||
|
|
||||||
`yarn add @polkadot/wasm-crypto @polkadot/util`
|
`yarn add @pezkuwi/wasm-crypto @pezkuwi/util`
|
||||||
|
|
||||||
Use it -
|
Use it -
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { u8aToHex } from '@polkadot/util';
|
import { u8aToHex } from '@pezkuwi/util';
|
||||||
import { bip39Generate, bip39ToSeed, waitReady } from '@polkadot/wasm-crypto';
|
import { bip39Generate, bip39ToSeed, waitReady } from '@pezkuwi/wasm-crypto';
|
||||||
|
|
||||||
// first wait until the WASM has been loaded (async init)
|
// first wait until the WASM has been loaded (async init)
|
||||||
await waitReady();
|
await waitReady();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { WasmCryptoInstance } from '@pezkuwi/wasm-crypto-init/types';
|
import type { WasmCryptoInstance } from '@pezkuwi/wasm-crypto-init/types';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import './packageDetect.js';
|
import './packageDetect.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
import type { InitFn } from '@pezkuwi/wasm-bridge/types';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { createWasm } from '@pezkuwi/wasm-crypto-init/none';
|
import { createWasm } from '@pezkuwi/wasm-crypto-init/none';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { createWasm } from '@pezkuwi/wasm-crypto-init/asm';
|
import { createWasm } from '@pezkuwi/wasm-crypto-init/asm';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { createWasm } from '@pezkuwi/wasm-crypto-init/wasm';
|
import { createWasm } from '@pezkuwi/wasm-crypto-init/wasm';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { createWasm } from '@pezkuwi/wasm-crypto-init/both';
|
import { createWasm } from '@pezkuwi/wasm-crypto-init/both';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export * from './index.js';
|
export * from './index.js';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
// (packageInfo imports will be kept as-is, user-editable)
|
// (packageInfo imports will be kept as-is, user-editable)
|
||||||
|
|
||||||
import { detectPackage } from '@pezkuwi/util';
|
import { detectPackage } from '@pezkuwi/util';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@pezkuwi/wasm-crypto', path: 'auto', type: 'auto', version: '7.5.4' };
|
export const packageInfo = { name: '@pezkuwi/wasm-crypto', path: 'auto', type: 'auto', version: '7.5.4' };
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Based on original work by Paritytech (https://github.com/paritytech/schnorrkel-js/)
|
// Based on original work by Paritytech (https://github.com/pezkuwichain/schnorrkel-js/)
|
||||||
// Adapted for PezkuwiChain by Kurdistan Tech Institute
|
// Adapted for PezkuwiChain by Kurdistan Tech Institute
|
||||||
// Original fork history: paritytech/schnorrkel-js → polkadot-js/schnorrkel-js → pezkuwi/wasm
|
// Original fork history: pezkuwichain/schnorrkel-js → pezkuwi-js/schnorrkel-js → pezkuwi/wasm
|
||||||
|
|
||||||
use curve25519_dalek::scalar::Scalar;
|
use curve25519_dalek::scalar::Scalar;
|
||||||
use schnorrkel::{
|
use schnorrkel::{
|
||||||
@@ -13,7 +13,7 @@ use schnorrkel::{
|
|||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
||||||
// We must make sure that this is the same as declared in the bizinikiwi source code.
|
// We must make sure that this is the same as declared in the bizinikiwi source code.
|
||||||
// PezkuwiChain uses "bizinikiwi" as the signing context instead of "substrate".
|
// PezkuwiChain uses "bizinikiwi" as the signing context instead of "bizinikiwi".
|
||||||
const CTX: &'static [u8] = b"bizinikiwi";
|
const CTX: &'static [u8] = b"bizinikiwi";
|
||||||
|
|
||||||
/// ChainCode construction helper
|
/// ChainCode construction helper
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Copyright 2019 Paritytech via https://github.com/paritytech/schnorrkel-js/
|
// Copyright 2019 Paritytech via https://github.com/pezkuwichain/schnorrkel-js/
|
||||||
//
|
//
|
||||||
// Originally developed (as a fork) in https://github.com/polkadot-js/schnorrkel-js/
|
// Originally developed (as a fork) in https://github.com/pezkuwi-js/schnorrkel-js/
|
||||||
// which was adpated from the initial https://github.com/paritytech/schnorrkel-js/
|
// which was adpated from the initial https://github.com/pezkuwichain/schnorrkel-js/
|
||||||
// forked at commit eff430ddc3090f56317c80654208b8298ef7ab3f
|
// forked at commit eff430ddc3090f56317c80654208b8298ef7ab3f
|
||||||
|
|
||||||
use merlin::Transcript;
|
use merlin::Transcript;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/* global it */
|
/* global it */
|
||||||
@@ -64,7 +64,7 @@ export function bip39ToEntropy (wasm) {
|
|||||||
*/
|
*/
|
||||||
export function bip39ToMiniSecret (wasm) {
|
export function bip39ToMiniSecret (wasm) {
|
||||||
it('creates the correct minisecret from a mnemonic', () => {
|
it('creates the correct minisecret from a mnemonic', () => {
|
||||||
const res = u8aToHex(wasm.bip39ToMiniSecret('legal winner thank year wave sausage worth useful legal winner thank yellow', 'Substrate'));
|
const res = u8aToHex(wasm.bip39ToMiniSecret('legal winner thank year wave sausage worth useful legal winner thank yellow', 'Bizinikiwi'));
|
||||||
|
|
||||||
// console.log('\tMIN', res);
|
// console.log('\tMIN', res);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/* global it */
|
/* global it */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/* global it */
|
/* global it */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/* global describe */
|
/* global describe */
|
||||||
@@ -15,7 +15,7 @@ import * as vrf from './vrf.js';
|
|||||||
export const tests = {
|
export const tests = {
|
||||||
// We place secp256k1 first, this allows the interaction with it in the
|
// We place secp256k1 first, this allows the interaction with it in the
|
||||||
// hashing (specifically scrypt) test not be an issue (ASM.js only)
|
// hashing (specifically scrypt) test not be an issue (ASM.js only)
|
||||||
// https://github.com/polkadot-js/wasm/issues/307
|
// https://github.com/pezkuwichain/pezkuwi-wasm/issues/307
|
||||||
secp256k1,
|
secp256k1,
|
||||||
// eslint-disable-next-line sort-keys
|
// eslint-disable-next-line sort-keys
|
||||||
bip39,
|
bip39,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/* global it */
|
/* global it */
|
||||||
@@ -52,7 +52,7 @@ export function secp256k1FromSeed1 (wasm) {
|
|||||||
*/
|
*/
|
||||||
export function secp256k1FromSeed2 (wasm) {
|
export function secp256k1FromSeed2 (wasm) {
|
||||||
it('creates a known pair from seed (2)', () => {
|
it('creates a known pair from seed (2)', () => {
|
||||||
// https://github.com/polkadot-js/wasm/issues/307
|
// https://github.com/pezkuwichain/pezkuwi-wasm/issues/307
|
||||||
const seckey = new Uint8Array([
|
const seckey = new Uint8Array([
|
||||||
203, 109, 249, 222, 30, 252, 167, 163, 153, 138, 142,
|
203, 109, 249, 222, 30, 252, 167, 163, 153, 138, 142,
|
||||||
173, 78, 2, 21, 157, 95, 169, 156, 62, 13, 79,
|
173, 78, 2, 21, 157, 95, 169, 156, 62, 13, 79,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/* global it */
|
/* global it */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/* global it */
|
/* global it */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import '@pezkuwi/wasm-crypto/initOnlyAsm';
|
import '@pezkuwi/wasm-crypto/initOnlyAsm';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// This is a Deno file, so we can allow .ts imports
|
// This is a Deno file, so we can allow .ts imports
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
|
||||||
|
|
||||||
// NOTE We don't use ts-expect-error here since the build folder may or may
|
// NOTE We don't use ts-expect-error here since the build folder may or may
|
||||||
// not exist (so the error may or may not be there)
|
// not exist (so the error may or may not be there)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import * as wasm from '@pezkuwi/wasm-crypto';
|
import * as wasm from '@pezkuwi/wasm-crypto';
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
## @polkadot/wasm-util
|
## @pezkuwi/wasm-util
|
||||||
|
|
||||||
Wasm utility functions, used internally in `@polkadot/wasm-crypto`.
|
Wasm utility functions, used internally in `@pezkuwi/wasm-crypto`.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-util authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-util authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
/// <reference types="@polkadot/dev-test/globals.d.ts" />
|
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
|
||||||
|
|
||||||
import { base64Decode } from './base64.js';
|
import { base64Decode } from './base64.js';
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-util authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-util authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Use an array for our indexer - this is faster than using map access. In
|
// Use an array for our indexer - this is faster than using map access. In
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-util authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-util authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export { base64Decode } from './base64.js';
|
export { base64Decode } from './base64.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-util authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-util authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// MIT License
|
// MIT License
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
// This only contains the unzlibSync function, no compression, no async, no workers
|
// This only contains the unzlibSync function, no compression, no async, no workers
|
||||||
//
|
//
|
||||||
// These 2 issues are addressed as a short-term, stop-gap solution
|
// These 2 issues are addressed as a short-term, stop-gap solution
|
||||||
// - https://github.com/polkadot-js/api/issues/2963
|
// - https://github.com/pezkuwi/api/issues/2963
|
||||||
// - https://github.com/101arrowz/fflate/issues/17
|
// - https://github.com/101arrowz/fflate/issues/17
|
||||||
//
|
//
|
||||||
// Only tweaks made here are some TS adjustments (we use strict null checks),
|
// Only tweaks made here are some TS adjustments (we use strict null checks),
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-util authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-util authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import './packageDetect.js';
|
import './packageDetect.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-util authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-util authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
export * from './index.js';
|
export * from './index.js';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-util authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-util authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
// (packageInfo imports will be kept as-is, user-editable)
|
// (packageInfo imports will be kept as-is, user-editable)
|
||||||
|
|
||||||
import { detectPackage } from '@pezkuwi/util';
|
import { detectPackage } from '@pezkuwi/util';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Copyright 2017-2025 @pezkuwi/wasm-util authors & contributors
|
// Copyright 2017-2026 @pezkuwi/wasm-util authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @pezkuwi/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@pezkuwi/wasm-util', path: 'auto', type: 'auto', version: '7.5.4' };
|
export const packageInfo = { name: '@pezkuwi/wasm-util', path: 'auto', type: 'auto', version: '7.5.4' };
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
// Copyright 2019-2025 @pezkuwi/wasm-crypto authors & contributors
|
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { createBundle } from '@polkadot/dev/config/rollup';
|
import { createBundle } from '@pezkuwi/dev/config/rollup';
|
||||||
|
|
||||||
const pkgs = [
|
const pkgs = [
|
||||||
'@pezkuwi/wasm-crypto'
|
'@pezkuwi/wasm-crypto'
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "@polkadot/dev/config/tsconfig.json",
|
"extends": "@pezkuwi/dev/config/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
|
|||||||
Reference in New Issue
Block a user