Commit Graph
39 Commits
Author SHA1 Message Date
Jaco bbadfbebfa assert cleanups (#957) 2021-04-22 13:13:41 +02:00
Jaco Greeff f12aa92383 Add schnorrkelVrf{Sign, Verify} functions (#845)
* Add schnorrkelVrf{Sign, Verify} functions

* Apply suggestions from code review
2021-01-20 12:54:59 +01:00
Jaco Greeff f0f0dec8ea 2021 (#824) 2021-01-03 11:20:22 +01:00
Jaco Greeff af71673c7b import type (#782) 2020-12-01 13:24:37 +01:00
Jaco Greeff f07d66562b Remove default exports (#755)
* Remove default exports

* Cleanup tests

* Exports in util

* Single secp256k1 instance

* Length check

* format check

* encoded lengths
2020-11-08 18:07:31 +01:00
Jaco Greeff 695e19a8a7 Remove polyfills (#739)
* Remove polyfills

* CHANGELOG

* jestConfig

* Adjust jest

* Revert explicit overrides (from base)

* Fix dev

* 4.0.0

* Bump wasm-crypto

* min/max duplication

* Split tests, update dev

* startChar

* validate params

* complexity?

* secp256k1Verify options

* sign Options

* hasher extraction
2020-11-03 10:29:22 +01:00
Jaco Greeff 56a79924a0 SPDX (#687) 2020-09-17 16:13:39 +02:00
Jaco Greeff 0d03eac307 Add deriveAddress (#653) 2020-08-09 14:26:37 +02:00
Jaco Greeff bdb14f91a8 Pre-checks on verify input lengths (#608)
* Pre-checks on verify input lengths

* Small cleanup

* Update error signatures
2020-06-01 10:27:08 +02:00
Jaco Greeff 241febb707 Bump deps (#497) 2020-01-06 13:43:49 +01:00
Jaco Greeff 76a9f2787c assert does asserts conditions (TS 3.7) (#489)
* assert does asserts conditions (TS 3.7)

* Throw in condition

* Fix cleanup
2019-11-11 09:43:05 +01:00
Jaco Greeff 80db504a3b Swap to using eslint (#435)
* WIP

* ... and more

* yet more...

* and examples (more-or-less) fixed

* Only problematic promisify left...

* Last batch

* rm config header

* Update

* Use Record

* Bumps
2019-07-14 11:12:46 +02:00
Jaco Greeff 8d869002bd Allow string params for sr25519/ed25519 sign & verify (#404)
* Allow string params for sr25519/ed25519 sign & verify

* Bump wasm

* Remove _'s from params (code-completion)
2019-05-09 16:10:54 +02:00
Jaco Greeff c11f068f70 Update wasm-crypto to latest (#389) 2019-03-30 18:15:40 +01:00
Jaco Greeff 663b8ca741 Swap crypto to WASM (JS as fallback) (#378) 2019-03-22 11:31:54 +01:00
Jaco Greeff fe0bd25acc Swap bip39 to wasm-crypto (#373)
* Swap bip39 to wasm-crypto

* Bump upstream deps
2019-03-20 11:32:05 +01:00
Jaco Greeff eb167f8735 Use wasm-schnorrkel package (#371)
* Use wasm-schnorrkel package

* wasm-schnorrkel 0.1.1
2019-03-18 10:25:02 +01:00
Jaco Greeff 5dc8e87797 Hard and soft derivation aligned with substrate master (#369)
* I compiles... ship it!?

* Re-enable derivation from path tests

* Update schnorrkel-js (latest w3f version)

* Swap default keyring to sr25519
2019-03-16 11:34:31 +01:00
Jaco Greeff 1cd491b78a Bump schnorrkel (derivation) (#366) 2019-03-14 22:07:58 +01:00
Jaco Greeff 6049f09880 Dev keys should use sr25519 derivation (#361)
* Dev keys should use sr25510 derivation

* Rework derive

* Derive hard and soft

* Swap default to isDerived

* typo

* Pull in new schnorrkel-js dep, update tests

* Update nobody
2019-03-14 16:10:38 +01:00
Jaco Greeff de67a88f45 Remove /index imports (swap to bare) (#362) 2019-03-14 08:41:00 +01:00
Jaco Greeff f1ca4eef0e Introduce key suri (path derivation) (#358)
* Introduce key suri (path derivation)

* Errant console.log

* let -> const

* Add seed derivation from path

* Allow new-generation derivation

* Add addFromUri to keyring

* Use addFromUri in testing keyring

* Add suri tests

* Prepare for sr25519 derivation

* CHANGELOG entry

* ed25519 is aligned with substrate

* Bump version
2019-03-13 14:39:10 +01:00
Jaco Greeff b75908ce3b Use Read & Write transactions (interleave) (#354)
* Use Read & Write transactions (interleave)

* Rename toSeedEntropy -> toMiniSecret
2019-03-06 17:17:23 +01:00
Jaco Greeff db4b22125e Generate mnemonic via entropy (use in sr25519) (#339)
* Generate mnemonic via entropy (use in sr25519)

* Expand tests with Rust versions
2019-02-28 13:13:52 +01:00
Jaco Greeff 6610403e91 Bump dependencies (incl. schnorrkel) (#327)
* Bump dependencies

* yarn add global

* Install gitbook-cli via npm (no save)

* Add global path for yarn

* Bump dev, again...
2019-02-25 17:03:58 +01:00
Jaco Greeff e19d377eec Remove test polyfill, only include in tests (#322)
* Remove test polyfill, only include in tests

* Test polyfill for keyring
2019-02-19 16:02:45 +01:00
Jaco Greeff 830c98d03b Use published schnorrkel-js (not embedded) (#320) 2019-02-18 11:48:53 +01:00
Jaco Greeff b15abe1167 null on WASM non-available (#317) 2019-02-16 12:09:07 +01:00
Jaco Greeff bc2b1344b7 Allow proper promise failure (#316)
* Allow proper promise failure

* Remove unneeded dep
2019-02-16 11:05:53 +01:00
Jaco Greeff 50721f2db2 Update with scripted schnorrkel-js (#313) 2019-02-15 17:04:21 +01:00
Jaco Greeff 9f9ceff1a5 Dont clutter exports with wasm-specific items (#310) 2019-02-15 12:35:49 +01:00
Jaco Greeff dd77c3c752 Error stub require, cleans up webpack warnings (#309) 2019-02-15 12:12:12 +01:00
Jaco Greeff 74b37cfff8 Really fix "dep as expression" (webpack) (#308) 2019-02-15 10:27:59 +01:00
Jaco Greeff 8513530ad0 Async schnorrkel init (#307)
* Async schnorrkel init

* Start crypto init process on import

* Small spelling adjustment
2019-02-15 09:33:47 +01:00
Jaco Greeff 49b0c841d9 Cleanup circular deps (#306)
* Cleanup circular deps

* Split WASM blob
2019-02-15 08:35:15 +01:00
Jaco Greeff 420f8075f6 Work around TextDecoder issues (schnorrkel) (#304) 2019-02-15 00:07:42 +01:00
Jaco Greeff c3fafbeab7 Expand keyring tests for sr25519 (#302)
* Expand keyring tests for sr25519

* Update index.spec.ts

* Update index.spec.ts

* Support type conversion, type per pair

* toType tests
2019-02-14 22:04:12 +01:00
Jaco Greeff 0710c73299 Remove WASM output, use @parity/schnorrkel-js (#301)
* schnorrkel imports from @parity namespace

* Remove WASM output, use @parity/schnorrkel-js
2019-02-14 15:14:20 +01:00
Jaco Greeff 2aba82e569 Schnorrkel support (#297)
* Initial schnorrkel support

* Start conversion of actual keyring

* Wrap encoding/decoding (needs another check)

* Manage encoding version & types with passthrough

* Update to version with working sign

* Cleanup pair interface (with seed)

* Fix failing tests

* Align naclSign signature

* Update tests for nacl (with TS conversion)

* Bump version with CHANGELOG

* Remove unneeded dep

* Use KeyringOptions instead of PairType

* Do isNumber check on addressPrefix
2019-02-13 16:46:33 +01:00