package
0.0.121
Repository: https://github.com/layer-3/clearsync.git
Documentation: pkg.go.dev

# README

SmartWallet GoLang library

Overview

SmartWallet is a golang library that provides helper functions to user operations.

Features

This package introduces the following types and helper functionality:

  • Config - A struct that holds the configuration for the SmartWallet.
  • Type - an enum that represents the type of the wallet. Currently only ZeroDev Kernel v2.2, Biconomy v2.0 and eth-infinitism SimpleAccount v0.6 (still in progress) are supported.
  • IsAccountDeployed(swAddress) - a function that checks if the smart wallet is deployed.
  • GetAccountAddress(owner, index) - a function that calculates the address of the smart wallet.
  • GetInitCode(smartWalletConfig) - a function that returns the init code of the smart wallet.
  • Get<SmartWalletType>InitCode(...) - a function that returns the init code for the supported types of smart wallets.
  • GetInitCodeFromFactoryCallData(smartWalletConfig, factoryCallData) - a function that builds the init code from the smart wallet config and factory call data.
  • GetFactoryCallData(smartWalletConfig) - a function that returns the call data for the smart wallet factory.
  • Get<SmartWalletType>FactoryCallData(...) - a function that returns the factory call data for the supported types of smart wallets.