Skip to main content

Interact

Once you have created an INTU MPC Account, you can start using it to send transactions!

That process comes in 3 steps, proposing a transaction, signing the transaction (requiring a threshold amount of users to sign it), and then combining/sending the transaction.

Propose transaction

import { submitTransaction, getVaults } from "@intuweb3/web-exp";
let myVaults = getVaults("0x12345_user_address", provider)
let nonce = myVaults[i].transactionCount //nonce should start at 0
let value = ethers.utils.parseEther(String(AMOUNTFROMYOURFORM))._hex; // in eth
let to = FROMYOURFORM
let chainId = FROMYOURFORM
let data = 0x1...
let gasPrice = "" // or an amount of your choosing
let gas = "" // or an amount of your choosing

await submitTransaction(to, value, chainId, nonce, data, gasPrice, gas, vaultAddress, signer)

Sign transaction

import { signTx, getVaults } from "@intuweb3/web-exp";
let myVaults = getVaults("0x12345_user_address", provider);
let vaultaddress = myVaults[i].vaultAddress;
let txId = myVaults[i].transactions; //index of transaction you
await signTx(vaultAddress, txId, signer);

Combine signatures

import { combineSignedTx, getVaults } from "@intuweb3/web-exp";
let myVaults = getVaults("0x12345_user_address", provider);

await combineSignedTx(vaultAddress, txId, signer);