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
This commit is contained in:
Jaco Greeff
2018-02-08 14:50:54 +01:00
committed by GitHub
parent a18e7f8474
commit e832aebb07
64 changed files with 1073 additions and 188 deletions
+1 -7
View File
@@ -19,11 +19,5 @@ module.exports = function bufferToU8a (buffer?: Buffer): Uint8Array {
return new Uint8Array([]);
}
const array = new Uint8Array(buffer.length);
for (let index = 0; index < buffer.length; ++index) {
array[index] = buffer[index];
}
return array;
return new Uint8Array(buffer);
};