Comment on page

Methods Usage Latest

import { Banana,
Chain
} from '@bananahq/banana-sdk'
​
const bananaInstance = new Banana(Chains.mumbai);
​
// getting wallet
const walletInstance = await bananaInstance.connectWallet();
​
// getting SCW address for display
const SCWAddress = walletInstance.walletAddress;
​
// getting signer
const signer = walletInstance.getSigner();
​
// making transaction using sendTransaction
const tx = {
gasLimit: "0x55555",
to: stakeAddress,
value: ethers.utils.parseEther('0.0000001'),
data: new ethers.utils.Interface(StakingArtifact.abi).encodeFunctionData(
"stake",
[]
),
};
​
// making txn
const txn = await signer.sendTransaction(tx);
​
// for making bundled transaction use method sendBatchedTransaction
const batchedTxnResp = await signer.sendBatchTransaction([tx, tx]);
If you have any questions please post them Banana SDK Discord forum.​