Commit Graph
73 Commits
Author SHA1 Message Date
Jaco Greeff ae814c646d ExtError doesn't require any arguments 2018-06-24 14:41:16 +02:00
Jaco Greeff b872816ad9 Update with tweetnacl nacl.d.ts 2018-06-24 09:38:13 +02:00
Jaco Greeff 4470dfa7b9 TypeScript conversion (#142)
* Auto-conversion

* Cleanup type conversion errors

* Inching closer, resolution sorted

* Additional cleanups

* TS, TS everywhere

* Minor version for TS release

* Last roundups
2018-06-22 21:17:50 +02:00
Jaco Greeff 99b86d9849 Use ES6 import/export (#139)
* Use ES6 import/export

* Fix tests
2018-06-20 16:36:07 +02:00
Jaco Greeff 93b54ea5ac Update dependencies 2018-06-12 13:09:09 +02:00
Jaco Greeff aacb03bc74 Add yarn & node to engines (#135)
* Add yarn & node to engines

* Bump node version in travis.yml

* yarn ^1.3.2

* Update dependencies
2018-06-12 09:41:51 +02:00
Jaco Greeff ece9480c94 Allow logging with colors (based on type) (#133) 2018-06-08 10:29:26 +02:00
Jaco Greeff a4c7615bec Skeleton for triedb (#132) 2018-06-07 13:20:32 +02:00
Jaco Greeff 952f25659e Added 'everybody' for system testing (#131) 2018-06-02 10:08:05 +02:00
Jaco Greeff db1a6adfc5 Cleanup hex functions (#130) 2018-05-25 10:27:53 +02:00
Jaco Greeff 1d35c7c3ef Remove util/jsonrpc utility functions (move to origin) (#127) 2018-05-17 19:44:34 +02:00
Jaco Greeff 746296f340 Bump dependencies 2018-05-17 11:31:17 +02:00
Jaco Greeff fbd6c62ae5 Update dependencies 2018-05-16 14:01:24 +02:00
Travis CI c2535b4322 [CI Skip] 2018-05-16 11:27:18 +00:00
Jaco Greeff e7e76b8231 Update dependencies 2018-05-16 13:23:21 +02:00
Jaco Greeff a07f34353b Bump dependencies 2018-05-16 12:52:05 +02:00
Jaco Greeff aabceb866f Use @babel 7 (#126) 2018-05-16 12:39:26 +02:00
Jaco Greeff c5f96e77c0 Update dependencies 2018-05-15 12:03:05 +02:00
Jaco Greeff f8e07bada9 Add pair to/fromJson (#123) 2018-05-08 12:46:04 +02:00
Jaco Greeff 05f4754857 Add keyring publicKey <-> address (#122)
* Add keyring publicKey <-> address

* Add isObservable utility
2018-05-05 20:09:14 +02:00
Jaco Greeff a24ac88f13 Format short hex with ellipsis (#120) 2018-04-27 16:56:34 +02:00
Jaco Greeff 68e77f3abb toHexShort utility (#119) 2018-04-23 09:34:31 +02:00
Jaco Greeff 24dffb710e testingPairs for inetrnal testing (#118) 2018-04-19 12:24:43 +02:00
Jaco Greeff 6da140a6d3 Correct u8aConcat with hex inputs (#117)
* Correct u8aConcat with hex inputs

* Add test
2018-04-17 13:45:56 +02:00
Jaco Greeff 0a7ac8a89b u8a to u8a convenience function (#116)
* Convenience u8aToU8a conversion

* u8aConcat take u8a | hex
2018-04-17 11:20:23 +02:00
Jaco Greeff 985ea40b45 Remove unneeded 0 constant (#113) 2018-04-11 10:55:19 +02:00
Jaco Greeff 8a6090842e RLP u8a conversion complexity (#112)
* Address u8a conversion complexity

* Split RLP decoder steps

* Cleanup decode value checks

* Encoder lookup table (as per decoder)

* Typings for encoders/decoders values
2018-03-21 17:16:55 +01:00
Jaco Greeff 35d2f69b75 Pkcs8 bytes for pairs (non-encrypted) (#111)
* Upgrade dependencies

* Pkcs8 bytes for pairs (non-encrypted)

* Bump minor

* Pass only secretKey around for encoding

* Cleanup seed interface
2018-03-20 15:42:39 +01:00
Jaco Greeff ac501317af Update @polkadot/api-jsonrpc (dev) (#110)
* Split parameter formatting

* Modularise triehash encodiung further
2018-03-19 13:17:26 +01:00
Travis CI 87db3ea8a3 [CI Skip] 0.17.3 2018-03-19 11:02:01 +00:00
Jaco Greeff 995dfecf61 Initial pair encryption (xsalsa20-poly1305) (#107)
* Allow keypair generation from input string

* Add keyfile encryption/decryption

* Pass secret through n rounds

* Split definition types

* Additional cleanups

* Pass salt as blake2b input

* Move kdf hashing to util-cypto

* Dangling comma

* Pull through secret as string | Uint8Array

* Update documentation
2018-03-13 17:04:44 +01:00
Jaco Greeff 4b65a59c2b Fix LE hex conversion for BN (#104) 2018-03-08 12:47:54 +01:00
Jaco Greeff 19b4cc2865 Upgrade @polkadot/dev (#101) 2018-02-26 16:00:16 +01:00
Jaco Greeff be7d5842de Add u8a <-> BN endian (#95) 2018-02-21 10:59:58 +01:00
Jaco Greeff ce36deb6f9 Fix blake2 with proper key & length (#94)
* Fix blake2 with proper key & length

* Fix linting

* Update @polkadot/dev for blakejs typings
2018-02-20 17:13:26 +01:00
Jaco Greeff 532c526bc7 Add basic u8aToString (#92) 2018-02-20 14:01:02 +01:00
Jaco Greeff 480a2f05c4 Fix xxhash outputs as LE (#91) 2018-02-20 10:01:32 +01:00
Jaco Greeff ece0c95691 Remove types (#90) 2018-02-16 14:53:53 +01:00
Jaco Greeff f79d7fe68e bnToU8a supports endian (#87)
* bnToU8a supports endian

* Update with new bn.js flow
2018-02-13 14:30:10 +01:00
Jaco Greeff e9cace8c1e Bump (patch, CI) 2018-02-13 10:12:49 +01:00
Jaco Greeff 03dc89c2b6 Remove exposed Buffer in crypto (#80)
* Use js-sha3 instead of keccak

* Remove exposed toBuffer from util-crypto

* Add definiton for js-sha3

* Remove Buffer from docs

* Cleanup crypto hashing

* Cleanup interface
2018-02-08 16:12:00 +01:00
Jaco Greeff e832aebb07 Introduce @polkadot/util-rlp (#76)
* Add toU8a conversions

* Add u8a utilities

* @polkadot/rlp with encoding

* Decoding test runthrough

* Update util locations

* Convert util-triehash to use util-rlp

* Allow keccak from Uint8Array

* Pass Uint8Array to keccak input

* Update documentation

* Skip some doc generation

* Update @polkadot/dev

* Update doc typo

* Update allocations

* Retrieve tests from ethereumjs-testing

* Simplify test retrieval

* Exclude etereumjs-testing from flow
2018-02-08 14:50:54 +01:00
Jaco Greeff 6b3be0bc30 Introduce @polkadot/util-triehash (#75)
* Expand util-crypto test coverage

* Add @polkadot/util-triehash

* Update link to util-triehash
2018-02-07 13:41:45 +01:00
Jaco Greeff 523dc1c48d Update hashing functions to ref (#68)
* Package upgrades

* Use h64 by default

* Remove AsNumber distinction

* xxhash32/64 & blake2b/2s

* Add xxhashAsHex{128,256}

* Add blake2AsHex{128,256,512}

* Update documentation

* Update docs
2018-01-30 11:55:32 +01:00
Jaco Greeff 8fbfe612f9 Use deasync loopWhile (#67) 2018-01-29 10:18:04 +01:00
Jaco Greeff b5c5734c7c Add Blake2s & XXHash utility functions (#66)
* Initial split of util & util-crypto

* Add initial XXHash version

* Blake2s wit tests & documentation

* Add sha512 (from NaCl)

* Add randomBytes (from NaCl)

* Flow fixes

* Update documentation

* Update latest @polkadot/dev
2018-01-25 14:13:43 +01:00
Jaco Greeff f20035fe97 Move util function from @polkadot/client (#62) 2018-01-11 17:48:38 +01:00
Jaco Greeff 6e68784481 2018 (#57) 2018-01-04 08:48:28 +01:00
Jaco Greeff fe53d2ab2d Prefer static to runtime types (#56) 2017-12-30 17:43:51 +01:00
Jaco Greeff e77d536edd Add isBoolean (#53) 2017-12-17 20:16:15 +01:00