Hi Guys, I'm implementing Account Abstraction using Magic and Account Kit, following this example: Magic and Account Kit Example
When I try to create the provider, I encounter an error because the type of new WalletClientSigner(magicClient, 'magic') is not compatible with the value that must be assigned to the owner in the .connect method to create the provider:
provider = new AlchemyProvider({
apiKey: "xxxxxxxxxxxxx",
chain: polygonMumbai,
}).connect(
async (rpcClient) =>
new LightSmartContractAccount({
entryPointAddress,
chain: rpcClient.chain,
owner: await createMagicSigner(), //ERROR
factoryAddress: getDefaultLightAccountFactoryAddress(polygonMumbai),
rpcClient,
})
);
Error creating the provider: TypeError: account.getOwner is not a function
*Dependencies*:
- "@alchemy/aa-accounts": "^1.2.0"
- "@alchemy/aa-alchemy": "^1.2.0"
- "@alchemy/aa-core": "^1.2.0"
- "magic-sdk": "^21.2.1"
- "viem": "^1.19.3"
Someone knows how can i solve this? Thank you all!
Nov 20, 2023, 12:53 PM