This library is designed to manage vault canisters.
The main interface is VaultManager, which offers a set of methods for communication with the canister. To create a VaultManager object, you need to pass the canister identifier and identity.
You can find descriptions of each type of possible transaction in the class files.
How to create transactions:
const vm = new VaultManager(activeVaultCanisterId, adminIdentity)
const quorumTransactionRequest = new QuorumTransactionRequest(newApprovalThreshold)
const txs = await vm.requestTransaction([quorumTransactionRequest])
How to approve transactions:
const approveRequest: ApproveRequest[] = [
{ trId: this.transaction.id, state: TransactionState.Approved },
]
const vm = new VaultManager(activeVaultCanisterId, memberIdentity)
const txs = this.vm.approveTransaction(approves)
There are two methods to ensure your vault canister is always topped up with cycles:
-
Using Cycleops: Cycleops is a proactive, automated, no-code canister management tool for the Internet Computer. You can learn more about it and how to use it here. To use Cycleops with your vault canister, you need to add the Cycleops canister through a "ControllersUpdateTransaction". And them follow the instructions provided in the link.
-
Manual Top Up: Alternatively, you can manually top up the canister by sending cycles to the canister address.