Commit Graph
48 Commits
Author SHA1 Message Date
Jaco Greeff 243df6d030 Add MemoryDb Trie-wrapper (#159)
* Pass along hashing function (keccak or blake2)

* Allow syncify to handle Promises with no return values

* Add sync MemoryDb interface
2018-07-03 14:31:01 +02:00
Jaco Greeff 2d4af33715 submitExtrinsic returns hash (#154) 2018-06-28 13:02:22 +02:00
Jaco Greeff f0c34bea09 Use bn types from @types (#153)
* Use bn.js definitions from @types

* Update isHex & isObservable
2018-06-27 15:05:55 +02:00
Jaco Greeff 73477a2809 Add tslint (#151) 2018-06-27 10:15:46 +02:00
Jaco Greeff 2f1aebe908 Update @polkadot/dev, finsing deasync jest resolution 2018-06-26 16:49:17 +02:00
Jaco Greeff 69239d56e6 Use Jest default files as fallback 2018-06-26 16:38:24 +02:00
Jaco Greeff 5759a61689 Re-introduce ip4/ip6 checks 2018-06-26 13:22:01 +02:00
Jaco Greeff ae814c646d ExtError doesn't require any arguments 2018-06-24 14:41:16 +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 29d635d913 Allow u8aToU8a to convert buffers (#138)
* Allow u8aToU8a to convert buffers

* Cater for utf8 -> u8a strings
2018-06-15 11:53:18 +02:00
Jaco Greeff 461dde7c3c Copyright project authors (#137)
* Copyright project authors

* Add contributors
2018-06-13 22:24:48 +02:00
Jaco Greeff 9186a46bf9 Handle u8a null inputs in formatters (#134) 2018-06-11 10:16:03 +02:00
Jaco Greeff ece9480c94 Allow logging with colors (based on type) (#133) 2018-06-08 10:29:26 +02:00
Jaco Greeff db1a6adfc5 Cleanup hex functions (#130) 2018-05-25 10:27:53 +02:00
Jaco Greeff f1c7553a4f Update isHex check & toHex with shortening (#129)
* Update isHex check & toHex with shortening

* Basic cleanups
2018-05-24 15:00:59 +02:00
Jaco Greeff 1d35c7c3ef Remove util/jsonrpc utility functions (move to origin) (#127) 2018-05-17 19:44:34 +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 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 ac501317af Update @polkadot/api-jsonrpc (dev) (#110)
* Split parameter formatting

* Modularise triehash encodiung further
2018-03-19 13:17:26 +01:00
Jaco Greeff 827012783f Avoid u8a -> string conversion costs (#106)
* Avoid u8a -> string conversion for pair keys

* Update hexToBn tests
2018-03-12 15:18:32 +01:00
Jaco Greeff 2279c9550e Update u8aConcat call signature (#105)
* Change u8aConcat calling format

* Simplify utilkeyring test harness
2018-03-08 16:21:37 +01:00
Jaco Greeff 4b65a59c2b Fix LE hex conversion for BN (#104) 2018-03-08 12:47:54 +01:00
Jaco Greeff 3199c79ce5 Allow lazy Logger execution (#103) 2018-02-28 13:17:14 +01:00
Jaco Greeff 54fb67c597 Test for valid hex in conversions (#102) 2018-02-28 09:20:44 +01:00
Jaco Greeff f542d9d2a0 bnToU8a with bitLength on 0 (#98)
* bnToU8a with bitLength on 0

* Extra 0 check
2018-02-22 12:29:28 +01:00
Jaco Greeff be7d5842de Add u8a <-> BN endian (#95) 2018-02-21 10:59:58 +01:00
Jaco Greeff ff5396e2ec Use u8a.toString as u8aToString (#93)
* Use u8a.toString as u8aToString

* Fix lint
2018-02-20 14:37:28 +01:00
Jaco Greeff 532c526bc7 Add basic u8aToString (#92) 2018-02-20 14:01:02 +01:00
Jaco Greeff 6f8c54337b Remove {from,to}Buffer methods (#89)
* Remove all {from,to}Buffer utility methods

* Fix check & test

* Updsate docs

* Bump minor
2018-02-15 10:32:05 +01:00
Jaco Greeff 037da5a666 Show logger.debug in NODE_ENV=test (#88) 2018-02-14 09:19:14 +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 950fa51214 Ad bnToBn (convenience) (#85)
* Ad bnToBn (convenience)

* Fix flow
2018-02-12 17:50:57 +01:00
Jaco Greeff 5c270164ec Add u8aFixLength (#84) 2018-02-12 17:10:40 +01:00
Jaco Greeff c451a85797 Add bitLength to hexToU8a (#83) 2018-02-12 15:25:54 +01:00
Jaco Greeff dc0f612081 Add u8aBn (#82) 2018-02-12 13:52:40 +01:00
Jaco Greeff b9f83dd422 Ad bitLength to number & BN conversions (#81)
* Typo in docs

* Add bitLength to number & WS conversions

* Update docs
2018-02-12 12:05:36 +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 8488254a0c Add u8aToHex (#73)
* Add u8aToHex

* Update doc

* Cleanup allocation

* Fix typo
2018-02-02 13:28:52 +01:00
Jaco Greeff a5518ce830 Align NaCl functions with Rust tests (#72)
* Align nacl functions with Rust tests

* Match tests from Rust
2018-02-02 13:02:55 +01:00
Jaco Greeff 19e365e2c8 Hex <-> Uint8Array utils (#69) 2018-01-30 12:36:01 +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