Commit Graph
95 Commits
Author SHA1 Message Date
Jaco Greeff 60a9866abe Create createKeyMulti & createKeySub for utility (util-crypto) (#587)
* Create keyMulti & keysub for utility

* Bumps
2020-04-24 15:34:47 +02:00
Jaco Greeff adb1c1fea4 Rewrite yarn.lock (#580) 2020-04-02 08:42:32 +02:00
Jaco Greeff cbec4add88 Bump dev (incl. lint fixes) (#579)
* Bump dev (incl. lint fixes)

* Fix failures
2020-04-01 21:20:50 +02:00
Jaco Greeff fe2f054389 wasm-crypto initNone (#573)
* wasm-crypto initNone

* noWasm to replace @polkadot/wasm-crypto interface
2020-03-24 06:55:07 +01:00
Jaco Greeff af56c10278 Add cryptoIsReady (#557)
* Add cryptoIsReady

* Bump yarn
2020-02-29 11:51:17 +01:00
Jaco Greeff 804ed13d0a Add signatureVerify (#552)
* Add signatureVerify

* addressOrPublicKey typo

* Flatten verify, allow extra types

* Add signatureVerify tests

* De-dup address checksum checks
2020-02-24 11:55:15 +01:00
Jaco Greeff 7c1ca3a5c9 Use #<varname> instead of private _<varname> (#545)
* Use #<varname> insead of private _<varname>

* Update key extraction paths
2020-02-22 14:45:31 +01:00
Jaco Greeff 76a0daeed6 Use ss58 format on keyring for the keyring only (#538)
* Use ss58 format on keyring for the keyring only

* Cleanup args

* Cleanup failures

* Remove deprecated addressPrefix

* Update CHANGELOG
2020-02-17 16:24:03 +01:00
Jaco Greeff b8411bb0ea Bump deps (#513)
* Bump deps

* Linting
2020-01-29 10:23:27 +01:00
Jaco Greeff 241febb707 Bump deps (#497) 2020-01-06 13:43:49 +01:00
Hyungsuk Kang 4e4ff5de4b Add cross client Encryption/Decryption (#496)
* chore: add a test

* Add KDF case for double ratchet

* chore: add .idea in .gitignore

* chore: add .vscode to .gitignore

* Remove comma-dangle
2019-12-17 11:12:06 +01:00
Jaco Greeff dec88b6ab7 Bump deps (#490) 2019-11-13 10:17:40 +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 a512766bfb 1.5 (#473) 2019-09-25 12:37:59 +02:00
Jaco Greeff c13c2022ca Proper ss58Format check (allows 0) (#472) 2019-09-19 11:09:17 +02:00
Jaco Greeff 16d077c87d ss58Format option for Keyring (#471)
* ss58Format option  for Keyring

* Expose setSS58Format everywhere

* Remove setAddressPrefix

* 1.4.0
2019-09-12 13:59:03 +02:00
Jaco Greeff 25fc033728 typescript-eslint 2 (#462)
* typescript-eslint 2

* startsWith fixes

* padStart/padEnd
2019-08-30 12:24:16 +02:00
Jaco Greeff df8c1038b9 Add address check function (#443)
* Add address check function

* Add tests for checkAddress
2019-07-17 23:19:25 +02:00
Jaco Greeff 6c794626e8 Allow Kusama network prefix (#441)
* Allow Kusama network prefix

* Allow deprecated 68
2019-07-16 20:09:03 +02: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
Axel Chalon 3c253ec2c4 Simplify @polkadot/keyring KeyringPair (#419)
* Simplify @polkadot/keyring KeyringPair

* Fix keypair.address not taking prefix changes into account

* Merge master, update CHANGELOG

* Use getter for keypair.publicKey

* Fix import

* Fix isLocked; add test
2019-06-13 07:56:24 +02:00
Jaco Greeff 6907add8ff Move address helpers to util-crypto (#416)
* Move address helpers to util

* Move address helpers to @polkadot/util-crypto
2019-06-12 15:01:54 +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 364a5d93f0 Expand bip39 usage (#381)
* Bump wasm-crypto for bip39ToSeed

* Support bip39ToSeed for ed25519 (backwards-compat)

* Update to latest wasm-crypto
2019-03-23 19:17:29 +01:00
Jaco Greeff 663b8ca741 Swap crypto to WASM (JS as fallback) (#378) 2019-03-22 11:31:54 +01:00
Jaco Greeff 828688bd10 Cater for non-slash derived paths (#377) 2019-03-21 11:48:08 +01:00
Jaco Greeff f6d05e0553 Utility function to extract from path only (#376)
* Utility function to extract from path only

* Add createFromUri
2019-03-21 10:51:02 +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 302b70e97d Only log error on crypto waitReady (#355)
* Only log error on crypto waitReady

* empty catch (already logged)
2019-03-08 09:05:25 +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 0f57902672 Add mnemonic strength (length) (#324) 2019-02-22 12:32:10 +01:00
Jaco Greeff c5e0faca60 Add secp256k1Recover (#323) 2019-02-21 14:27:35 +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 2efc5f7ca1 Bump deps (#312) 2019-02-15 14:35:43 +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