Jaco Greeff
8d355ff6fc
Local base58 alphabet check for better errors ( #622 )
...
* Local base58 alphabet check for better errors
* Rewrite yarn.lock
* Align error return values
* Split base58{Encode, Decode}
* base58Encode input types
* Function names, some docs
2020-06-26 14:46:19 +02:00
Jaco Greeff
95d7160ad0
Test for 0 prefix ( #620 )
...
* Test for 0 prefix
* Add test for keyring encodeAddress (& fix)
* Test other branch of ?: check
2020-06-19 17:35:48 +02:00
Jaco Greeff
f7a2bb895f
Fix blake2 U8a JS with hex inputs ( #614 )
...
* Fix blake2 U8a JS with hex inputs
* Apply suggestions from code review
2020-06-08 13:31:10 +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
d4491aeb7f
Small cleanups, u8aConcat optimization ( #607 )
...
* Small cleanups, u8aConcat oprimizations
* Cleanup
* Pre-allocate arrays
* Don't recreate PREFIX
2020-06-01 09:29:44 +02:00
Jaco Greeff
1f3dd60a8d
{address,u8a}Eq functions ( #606 )
...
* {addres,u8a}Eq functions
* Remove mnemonicToSeed
2020-05-31 14:19:10 +02:00
Jaco Greeff
18a202c460
Bump dev w/ eslint ( #603 )
...
* Bump dev w/ eslint
* Mop-up remaining lint issues
* Update stringShorten expectation
2020-05-23 14:23:13 +02:00
Jaco Greeff
6de6b871cd
Adjust DeriveJunction (types & BigInt) ( #598 )
2020-05-11 13:57:59 +02:00
Wei Tang
bb04fa28f7
ss58: add Kulupu prefix to the list ( #595 )
2020-05-08 20:12:17 +02:00
Alexander Krupenkin
34380caf1f
Added ECDSA keypair support ( #589 )
...
* Added ECDSA signature verification
* Add ECDSA keypair, sign, key derivation, fromSeed and tests
* keyring: added ECDSA keypair
* Fix lint errors
2020-04-30 00:33:10 +02:00
Jaco Greeff
5d0abef952
Sort with ss58 prefix ( #591 )
2020-04-26 14:33:45 +02:00
Jaco Greeff
62ebe257a6
u8aSorted & sortAddresses ( #588 )
2020-04-24 19:15:43 +02:00
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