Skip to main content

2. Combine the Multisig Keys

By combining the two multisig keys (the Octet key and the user key), you can derive the original private key.

You can sign transactions with the derived private key.


Example​

// secrets.js-grempe: 2.0.0
import * as Secrets from 'secrets.js-grempe';

const octetKey = '80172a2427c7960ff54f3b43318d88c88c0d649c08b96474005d1a5c2bb65fd5121ee8a7e6ff2d364216cb3020501c4b4f8138084d328e950c8e61a965c1f3c3863c9e20d6970682919499be264baf2b79c4691b9834aa2a3423f2f3952ba7139e49a45c073dfcf59c89387d01937c66b112f5c611eae3198aed1aa7d27fd5dd40366442acdb6a2adb56f08d4607f1135ee';
const userKey = '802e45984f8f2c0e3a8fb756633ada30dc1b1c79dae312d80afbff8993bcab4a20ac1a5fc7df914c80ad824045902dd7547264715145090a02ed16231e43ed4708d8f831a7ee07a52679263d98369a573738c6c6f4194f65b2b7ef472fe6947728a29299db3a3c8b2db3b58bd9e6ecbd6745ef3c29041c42dedbfe3fa06e7f2b556ccdb542d71fc472bde40b593feaa6a91';
const keys = [octetKey, userKey];

const privateKey = Secrets.hex2str(Secrets.combine(keys));