IdentityWallet class
Wallet instance to manage the digital identity based on iden3 protocol allows to: create identity/profile, sign payloads (bigint / bytes), generate keys, generate Merkle tree proofs of inclusion / non-inclusion to Merkle trees, issue credentials with a BJJSignature and Iden3SparseMerkleTree Proofs, revoke credentials, add credentials to Merkle trees, push states to reverse hash service
IdentityWallet - class
implements IIdentityWallet interface
Signature:
export declare class IdentityWallet implements IIdentityWallet
Implements: IIdentityWallet
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(_kms, _storage, _credentialWallet) | Constructs a new instance of the IdentityWallet class |
Methods
Method | Modifiers | Description |
---|---|---|
addCredentialsToMerkleTree(credentials, issuerDID) | Adds verifiable credentials to issuer Claims Merkle tree | |
createIdentity(opts) | Create Identity creates Auth BJJ credential, Merkle trees for claims, revocations and root of roots, adds auth BJJ credential to claims tree and generates mtp of inclusion based on the resulting state it provides an identifier in DID form. | |
createProfile(did, nonce, verifier) | Creates profile based on genesis identifier | |
findOwnedCredentialsByDID(did, query) | ||
generateCredentialMtp(did, credential, treeState) | ||
generateIden3SparseMerkleTreeProof(issuerDID, credentials, txId, blockNumber, blockTimestamp) | Generate Iden3SparseMerkleTree proof of inclusion to issuer state of specific credentials | |
generateKey(keyType) | Generates a new key | |
generateNonRevocationMtp(did, credential, treeState) | Generates proof of credential revocation nonce inclusion / non-inclusion to the given revocation tree and its root or to the current root of the Revocation tree in the given Merkle tree storage. | |
getCoreClaimFromCredential(credential) | ||
getDIDTreeModel(did) | Gets a tree model for given did that includes claims tree, revocation tree, the root of roots tree and calculated state hash | |
getGenesisDIDMetadata(did) | gets profile nonce by it's id. if profile is genesis identifier - 0 is returned | |
getProfileByVerifier(verifier) | ||
getProfilesByDID(did) | gets profile identity by genesis identifiers | |
issueCredential(issuerDID, req, opts) | Issues new credential from issuer according to the claim request | |
publishStateToRHS(issuerDID, rhsURL, revokedNonces) | ||
revokeCredential(issuerDID, credential) | ||
sign(message, credential) | Signs a payload of arbitrary size with an Auth BJJ Credential that identifies a key for signing. | |
signChallenge(challenge, credential) | Signs a big integer with an Auth BJJ Credential that identifies a key for signing. |