Introduction

In this page, we explore an example P256AccountFactory that allows the creation of blockchain accounts whose transactions can be signed using the P256 curve instead of the native secp256k1 provided by the blockchain protocol. This is incredibly useful, as many IoT devices support this type of cryptography by default, empowering developers to create applications where users can, for example, sign transactions with their biometrics. This example is based on the code created by the original author of the ERC-4337. The example is deployed on IoTeX and can be freely utilized by developers:
Mainnet Contract
0xD98d2B6cBca981c777037c5784721d8179D7030b
Testnet Contract
0x508Db1A73FcBA98594679aD4f5d8D0B880BbdaFB

Paymaster support

The P256AccountFactory also supports a paymaster service, which is made out of two components, a VerifyingPaymaster contract (view [source code](< https://github.com/iotexproject/account-abstraction-contracts/blob/main/contracts/paymaster/VerifyingPaymaster.sol>)) and an off-chain service endpoint to generate payment proofs for the paymaster contract: Testnet Endpoint: https://paymaster.testnet.w3bstream.com

Create P256 Accounts

The code below shows you how to interact with the p256 account implementation from a javascript client in order to create an account -> View the full code

Transfer IOTX

The following code will show you how to transfer IOTX using bundler service and paymaster. -> View the full code
The rest of the example on how to interact with the p256 account implementation from a javascript client, can be found at this link.