1 | // Copyright 2017-2022 @polkadot/util-crypto authors & contributors
|
2 | // SPDX-License-Identifier: Apache-2.0
|
3 | import { bnToU8a, compactToU8a, stringToU8a, u8aConcat, u8aSorted } from '@polkadot/util';
|
4 | import { blake2AsU8a } from "../blake2/asU8a.js";
|
5 | import { BN_LE_16_OPTS } from "../bn.js";
|
6 | import { addressToU8a } from "./util.js";
|
7 | const PREFIX = stringToU8a('modlpy/utilisuba');
|
8 | export function createKeyMulti(who, threshold) {
|
9 | return blake2AsU8a(u8aConcat(PREFIX, compactToU8a(who.length), ...u8aSorted(who.map(addressToU8a)), bnToU8a(threshold, BN_LE_16_OPTS)));
|
10 | } |
\ | No newline at end of file |