Biconomy SDK
Search…
⌃K

Signing Transactions

Smart Account transactions need to be signed by EOA current authoriser.
Smart Account package provides API methods to sendTransaction (which includes step of getting signature from provided signer) but one can also decouple getting signature separately by authorised controller (owner or current key) of smart wallet and dispatch later on.
// 1. Initialise smart account
// 2. prepare wallet transaction that you need to get signed
const transaction = await smartAccount.createRefundTransaction(
{transaction: tx1, feeQuote: feeQuote }
)
// batch
// const transaction = await smartAccount.createRefundTransactionBatch(
/// {transaction: tx1, feeQuote: feeQuote}
//)
// 3. prepare the signer object
// 4. Get the signature
const signature = await smartAccount.signTransaction({tx: transaction, signer: eoaSigner})
// 5. Pass on the singature in sendSignedTransaction along with prepared transaction object
const txId = await smartAccount.sendSignedTransaction({
tx: transaction, // temp
gasLimit,
signature: signature
});