# new Identity(argopt)
Encapsulates an identity stored in a Fabric wallet, including its MSP identifier, credential linkage, and type information. Built on BaseModel for integration with Decaf validation and persistence.
Identity model representing a Fabric wallet entry
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
arg |
ModelArg.<Identity>
|
<optional> |
Optional initialization object used to populate model fields |
Example
// Create a new identity referencing existing credentials
const id = new Identity({ id: "user1", mspId: "Org1MSP", type: IdentityType.X509 });
Members
# credentials
One-to-one relationship to the credentials entity; cascades on update and delete
Link to the identity credentials stored separately
IdentityCredentials
# credentials
One-to-one relationship to the credentials entity; cascades on update and delete
Link to the identity credentials stored separately
# id
Primary key used to reference this identity record
Unique identifier of the identity in the wallet
string
# id
Primary key used to reference this identity record
Unique identifier of the identity in the wallet
# mspId
The MSP ID corresponding to the organization that issued this identity
Membership Service Provider identifier
string
# mspId
The MSP ID corresponding to the organization that issued this identity
Membership Service Provider identifier