This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@biconomy-sdk-dev/account-abstraction
TypeScript icon, indicating that this package has built-in type declarations

1.0.29 • Public • Published

SDK to create and send UserOperation

This package provides 2 APIs for using UserOperations:

  • Low-level "walletAPI"
  • High-level Provider

LowLevel API:

BaseWalletAPI

An abstract base-class to create UserOperation for a contract wallet.

SmartAccountAPI

An implementation of the BaseWalletAPi, for the Biconomy SmartAccount

owner = provider.getSigner()
const smartWalletAPI = new SmartAccountAPI(
    provider,
    entryPoint, // instance of the entry point contract
    config, // instance of ClientConfig
    walletAddress, // counter factual wallet address (smartAccount.address)
    originalSigner, // owner
    fallbackHandlerAddress, 
    factoryAddress, // wallet factory address 
    0 // index
  )
const op = await smartWalletAPI.createSignedUserOp({
  target: recipient.address,
  data: recipient.interface.encodeFunctionData('something', ['hello'])
})

High-Level Provider API

A simplified mode that doesn't require a different wallet extension. Instead, the current provider's account is used as wallet owner by calling its "Sign Message" operation.

This can only work for wallets that use an EIP-191 ("Ethereum Signed Message") signatures (like our sample SimpleWallet) Also, the UX is not great (the user is asked to sign a hash, and even the wallet address is not mentioned, only the signer)

Package Sidebar

Install

npm i @biconomy-sdk-dev/account-abstraction

Weekly Downloads

6

Version

1.0.29

License

MIT

Unpacked Size

315 kB

Total Files

64

Last publish

Collaborators

  • maliktalha