Identity Suite
The identity suite is ONCHAINID: the contracts that give every participant and every asset an on-chain identity, with its keys, its claims and its wallets. This section has one page per contract: every external function, who can call it, what it reverts with, and the events it emits. The pages are written from the code of the develop branch of the ONCHAINID repository. The concepts are in Identity: ONCHAINID.
The contracts
Identity, with SmartAccount and KeyManager
One beacon proxy per identity, by the IdentityFactory. Every identity runs the same implementation
KeyApprovalModule
Once per network. It holds the execution queue of every identity that installs it
RecoveryModule
Once per network. It holds the guardians of every identity that installs it
IdentityFactory
Once per network. It deploys identities and keeps the global record of wallets
How the contracts fit
An identity is an account.
Identityis an ERC-7579 smart account behind a beacon proxy. It holds tokens, executes calls and installs modules.Its state lives in shared modules. Keys and claims are stored in the
ERC734Validator, under the address of the identity. The execution queue is in theKeyApprovalModule, the guardians in theRecoveryModule. One deployment of each module serves every identity.Calls reach the modules through the identity. An integrator calls the identity. The identity answers key reads itself and routes the claim functions,
executeandapproveto the module that serves them. A function that a module has and the identity does not route cannot be called on the identity.The factory is the global registry.
IdentityFactorycreates identities, records the type of each one, and records which wallet is linked to which identity. TheTREXRegistryof every asset reads it.
Conventions shared by every contract
Keys. A key is identified by
keyHash = keccak256(signerData). For an address,signerDatais its 20 bytes. For a key behind an ERC-7913 verifier, it is the verifier address followed by the public key.Purposes.
MANAGEMENT1,ACTION2,CLAIM_SIGNER3,ENCRYPTION4,CLAIM_ADDER5,PROPOSER6.MANAGEMENTsatisfies every purpose check.Key types.
ECDSA1,RSA2,WEBAUTHN3,MODULE4,ACCESS_MANAGER5.Identity types.
ASSET1,INDIVIDUAL2,CORPORATE3,IOT4,CLAIM_ISSUER5,SMART_CONTRACT6,PUBLIC_AUTHORITY7,AI_AGENT8.Wallets. The factory takes a wallet as
bytes: an ERC-7930 interoperable address in canonical form, on any chain.Access control. The functions of the factory, the reputation registry and the EAS adapter that are marked "Network governance" are restricted by the access manager of the network. The functions of an identity are gated by its own keys.
Errors. Custom errors are declared in the library
Errors, and a few in the modules themselves. They are listed in Errors of the identity suite.
The reading conventions of the function tables are those of the Token Suite section.
Last updated