Files
common/packages/util-triehash/docs/util.md
T
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

451 B

util

Internal utilities used along with hash generation

asNibbles

Converts the input to Nibbles.

asNibbles (pairs: Trie$Pairs): Uint8Array

From an Uint8Array input, calculate and return a list of nibbles that makes up the input.

import { asNibbles } from '@polkadot/util-triehash/util';

asNibbles(new Uint8Array([0x41, 0x20]) // => Uint8Array([4, 1, 2, 0])