Commit Graph
52 Commits
Author SHA1 Message Date
Jaco Greeff e6bc31ac5d Adjust vrf_{sign, verify} with one variant (#171) 2021-01-20 12:08:27 +01:00
Steve DegosserieandGithub Actions b1752ad001 Expose Schnorrkel's VRF capabilities (#170)
* Expose vrf_sign_extra function from Schnorrkel

* Document function, code cleanup

* Added vrf_sign, vrf_verify, vrf_verify_extra functions.

* Expose VRF functions to js

Co-authored-by: Github Actions <action@github.com>
2021-01-17 16:16:14 +01:00
Jaco Greeff 1bb6db86f7 2021 (#167) 2021-01-03 11:20:26 +01:00
Jaco Greeff a96c6337a0 WP4 compat :( 2020-12-18 10:39:13 +01:00
Jaco Greeff 29d1ac009a detectPackage test 2020-12-18 10:17:04 +01:00
Jaco Greeff 8618b57ee8 __dirname fix 2020-12-17 18:22:13 +01:00
Jaco Greeff e7389c2f15 Remove non-working import.meta wrapper 2020-12-17 17:37:12 +01:00
Jaco Greeff 81101b69a3 detectPackage protection? 2020-12-17 17:18:57 +01:00
Jaco Greeff 123bb2a09c detectPackage function 2020-12-17 12:28:28 +01:00
Jaco Greeff a3ed8293f8 esm detectPackage (#161) 2020-12-16 15:17:47 +01:00
Jaco Greeff f01a9b187e Single instance package detection (#160)
* Single instance package detection

* s/require/request/

* Internal isReady

* Revert unneeded from-build alias
2020-12-15 16:04:22 +01:00
Jaco Greeff 2c4f8bbe4e 3.0 (#158)
* 3.0

* CHANGELOG

* Rename content packages

* final dev bump
2020-12-13 10:09:24 +01:00
Jaco Greeff 9c5c22ddbe Bump common x-randomvalues import 2020-12-11 17:27:28 +01:00
Jaco Greeff 3e1249ca2c Allow esm builds (#157) 2020-12-11 16:45:56 +01:00
Jaco Greeff 5c563bb95f Split bytes packages for easier override (#155) 2020-12-10 14:07:11 +01:00
Jaco Greeff 7af6734e26 Fix sr25519 soft derive signature (#153) 2020-12-09 16:11:56 +01:00
Jaco Greeff ad4ac2e101 Convert to TypeScript sources (#152) 2020-12-09 15:52:04 +01:00
Jaco Greeff 2fca9b83c1 Flatten JS (#142)
* Flatten JS

* JS locations in build
2020-11-07 14:18:41 +01:00
Jaco Greeff 5be84df651 Use x-randomvalues (#140)
* Use x-randomvalues

* Install
2020-11-07 13:46:27 +01:00
Jaco Greeff 15788efd34 Replace default crypto import, remove requires (#139)
* Replace default crypto import, remove requires

* TS 4.0.5
2020-11-07 10:42:14 +01:00
Jaco Greeff c6135e28d4 2.0 (#133)
* 2.0

* prerelease

* Bumps

* CHANGELOG

* Don't init with no WASM bytes

* {asm,bytes}-empty

* asm-empty import

* WasmCryptoInstance
2020-11-03 08:46:57 +01:00
Jaco Greeff d937dda6ba Drop actual polyfill 2020-11-02 22:12:10 +01:00
Jaco Greeff f8efe32b43 Align stub.js with asm.js 2020-11-02 19:03:52 +01:00
Jaco Greeff bb748c0225 Simplify asm creation (#131) 2020-11-02 19:02:28 +01:00
Jaco Greeff e2d0726608 Split js/wasm (#130)
* Split js/wasm

* require
2020-11-02 18:34:00 +01:00
Jaco Greeff da946b18ce Cleanup build, no sed mangling (#129)
* Polyfill require adjust

* Assert in promise for getRandomBytes

* Adjust jest

* Revert explicit overrides (from base)

* use typeof

* Re-add crypto-polyfill (backwards, direct imports)

* crypto log

* Fix dev

* Adjust

* Cleanups, no sed mangling

* Cleanup build folder

* Remove exports

* Cleanups

* Adjust env vs util

* Remove Buffer alloc

* Cleant ext vs int

* Rework naming

* Mapping rename

* Combine index & exports

* withWasm wrapper

* pass{String, U8a} -> alloc{String, U8a}

* Internal reuse

* Explict package-only test
2020-11-02 16:39:54 +01:00
Jaco Greeff 83762d9997 Polyfill require adjust (#128)
* Polyfill require adjust

* Assert in promise for getRandomBytes

* Adjust jest

* Revert explicit overrides (from base)

* use typeof

* Re-add crypto-polyfill (backwards, direct imports)

* crypto log

* Fix dev

* Adjust
2020-11-01 18:53:09 +01:00
Jaco Greeff 35b2bb2d13 Use base122 encoding for WASM buffer (#127) 2020-10-27 09:04:37 +01:00
Jaco Greeff 5860c204e1 Bump berry (#125)
* Bump berry

* Bump dev
2020-10-25 13:27:00 +01:00
Jaco Greeff 52c5a506ac SPDX (#114) 2020-09-17 16:13:19 +02:00
Jaco Greeff c4ab178926 Re-add bip39ToSeed interface (#104)
* Re-add bip39ToSeed interface

* import
2020-08-25 20:48:28 +02:00
Jaco Greeff 037d857085 Adjust init message with possible fixes (#103) 2020-08-19 15:49:06 +02:00
Jaco Greeff 735584aef9 Scrypt TS interface (#93) 2020-08-03 15:25:34 +02:00
Jaco Greeff 0faca1b98e Add scrypt hashing (#92) 2020-08-03 14:47:17 +02:00
Jaco Greeff 9bc97a4e1d Update ed25519-dalek (#85)
* Update ed25519-dalek

* Bump subtle
2020-07-17 13:12:21 +02:00
Jaco Greeff ef6db82c52 Remove bip39ToSeed (#80)
* Cleanups, no mnemonic to seed (only minisecret)

* Remove bip39ToSeed
2020-05-31 14:42:13 +02:00
Jaco Greeff 8c0aa030cf Bump deps (#79)
* Bump deps

* Rust bumps

* Rust bumps (again)

* Pin nightly

* Cleanup with new generation
2020-05-23 18:25:53 +02:00
Jaco Greeff 84f0d27744 Rewrite yarn.lock (#72) 2020-04-02 08:02:17 +02:00
Jaco Greeff 4c7a9609bd Drop sr25519 verify_simple_preaudit_deprecated (#54)
* Drop sr25519 verify_simple_preaudit_deprecated

* Add missing Signature import

* Update test-verctor, 0.8.5+ only signatures

* Trigger

* Pin Rust nightly

* Pin via run

* De-dup nightlies

* Update tests to use nightly-2020-02-17

* Update CHANGELOG

* Typo
2020-02-24 16:24:49 +01:00
Jaco Greeff 9f08e7832f Bump schnorrkel to 0.8 (#29)
* Bump schnorrkel to 0.8

* Remove unneeded return refactor (stick to issues at-hand)

* Mid-point step, use rev, verify signatures

* Update to 0.8.2

* Flatten for easier inspection

* 0.8.3 rev that passes the tests

* Updates for 0.8.3 memory allocation

* Test for Rust keypair imports

* Rust ed25519 compat

* 0.8.4

* sr25519 0.8.5, bump deps

* tiny-keccak config

* Update keccack hashing

* Update hashing
2020-01-13 16:26:04 +01:00
Jaco Greeff 1f4612bf32 Bump deps (#47) 2020-01-06 13:44:06 +01:00
Jaco Greeff 794d514909 0.13 (#27)
* 0.13

* Only log when asm.js not available

* Flatten checks
2019-07-20 09:56:53 +02:00
Jaco Greeff 8c6d2aea12 Only rely on wasm.js (no asm.js duplication) (#25)
* Only rely on wasm.js (no asm.js duplication)

* Add browser entry

* Make asm.js tests pass

* Remove (now-unsued) mock dep
2019-07-19 11:06:31 +02:00
Jaco Greeff 72d4ec56b5 Add asm.js generation with CRYPTO_ASM env var (#23)
* Add asm.js generation, import via index-asm.js

* Less sed-y, more babel-y

* Throw error when some failed

* CRYPTO_ASM env flag

* CHANGELOG
2019-07-18 15:38:50 +02:00
Jaco Greeff 2b637b079a Swap to eslint (#22)
* Swap to eslint

* Remove links to outdated packages

* Bump hex_literal to 0.2.0

* Bump version
2019-07-17 11:23:11 +02:00
Jaco Greeff f39b68f83d Add known signature tests (from subkey, actual values) (#20)
* Add know signing test (from subkey)

* Align sr25519 known sigs

* 0.10 (schnorrkel got a bump)
2019-05-09 15:18:44 +02:00
Jaco Greeff 1c1565b6ff Update error logging (#16)
* Update error logging

* Re-add drropped assert import

* Update travis scripts
2019-03-30 22:02:08 +01:00
Jaco Greeff a1692ae1e6 Combine all crypto into a single package (#15)
* Combine all crypto into a single package

* Disable build for daled & schnrorrkel (combined)

* Bump @polkadot/dev (for publish)

* yarn.lock

* Fix CHANGELOG
2019-03-30 17:35:43 +01:00
Jaco Greeff 06f2e0eb31 add bip39ToSeed password param 2019-03-23 18:32:52 +01:00
Jaco Greeff 44c0553cae Add bip39ToSeed, add wasm-crypto (simple) usage (#10) 2019-03-23 17:51:39 +01:00