@b2network/b2-account-agent
v0.0.9
Published
## Install
Downloads
20
Readme
B2 Account Agent
Install
yarn add @b2network/b2-account-agent
Test
yarn test
Examples
// 1. pick a signer
const ethSigner = new ETHSigner(PASS_IN_YOUR_32_BYTES_PK)
const btcSigner = new BTCSigner(PASS_IN_YOUR_32_BYTES_PK)
// 2. create an agent
const agent = await B2AccountAgent.create(ethSigner, 'devnet')
// 3. send tx (userOperation technically)
const tx = await agent.sendTransaction({
to: randomAddr,
value: 0n,
data: '0x'
})
// 4. poll for receipt
const result = await agent.waitForTransaction(tx.hash)