onchainid.createIdentity(CreateIdentity)
Create (or fetch if already exists) an ONCHAINID identity for a given EOA (Externally Owned Account where the user controls the keys). If an identity is already associated with a subject, it returns that identity address with status: 'exists'.
CreateIdentity Type Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| idFactoryAdmin | Signer | Required | ID Factory Signer authorized to create identities. |
| subject | string | Required | EOA of the identity the deployed ONCHAINID will be associated with. |
| deploymentSalt | string | Required | Arbitrary string used for deterministic deployment. |
Returns
| Field | Type | Description |
|---|---|---|
| status | created or exists | 'created' when a new identity was deployed, 'exists' if already present. |
| identity | string | ONCHAINID identity contract address that is bound to their EOA. |
| receipt | TransactionReceipt | Transaction receipt when created. Only present when status is 'created'. |

