Skip to content

A modified version of the AbstractionKit library to enable support for data-dependent user operations

License

Notifications You must be signed in to change notification settings

Morpher-io/dd-abstractionkit

Repository files navigation

Supported by Safe Grants

A modified version of the AbstractionKit library to enable support for data-dependent user operations.

Docs

For full detailed documentation visit the Candide docs page.

Installation [todo]

npm install abstractionkit

Quickstart

The kit is used exaclty as the original one, refer to the original readme for a quickstart.

The only difference is the management of data dependent user operations. If a contract the user is interacting with requires data, the kit will make use of contract calls and special bundler endpoints to manage that. Make sure that the bundler you're connecting to supports data-dependency.

Creating and sending a data-dependent user operation

const transaction : MetaTransaction = {
        to: yourDataDepndentContract,
        value: 0n,
        data: transactionCallData,
    }

// bundler will provide gas estimation on data-dependent endpoints
// the userOperation object is also containing the data requirements
const userOperation = await smartAccount.createUserOperation(
        [transaction],
        jsonRpcNodeProvider, // regular ethereum rpc for your chain
        bundlerUrl, // must be a dd-bundler
    )

userOperation.signature = smartAccount.signUserOperation(
        userOperation,
        [ownerPrivateKey],
        chainId,
    )

// correct bundler endpoint will be used according to data-dependecy
const sendUserOperationResponse = await smartAccount.sendUserOperation(
        userOperation, bundlerUrl
    )

npm package [todo]

npm

License

MIT

About

A modified version of the AbstractionKit library to enable support for data-dependent user operations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages