Methods

loadKeys(privateKeys)

Load the private keys of the authority public keys in order to approve transactions with them

const account = await eoslime.Account.createRandom();

const keys = [
    await eoslime.utils.generateKeys(),
    await eoslime.utils.generateKeys()
]

await account.addOnBehalfKey(keys[0].publicKey)
await account.addOnBehalfKey(keys[1].publicKey)
await account.increaseThreshold(2);

const multiSigAccount = eoslime.MultiSigAccount.load(account.name, account.privateKey);
multiSigAccount.loadKeys(keys.map((key) => { return key.privateKey }));

loadAccounts(accounts)

Load the accounts configured to act on behalf of the multisignature authority

propose(contractAction, actionData)

Propose a transaction to be executed

Parameters

  1. contractAction - Instance of ContractFunction. ContractFunctions are all contract methods constructed with eoslime

  2. actionData - An array of the parameters you will want the produce function to be called with

You are loading actually the proposer account with

When you are proposing a transaction, behind the scene the proposer approves it.

approve(publicKey, proposalId)

Sign a proposed transaction

Parameters

  1. publicKey - publicKey of a loaded account/key

  2. proposalId - Response of the propose method

processProposal(proposalId)

Broadcast proposal in case of enough approvals

Last updated

Was this helpful?