@dgpub/prime-sdk
Version:
Etherspot Prime (Account Abstraction) SDK
19 lines (18 loc) • 728 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EtherspotWalletFactoryAPI = void 0;
const ethers_1 = require("ethers");
class EtherspotWalletFactoryAPI {
static createAccount(factoryAddress, registry, owner, salt) {
const walletFactory = new ethers_1.Contract(factoryAddress, [
'function createAccount(IEntryPoint _entryPoint, address, _registry, address owner, uint256 salt) returns(address)',
]);
const encodedData = walletFactory.interface.encodeFunctionData('createAccount', [
registry,
owner,
salt,
]);
return encodedData;
}
}
exports.EtherspotWalletFactoryAPI = EtherspotWalletFactoryAPI;