createMultiSig(sender, keys, currency, amount, threshold)
const senderAddress = "0x78f707a5CB15924b5edf7E45cD8df06b577984F7fca";
const currencyID = "MCC";
const threshold = 100;
const amount = 10000;
const pubkey01 = {
key: "0399623f76b2d62a54b368f367426704d5af14aed09c9ed67104c225fcfda429bdfpu",
weight: 50
};
const pubkey02 = {
key: "029187852a565afa52cc7def7b3d86624a042d9138522a729fffc082e080aa6297fpu",
weight: 50
};
const keysArray = [pubkey01, pubkey02];
const createOperation = mitum.contract.createMultiSig(
senderAddress,
keysArray,
currencyID,
amount,
threshold,
);
console.log(createOperation);
// output
Operation {
id: 'mitum',
fact: CreateContractAccountFact {
hint: Hint { s: 'mitum-currency-create-contract-account-operation-fact' },
token: Token { s: '2024-05-20 08:16:41.783 +0000 UTC' },
_hash: <Buffer 1a fe 46 47 38 11 19 ab 36 c6 94 5b e1 48 67 a1 85 25 fe fc 62 02 41 95 7a f5 4e 44 a1 ea 2c 8b>,
sender: Address {
s: '0x78f707a5CB15924b5edf7E45cD8df06b577984F7fca',
type: 'mitum'
},
items: [ [CreateContractAccountItem] ]
},
hint: Hint { s: 'mitum-currency-create-contract-account-operation' },
_factSigns: [],
_hash: <Buffer >
}Last updated