With the Etherspot Prime SDK we have the option to use some different smart contract wallet implementations with the Etherspot infrastructure.

When instantiating the SDK, there is an optional parameter called factoryWallet. If this is not included then it will default to Factory.ETHERSPOT and use our wallet factory.

Currently we have added support for ZeroDev and simpleAccount.

ZeroDev instantiation

Factory contract address: 0x5de4839a76cf55d0c90e2061ef4386d962E15ae3

import { Factory, PrimeSdk } from '../src';
import * as dotenv from 'dotenv';
dotenv.config();

async function main() {
  const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), 
  factoryWallet: Factory.ZERO_DEV, bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })
}

simpleAccount instantiation

Factory contract address: 0x9406Cc6185a346906296840746125a0E44976454

import { Factory, PrimeSdk } from '../src';
import * as dotenv from 'dotenv';
dotenv.config();

async function main() {
  const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), 
  factoryWallet: Factory.SIMPLE_ACCOUNT, bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })
}