1.0 KiB
1.0 KiB
Functions
trieRootOrdered
▸ trieRootOrdered(input: Array<Uint8Array>, codec?: Codec): Uint8Array
Defined in trieRootOrdered.ts:31
name: trieRootOrdered
signature: trieRootOrdered (values: Array): Uint8Array
summary: Creates a trie hash from the supplied values.
description: From an Array<Uint8Array> input, calculate the ordered triehash and return the result as a Uint8Array.
example:
import { stringToU8a } from '@polkadot/util';
import { trieRootOrdered } from '@polkadot/trie-hash';
trieRootOrdered([
stringToU8a('doe'),
stringToU8a('reindeer')
]); // => 0xe766d5d51b89dc39d981b41bda63248d7abce4f0225eefd023792a540bcffee3
Parameters:
| Name | Type | Default value |
|---|---|---|
| input | Array<Uint8Array> |
- |
Default value codec |
Codec |
DEFAULT_CODEC |
Returns: Uint8Array