Class

Identity

Identity(argopt)

Constructor

# 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

sequenceDiagram participant App participant Model as Identity App->>Model: new Identity({ id, mspId, type }) Model-->>App: instance
Parameters:
Name Type Attributes Description
arg ModelArg.<Identity> <optional>

Optional initialization object used to populate model fields

View Source shared/model/Identity.ts, line 12

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

View Source shared/model/Identity.ts, line 37

IdentityCredentials

# credentials

One-to-one relationship to the credentials entity; cascades on update and delete

Link to the identity credentials stored separately

View Source shared/model/Identity.ts, line 88

# id

Primary key used to reference this identity record

Unique identifier of the identity in the wallet

View Source shared/model/Identity.ts, line 32

string

# id

Primary key used to reference this identity record

Unique identifier of the identity in the wallet

View Source shared/model/Identity.ts, line 82

# mspId

The MSP ID corresponding to the organization that issued this identity

Membership Service Provider identifier

View Source shared/model/Identity.ts, line 42

string

# mspId

The MSP ID corresponding to the organization that issued this identity

Membership Service Provider identifier

View Source shared/model/Identity.ts, line 94

# type

Indicates the identity encoding/format; defaults to X.509

Type of identity

View Source shared/model/Identity.ts, line 47

IdentityType

# type

Indicates the identity encoding/format; defaults to X.509

Type of identity

View Source shared/model/Identity.ts, line 100