Files
common/packages/trie-db/src/constants.ts
T
Jaco Greeff 65b8468e5b Import util via {...} (#236)
* Import util via {...}

* Fix test failures
2018-10-18 15:24:13 +02:00

21 lines
585 B
TypeScript

// Copyright 2017-2018 @polkadot/trie-db authors & contributors
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
import { keccakAsU8a as hashing } from '@polkadot/util-crypto/index';
import trieRoot from '@polkadot/trie-hash/root';
const EMPTY_NODE = new Uint8Array();
const EMPTY_U8A = trieRoot([]);
const EMPTY_U8A_STR = trieRoot([]);
const EMPTY_HASH = hashing(EMPTY_U8A);
const EMPTY_HASH_STR = EMPTY_HASH.toString();
export {
EMPTY_NODE,
EMPTY_HASH,
EMPTY_HASH_STR,
EMPTY_U8A,
EMPTY_U8A_STR
};