Skip to main content

IIdentityWallet interface

Interface for IdentityWallet

Signature:

export interface IIdentityWallet 

Methods

MethodDescription
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)find all credentials that belong to any profile or genesis identity for the given did
generateCredentialMtp(did, credential, treeState)Generates proof of credential inclusion / non-inclusion to the given claims tree and its root or to the current root of the Claims tree in the given Merkle tree storage.
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)

Extracts core claim from signature or merkle tree proof. If both proof persists core claim must be the same

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)gets profile identity by verifier
getProfilesByDID(did)gets profile identity by genesis identifiers
issueCredential(issuerDID, req)Issues new credential from issuer according to the claim request
publishStateToRHS(issuerDID, rhsURL, revokedNonces)
revokeCredential(issuerDID, credential)
sign(payload, credential)Signs a payload of arbitrary size with an Auth BJJ Credential that identifies a key for signing.
signChallenge(payload, credential)Signs a big integer with an Auth BJJ Credential that identifies a key for signing.