createMultiSig(sender, keys, currency, amount, threshold)
Feature
Return raw operation to transfer native token from sender to multi-sig account corresponding to the given public keys.
Parameters
string
sender address,
array
keys {key : string
public key, weight : int
| string
weight},
string
currency ID,
int
| string
amount,
int
| string
threshold
Return Value
object
create (multisig) account operation
example
const senderAddress = "0x77A1a35dEB2bcc5Ed061524aa9758f2605F7DA13fca";
const currencyID = "MIT";
const threshold = 100;
const amount = 10000;
const pubkey01 = {
key: "029187852a565afa52cc7def7b3d86624a042d9138522a729fffc082e080aa6297fpu",
weight: 50
};
const pubkey02 = {
key: "020ba4d2ecd1721483d80a69abd20e7fa5d7388fb29a15c4de9cfe3e16aeea5e41fpu",
weight: 50
};
const keysArray = [pubkey01, pubkey02];
const createOperation = mitum.account.createMultiSig(
senderAddress,
keysArray,
currencyID,
amount,
threshold,
);
console.log(createOperation);
// output
Operation {
id: 'mitum',
fact: CreateAccountFact {
hint: Hint { s: 'mitum-currency-create-account-operation-fact' },
token: Token { s: '2024-05-20 07:26:20.677 +0000 UTC' },
_hash: <Buffer 74 08 9a 6f 41 f4 49 13 03 3f a7 63 58 64 33 41 ed 32 f0 d0 97 f8 85 d3 84 37 41 fa c8 4b c3 05>,
sender: Address {
s: '0x77A1a35dEB2bcc5Ed061524aa9758f2605F7DA13fca',
type: 'mitum'
},
items: [ [CreateAccountItem] ]
},
hint: Hint { s: 'mitum-currency-create-account-operation' },
_factSigns: [],
_hash: <Buffer >
}
PreviouscreateAccount(sender, key, currency, amount)NextupdateKey(sender, newKeys, currency, threshold)
Last updated