addressForMultiSig(keys, threshold)
Feature
Return address for multi-signature from multiple public keys. Each public key should have a weight set based on its priority or importance in the multi sig account. 1 ≤ weight ≤ 100, threshold ≤ 100 & sum of weights
Parameters
array
keys {key : string
public key, weight : int
| string
weight},
int
| string
threshold
Return Value
string
address
example
const pubkey01 = {
key: "020ba4d2ecd1721483d80a69abd20e7fa5d7388fb29a15c4de9cfe3e16aeea5e41fpu",
weight: 50
};
const pubkey02 = {
key: "035facb53ce57afba4fb168f12c2be6a7b5b2ba764aa84136a89171131fc50b662fpu",
weight: 50
};
const keysArray = [pubkey01, pubkey02];
const threshold = 100;
const multisigAddress = mitum.account.addressForMultiSig(keysArray, threshold);
console.log(multisigAddress);
// output
0xc3673F673bD88b6DCF83c493AE73BFb25A6689Acfca
Last updated