The Javascript examples uses Zilliqa-Javascript-Library.
Using npm <= 12.9, run npm install
.
To execute the examples, configure the parameters in the Javascript files and run node [file_name.js], e.g. node deploy.js
.
An example of using this multisig wallet contract is as follows:
- Prepare some accounts and deploy the wallet contract:
node deploy.js
- Add funds to the wallet:
node add_funds.js
- Create a transaction to transfer some funds to a recipient:
node submit_transaction.js
- Sign the transaction from (3):
node sign_transaction.js
; change the private key to simulate different wallet owners approving the transaction. - Check the transactions and signatures' statuses:
node get_transactions.js
- If necessary, revoke the signature from (4):
node revoke_signature.js
- Execute the transaction from (4) once the number of required signatures is reached:
node execute_transaction.js
; can be wallet owners or recipient