1 | ;
|
2 |
|
3 | // Copyright 2017-2018 Jaco Greeff
|
4 | // This software may be modified and distributed under the terms
|
5 | // of the ISC license. See the LICENSE file for details.
|
6 | var u8aConcat = require('@polkadot/util/u8a/concat');
|
7 | var u8aFromString = require('@polkadot/util/u8a/fromString');
|
8 | var u8aToHex = require('@polkadot/util/u8a/toHex');
|
9 | var xxhash = require('@polkadot/util-crypto/xxhash/asU8a128');
|
10 |
|
11 | module.exports = function storageKey(prefix, key) {
|
12 | return u8aToHex(xxhash(u8aConcat(u8aFromString(prefix), key)));
|
13 | }; |
\ | No newline at end of file |