js-sdk package
Classes
Class | Description |
---|---|
AgentResolver | AgentResolver is a class that allows to interact with the issuer's agent to get revocation status. AgentResolver |
AtomicQueryMTPV2Inputs | AtomicQueryMTPInputs ZK private inputs for credentialAtomicQueryMTP.circom AtomicQueryMTPV2Inputs {BaseConfig} |
AtomicQueryMTPV2OnChainInputs | AtomicQueryMTPV2OnChainInputs ZK private inputs for credentialAtomicQueryMTPV2OnChain.circom AtomicQuerySigV2OnChainInputs {BaseConfig} |
AtomicQueryMTPV2OnChainPubSignals | public signals AtomicQueryMTPV2OnChainPubSignals {BaseConfig} |
AtomicQueryMTPV2PubSignals | Public signals AtomicQueryMTPV2PubSignals {BaseConfig} |
AtomicQuerySigV2Inputs | AtomicQuerySigV2Inputs representation for credentialAtomicQuerySig.circom Inputs and public signals declaration, marshalling and parsing AtomicQuerySigV2Inputs {BaseConfig} |
AtomicQuerySigV2OnChainCircuitInputs | AtomicQuerySigV2OnChainCircuitInputs type represents credentialAtomicQuerySig.circom private inputs required by prover AtomicQuerySigV2OnChainCircuitInputs |
AtomicQuerySigV2OnChainInputs | AtomicQuerySigV2OnChainInputs ZK private inputs for credentialAtomicQuerySig.circom AtomicQuerySigV2OnChainInputs {BaseConfig} |
AtomicQuerySigV2OnChainPubSignals | public signals AtomicQuerySigV2OnChainPubSignals {BaseConfig} |
AtomicQuerySigV2PubSignals | public signals AtomicQuerySigV2PubSignals {BaseConfig} |
AuthHandler | Allows to process AuthorizationRequest protocol message and produce JWZ response. AuthHandler implements IAuthHandler interface |
AuthV2Inputs | Auth v2 circuit representation Inputs and public signals declaration, marshalling and parsing AuthV2Inputs {BaseConfig} |
AuthV2PubSignals | public signals AuthV2PubSignals |
BaseConfig | base config for circuit inputs BaseConfig |
BjjProvider | Provider for Baby Jub Jub keys BjjProvider implements IKeyProvider interface |
BJJSignatureProof2021 | BJJSignatureProof2021 is a signature of core claim by BJJ key BJJSignatureProof2021 |
BrowserDataSource | Storage in the browser, uses local storage BrowserDataSource Type |
CircuitClaim | Claim structure for circuit inputs CircuitClaim |
CircuitStorage | Implementation of ICircuitStorage to store keys data CircuitStorage implements ICircuitStorage interface |
CredentialStatusResolverRegistry | CredentialStatusResolverRegistry is a registry of CredentialStatusResolver CredentialStatusResolverRegistry |
CredentialStorage | Implementation of ICredentialStorage with KV Data source CredentialStorage {ICredentialStorage} |
CredentialWallet | Wallet instance is a wrapper of CRUD logic for W3C credentials, also it allows to fetch revocation statuses. CredentialWallet implements ICredentialWallet interface |
DataPrepareHandlerFunc | Handler to DataPrepareHandlerFunc |
EthStateStorage | EthStateStorage implements IStateStorage interface |
FetchHandler | Allows to handle Credential offer protocol message and return fetched credential FetchHandler implements IFetchHandler interface |
FilterQuery | Filter for queries of credentialSubject with a json path e.g birthday.date FilterQuery implements IFilterQuery interface |
FSKeyLoader | Loader from file system FSKeyLoader implements IKeyLoader interface |
Iden3SparseMerkleTreeProof | Iden3SparseMerkleProof is a iden3 protocol merkle tree proof Iden3SparseMerkleTreeProof |
IdentityStorage | Implementation of the IIdentityStorage with KV data source IdentityStorage implements IIdentityStorage interface |
IdentityWallet | 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 |
IndexedDBDataSource | Storage in the browser, uses indexed db storage IndexedDBDataSource Type |
IndexedDBPrivateKeyStore | Allows storing keys in the indexed db storage of the browser (NOT ENCRYPTED: DO NOT USE IN THE PRODUCTION) IndexedDBPrivateKeyStore implements AbstractPrivateKeyStore interface |
InMemoryDataSource | Generic Memory Data Source InMemoryDataSource - class Type |
InMemoryMerkleTreeStorage |
InMemoryMerkleTreeStorage implements IMerkleTreeStorage interface |
InMemoryPrivateKeyStore | Key Store to use in memory InMemoryPrivateKeyStore implements AbstractPrivateKeyStore interface |
IssuerData | IssuerData is the data that is used to create a proof IssuerData |
IssuerResolver | IssuerResolver is a class that allows to interact with the issuer's http endpoint to get revocation status. IssuerResolver |
JsonSchemaValidator | JSON Schema Validator JsonSchemaValidator |
JWSPacker | Packer that can pack message to JWZ token, and unpack and validate JWZ envelope ZKPPacker implements IPacker interface |
KMS | Key management system class contains different key providers. allows to register custom provider, create key, get public key and sign KMS - class |
LDParser | LDParser can parse JSONLD schema according to specification LDParser |
LocalStoragePrivateKeyStore | Allows storing keys in the local storage of the browser (NOT ENCRYPTED: DO NOT USE IN THE PRODUCTION) LocalStoragePrivateKeyStore implements AbstractPrivateKeyStore interface |
MerkleTreeIndexedDBStorage | Merkle tree storage that uses browser indexed db storage MerkleTreeIndexedDBStorage implements IMerkleTreeStorage interface |
MerkleTreeLocalStorage | Merkle tree storage that uses browser local storage MerkleTreeLocalStorage implements IMerkleTreeStorage interface |
NativeProver | |
OnChainResolver | OnChainIssuer is a class that allows to interact with the onchain contract and build the revocation status. OnChainIssuer |
PackageManager | Basic package manager for iden3 communication protocol PackageManager implements IPackageManager interface |
Parser | Parser can parse claim and schema data according to specification Parser |
PlainPacker | Plain packer just serializes bytes to JSON and adds media type PlainPacker implements IPacker interface |
ProofNode | ProofNode is a partial Reverse Hash Service result it contains the current node hash and its children ProofNode |
ProofService | Proof service is an implementation of IProofService that works with a native groth16 prover ProofService implements IProofService interface |
Query | Query represents basic request to claim slot verification Query |
RevocationStatusDTO | RevocationStatusDTO is a result of fetching credential status with type SparseMerkleTreeProof RevocationStatusDTO |
RHSResolver | RHSResolver is a class that allows to interact with the RHS service to get revocation status. RHSResolver |
Scalar | Scalar is used to compare two scalar value. Scalar implements IComparer interface |
Sec256k1Provider | Provider for Sec256p1 keys256p1 Sec256p1Provider implements IKeyProvider interface |
StateTransitionInputs | StateTransition circuit representation Inputs and public signals declaration, marshalling and parsing StateTransitionInputs {BaseConfig} |
StateTransitionPubSignals | Public signals of StateTransition circuit StateTransitionPubSignals |
ValueProof | ValueProof represents a Merkle Proof for a value stored as MT ValueProof |
Vector | Vector uses for find/not find x scalar type in y vector type. Vector implements IComparer interface |
VerificationHandlerFunc | Handler to verify public signals of authorization circuits VerificationHandlerFunc |
W3CCredential | W3C Verifiable credential https://www.w3.org/2018/credentials/v1 W3CCredential |
ZKPPacker | Packer that can pack message to JWZ token, and unpack and validate JWZ envelope ZKPPacker implements IPacker interface |
Abstract Classes
Abstract Class | Description |
---|---|
AbstractPrivateKeyStore | KeyStore that allows to import and get keys by alias. AbstractPrivateKeyStore |
Enumerations
Enumeration | Description |
---|---|
CircuitError | List of errors of circuit inputs processing {number} |
CircuitId | CircuitID is alias for circuit identifier {number} |
CredentialStatusType | CredentialStatusType type for revocation type {number} |
KmsKeyType | Key type that can be used in the key management system {number} |
MerkleTreeType | Type of MerkleTree {number} |
MerklizedRootPosition | Merklized Core.Claim root position for vc creation {number} |
Operators | List of available operators. {number} |
ProofPurpose | W3C Proof purpose {number} |
ProofType | Proof type for Verifiable Credential supported by sdk {number} |
SearchError | search errors {number} |
SubjectPosition | Subject Core.Claim position for vc creation {number} |
Functions
Function | Description |
---|---|
base58ToBytes(s) | |
base64ToBytes(s) | |
bytesToBase58(b) | |
bytesToBase64(b) | |
bytesToBase64url(b) | |
bytesToHex(b) | |
checkDataInField(data) | check if byte data is in Q field |
dataFillsSlot(slot, newData) | checks if data fills into slot capacity () |
decodeBase64url(s) | |
encodeBase64url(s) | |
extractProof(proof) | extracts core claim from Proof and returns Proof Type |
fieldToByteArray(field) | FieldToByteArray convert fields to byte representation based on type |
getProperties(obj) | return object properties |
getRandomBytes(n) | generates Uint8Array with random bytes of size n |
hexToBytes(s) | |
isGenesisStateId(id, state, type) | Checks if id is created from given state and type is genesis |
isIssuerGenesis(issuer, state) | Checks if issuer did is created from given state is genesis |
keyPath(keyType, keyID) | builds key path |
pushHashesToRHS(state, trees, rhsUrl, revokedNonces) | Pushes identity state information to a reverse hash service. A reverse hash service (RHS) is a centralized or decentralized service for storing publicly available data about identity. Such data are identity state and state of revocation tree and roots tree root tree. |
Interfaces
Interface | Description |
---|---|
AuthHandlerOptions | Options to pass to auth handler AuthHandlerOptions |
BJJSignatureProof | prepared bjj signature for circuits with auth bjj claim data BJJSignatureProof |
ClaimNonRevStatus | claim non revocation status for circuit TreeState and Proof of inclusion / non-inclusion ClaimNonRevStatus |
ClaimWithMTPProof | Claim for circuit with non revocation proof and proof of merkle tree inclusion ClaimWithMTPProof |
ClaimWithSigProof | Claim for circuit with non revocation proof and signature proof ClaimWithSigProof |
CoreClaimOptions | CoreClaimOptions is params for core claim parsing CoreClaimOptions |
CredentialRequest | Request to core library to create Core Claim from W3C Verifiable Credential CredentialRequest |
CredentialSchema | Credential schema vc CredentialSchema |
CredentialStatus | CredentialStatus contains type and revocation Url CredentialStatus |
CredentialStatusResolveOptions | CredentialStatusResolveOptions is a set of options that can be passed to CredentialStatusResolver CredentialStatusResolveOptions |
CredentialStatusResolver | CredentialStatusResolver is an interface that allows to interact with deifferent types of credential status to resolve revocation status CredentialStatusResolver |
DIDProfileMetadata | |
EthConnectionConfig | Configuration of ethereum based blockchain connection EthConnectionConfig |
FetchHandlerOptions | Options to pass to fetch handler FetchHandlerOptions |
GISTProof | global identity state proof GISTProof |
IAuthHandler | Interface that allows the processing of the authorization request in the raw format for given identifier IAuthHandler |
ICircuitStorage | Interface to work with circuit files ICircuitStorage |
IComparer | |
ICredentialStorage | Interface for credential storages ICredentialStorage |
ICredentialWallet | Interface to work with credential wallets ICredentialWallet |
IDataSource | Generic Key/Value Data Source for crud operation IDataSource Type - generic type |
IDataStorage | General Data storage interface that union identity, credential, merkletree and states storage. IDataStorage |
Iden3ProofCreationResult | Proof creation result Iden3ProofCreationResult |
IdentityCreationOptions | DID creation options seed - seed to generate BJJ keypair revocationOpts - IdentityCreationOptions |
IdentityMerkleTreeMetaInformation | Interface to store metadata about merkle tree IdentityMerkleTreeMetaInformation |
IFetchHandler | Interface that allows the processing of the credential offer in the raw format for given identifier IFetchHandler |
IFilterQuery | query filter interface that allows to query Verifiable Credential IFilterQuery |
IIdentityStorage | storage for identities and profiles IIdentityStorage |
IIdentityWallet | Interface for IdentityWallet |
IKeyLoader | Loader interface to load from different sources IKeyLoader |
IKeyProvider | KeyProvider is responsible for signing and creation of the keys IKeyProvider |
IMerkleTreeStorage | Interface to work with a merkle tree storage IMerkleTreeStorage |
IPackageManager | Interface for defining the registry of packers IPackageManager |
IPacker | Defines method that must be implemented by any packer IPacker |
IProofService | |
Issuer | Issuer tree information Issuer |
IStateStorage | Interface that defines methods for state storage IStateStorage |
JSONSchema | JSON credential Schema Schema |
KmsKeyId | ID of the key that describe contain key type KmsKeyId |
MerkleTreeProofWithTreeState | Proof with MerkleTree info MerkleTreeProofWithTreeState |
MTProof | prepared mtp with a tree state MTProof |
NodeAuxValue | auxiliary node NodeAuxValue |
ParsedSlots | Parsed slots of core.Claim ParsedSlots |
ProofDTO | Proof dto as a partial result of fetching credential status with type SparseMerkleTreeProof ProofDTO |
ProofGenerationOptions | |
ProofQuery | Query represents structure for query to atomic circuit ProofQuery |
QueryWithFieldName | |
RevocationStatus | RevocationStatus status of revocation nonce. Info required to check revocation state of claim in circuits RevocationStatus |
RootInfo | global identity state root info from chain RootInfo |
SchemaMetadata | schema metadata in the json credential schema SchemaMetadata |
SerializationSchema | Serialization of data slots for the fields non-merklized claims SerializationSchema |
State | Represents the published state of the issuer State |
StateInfo | state information of identity from chain. StateInfo |
StateProof | state proof of identity from chain StateProof |
TreesModel | Interface to unite contains three trees: claim, revocation and rootOfRoots Also contains the current state of identity TreesModel |
TreeState | TreeState is model for merkle tree roots TreeState |
Namespaces
Namespace | Description |
---|---|
PROTOCOL_CONSTANTS |
Variables
Variable | Description |
---|---|
bigIntArrayToStringArray | converts each big integer in array to string |
bJJSignatureFromHexString | |
buildQueryPath | |
buildTreeState | converts hexes of tree roots to Hashes |
byteDecoder | |
byteEncoder | |
comparatorOptions | |
createSchemaHash | Calculates schema hash |
createVerifiablePresentation | |
defaultEthConnectionConfig | |
defaultMTLevels | |
defaultMTLevelsClaimsMerklization | |
defaultMTLevelsOnChain | |
defaultValueArraySize | |
defineMerklizedRootPosition | Returns merklized root position based on schema serialization metadata and expected position |
DIDDocumentJSONSchema | DIDDocumentJSONSchema is a basic schema of did document |
ErrorEmptyAuthClaimNonRevProof | |
ErrorEmptyAuthClaimProof | |
ErrorEmptyChallengeSignature | |
ErrorEmptyClaimNonRevProof | |
ErrorEmptyClaimProof | |
ErrorEmptyClaimSignature | |
ErrorEmptyIssuerAuthClaimNonRevProof | |
ErrorEmptyIssuerAuthClaimProof | |
ErrorUserStateInRelayClaimProof | |
existenceToInt | converts boolean existence param to integer if true - 1, else - 0 |
extractPublicKeyBytes | |
factoryComparer | FactoryComparer depends on input data will return right comparer. |
fillSlot | checks if data can fill the slot |
generateProfileDID | Returns profile DID based on did and profile nonce |
getNodeAuxValue | |
JSON_SCHEMA_VALIDATORS_REGISTRY | JSON SCHEMA VALIDATOR REGISTRY |
prepareCircuitArrayValues | PrepareCircuitArrayValues padding values to size. Validate array size and throw an exception if array is bigger than size if array is bigger, circuit cannot compile because number of inputs does not match |
prepareSiblingsStr | siblings as string array |
QueryOperators | QueryOperators represents operators for atomic circuits |
resolvePath | credential search path resolver |
resolveVerificationMethods | |
StandardJSONCredentialsQueryFilter | creates filters based on proof query |
stringByPath | |
strMTHex | converts hex to Hash |
subjectPositionIndex | Determines subject position |
swapEndianness | SwapEndianness swaps the endianness of the value encoded in buf. If buf is Big-Endian, the result will be Little-Endian and vice-versa. |
toClaimNonRevStatus | converts verifiable RevocationStatus model to circuits structure |
toGISTProof | converts state info from smart contract to gist proof |
VerifiableConstants | Verifiable constants |
verifiablePresentationFromCred |
Type Aliases
Type Alias | Description |
---|---|
AuthDataPrepareFunc | signature of auth signals function preparer |
AuthorizationMessageResponseBody | AuthorizationMessageResponseBody is struct the represents authorization response data |
AuthorizationRequestMessage | AuthorizationRequestMessage is struct the represents iden3message authorization request |
AuthorizationRequestMessageBody | AuthorizationRequestMessageBody is body for authorization request |
AuthorizationResponseMessage | AuthorizationResponseMessage is struct the represents iden3message authorization response |
BasicMessage | |
CircuitData | Circuit data that includes id, wasm file, verification key and proving key |
CredentialFetchRequestMessage | CredentialFetchRequestMessage represent Iden3message for credential fetch request |
CredentialFetchRequestMessageBody | CredentialFetchRequestMessageBody is msg body for fetch request |
CredentialIssuanceMessage | CredentialIssuanceMessage represent Iden3message for credential issuance |
CredentialIssuanceRequestMessage | CredentialIssuanceRequestMessage represent Iden3message for credential request |
CredentialIssuanceRequestMessageBody | CredentialIssuanceRequestMessageBody represents data for credential issuance request |
CredentialOffer | CredentialOffer is structure to fetch credential |
CredentialsOfferMessage | CredentialsOfferMessage represent Iden3message for credential offer |
CredentialsOfferMessageBody | CredentialsOfferMessageBody is struct the represents offer message |
EnvelopeStub | EnvelopeStub is used to stub the jwt based envelops |
FilterOperatorFunction | filter function type |
FilterOperatorMethod | allowed operators to search |
HeaderStub | HeaderStub is used to stub the jwt based envelops |
Identity | Identity structure that can be used for identity storage |
IssuanceMessageBody | IssuanceMessageBody is struct the represents message when credential is issued |
JSONObject | JSON object |
JWSPackerParams | JWSPackerParams are parameters for JWS packer |
MessageFetchRequestMessage | MessageFetchRequestMessage represent Iden3message for message fetch request. |
MessageFetchRequestMessageBody | MessageFetchRequestMessageBody is struct the represents body for message fetch request. |
PackerParams | parameters for any packer |
PlainPackerParams | parameters for plain packer |
Profile | Profile structure that can be used for profiles storage |
ProofGenerationRequestMessage | ProofGenerationRequestMessage is struct the represents body for proof generation request |
ProofGenerationRequestMessageBody | ProofGenerationRequestMessageBody is struct the represents body for proof generation request |
ProofGenerationResponseMessage | ProofGenerationResponseMessage is struct the represents body for proof generation request |
ProtocolMessage | Protocol message type |
ProvingParams | Params for generation of proof for auth circuit |
ResponseMessageBody | ResponseMessageBody is struct the represents request for revocation status |
RevocationStatusRequestMessage | RevocationStatusRequestMessage is struct the represents body for proof generation request |
RevocationStatusRequestMessageBody | RevocationStatusRequestMessageBody is struct the represents request for revocation status |
RevocationStatusResponseMessage | RevocationStatusResponseMessage is struct the represents body for proof generation request |
RevocationStatusResponseMessageBody | RevocationStatusResponseMessageBody is struct the represents request for revocation status |
Schema | Schema represents location and type where it's stored |
SignerFn | SignerFn Is function to sign data with a verification method |
StateVerificationFunc | signature of state function verifier |
VerificationParams | Params for verification of auth circuit public signals |
ZeroKnowledgeProofRequest | ZeroKnowledgeProofRequest represents structure of zkp request object |
ZeroKnowledgeProofResponse | ZeroKnowledgeProofResponse represents structure of zkp response |
ZKPPackerParams | parameters for zkp packer |