From 1c27957efa98f1993879d26b6df292e6a9f71acb Mon Sep 17 00:00:00 2001 From: Gino Date: Mon, 11 Nov 2024 15:02:10 +0100 Subject: [PATCH 1/4] refactor(devx): edit IOTA About us > staking and rewards --- .../content/about-iota/iota-architecture/staking-rewards.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/content/about-iota/iota-architecture/staking-rewards.mdx b/docs/content/about-iota/iota-architecture/staking-rewards.mdx index 33790c21906..f3ff56089f7 100644 --- a/docs/content/about-iota/iota-architecture/staking-rewards.mdx +++ b/docs/content/about-iota/iota-architecture/staking-rewards.mdx @@ -32,8 +32,9 @@ epoch. Similarly, when a user withdraws their stake, it stops counting from the ## Rewards Distribution -At the end of each [epoch](epochs.mdx), gas fees and stake subsidies are distributed among validators and stakers as -rewards. The amount of rewards a validator gets depends on: +At the end of each each [epoch](epochs.mdx), gas fees and newly minted IOTA tokens are distributed as rewards among validators and stakers. Within each validator staking pool, stakers receive rewards proportionally through the appreciation of the pool's exchange rate. Validators also earn additional rewards, represented as StakedIOTA objects, which they receive at the end of each epoch in proportion to the commissions generated by their staking pool. + +Each epoch's rewards are funded by newly minted IOTA tokens, totaling 767k IOTA per epoch. This amount is distributed across staking pools based on their voting power and the specified tallying rule. The amount of rewards a validator gets depends on: ### Performance From 37c98b3760373a084afa273ffe6411950280b9cd Mon Sep 17 00:00:00 2001 From: Gino Date: Wed, 13 Nov 2024 10:13:27 +0100 Subject: [PATCH 2/4] fix(devx) fix broken link --- docs/content/about-iota/iota-architecture/staking-rewards.mdx | 2 +- docs/content/operator/validator-config.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/about-iota/iota-architecture/staking-rewards.mdx b/docs/content/about-iota/iota-architecture/staking-rewards.mdx index f3ff56089f7..21c7ab5d878 100644 --- a/docs/content/about-iota/iota-architecture/staking-rewards.mdx +++ b/docs/content/about-iota/iota-architecture/staking-rewards.mdx @@ -32,7 +32,7 @@ epoch. Similarly, when a user withdraws their stake, it stops counting from the ## Rewards Distribution -At the end of each each [epoch](epochs.mdx), gas fees and newly minted IOTA tokens are distributed as rewards among validators and stakers. Within each validator staking pool, stakers receive rewards proportionally through the appreciation of the pool's exchange rate. Validators also earn additional rewards, represented as StakedIOTA objects, which they receive at the end of each epoch in proportion to the commissions generated by their staking pool. +At the end of each [epoch](epochs.mdx), newly minted IOTA tokens are distributed as rewards among validators and stakers. Within each validator staking pool, stakers receive rewards proportionally through the appreciation of the pool's exchange rate. Validators also earn additional rewards, represented as StakedIOTA objects, which they receive at the end of each epoch in proportion to the commissions generated by their staking pool. Each epoch's rewards are funded by newly minted IOTA tokens, totaling 767k IOTA per epoch. This amount is distributed across staking pools based on their voting power and the specified tallying rule. The amount of rewards a validator gets depends on: diff --git a/docs/content/operator/validator-config.mdx b/docs/content/operator/validator-config.mdx index b75c2b4f41e..29ca215374e 100644 --- a/docs/content/operator/validator-config.mdx +++ b/docs/content/operator/validator-config.mdx @@ -13,7 +13,7 @@ Validators on the IOTA network run special nodes and have additional tasks and r To run an IOTA validator, you must set up and configure an IOTA Validator node. After you have a running node, you must have a minimum of 2 million IOTA in your staking pool to join the validator set on the IOTA network. -To learn how to set up and configure an IOTA Validator node, see [IOTA for Node Operators](https://github.com/iotaledger/iota/blob/main/nre/iota_for_node_operators.md) on GitHub. The guide includes all of the information you need to configure your Validator node. It also provides guidance on the tasks you must perform after you join the validator set. +To learn how to set up and configure an IOTA Validator node, see [IOTA for Node Operators](../operator/validator-operation/validator-tasks.mdx) on GitHub. The guide includes all of the information you need to configure your Validator node. It also provides guidance on the tasks you must perform after you join the validator set. Specific steps you must take include: From 2523dbf9672b53d1128eb8f01b22a31a0d689e78 Mon Sep 17 00:00:00 2001 From: Gino Date: Wed, 13 Nov 2024 10:33:27 +0100 Subject: [PATCH 3/4] fix(devx) update validator config file --- docs/content/operator/validator-config.mdx | 15 +- .../references/iota-evm/iscutils/prng.md | 106 ++ .../magic-contract/ERC20BaseTokens.md | 212 ++++ .../ERC20ExternalNativeTokens.md | 37 + .../magic-contract/ERC20NativeTokens.md | 251 ++++ .../magic-contract/ERC721NFTCollection.md | 81 ++ .../iota-evm/magic-contract/ERC721NFTs.md | 326 +++++ .../references/iota-evm/magic-contract/ISC.md | 53 + .../iota-evm/magic-contract/ISCAccounts.md | 69 ++ .../iota-evm/magic-contract/ISCPrivileged.md | 41 + .../iota-evm/magic-contract/ISCSandbox.md | 159 +++ .../iota-evm/magic-contract/ISCTypes.md | 267 +++++ .../iota-evm/magic-contract/ISCUtil.md | 27 + .../references/iota-identity/wasm/api_ref.md | 14 + .../wasm/classes/identity_wasm.CoreDID.md | 296 +++++ .../classes/identity_wasm.CoreDocument.md | 787 ++++++++++++ .../wasm/classes/identity_wasm.Credential.md | 374 ++++++ .../classes/identity_wasm.CustomMethodData.md | 93 ++ .../wasm/classes/identity_wasm.DIDJwk.md | 193 +++ .../wasm/classes/identity_wasm.DIDUrl.md | 252 ++++ .../identity_wasm.DecodedJptCredential.md | 58 + .../identity_wasm.DecodedJptPresentation.md | 60 + .../wasm/classes/identity_wasm.DecodedJws.md | 103 ++ .../identity_wasm.DecodedJwtCredential.md | 69 ++ .../identity_wasm.DecodedJwtPresentation.md | 105 ++ .../wasm/classes/identity_wasm.Disclosure.md | 180 +++ ...dentity_wasm.DomainLinkageConfiguration.md | 125 ++ .../wasm/classes/identity_wasm.Duration.md | 158 +++ .../classes/identity_wasm.EcDSAJwsVerifier.md | 51 + .../classes/identity_wasm.EdDSAJwsVerifier.md | 54 + .../wasm/classes/identity_wasm.IotaDID.md | 357 ++++++ .../classes/identity_wasm.IotaDocument.md | 1059 +++++++++++++++++ .../identity_wasm.IotaDocumentMetadata.md | 154 +++ .../identity_wasm.IotaIdentityClientExt.md | 132 ++ .../identity_wasm.IssuerProtectedHeader.md | 84 ++ .../wasm/classes/identity_wasm.Jpt.md | 52 + ...ity_wasm.JptCredentialValidationOptions.md | 94 ++ .../identity_wasm.JptCredentialValidator.md | 28 + ...entity_wasm.JptCredentialValidatorUtils.md | 128 ++ ...y_wasm.JptPresentationValidationOptions.md | 92 ++ .../identity_wasm.JptPresentationValidator.md | 37 + ...tity_wasm.JptPresentationValidatorUtils.md | 52 + .../wasm/classes/identity_wasm.Jwk.md | 297 +++++ .../classes/identity_wasm.JwkGenOutput.md | 119 ++ .../identity_wasm.JwpCredentialOptions.md | 77 ++ .../wasm/classes/identity_wasm.JwpIssued.md | 137 +++ .../identity_wasm.JwpPresentationOptions.md | 67 ++ .../identity_wasm.JwpVerificationOptions.md | 91 ++ .../wasm/classes/identity_wasm.Jws.md | 41 + .../wasm/classes/identity_wasm.JwsHeader.md | 564 +++++++++ .../identity_wasm.JwsSignatureOptions.md | 261 ++++ .../identity_wasm.JwsVerificationOptions.md | 149 +++ .../wasm/classes/identity_wasm.Jwt.md | 86 ++ ...ity_wasm.JwtCredentialValidationOptions.md | 71 ++ .../identity_wasm.JwtCredentialValidator.md | 263 ++++ ...identity_wasm.JwtDomainLinkageValidator.md | 90 ++ .../identity_wasm.JwtPresentationOptions.md | 73 ++ ...y_wasm.JwtPresentationValidationOptions.md | 75 ++ .../identity_wasm.JwtPresentationValidator.md | 140 +++ ...ity_wasm.KeyBindingJWTValidationOptions.md | 71 ++ .../identity_wasm.KeyBindingJwtClaims.md | 190 +++ .../identity_wasm.LinkedDomainService.md | 135 +++ ...asm.LinkedVerifiablePresentationService.md | 160 +++ .../wasm/classes/identity_wasm.MethodData.md | 201 ++++ .../classes/identity_wasm.MethodDigest.md | 101 ++ .../wasm/classes/identity_wasm.MethodScope.md | 150 +++ .../wasm/classes/identity_wasm.MethodType.md | 154 +++ .../classes/identity_wasm.PayloadEntry.md | 22 + .../wasm/classes/identity_wasm.Payloads.md | 197 +++ .../classes/identity_wasm.Presentation.md | 256 ++++ ...entity_wasm.PresentationProtectedHeader.md | 71 ++ .../wasm/classes/identity_wasm.Proof.md | 106 ++ .../classes/identity_wasm.ProofUpdateCtx.md | 100 ++ .../wasm/classes/identity_wasm.Resolver.md | 91 ++ .../classes/identity_wasm.RevocationBitmap.md | 177 +++ ...identity_wasm.RevocationTimeframeStatus.md | 149 +++ .../wasm/classes/identity_wasm.SdJwt.md | 152 +++ .../identity_wasm.SdJwtCredentialValidator.md | 140 +++ .../classes/identity_wasm.SdObjectDecoder.md | 73 ++ .../classes/identity_wasm.SdObjectEncoder.md | 178 +++ ...ty_wasm.SelectiveDisclosurePresentation.md | 120 ++ .../wasm/classes/identity_wasm.Service.md | 144 +++ .../classes/identity_wasm.StatusList2021.md | 152 +++ .../identity_wasm.StatusList2021Credential.md | 153 +++ ...ty_wasm.StatusList2021CredentialBuilder.md | 174 +++ .../identity_wasm.StatusList2021Entry.md | 162 +++ .../wasm/classes/identity_wasm.Storage.md | 56 + .../wasm/classes/identity_wasm.Timestamp.md | 160 +++ .../identity_wasm.UnknownCredential.md | 92 ++ .../identity_wasm.VerificationMethod.md | 292 +++++ ...iota_identity_client.IotaIdentityClient.md | 185 +++ .../enums/identity_wasm.CredentialStatus.md | 29 + .../wasm/enums/identity_wasm.FailFast.md | 28 + .../enums/identity_wasm.MethodRelationship.md | 43 + .../wasm/enums/identity_wasm.PayloadType.md | 29 + ...dentity_wasm.PresentationProofAlgorithm.md | 71 ++ .../enums/identity_wasm.ProofAlgorithm.md | 71 ++ .../enums/identity_wasm.SerializationType.md | 22 + .../identity_wasm.StateMetadataEncoding.md | 15 + .../wasm/enums/identity_wasm.StatusCheck.md | 44 + .../wasm/enums/identity_wasm.StatusPurpose.md | 24 + ...identity_wasm.SubjectHolderRelationship.md | 40 + .../wasm/enums/jose_ec_curve.EcCurve.md | 48 + .../wasm/enums/jose_ed_curve.EdCurve.md | 30 + .../enums/jose_jwk_operation.JwkOperation.md | 84 ++ .../wasm/enums/jose_jwk_type.JwkType.md | 48 + .../wasm/enums/jose_jwk_use.JwkUse.md | 30 + .../enums/jose_jws_algorithm.JwsAlgorithm.md | 147 +++ .../wasm/interfaces/identity_wasm.Evidence.md | 30 + .../interfaces/identity_wasm.ICredential.md | 127 ++ .../identity_wasm.IDomainLinkageCredential.md | 46 + .../identity_wasm.IIotaIdentityClient.md | 46 + ...ty_wasm.IJptCredentialValidationOptions.md | 59 + ..._wasm.IJptPresentationValidationOptions.md | 28 + .../wasm/interfaces/identity_wasm.IJwk.md | 142 +++ .../wasm/interfaces/identity_wasm.IJwkEc.md | 217 ++++ .../wasm/interfaces/identity_wasm.IJwkOct.md | 172 +++ .../wasm/interfaces/identity_wasm.IJwkOkp.md | 202 ++++ .../wasm/interfaces/identity_wasm.IJwkRsa.md | 292 +++++ .../identity_wasm.IJwpVerificationOptions.md | 29 + .../identity_wasm.IJwsSignatureOptions.md | 109 ++ .../identity_wasm.IJwsVerificationOptions.md | 40 + .../interfaces/identity_wasm.IJwsVerifier.md | 45 + ...ty_wasm.IJwtCredentialValidationOptions.md | 61 + .../identity_wasm.IJwtPresentationOptions.md | 53 + ..._wasm.IJwtPresentationValidationOptions.md | 39 + ...ty_wasm.IKeyBindingJWTValidationOptions.md | 59 + .../identity_wasm.ILinkedDomainService.md | 28 + ...sm.ILinkedVerifiablePresentationService.md | 28 + .../interfaces/identity_wasm.IPresentation.md | 73 ++ .../wasm/interfaces/identity_wasm.IService.md | 54 + .../wasm/interfaces/identity_wasm.Issuer.md | 21 + .../interfaces/identity_wasm.JptClaims.md | 64 + .../interfaces/identity_wasm.JwkParamsEc.md | 62 + .../interfaces/identity_wasm.JwkParamsOct.md | 29 + .../interfaces/identity_wasm.JwkParamsOkp.md | 51 + .../interfaces/identity_wasm.JwkParamsRsa.md | 117 ++ .../identity_wasm.JwkParamsRsaPrime.md | 45 + .../interfaces/identity_wasm.JwkStorage.md | 136 +++ .../interfaces/identity_wasm.KeyIdStorage.md | 85 ++ .../wasm/interfaces/identity_wasm.Policy.md | 30 + .../identity_wasm.RefreshService.md | 30 + .../wasm/interfaces/identity_wasm.Schema.md | 30 + .../wasm/interfaces/identity_wasm.Status.md | 30 + .../wasm/interfaces/identity_wasm.Subject.md | 21 + .../wasm/modules/identity_wasm.md | 239 ++++ .../wasm/modules/iota_identity_client.md | 7 + .../wasm/modules/jose_ec_curve.md | 7 + .../wasm/modules/jose_ed_curve.md | 7 + .../wasm/modules/jose_jwk_operation.md | 7 + .../wasm/modules/jose_jwk_type.md | 7 + .../wasm/modules/jose_jwk_use.md | 7 + .../wasm/modules/jose_jws_algorithm.md | 7 + 153 files changed, 17868 insertions(+), 3 deletions(-) create mode 100644 docs/content/references/iota-evm/iscutils/prng.md create mode 100644 docs/content/references/iota-evm/magic-contract/ERC20BaseTokens.md create mode 100644 docs/content/references/iota-evm/magic-contract/ERC20ExternalNativeTokens.md create mode 100644 docs/content/references/iota-evm/magic-contract/ERC20NativeTokens.md create mode 100644 docs/content/references/iota-evm/magic-contract/ERC721NFTCollection.md create mode 100644 docs/content/references/iota-evm/magic-contract/ERC721NFTs.md create mode 100644 docs/content/references/iota-evm/magic-contract/ISC.md create mode 100644 docs/content/references/iota-evm/magic-contract/ISCAccounts.md create mode 100644 docs/content/references/iota-evm/magic-contract/ISCPrivileged.md create mode 100644 docs/content/references/iota-evm/magic-contract/ISCSandbox.md create mode 100644 docs/content/references/iota-evm/magic-contract/ISCTypes.md create mode 100644 docs/content/references/iota-evm/magic-contract/ISCUtil.md create mode 100644 docs/content/references/iota-identity/wasm/api_ref.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.CoreDID.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.CoreDocument.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Credential.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.CustomMethodData.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.DIDJwk.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.DIDUrl.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJptCredential.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJptPresentation.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJws.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJwtCredential.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJwtPresentation.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Disclosure.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.DomainLinkageConfiguration.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Duration.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.EcDSAJwsVerifier.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.EdDSAJwsVerifier.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDID.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDocument.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDocumentMetadata.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaIdentityClientExt.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.IssuerProtectedHeader.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Jpt.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidator.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidatorUtils.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidator.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidatorUtils.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Jwk.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwkGenOutput.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpCredentialOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpIssued.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpPresentationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpVerificationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Jws.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsHeader.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsSignatureOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsVerificationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Jwt.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtCredentialValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtCredentialValidator.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtDomainLinkageValidator.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationValidator.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.KeyBindingJWTValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.KeyBindingJwtClaims.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.LinkedDomainService.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.LinkedVerifiablePresentationService.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodData.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodDigest.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodScope.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodType.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.PayloadEntry.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Payloads.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Presentation.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.PresentationProtectedHeader.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Proof.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.ProofUpdateCtx.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Resolver.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.RevocationBitmap.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.RevocationTimeframeStatus.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.SdJwt.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.SdJwtCredentialValidator.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.SdObjectDecoder.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.SdObjectEncoder.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.SelectiveDisclosurePresentation.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Service.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021Credential.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021CredentialBuilder.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021Entry.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Storage.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.Timestamp.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.UnknownCredential.md create mode 100644 docs/content/references/iota-identity/wasm/classes/identity_wasm.VerificationMethod.md create mode 100644 docs/content/references/iota-identity/wasm/classes/iota_identity_client.IotaIdentityClient.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.CredentialStatus.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.FailFast.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.MethodRelationship.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.PayloadType.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.PresentationProofAlgorithm.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.ProofAlgorithm.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.SerializationType.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.StateMetadataEncoding.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.StatusCheck.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.StatusPurpose.md create mode 100644 docs/content/references/iota-identity/wasm/enums/identity_wasm.SubjectHolderRelationship.md create mode 100644 docs/content/references/iota-identity/wasm/enums/jose_ec_curve.EcCurve.md create mode 100644 docs/content/references/iota-identity/wasm/enums/jose_ed_curve.EdCurve.md create mode 100644 docs/content/references/iota-identity/wasm/enums/jose_jwk_operation.JwkOperation.md create mode 100644 docs/content/references/iota-identity/wasm/enums/jose_jwk_type.JwkType.md create mode 100644 docs/content/references/iota-identity/wasm/enums/jose_jwk_use.JwkUse.md create mode 100644 docs/content/references/iota-identity/wasm/enums/jose_jws_algorithm.JwsAlgorithm.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Evidence.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ICredential.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IDomainLinkageCredential.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IIotaIdentityClient.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJptCredentialValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJptPresentationValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwk.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkEc.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkOct.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkOkp.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkRsa.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwpVerificationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsSignatureOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsVerificationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsVerifier.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtCredentialValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtPresentationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtPresentationValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IKeyBindingJWTValidationOptions.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ILinkedDomainService.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ILinkedVerifiablePresentationService.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IPresentation.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IService.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Issuer.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JptClaims.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsEc.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsOct.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsOkp.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsRsa.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsRsaPrime.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkStorage.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.KeyIdStorage.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Policy.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.RefreshService.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Schema.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Status.md create mode 100644 docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Subject.md create mode 100644 docs/content/references/iota-identity/wasm/modules/identity_wasm.md create mode 100644 docs/content/references/iota-identity/wasm/modules/iota_identity_client.md create mode 100644 docs/content/references/iota-identity/wasm/modules/jose_ec_curve.md create mode 100644 docs/content/references/iota-identity/wasm/modules/jose_ed_curve.md create mode 100644 docs/content/references/iota-identity/wasm/modules/jose_jwk_operation.md create mode 100644 docs/content/references/iota-identity/wasm/modules/jose_jwk_type.md create mode 100644 docs/content/references/iota-identity/wasm/modules/jose_jwk_use.md create mode 100644 docs/content/references/iota-identity/wasm/modules/jose_jws_algorithm.md diff --git a/docs/content/operator/validator-config.mdx b/docs/content/operator/validator-config.mdx index 29ca215374e..2664997d786 100644 --- a/docs/content/operator/validator-config.mdx +++ b/docs/content/operator/validator-config.mdx @@ -28,16 +28,25 @@ Specific steps you must take include: -## Hardware requirements to run a Validator node +## Hardware requirements to run a Validator node on Mainnet -Suggested minimum hardware specifications to run an IOTA Validator node: +Suggested minimum hardware specifications to run an IOTA Validator node on Mainnet: - CPU: 24 physical cores (or 48 virtual cores) - Memory: 128 GB - Storage: 4 TB NVME - Network: 1 Gbps -## Validator consensus and voting power +## Hardware requirements to run a Validator node on Testnet + +Suggested minimum hardware specifications to run an IOTA Validator node on Testnet: + +- CPU: 8 cores +- Memory: 64 GB +- Storage: 2 TB NVME +- Network: 1 Gbps + +## Validator consensus and voting power The total voting power on IOTA is always 10,000, regardless of the amount staked. Therefore, the quorum threshold is 6,667. There is no limit to the amount of IOTA users can stake with a validator. Each validator has consensus voting power proportional to IOTA in its staking pool, with one exception: the voting power of an individual validator is capped at 1,000 (10% of the total). If a validator accumulates more than 10% of total stake, the validator's voting power remains fixed at 10%, and the remaining voting power is spread across the rest of the validator set. diff --git a/docs/content/references/iota-evm/iscutils/prng.md b/docs/content/references/iota-evm/iscutils/prng.md new file mode 100644 index 00000000000..b2d15e4e88e --- /dev/null +++ b/docs/content/references/iota-evm/iscutils/prng.md @@ -0,0 +1,106 @@ +--- +title: prng +description: 'Not recommended for generating cryptographic secure randomness' +--- + +## PRNG + +This library is used to generate pseudorandom numbers + +_Not recommended for generating cryptographic secure randomness_ + +### PRNGState + +_Represents the state of the PRNG_ + +```solidity +struct PRNGState { + bytes32 state; +} +``` + +### generateRandomHash + +```solidity +function generateRandomHash(struct PRNG.PRNGState self) internal returns (bytes32) +``` + +Generate a new pseudorandom hash + +_Takes the current state, hashes it and returns the new state._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| self | struct PRNG.PRNGState | The PRNGState struct to use and alter the state | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bytes32 | The generated pseudorandom hash | + +### generateRandomNumber + +```solidity +function generateRandomNumber(struct PRNG.PRNGState self) internal returns (uint256) +``` + +Generate a new pseudorandom number + +_Takes the current state, hashes it and returns the new state._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| self | struct PRNG.PRNGState | The PRNGState struct to use and alter the state | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The generated pseudorandom number | + +### generateRandomNumberInRange + +```solidity +function generateRandomNumberInRange(struct PRNG.PRNGState self, uint256 min, uint256 max) internal returns (uint256) +``` + +Generate a new pseudorandom number in a given range [min, max) + +_Takes the current state, hashes it and returns the new state. It constrains the returned number to the bounds of min (inclusive) and max (exclusive)._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| self | struct PRNG.PRNGState | The PRNGState struct to use and alter the state | +| min | uint256 | | +| max | uint256 | | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The generated pseudorandom number constrained to the bounds of [min, max) | + +### seed + +```solidity +function seed(struct PRNG.PRNGState self, bytes32 entropy) internal +``` + +Seed the PRNG + +_The seed should not be zero_ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| self | struct PRNG.PRNGState | The PRNGState struct to update the state | +| entropy | bytes32 | The seed value (entropy) | + diff --git a/docs/content/references/iota-evm/magic-contract/ERC20BaseTokens.md b/docs/content/references/iota-evm/magic-contract/ERC20BaseTokens.md new file mode 100644 index 00000000000..dc8863b469c --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ERC20BaseTokens.md @@ -0,0 +1,212 @@ +--- +title: ERC20BaseTokens +description: 'The ERC20 contract directly mapped to the L1 base token.' +--- + +## ERC20BaseTokens + +_The ERC20 contract directly mapped to the L1 base token._ + +### Approval + +```solidity +event Approval(address tokenOwner, address spender, uint256 tokens) +``` + +_Emitted when the approval of tokens is granted by a token owner to a spender. + +This event indicates that the token owner has approved the spender to transfer a certain amount of tokens on their behalf._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| tokenOwner | address | The address of the token owner who granted the approval. | +| spender | address | The address of the spender who is granted the approval. | +| tokens | uint256 | The amount of tokens approved for transfer. | + +### Transfer + +```solidity +event Transfer(address from, address to, uint256 tokens) +``` + +_Emitted when tokens are transferred from one address to another. + +This event indicates that a certain amount of tokens has been transferred from one address to another._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| from | address | The address from which the tokens are transferred. | +| to | address | The address to which the tokens are transferred. | +| tokens | uint256 | The amount of tokens transferred. | + +### name + +```solidity +function name() public view returns (string) +``` + +_Returns the name of the base token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | string | The name of the base token. | + +### symbol + +```solidity +function symbol() public view returns (string) +``` + +_Returns the symbol of the base token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | string | The symbol of the base token. | + +### decimals + +```solidity +function decimals() public view returns (uint8) +``` + +_Returns the number of decimals used by the base token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint8 | The number of decimals used by the base token. | + +### totalSupply + +```solidity +function totalSupply() public view returns (uint256) +``` + +_Returns the total supply of the base token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The total supply of the base token. | + +### balanceOf + +```solidity +function balanceOf(address tokenOwner) public view returns (uint256) +``` + +_Returns the balance of the specified token owner._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| tokenOwner | address | The address of the token owner. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The balance of the token owner. | + +### transfer + +```solidity +function transfer(address receiver, uint256 numTokens) public returns (bool) +``` + +_Transfers tokens from the caller's account to the specified receiver._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| receiver | address | The address of the receiver. | +| numTokens | uint256 | The number of tokens to transfer. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | true. | + +### approve + +```solidity +function approve(address delegate, uint256 numTokens) public returns (bool) +``` + +_Sets the allowance of `delegate` over the caller's tokens._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| delegate | address | The address of the delegate. | +| numTokens | uint256 | The number of tokens to allow. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | true. | + +### allowance + +```solidity +function allowance(address owner, address delegate) public view returns (uint256) +``` + +_Returns the allowance of the specified owner for the specified delegate._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | address | The address of the owner. | +| delegate | address | The address of the delegate. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The allowance of the owner for the delegate. | + +### transferFrom + +```solidity +function transferFrom(address owner, address buyer, uint256 numTokens) public returns (bool) +``` + +_Transfers tokens from the specified owner's account to the specified buyer._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | address | The address of the owner. | +| buyer | address | The address of the buyer. | +| numTokens | uint256 | The number of tokens to transfer. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | true. | + +## __erc20BaseTokens + +```solidity +contract ERC20BaseTokens __erc20BaseTokens +``` + diff --git a/docs/content/references/iota-evm/magic-contract/ERC20ExternalNativeTokens.md b/docs/content/references/iota-evm/magic-contract/ERC20ExternalNativeTokens.md new file mode 100644 index 00000000000..81133d4d658 --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ERC20ExternalNativeTokens.md @@ -0,0 +1,37 @@ +--- +title: ERC20ExternalNativeTokens +description: 'The ERC20 contract for externally registered native tokens (off-chain foundry).' +--- + +## ERC20ExternalNativeTokens + +_The ERC20 contract for externally registered native tokens (off-chain foundry)._ + +### nativeTokenID + +```solidity +function nativeTokenID() public view returns (struct NativeTokenID) +``` + +_Returns the native token ID._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | struct NativeTokenID | The native token ID. | + +### totalSupply + +```solidity +function totalSupply() public view returns (uint256) +``` + +_Returns the total supply of the native tokens._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The total supply of the native tokens. | + diff --git a/docs/content/references/iota-evm/magic-contract/ERC20NativeTokens.md b/docs/content/references/iota-evm/magic-contract/ERC20NativeTokens.md new file mode 100644 index 00000000000..d2609abf5bd --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ERC20NativeTokens.md @@ -0,0 +1,251 @@ +--- +title: ERC20NativeTokens +description: 'The ERC20 contract native tokens (on-chain foundry).' +--- + +## ERC20NativeTokens + +_The ERC20 contract native tokens (on-chain foundry)._ + +### Approval + +```solidity +event Approval(address tokenOwner, address spender, uint256 tokens) +``` + +_Emitted when the allowance of a spender for an owner is set._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| tokenOwner | address | The owner of the tokens. | +| spender | address | The address allowed to spend the tokens. | +| tokens | uint256 | The amount of tokens allowed to be spent. | + +### Transfer + +```solidity +event Transfer(address from, address to, uint256 tokens) +``` + +_Emitted when tokens are transferred from one address to another._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| from | address | The address tokens are transferred from. | +| to | address | The address tokens are transferred to. | +| tokens | uint256 | The amount of tokens transferred. | + +### foundrySerialNumber + +```solidity +function foundrySerialNumber() internal view returns (uint32) +``` + +_Returns the foundry serial number of the native token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint32 | The foundry serial number. | + +### nativeTokenID + +```solidity +function nativeTokenID() public view virtual returns (struct NativeTokenID) +``` + +_Returns the native token ID of the native token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | struct NativeTokenID | The native token ID. | + +### name + +```solidity +function name() public view returns (string) +``` + +_Returns the name of the native token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | string | The name of the token. | + +### symbol + +```solidity +function symbol() public view returns (string) +``` + +_Returns the ticker symbol of the native token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | string | The ticker symbol of the token. | + +### decimals + +```solidity +function decimals() public view returns (uint8) +``` + +_Returns the number of decimals used for the native token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint8 | The number of decimals. | + +### totalSupply + +```solidity +function totalSupply() public view virtual returns (uint256) +``` + +_Returns the total supply of the native token._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The total supply of the token. | + +### balanceOf + +```solidity +function balanceOf(address tokenOwner) public view returns (uint256) +``` + +_Returns the balance of a token owner._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| tokenOwner | address | The address of the token owner. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The balance of the token owner. | + +### transfer + +```solidity +function transfer(address receiver, uint256 numTokens) public returns (bool) +``` + +_Transfers tokens from the sender's address to the receiver's address._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| receiver | address | The address to transfer tokens to. | +| numTokens | uint256 | The amount of tokens to transfer. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | true. | + +### approve + +```solidity +function approve(address delegate, uint256 numTokens) public returns (bool) +``` + +_Sets the allowance of a spender to spend tokens on behalf of the owner._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| delegate | address | The address allowed to spend the tokens. | +| numTokens | uint256 | The amount of tokens allowed to be spent. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | true. | + +### allowance + +```solidity +function allowance(address owner, address delegate) public view returns (uint256) +``` + +_Returns the amount of tokens that the spender is allowed to spend on behalf of the owner._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | address | The address of the token owner. | +| delegate | address | The address of the spender. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The amount of tokens the spender is allowed to spend. | + +### bytesEqual + +```solidity +function bytesEqual(bytes a, bytes b) internal pure returns (bool) +``` + +_Compares two byte arrays for equality._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| a | bytes | The first byte array. | +| b | bytes | The second byte array. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | A boolean indicating whether the byte arrays are equal or not. | + +### transferFrom + +```solidity +function transferFrom(address owner, address buyer, uint256 numTokens) public returns (bool) +``` + +_Transfers tokens from one address to another on behalf of a token owner._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | address | The address from which tokens are transferred. | +| buyer | address | The address to which tokens are transferred. | +| numTokens | uint256 | The amount of tokens to transfer. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | A boolean indicating whether the transfer was successful or not. | + diff --git a/docs/content/references/iota-evm/magic-contract/ERC721NFTCollection.md b/docs/content/references/iota-evm/magic-contract/ERC721NFTCollection.md new file mode 100644 index 00000000000..38f3a2613db --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ERC721NFTCollection.md @@ -0,0 +1,81 @@ +--- +title: ERC721NFTCollection +description: 'The ERC721 contract for a L2 collection of ISC NFTs, as defined in IRC27. + Implements the ERC721 standard and extends the ERC721NFTs contract. + For more information about IRC27, refer to: https://github.com/iotaledger/tips/blob/main/tips/TIP-0027/tip-0027.md' +--- + +## ERC721NFTCollection + +_The ERC721 contract for a L2 collection of ISC NFTs, as defined in IRC27. +Implements the ERC721 standard and extends the ERC721NFTs contract. +For more information about IRC27, refer to: https://github.com/iotaledger/tips/blob/main/tips/TIP-0027/tip-0027.md_ + +### _balanceOf + +```solidity +function _balanceOf(struct ISCAgentID owner) internal view virtual returns (uint256) +``` + +_Returns the balance of the specified owner._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | struct ISCAgentID | The address to query the balance of. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The balance of the specified owner. | + +### _isManagedByThisContract + +```solidity +function _isManagedByThisContract(struct ISCNFT nft) internal view virtual returns (bool) +``` + +_Checks if the given NFT is managed by this contract._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| nft | struct ISCNFT | The NFT to check. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | True if the NFT is managed by this contract, false otherwise. | + +### collectionId + +```solidity +function collectionId() external view virtual returns (NFTID) +``` + +_Returns the ID of the collection._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | NFTID | The ID of the collection. | + +### name + +```solidity +function name() external view virtual returns (string) +``` + +_Returns the name of the collection._ + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | string | The name of the collection. | + diff --git a/docs/content/references/iota-evm/magic-contract/ERC721NFTs.md b/docs/content/references/iota-evm/magic-contract/ERC721NFTs.md new file mode 100644 index 00000000000..a7a717b29b9 --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ERC721NFTs.md @@ -0,0 +1,326 @@ +--- +title: ERC721NFTs +description: 'This contract represents the ERC721 contract for the "global" collection of native NFTs on the chains L1 account.' +--- + +## ERC721NFTs + +_This contract represents the ERC721 contract for the "global" collection of native NFTs on the chains L1 account._ + +### Transfer + +```solidity +event Transfer(address from, address to, uint256 tokenId) +``` + +_Emitted when a token is transferred from one address to another._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| from | address | The address transferring the token. | +| to | address | The address receiving the token. | +| tokenId | uint256 | The ID of the token being transferred. | + +### Approval + +```solidity +event Approval(address owner, address approved, uint256 tokenId) +``` + +_Emitted when the approval of a token is changed or reaffirmed._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | address | The owner of the token. | +| approved | address | The new approved address. | +| tokenId | uint256 | The ID of the token. | + +### ApprovalForAll + +```solidity +event ApprovalForAll(address owner, address operator, bool approved) +``` + +_Emitted when operator gets the allowance from owner._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | address | The owner of the token. | +| operator | address | The operator to get the approval. | +| approved | bool | True if the operator got approval, false if not. | + +### _balanceOf + +```solidity +function _balanceOf(struct ISCAgentID owner) internal view virtual returns (uint256) +``` + +### _isManagedByThisContract + +```solidity +function _isManagedByThisContract(struct ISCNFT) internal view virtual returns (bool) +``` + +### balanceOf + +```solidity +function balanceOf(address owner) public view returns (uint256) +``` + +_Returns the number of tokens owned by a specific address._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | address | The address to query the balance of. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The balance of the specified address. | + +### ownerOf + +```solidity +function ownerOf(uint256 tokenId) public view returns (address) +``` + +_Returns the owner of the specified token ID._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| tokenId | uint256 | The ID of the token to query the owner for. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | address | The address of the owner of the token. | + +### safeTransferFrom + +```solidity +function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) public payable +``` + +_Safely transfers an ERC721 token from one address to another. + +Emits a `Transfer` event. + +Requirements: +- `from` cannot be the zero address. +- `to` cannot be the zero address. +- The token must exist and be owned by `from`. +- If `to` is a smart contract, it must implement the `onERC721Received` function and return the magic value._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| from | address | The address to transfer the token from. | +| to | address | The address to transfer the token to. | +| tokenId | uint256 | The ID of the token to be transferred. | +| data | bytes | Additional data with no specified format, to be passed to the `onERC721Received` function if `to` is a smart contract. | + +### safeTransferFrom + +```solidity +function safeTransferFrom(address from, address to, uint256 tokenId) public payable +``` + +_Safely transfers an ERC721 token from one address to another. + +Emits a `Transfer` event. + +Requirements: +- `from` cannot be the zero address. +- `to` cannot be the zero address. +- The caller must own the token or be approved for it._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| from | address | The address to transfer the token from. | +| to | address | The address to transfer the token to. | +| tokenId | uint256 | The ID of the token to be transferred. | + +### transferFrom + +```solidity +function transferFrom(address from, address to, uint256 tokenId) public payable +``` + +_Transfers an ERC721 token from one address to another. +Emits a {Transfer} event. + +Requirements: +- The caller must be approved or the owner of the token._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| from | address | The address to transfer the token from. | +| to | address | The address to transfer the token to. | +| tokenId | uint256 | The ID of the token to be transferred. | + +### approve + +```solidity +function approve(address approved, uint256 tokenId) public payable +``` + +Only the owner of the token or an approved operator can call this function. + +_Approves another address to transfer the ownership of a specific token._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| approved | address | The address to be approved for token transfer. | +| tokenId | uint256 | The ID of the token to be approved for transfer. | + +### setApprovalForAll + +```solidity +function setApprovalForAll(address operator, bool approved) public +``` + +_Sets or revokes approval for the given operator to manage all of the caller's tokens._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| operator | address | The address of the operator to set approval for. | +| approved | bool | A boolean indicating whether to approve or revoke the operator's approval. | + +### getApproved + +```solidity +function getApproved(uint256 tokenId) public view returns (address) +``` + +_Returns the address that has been approved to transfer the ownership of the specified token._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| tokenId | uint256 | The ID of the token. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | address | The address approved to transfer the ownership of the token. | + +### isApprovedForAll + +```solidity +function isApprovedForAll(address owner, address operator) public view returns (bool) +``` + +_Checks if an operator is approved to manage all of the owner's tokens._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| owner | address | The address of the token owner. | +| operator | address | The address of the operator. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | A boolean value indicating whether the operator is approved for all tokens of the owner. | + +### _isApprovedOrOwner + +```solidity +function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) +``` + +### _transferFrom + +```solidity +function _transferFrom(address from, address to, uint256 tokenId) internal +``` + +### supportsInterface + +```solidity +function supportsInterface(bytes4 interfaceID) public pure returns (bool) +``` + +_Checks if a contract supports a given interface._ + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| interfaceID | bytes4 | The interface identifier. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bool | A boolean value indicating whether the contract supports the interface. | + +### _checkOnERC721Received + +```solidity +function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes data) internal returns (bool) +``` + +### _isContract + +```solidity +function _isContract(address account) internal view returns (bool) +``` + +### name + +```solidity +function name() external view virtual returns (string) +``` + +### symbol + +```solidity +function symbol() external pure returns (string) +``` + +### tokenURI + +```solidity +function tokenURI(uint256 tokenId) external view returns (string) +``` + +## __erc721NFTs + +```solidity +contract ERC721NFTs __erc721NFTs +``` + +## IERC721Receiver + +### onERC721Received + +```solidity +function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes _data) external returns (bytes4) +``` + diff --git a/docs/content/references/iota-evm/magic-contract/ISC.md b/docs/content/references/iota-evm/magic-contract/ISC.md new file mode 100644 index 00000000000..36955cbb224 --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ISC.md @@ -0,0 +1,53 @@ +--- +title: ISC +description: 'This library contains various interfaces and functions related to the IOTA Smart Contracts (ISC) system. + It provides access to the ISCSandbox, ISCAccounts, ISCUtil, ERC20BaseTokens, ERC20NativeTokens, ERC721NFTs, and ERC721NFTCollection contracts.' +--- + +## ISC + +_This library contains various interfaces and functions related to the IOTA Smart Contracts (ISC) system. +It provides access to the ISCSandbox, ISCAccounts, ISCUtil, ERC20BaseTokens, ERC20NativeTokens, ERC721NFTs, and ERC721NFTCollection contracts._ + +### sandbox + +```solidity +contract ISCSandbox sandbox +``` + +### accounts + +```solidity +contract ISCAccounts accounts +``` + +### util + +```solidity +contract ISCUtil util +``` + +### baseTokens + +```solidity +contract ERC20BaseTokens baseTokens +``` + +### nativeTokens + +```solidity +function nativeTokens(uint32 foundrySN) internal view returns (contract ERC20NativeTokens) +``` + +### nfts + +```solidity +contract ERC721NFTs nfts +``` + +### erc721NFTCollection + +```solidity +function erc721NFTCollection(NFTID collectionID) internal view returns (contract ERC721NFTCollection) +``` + diff --git a/docs/content/references/iota-evm/magic-contract/ISCAccounts.md b/docs/content/references/iota-evm/magic-contract/ISCAccounts.md new file mode 100644 index 00000000000..15e204190f5 --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ISCAccounts.md @@ -0,0 +1,69 @@ +--- +title: ISCAccounts +description: 'Functions of the ISC Magic Contract to access the core accounts functionality' +--- + +## ISCAccounts + +_Functions of the ISC Magic Contract to access the core accounts functionality_ + +### getL2BalanceBaseTokens + +```solidity +function getL2BalanceBaseTokens(struct ISCAgentID agentID) external view returns (uint64) +``` + +### getL2BalanceNativeTokens + +```solidity +function getL2BalanceNativeTokens(struct NativeTokenID id, struct ISCAgentID agentID) external view returns (uint256) +``` + +### getL2NFTs + +```solidity +function getL2NFTs(struct ISCAgentID agentID) external view returns (NFTID[]) +``` + +### getL2NFTAmount + +```solidity +function getL2NFTAmount(struct ISCAgentID agentID) external view returns (uint256) +``` + +### getL2NFTsInCollection + +```solidity +function getL2NFTsInCollection(struct ISCAgentID agentID, NFTID collectionId) external view returns (NFTID[]) +``` + +### getL2NFTAmountInCollection + +```solidity +function getL2NFTAmountInCollection(struct ISCAgentID agentID, NFTID collectionId) external view returns (uint256) +``` + +### foundryCreateNew + +```solidity +function foundryCreateNew(struct NativeTokenScheme tokenScheme, struct ISCAssets allowance) external returns (uint32) +``` + +### createNativeTokenFoundry + +```solidity +function createNativeTokenFoundry(string tokenName, string tokenSymbol, uint8 tokenDecimals, struct NativeTokenScheme tokenScheme, struct ISCAssets allowance) external returns (uint32) +``` + +### mintNativeTokens + +```solidity +function mintNativeTokens(uint32 foundrySN, uint256 amount, struct ISCAssets allowance) external +``` + +## __iscAccounts + +```solidity +contract ISCAccounts __iscAccounts +``` + diff --git a/docs/content/references/iota-evm/magic-contract/ISCPrivileged.md b/docs/content/references/iota-evm/magic-contract/ISCPrivileged.md new file mode 100644 index 00000000000..851ba83e5a1 --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ISCPrivileged.md @@ -0,0 +1,41 @@ +--- +title: ISCPrivileged +description: 'The ISCPrivileged interface represents a contract that has some extra methods not included in the standard ISC interface. + These methods can only be called from privileged contracts.' +--- + +## ISCPrivileged + +_The ISCPrivileged interface represents a contract that has some extra methods not included in the standard ISC interface. +These methods can only be called from privileged contracts._ + +### moveBetweenAccounts + +```solidity +function moveBetweenAccounts(address sender, address receiver, struct ISCAssets allowance) external +``` + +### setAllowanceBaseTokens + +```solidity +function setAllowanceBaseTokens(address from, address to, uint256 numTokens) external +``` + +### setAllowanceNativeTokens + +```solidity +function setAllowanceNativeTokens(address from, address to, struct NativeTokenID nativeTokenID, uint256 numTokens) external +``` + +### moveAllowedFunds + +```solidity +function moveAllowedFunds(address from, address to, struct ISCAssets allowance) external +``` + +## __iscPrivileged + +```solidity +contract ISCPrivileged __iscPrivileged +``` + diff --git a/docs/content/references/iota-evm/magic-contract/ISCSandbox.md b/docs/content/references/iota-evm/magic-contract/ISCSandbox.md new file mode 100644 index 00000000000..86ebba3f719 --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ISCSandbox.md @@ -0,0 +1,159 @@ +--- +title: ISCSandbox +description: 'This is the main interface of the ISC Magic Contract.' +--- + +## ISCSandbox + +_This is the main interface of the ISC Magic Contract._ + +### getRequestID + +```solidity +function getRequestID() external view returns (struct ISCRequestID) +``` + +### getSenderAccount + +```solidity +function getSenderAccount() external view returns (struct ISCAgentID) +``` + +### triggerEvent + +```solidity +function triggerEvent(string s) external +``` + +### getEntropy + +```solidity +function getEntropy() external view returns (bytes32) +``` + +### allow + +```solidity +function allow(address target, struct ISCAssets allowance) external +``` + +### takeAllowedFunds + +```solidity +function takeAllowedFunds(address addr, struct ISCAssets allowance) external +``` + +### getAllowanceFrom + +```solidity +function getAllowanceFrom(address addr) external view returns (struct ISCAssets) +``` + +### getAllowanceTo + +```solidity +function getAllowanceTo(address target) external view returns (struct ISCAssets) +``` + +### getAllowance + +```solidity +function getAllowance(address from, address to) external view returns (struct ISCAssets) +``` + +### send + +```solidity +function send(struct L1Address targetAddress, struct ISCAssets assets, bool adjustMinimumStorageDeposit, struct ISCSendMetadata metadata, struct ISCSendOptions sendOptions) external payable +``` + +### call + +```solidity +function call(ISCHname contractHname, ISCHname entryPoint, struct ISCDict params, struct ISCAssets allowance) external returns (struct ISCDict) +``` + +### callView + +```solidity +function callView(ISCHname contractHname, ISCHname entryPoint, struct ISCDict params) external view returns (struct ISCDict) +``` + +### getChainID + +```solidity +function getChainID() external view returns (ISCChainID) +``` + +### getChainOwnerID + +```solidity +function getChainOwnerID() external view returns (struct ISCAgentID) +``` + +### getTimestampUnixSeconds + +```solidity +function getTimestampUnixSeconds() external view returns (int64) +``` + +### getBaseTokenProperties + +```solidity +function getBaseTokenProperties() external view returns (struct ISCTokenProperties) +``` + +### getNativeTokenID + +```solidity +function getNativeTokenID(uint32 foundrySN) external view returns (struct NativeTokenID) +``` + +### getNativeTokenScheme + +```solidity +function getNativeTokenScheme(uint32 foundrySN) external view returns (struct NativeTokenScheme) +``` + +### getNFTData + +```solidity +function getNFTData(NFTID id) external view returns (struct ISCNFT) +``` + +### getIRC27NFTData + +```solidity +function getIRC27NFTData(NFTID id) external view returns (struct IRC27NFT) +``` + +### erc20NativeTokensAddress + +```solidity +function erc20NativeTokensAddress(uint32 foundrySN) external view returns (address) +``` + +### erc721NFTCollectionAddress + +```solidity +function erc721NFTCollectionAddress(NFTID collectionID) external view returns (address) +``` + +### erc20NativeTokensFoundrySerialNumber + +```solidity +function erc20NativeTokensFoundrySerialNumber(address addr) external view returns (uint32) +``` + +### registerERC20NativeToken + +```solidity +function registerERC20NativeToken(uint32 foundrySN, string name, string symbol, uint8 decimals, struct ISCAssets allowance) external +``` + +## __iscSandbox + +```solidity +contract ISCSandbox __iscSandbox +``` + diff --git a/docs/content/references/iota-evm/magic-contract/ISCTypes.md b/docs/content/references/iota-evm/magic-contract/ISCTypes.md new file mode 100644 index 00000000000..5e03a7e342c --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ISCTypes.md @@ -0,0 +1,267 @@ +--- +title: ISCTypes +--- + +## ISC_MAGIC_ADDRESS + +```solidity +address ISC_MAGIC_ADDRESS +``` + +## ISC_ERC20BASETOKENS_ADDRESS + +```solidity +address ISC_ERC20BASETOKENS_ADDRESS +``` + +## ISC_ERC721_ADDRESS + +```solidity +address ISC_ERC721_ADDRESS +``` + +## L1Address + +```solidity +struct L1Address { + bytes data; +} +``` + +## L1AddressTypeEd25519 + +```solidity +uint8 L1AddressTypeEd25519 +``` + +## L1AddressTypeAlias + +```solidity +uint8 L1AddressTypeAlias +``` + +## L1AddressTypeNFT + +```solidity +uint8 L1AddressTypeNFT +``` + +## NativeTokenID + +```solidity +struct NativeTokenID { + bytes data; +} +``` + +## NativeToken + +```solidity +struct NativeToken { + struct NativeTokenID ID; + uint256 amount; +} +``` + +## NativeTokenScheme + +```solidity +struct NativeTokenScheme { + uint256 mintedTokens; + uint256 meltedTokens; + uint256 maximumSupply; +} +``` + +## NFTID + +## ISCNFT + +```solidity +struct ISCNFT { + NFTID ID; + struct L1Address issuer; + bytes metadata; + struct ISCAgentID owner; +} +``` + +## IRC27NFTMetadata + +```solidity +struct IRC27NFTMetadata { + string standard; + string version; + string mimeType; + string uri; + string name; +} +``` + +## IRC27NFT + +```solidity +struct IRC27NFT { + struct ISCNFT nft; + struct IRC27NFTMetadata metadata; +} +``` + +## ISCTransactionID + +## ISCHname + +## ISCChainID + +## ISCAgentID + +```solidity +struct ISCAgentID { + bytes data; +} +``` + +## ISCAgentIDKindNil + +```solidity +uint8 ISCAgentIDKindNil +``` + +## ISCAgentIDKindAddress + +```solidity +uint8 ISCAgentIDKindAddress +``` + +## ISCAgentIDKindContract + +```solidity +uint8 ISCAgentIDKindContract +``` + +## ISCAgentIDKindEthereumAddress + +```solidity +uint8 ISCAgentIDKindEthereumAddress +``` + +## ISCRequestID + +```solidity +struct ISCRequestID { + bytes data; +} +``` + +## ISCDictItem + +```solidity +struct ISCDictItem { + bytes key; + bytes value; +} +``` + +## ISCDict + +```solidity +struct ISCDict { + struct ISCDictItem[] items; +} +``` + +## ISCSendMetadata + +```solidity +struct ISCSendMetadata { + ISCHname targetContract; + ISCHname entrypoint; + struct ISCDict params; + struct ISCAssets allowance; + uint64 gasBudget; +} +``` + +## ISCAssets + +```solidity +struct ISCAssets { + uint64 baseTokens; + struct NativeToken[] nativeTokens; + NFTID[] nfts; +} +``` + +## ISCSendOptions + +```solidity +struct ISCSendOptions { + int64 timelock; + struct ISCExpiration expiration; +} +``` + +## ISCExpiration + +```solidity +struct ISCExpiration { + int64 time; + struct L1Address returnAddress; +} +``` + +## ISCTokenProperties + +```solidity +struct ISCTokenProperties { + string name; + string tickerSymbol; + uint8 decimals; + uint256 totalSupply; +} +``` + +## ISCTypes + +### L1AddressType + +```solidity +function L1AddressType(struct L1Address addr) internal pure returns (uint8) +``` + +### newEthereumAgentID + +```solidity +function newEthereumAgentID(address addr, ISCChainID iscChainID) internal pure returns (struct ISCAgentID) +``` + +### isEthereum + +```solidity +function isEthereum(struct ISCAgentID a) internal pure returns (bool) +``` + +### ethAddress + +```solidity +function ethAddress(struct ISCAgentID a) internal pure returns (address) +``` + +### chainID + +```solidity +function chainID(struct ISCAgentID a) internal pure returns (ISCChainID) +``` + +### asNFTID + +```solidity +function asNFTID(uint256 tokenID) internal pure returns (NFTID) +``` + +### isInCollection + +```solidity +function isInCollection(struct ISCNFT nft, NFTID collectionId) internal pure returns (bool) +``` + diff --git a/docs/content/references/iota-evm/magic-contract/ISCUtil.md b/docs/content/references/iota-evm/magic-contract/ISCUtil.md new file mode 100644 index 00000000000..59e576222f7 --- /dev/null +++ b/docs/content/references/iota-evm/magic-contract/ISCUtil.md @@ -0,0 +1,27 @@ +--- +title: ISCUtil +description: 'Functions of the ISC Magic Contract not directly related to the ISC sandbox' +--- + +## ISCUtil + +_Functions of the ISC Magic Contract not directly related to the ISC sandbox_ + +### hn + +```solidity +function hn(string s) external pure returns (ISCHname) +``` + +### print + +```solidity +function print(string s) external pure +``` + +## __iscUtil + +```solidity +contract ISCUtil __iscUtil +``` + diff --git a/docs/content/references/iota-identity/wasm/api_ref.md b/docs/content/references/iota-identity/wasm/api_ref.md new file mode 100644 index 00000000000..bdb0e1f5582 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/api_ref.md @@ -0,0 +1,14 @@ +# @iota/identity-wasm + +## Table of contents + +### Modules + +- [identity\_wasm](modules/identity_wasm.md) +- [iota\_identity\_client](modules/iota_identity_client.md) +- [jose/ec\_curve](modules/jose_ec_curve.md) +- [jose/ed\_curve](modules/jose_ed_curve.md) +- [jose/jwk\_operation](modules/jose_jwk_operation.md) +- [jose/jwk\_type](modules/jose_jwk_type.md) +- [jose/jwk\_use](modules/jose_jwk_use.md) +- [jose/jws\_algorithm](modules/jose_jws_algorithm.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.CoreDID.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.CoreDID.md new file mode 100644 index 00000000000..c649a7513ac --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.CoreDID.md @@ -0,0 +1,296 @@ +# Class: CoreDID + +[identity\_wasm](../modules/identity_wasm.md).CoreDID + +A method-agnostic Decentralized Identifier (DID). + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.CoreDID.md#tojson) +- [toString](identity_wasm.CoreDID.md#tostring) +- [parse](identity_wasm.CoreDID.md#parse) +- [setMethodName](identity_wasm.CoreDID.md#setmethodname) +- [validMethodName](identity_wasm.CoreDID.md#validmethodname) +- [setMethodId](identity_wasm.CoreDID.md#setmethodid) +- [validMethodId](identity_wasm.CoreDID.md#validmethodid) +- [scheme](identity_wasm.CoreDID.md#scheme) +- [authority](identity_wasm.CoreDID.md#authority) +- [method](identity_wasm.CoreDID.md#method) +- [methodId](identity_wasm.CoreDID.md#methodid) +- [join](identity_wasm.CoreDID.md#join) +- [toUrl](identity_wasm.CoreDID.md#tourl) +- [intoUrl](identity_wasm.CoreDID.md#intourl) +- [fromJSON](identity_wasm.CoreDID.md#fromjson) +- [clone](identity_wasm.CoreDID.md#clone) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) as a string. + +#### Returns + +`string` + +___ + +### parse + +▸ `Static` **parse**(`input`): [`CoreDID`](identity_wasm.CoreDID.md) + +Parses a [CoreDID](identity_wasm.CoreDID.md) from the given `input`. + +### Errors + +Throws an error if the input is not a valid [CoreDID](identity_wasm.CoreDID.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `input` | `string` | + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### setMethodName + +▸ **setMethodName**(`value`): `void` + +Set the method name of the [CoreDID](identity_wasm.CoreDID.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### validMethodName + +▸ `Static` **validMethodName**(`value`): `boolean` + +Validates whether a string is a valid DID method name. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`boolean` + +___ + +### setMethodId + +▸ **setMethodId**(`value`): `void` + +Set the method-specific-id of the `DID`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### validMethodId + +▸ `Static` **validMethodId**(`value`): `boolean` + +Validates whether a string is a valid `DID` method-id. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`boolean` + +___ + +### scheme + +▸ **scheme**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) scheme. + +E.g. +- `"did:example:12345678" -> "did"` +- `"did:iota:smr:12345678" -> "did"` + +#### Returns + +`string` + +___ + +### authority + +▸ **authority**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) authority: the method name and method-id. + +E.g. +- `"did:example:12345678" -> "example:12345678"` +- `"did:iota:smr:12345678" -> "iota:smr:12345678"` + +#### Returns + +`string` + +___ + +### method + +▸ **method**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) method name. + +E.g. +- `"did:example:12345678" -> "example"` +- `"did:iota:smr:12345678" -> "iota"` + +#### Returns + +`string` + +___ + +### methodId + +▸ **methodId**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) method-specific ID. + +E.g. +- `"did:example:12345678" -> "12345678"` +- `"did:iota:smr:12345678" -> "smr:12345678"` + +#### Returns + +`string` + +___ + +### join + +▸ **join**(`segment`): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Construct a new [DIDUrl](identity_wasm.DIDUrl.md) by joining with a relative DID Url string. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `segment` | `string` | + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### toUrl + +▸ **toUrl**(): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Clones the [CoreDID](identity_wasm.CoreDID.md) into a [DIDUrl](identity_wasm.DIDUrl.md). + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### intoUrl + +▸ **intoUrl**(): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Converts the [CoreDID](identity_wasm.CoreDID.md) into a [DIDUrl](identity_wasm.DIDUrl.md), consuming it. + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`CoreDID`](identity_wasm.CoreDID.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### clone + +▸ **clone**(): [`CoreDID`](identity_wasm.CoreDID.md) + +Deep clones the object. + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.CoreDocument.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.CoreDocument.md new file mode 100644 index 00000000000..9ff1110cb8e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.CoreDocument.md @@ -0,0 +1,787 @@ +# Class: CoreDocument + +[identity\_wasm](../modules/identity_wasm.md).CoreDocument + +A method-agnostic DID Document. + +Note: All methods that involve reading from this class may potentially raise an error +if the object is being concurrently modified. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.CoreDocument.md#constructor) + +### Methods + +- [toJSON](identity_wasm.CoreDocument.md#tojson) +- [toString](identity_wasm.CoreDocument.md#tostring) +- [id](identity_wasm.CoreDocument.md#id) +- [setId](identity_wasm.CoreDocument.md#setid) +- [controller](identity_wasm.CoreDocument.md#controller) +- [setController](identity_wasm.CoreDocument.md#setcontroller) +- [alsoKnownAs](identity_wasm.CoreDocument.md#alsoknownas) +- [setAlsoKnownAs](identity_wasm.CoreDocument.md#setalsoknownas) +- [verificationMethod](identity_wasm.CoreDocument.md#verificationmethod) +- [authentication](identity_wasm.CoreDocument.md#authentication) +- [assertionMethod](identity_wasm.CoreDocument.md#assertionmethod) +- [keyAgreement](identity_wasm.CoreDocument.md#keyagreement) +- [capabilityDelegation](identity_wasm.CoreDocument.md#capabilitydelegation) +- [capabilityInvocation](identity_wasm.CoreDocument.md#capabilityinvocation) +- [properties](identity_wasm.CoreDocument.md#properties) +- [setPropertyUnchecked](identity_wasm.CoreDocument.md#setpropertyunchecked) +- [service](identity_wasm.CoreDocument.md#service) +- [insertService](identity_wasm.CoreDocument.md#insertservice) +- [removeService](identity_wasm.CoreDocument.md#removeservice) +- [resolveService](identity_wasm.CoreDocument.md#resolveservice) +- [methods](identity_wasm.CoreDocument.md#methods) +- [verificationRelationships](identity_wasm.CoreDocument.md#verificationrelationships) +- [insertMethod](identity_wasm.CoreDocument.md#insertmethod) +- [removeMethod](identity_wasm.CoreDocument.md#removemethod) +- [resolveMethod](identity_wasm.CoreDocument.md#resolvemethod) +- [attachMethodRelationship](identity_wasm.CoreDocument.md#attachmethodrelationship) +- [detachMethodRelationship](identity_wasm.CoreDocument.md#detachmethodrelationship) +- [verifyJws](identity_wasm.CoreDocument.md#verifyjws) +- [revokeCredentials](identity_wasm.CoreDocument.md#revokecredentials) +- [unrevokeCredentials](identity_wasm.CoreDocument.md#unrevokecredentials) +- [clone](identity_wasm.CoreDocument.md#clone) +- [\_shallowCloneInternal](identity_wasm.CoreDocument.md#_shallowcloneinternal) +- [\_strongCountInternal](identity_wasm.CoreDocument.md#_strongcountinternal) +- [fromJSON](identity_wasm.CoreDocument.md#fromjson) +- [generateMethod](identity_wasm.CoreDocument.md#generatemethod) +- [purgeMethod](identity_wasm.CoreDocument.md#purgemethod) +- [createJws](identity_wasm.CoreDocument.md#createjws) +- [createCredentialJwt](identity_wasm.CoreDocument.md#createcredentialjwt) +- [createPresentationJwt](identity_wasm.CoreDocument.md#createpresentationjwt) +- [expandDIDJwk](identity_wasm.CoreDocument.md#expanddidjwk) + +## Constructors + +### constructor + +• **new CoreDocument**(`values`) + +Creates a new [CoreDocument](identity_wasm.CoreDocument.md) with the given properties. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `values` | `ICoreDocument` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes to a plain JS representation. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### id + +▸ **id**(): [`CoreDID`](identity_wasm.CoreDID.md) + +Returns a copy of the DID Document `id`. + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### setId + +▸ **setId**(`id`): `void` + +Sets the DID of the document. + +### Warning + +Changing the identifier can drastically alter the results of +`resolve_method`, `resolve_service` and the related +[DID URL dereferencing](https://w3c-ccg.github.io/did-resolution/#dereferencing) algorithm. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | [`CoreDID`](identity_wasm.CoreDID.md) | + +#### Returns + +`void` + +___ + +### controller + +▸ **controller**(): [`CoreDID`](identity_wasm.CoreDID.md)[] + +Returns a copy of the document controllers. + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md)[] + +___ + +### setController + +▸ **setController**(`controllers`): `void` + +Sets the controllers of the DID Document. + +Note: Duplicates will be ignored. +Use `null` to remove all controllers. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `controllers` | ``null`` \| [`CoreDID`](identity_wasm.CoreDID.md) \| [`CoreDID`](identity_wasm.CoreDID.md)[] | + +#### Returns + +`void` + +___ + +### alsoKnownAs + +▸ **alsoKnownAs**(): `string`[] + +Returns a copy of the document's `alsoKnownAs` set. + +#### Returns + +`string`[] + +___ + +### setAlsoKnownAs + +▸ **setAlsoKnownAs**(`urls`): `void` + +Sets the `alsoKnownAs` property in the DID document. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `urls` | ``null`` \| `string` \| `string`[] | + +#### Returns + +`void` + +___ + +### verificationMethod + +▸ **verificationMethod**(): [`VerificationMethod`](identity_wasm.VerificationMethod.md)[] + +Returns a copy of the document's `verificationMethod` set. + +#### Returns + +[`VerificationMethod`](identity_wasm.VerificationMethod.md)[] + +___ + +### authentication + +▸ **authentication**(): ([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +Returns a copy of the document's `authentication` set. + +#### Returns + +([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +___ + +### assertionMethod + +▸ **assertionMethod**(): ([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +Returns a copy of the document's `assertionMethod` set. + +#### Returns + +([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +___ + +### keyAgreement + +▸ **keyAgreement**(): ([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +Returns a copy of the document's `keyAgreement` set. + +#### Returns + +([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +___ + +### capabilityDelegation + +▸ **capabilityDelegation**(): ([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +Returns a copy of the document's `capabilityDelegation` set. + +#### Returns + +([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +___ + +### capabilityInvocation + +▸ **capabilityInvocation**(): ([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +Returns a copy of the document's `capabilityInvocation` set. + +#### Returns + +([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +___ + +### properties + +▸ **properties**(): `Map`\<`string`, `any`\> + +Returns a copy of the custom DID Document properties. + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### setPropertyUnchecked + +▸ **setPropertyUnchecked**(`key`, `value`): `void` + +Sets a custom property in the DID Document. +If the value is set to `null`, the custom property will be removed. + +### WARNING + +This method can overwrite existing properties like `id` and result in an invalid document. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | +| `value` | `any` | + +#### Returns + +`void` + +___ + +### service + +▸ **service**(): [`Service`](identity_wasm.Service.md)[] + +Returns a set of all [Service](identity_wasm.Service.md) in the document. + +#### Returns + +[`Service`](identity_wasm.Service.md)[] + +___ + +### insertService + +▸ **insertService**(`service`): `void` + +Add a new [Service](identity_wasm.Service.md) to the document. + +Errors if there already exists a service or verification method with the same id. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `service` | [`Service`](identity_wasm.Service.md) | + +#### Returns + +`void` + +___ + +### removeService + +▸ **removeService**(`didUrl`): `undefined` \| [`Service`](identity_wasm.Service.md) + +Remove a [Service](identity_wasm.Service.md) identified by the given [DIDUrl](identity_wasm.DIDUrl.md) from the document. + +Returns `true` if the service was removed. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `didUrl` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`undefined` \| [`Service`](identity_wasm.Service.md) + +___ + +### resolveService + +▸ **resolveService**(`query`): `undefined` \| [`Service`](identity_wasm.Service.md) + +Returns the first [Service](identity_wasm.Service.md) with an `id` property matching the provided `query`, +if present. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `query` | `string` \| [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`undefined` \| [`Service`](identity_wasm.Service.md) + +___ + +### methods + +▸ **methods**(`scope?`): [`VerificationMethod`](identity_wasm.VerificationMethod.md)[] + +Returns a list of all [VerificationMethod](identity_wasm.VerificationMethod.md) in the DID Document, +whose verification relationship matches `scope`. + +If `scope` is not set, a list over the **embedded** methods is returned. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `scope?` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +[`VerificationMethod`](identity_wasm.VerificationMethod.md)[] + +___ + +### verificationRelationships + +▸ **verificationRelationships**(): ([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +Returns an array of all verification relationships. + +#### Returns + +([`DIDUrl`](identity_wasm.DIDUrl.md) \| [`VerificationMethod`](identity_wasm.VerificationMethod.md))[] + +___ + +### insertMethod + +▸ **insertMethod**(`method`, `scope`): `void` + +Adds a new `method` to the document in the given `scope`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `method` | [`VerificationMethod`](identity_wasm.VerificationMethod.md) | +| `scope` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +`void` + +___ + +### removeMethod + +▸ **removeMethod**(`did`): `undefined` \| [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +Removes all references to the specified Verification Method. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`undefined` \| [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +___ + +### resolveMethod + +▸ **resolveMethod**(`query`, `scope?`): `undefined` \| [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +Returns a copy of the first verification method with an `id` property +matching the provided `query` and the verification relationship +specified by `scope`, if present. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `query` | `string` \| [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `scope?` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +`undefined` \| [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +___ + +### attachMethodRelationship + +▸ **attachMethodRelationship**(`didUrl`, `relationship`): `boolean` + +Attaches the relationship to the given method, if the method exists. + +Note: The method needs to be in the set of verification methods, +so it cannot be an embedded one. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `didUrl` | [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `relationship` | [`MethodRelationship`](../enums/identity_wasm.MethodRelationship.md) | + +#### Returns + +`boolean` + +___ + +### detachMethodRelationship + +▸ **detachMethodRelationship**(`didUrl`, `relationship`): `boolean` + +Detaches the given relationship from the given method, if the method exists. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `didUrl` | [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `relationship` | [`MethodRelationship`](../enums/identity_wasm.MethodRelationship.md) | + +#### Returns + +`boolean` + +___ + +### verifyJws + +▸ **verifyJws**(`jws`, `options`, `signatureVerifier?`, `detachedPayload?`): [`DecodedJws`](identity_wasm.DecodedJws.md) + +Decodes and verifies the provided JWS according to the passed `options` and `signatureVerifier`. +If a `signatureVerifier` is provided it will be used when +verifying decoded JWS signatures, otherwise a default verifier capable of handling the `EdDSA`, `ES256`, `ES256K` +algorithms will be used. + +Regardless of which options are passed the following conditions must be met in order for a verification attempt to +take place. +- The JWS must be encoded according to the JWS compact serialization. +- The `kid` value in the protected header must be an identifier of a verification method in this DID document, +or set explicitly in the `options`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jws` | [`Jws`](identity_wasm.Jws.md) | +| `options` | [`JwsVerificationOptions`](identity_wasm.JwsVerificationOptions.md) | +| `signatureVerifier?` | [`IJwsVerifier`](../interfaces/identity_wasm.IJwsVerifier.md) | +| `detachedPayload?` | `string` | + +#### Returns + +[`DecodedJws`](identity_wasm.DecodedJws.md) + +___ + +### revokeCredentials + +▸ **revokeCredentials**(`serviceQuery`, `indices`): `void` + +If the document has a [RevocationBitmap](identity_wasm.RevocationBitmap.md) service identified by `serviceQuery`, +revoke all specified `indices`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `serviceQuery` | `string` \| [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `indices` | `number` \| `number`[] | + +#### Returns + +`void` + +___ + +### unrevokeCredentials + +▸ **unrevokeCredentials**(`serviceQuery`, `indices`): `void` + +If the document has a [RevocationBitmap](identity_wasm.RevocationBitmap.md) service identified by `serviceQuery`, +unrevoke all specified `indices`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `serviceQuery` | `string` \| [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `indices` | `number` \| `number`[] | + +#### Returns + +`void` + +___ + +### clone + +▸ **clone**(): [`CoreDocument`](identity_wasm.CoreDocument.md) + +Deep clones the [CoreDocument](identity_wasm.CoreDocument.md). + +#### Returns + +[`CoreDocument`](identity_wasm.CoreDocument.md) + +___ + +### \_shallowCloneInternal + +▸ **_shallowCloneInternal**(): [`CoreDocument`](identity_wasm.CoreDocument.md) + +### Warning +This is for internal use only. Do not rely on or call this method. + +#### Returns + +[`CoreDocument`](identity_wasm.CoreDocument.md) + +___ + +### \_strongCountInternal + +▸ **_strongCountInternal**(): `number` + +### Warning +This is for internal use only. Do not rely on or call this method. + +#### Returns + +`number` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`CoreDocument`](identity_wasm.CoreDocument.md) + +Deserializes an instance from a plain JS representation. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`CoreDocument`](identity_wasm.CoreDocument.md) + +___ + +### generateMethod + +▸ **generateMethod**(`storage`, `keyType`, `alg`, `fragment`, `scope`): `Promise`\<`string`\> + +Generate new key material in the given `storage` and insert a new verification method with the corresponding +public key material into the DID document. + +- If no fragment is given the `kid` of the generated JWK is used, if it is set, otherwise an error is returned. +- The `keyType` must be compatible with the given `storage`. `Storage`s are expected to export key type constants +for that use case. + +The fragment of the generated method is returned. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `keyType` | `string` | +| `alg` | [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) | +| `fragment` | `undefined` \| `string` | +| `scope` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +`Promise`\<`string`\> + +___ + +### purgeMethod + +▸ **purgeMethod**(`storage`, `id`): `Promise`\<`void`\> + +Remove the method identified by the `fragment` from the document and delete the corresponding key material in +the `storage`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `id` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`Promise`\<`void`\> + +___ + +### createJws + +▸ **createJws**(`storage`, `fragment`, `payload`, `options`): `Promise`\<[`Jws`](identity_wasm.Jws.md)\> + +Sign the `payload` according to `options` with the storage backed private key corresponding to the public key +material in the verification method identified by the given `fragment. + +Upon success a string representing a JWS encoded according to the Compact JWS Serialization format is returned. +See [RFC7515 section 3.1](https://www.rfc-editor.org/rfc/rfc7515#section-3.1). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `payload` | `string` | +| `options` | [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) | + +#### Returns + +`Promise`\<[`Jws`](identity_wasm.Jws.md)\> + +___ + +### createCredentialJwt + +▸ **createCredentialJwt**(`storage`, `fragment`, `credential`, `options`, `custom_claims?`): `Promise`\<[`Jwt`](identity_wasm.Jwt.md)\> + +Produces a JWT where the payload is produced from the given `credential` +in accordance with [VC Data Model v1.1](https://www.w3.org/TR/vc-data-model/#json-web-token). + +Unless the `kid` is explicitly set in the options, the `kid` in the protected header is the `id` +of the method identified by `fragment` and the JWS signature will be produced by the corresponding +private key backed by the `storage` in accordance with the passed `options`. + +The `custom_claims` can be used to set additional claims on the resulting JWT. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `options` | [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) | +| `custom_claims?` | `Record`\<`string`, `any`\> | + +#### Returns + +`Promise`\<[`Jwt`](identity_wasm.Jwt.md)\> + +___ + +### createPresentationJwt + +▸ **createPresentationJwt**(`storage`, `fragment`, `presentation`, `signature_options`, `presentation_options`): `Promise`\<[`Jwt`](identity_wasm.Jwt.md)\> + +Produces a JWT where the payload is produced from the given presentation. +in accordance with [VC Data Model v1.1](https://www.w3.org/TR/vc-data-model/#json-web-token). + +Unless the `kid` is explicitly set in the options, the `kid` in the protected header is the `id` +of the method identified by `fragment` and the JWS signature will be produced by the corresponding +private key backed by the `storage` in accordance with the passed `options`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `presentation` | [`Presentation`](identity_wasm.Presentation.md) | +| `signature_options` | [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) | +| `presentation_options` | [`JwtPresentationOptions`](identity_wasm.JwtPresentationOptions.md) | + +#### Returns + +`Promise`\<[`Jwt`](identity_wasm.Jwt.md)\> + +___ + +### expandDIDJwk + +▸ `Static` **expandDIDJwk**(`did`): [`CoreDocument`](identity_wasm.CoreDocument.md) + +Creates a [CoreDocument](identity_wasm.CoreDocument.md) from the given [DIDJwk](identity_wasm.DIDJwk.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`DIDJwk`](identity_wasm.DIDJwk.md) | + +#### Returns + +[`CoreDocument`](identity_wasm.CoreDocument.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Credential.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Credential.md new file mode 100644 index 00000000000..569c7a41202 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Credential.md @@ -0,0 +1,374 @@ +# Class: Credential + +[identity\_wasm](../modules/identity_wasm.md).Credential + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Credential.md#constructor) + +### Methods + +- [toJSON](identity_wasm.Credential.md#tojson) +- [toString](identity_wasm.Credential.md#tostring) +- [BaseContext](identity_wasm.Credential.md#basecontext) +- [BaseType](identity_wasm.Credential.md#basetype) +- [createDomainLinkageCredential](identity_wasm.Credential.md#createdomainlinkagecredential) +- [context](identity_wasm.Credential.md#context) +- [id](identity_wasm.Credential.md#id) +- [type](identity_wasm.Credential.md#type) +- [credentialSubject](identity_wasm.Credential.md#credentialsubject) +- [issuer](identity_wasm.Credential.md#issuer) +- [issuanceDate](identity_wasm.Credential.md#issuancedate) +- [expirationDate](identity_wasm.Credential.md#expirationdate) +- [credentialStatus](identity_wasm.Credential.md#credentialstatus) +- [credentialSchema](identity_wasm.Credential.md#credentialschema) +- [refreshService](identity_wasm.Credential.md#refreshservice) +- [termsOfUse](identity_wasm.Credential.md#termsofuse) +- [evidence](identity_wasm.Credential.md#evidence) +- [nonTransferable](identity_wasm.Credential.md#nontransferable) +- [proof](identity_wasm.Credential.md#proof) +- [properties](identity_wasm.Credential.md#properties) +- [setProof](identity_wasm.Credential.md#setproof) +- [toJwtClaims](identity_wasm.Credential.md#tojwtclaims) +- [fromJSON](identity_wasm.Credential.md#fromjson) +- [clone](identity_wasm.Credential.md#clone) + +## Constructors + +### constructor + +• **new Credential**(`values`) + +Constructs a new [Credential](identity_wasm.Credential.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `values` | [`ICredential`](../interfaces/identity_wasm.ICredential.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### BaseContext + +▸ `Static` **BaseContext**(): `string` + +Returns the base JSON-LD context. + +#### Returns + +`string` + +___ + +### BaseType + +▸ `Static` **BaseType**(): `string` + +Returns the base type. + +#### Returns + +`string` + +___ + +### createDomainLinkageCredential + +▸ `Static` **createDomainLinkageCredential**(`values`): [`Credential`](identity_wasm.Credential.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `values` | [`IDomainLinkageCredential`](../interfaces/identity_wasm.IDomainLinkageCredential.md) | + +#### Returns + +[`Credential`](identity_wasm.Credential.md) + +___ + +### context + +▸ **context**(): (`string` \| `Record`\<`string`, `any`\>)[] + +Returns a copy of the JSON-LD context(s) applicable to the [Credential](identity_wasm.Credential.md). + +#### Returns + +(`string` \| `Record`\<`string`, `any`\>)[] + +___ + +### id + +▸ **id**(): `undefined` \| `string` + +Returns a copy of the unique `URI` identifying the [Credential](identity_wasm.Credential.md) . + +#### Returns + +`undefined` \| `string` + +___ + +### type + +▸ **type**(): `string`[] + +Returns a copy of the URIs defining the type of the [Credential](identity_wasm.Credential.md). + +#### Returns + +`string`[] + +___ + +### credentialSubject + +▸ **credentialSubject**(): [`Subject`](../interfaces/identity_wasm.Subject.md)[] + +Returns a copy of the [Credential](identity_wasm.Credential.md) subject(s). + +#### Returns + +[`Subject`](../interfaces/identity_wasm.Subject.md)[] + +___ + +### issuer + +▸ **issuer**(): `string` \| [`Issuer`](../interfaces/identity_wasm.Issuer.md) + +Returns a copy of the issuer of the [Credential](identity_wasm.Credential.md). + +#### Returns + +`string` \| [`Issuer`](../interfaces/identity_wasm.Issuer.md) + +___ + +### issuanceDate + +▸ **issuanceDate**(): [`Timestamp`](identity_wasm.Timestamp.md) + +Returns a copy of the timestamp of when the [Credential](identity_wasm.Credential.md) becomes valid. + +#### Returns + +[`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### expirationDate + +▸ **expirationDate**(): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +Returns a copy of the timestamp of when the [Credential](identity_wasm.Credential.md) should no longer be considered valid. + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### credentialStatus + +▸ **credentialStatus**(): [`Status`](../interfaces/identity_wasm.Status.md)[] + +Returns a copy of the information used to determine the current status of the [Credential](identity_wasm.Credential.md). + +#### Returns + +[`Status`](../interfaces/identity_wasm.Status.md)[] + +___ + +### credentialSchema + +▸ **credentialSchema**(): [`Schema`](../interfaces/identity_wasm.Schema.md)[] + +Returns a copy of the information used to assist in the enforcement of a specific [Credential](identity_wasm.Credential.md) structure. + +#### Returns + +[`Schema`](../interfaces/identity_wasm.Schema.md)[] + +___ + +### refreshService + +▸ **refreshService**(): [`RefreshService`](../interfaces/identity_wasm.RefreshService.md)[] + +Returns a copy of the service(s) used to refresh an expired [Credential](identity_wasm.Credential.md). + +#### Returns + +[`RefreshService`](../interfaces/identity_wasm.RefreshService.md)[] + +___ + +### termsOfUse + +▸ **termsOfUse**(): [`Policy`](../interfaces/identity_wasm.Policy.md)[] + +Returns a copy of the terms-of-use specified by the [Credential](identity_wasm.Credential.md) issuer. + +#### Returns + +[`Policy`](../interfaces/identity_wasm.Policy.md)[] + +___ + +### evidence + +▸ **evidence**(): [`Evidence`](../interfaces/identity_wasm.Evidence.md)[] + +Returns a copy of the human-readable evidence used to support the claims within the [Credential](identity_wasm.Credential.md). + +#### Returns + +[`Evidence`](../interfaces/identity_wasm.Evidence.md)[] + +___ + +### nonTransferable + +▸ **nonTransferable**(): `undefined` \| `boolean` + +Returns whether or not the [Credential](identity_wasm.Credential.md) must only be contained within a [Presentation](identity_wasm.Presentation.md) +with a proof issued from the [Credential](identity_wasm.Credential.md) subject. + +#### Returns + +`undefined` \| `boolean` + +___ + +### proof + +▸ **proof**(): `undefined` \| [`Proof`](identity_wasm.Proof.md) + +Optional cryptographic proof, unrelated to JWT. + +#### Returns + +`undefined` \| [`Proof`](identity_wasm.Proof.md) + +___ + +### properties + +▸ **properties**(): `Map`\<`string`, `any`\> + +Returns a copy of the miscellaneous properties on the [Credential](identity_wasm.Credential.md). + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### setProof + +▸ **setProof**(`proof?`): `void` + +Sets the `proof` property of the [Credential](identity_wasm.Credential.md). + +Note that this proof is not related to JWT. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proof?` | [`Proof`](identity_wasm.Proof.md) | + +#### Returns + +`void` + +___ + +### toJwtClaims + +▸ **toJwtClaims**(`custom_claims?`): `Record`\<`string`, `any`\> + +Serializes the `Credential` as a JWT claims set +in accordance with [VC Data Model v1.1](https://www.w3.org/TR/vc-data-model/#json-web-token). + +The resulting object can be used as the payload of a JWS when issuing the credential. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `custom_claims?` | `Record`\<`string`, `any`\> | + +#### Returns + +`Record`\<`string`, `any`\> + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Credential`](identity_wasm.Credential.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Credential`](identity_wasm.Credential.md) + +___ + +### clone + +▸ **clone**(): [`Credential`](identity_wasm.Credential.md) + +Deep clones the object. + +#### Returns + +[`Credential`](identity_wasm.Credential.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.CustomMethodData.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.CustomMethodData.md new file mode 100644 index 00000000000..5689255ad8a --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.CustomMethodData.md @@ -0,0 +1,93 @@ +# Class: CustomMethodData + +[identity\_wasm](../modules/identity_wasm.md).CustomMethodData + +A custom verification method data format. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.CustomMethodData.md#constructor) + +### Methods + +- [toJSON](identity_wasm.CustomMethodData.md#tojson) +- [toString](identity_wasm.CustomMethodData.md#tostring) +- [clone](identity_wasm.CustomMethodData.md#clone) +- [fromJSON](identity_wasm.CustomMethodData.md#fromjson) + +## Constructors + +### constructor + +• **new CustomMethodData**(`name`, `data`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `name` | `string` | +| `data` | `any` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### clone + +▸ **clone**(): [`CustomMethodData`](identity_wasm.CustomMethodData.md) + +Deep clones the object. + +#### Returns + +[`CustomMethodData`](identity_wasm.CustomMethodData.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`CustomMethodData`](identity_wasm.CustomMethodData.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`CustomMethodData`](identity_wasm.CustomMethodData.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.DIDJwk.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DIDJwk.md new file mode 100644 index 00000000000..56bb79aa56b --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DIDJwk.md @@ -0,0 +1,193 @@ +# Class: DIDJwk + +[identity\_wasm](../modules/identity_wasm.md).DIDJwk + +`did:jwk` DID. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.DIDJwk.md#constructor) + +### Methods + +- [parse](identity_wasm.DIDJwk.md#parse) +- [jwk](identity_wasm.DIDJwk.md#jwk) +- [scheme](identity_wasm.DIDJwk.md#scheme) +- [authority](identity_wasm.DIDJwk.md#authority) +- [method](identity_wasm.DIDJwk.md#method) +- [methodId](identity_wasm.DIDJwk.md#methodid) +- [toString](identity_wasm.DIDJwk.md#tostring) +- [toJSON](identity_wasm.DIDJwk.md#tojson) +- [fromJSON](identity_wasm.DIDJwk.md#fromjson) +- [clone](identity_wasm.DIDJwk.md#clone) + +## Constructors + +### constructor + +• **new DIDJwk**(`did`) + +Creates a new [DIDJwk](identity_wasm.DIDJwk.md) from a [CoreDID](identity_wasm.CoreDID.md). + +### Errors +Throws an error if the given did is not a valid `did:jwk` DID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | `IToCoreDID` \| [`CoreDID`](identity_wasm.CoreDID.md) | + +## Methods + +### parse + +▸ `Static` **parse**(`input`): [`DIDJwk`](identity_wasm.DIDJwk.md) + +Parses a [DIDJwk](identity_wasm.DIDJwk.md) from the given `input`. + +### Errors + +Throws an error if the input is not a valid [DIDJwk](identity_wasm.DIDJwk.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `input` | `string` | + +#### Returns + +[`DIDJwk`](identity_wasm.DIDJwk.md) + +___ + +### jwk + +▸ **jwk**(): [`Jwk`](identity_wasm.Jwk.md) + +Returns the JSON WEB KEY (JWK) encoded inside this `did:jwk`. + +#### Returns + +[`Jwk`](identity_wasm.Jwk.md) + +___ + +### scheme + +▸ **scheme**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) scheme. + +E.g. +- `"did:example:12345678" -> "did"` +- `"did:iota:smr:12345678" -> "did"` + +#### Returns + +`string` + +___ + +### authority + +▸ **authority**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) authority: the method name and method-id. + +E.g. +- `"did:example:12345678" -> "example:12345678"` +- `"did:iota:smr:12345678" -> "iota:smr:12345678"` + +#### Returns + +`string` + +___ + +### method + +▸ **method**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) method name. + +E.g. +- `"did:example:12345678" -> "example"` +- `"did:iota:smr:12345678" -> "iota"` + +#### Returns + +`string` + +___ + +### methodId + +▸ **methodId**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) method-specific ID. + +E.g. +- `"did:example:12345678" -> "12345678"` +- `"did:iota:smr:12345678" -> "smr:12345678"` + +#### Returns + +`string` + +___ + +### toString + +▸ **toString**(): `string` + +Returns the [CoreDID](identity_wasm.CoreDID.md) as a string. + +#### Returns + +`string` + +___ + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`DIDJwk`](identity_wasm.DIDJwk.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`DIDJwk`](identity_wasm.DIDJwk.md) + +___ + +### clone + +▸ **clone**(): [`DIDJwk`](identity_wasm.DIDJwk.md) + +Deep clones the object. + +#### Returns + +[`DIDJwk`](identity_wasm.DIDJwk.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.DIDUrl.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DIDUrl.md new file mode 100644 index 00000000000..ded624ac789 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DIDUrl.md @@ -0,0 +1,252 @@ +# Class: DIDUrl + +[identity\_wasm](../modules/identity_wasm.md).DIDUrl + +A method agnostic DID Url. + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.DIDUrl.md#tojson) +- [toString](identity_wasm.DIDUrl.md#tostring) +- [parse](identity_wasm.DIDUrl.md#parse) +- [did](identity_wasm.DIDUrl.md#did) +- [urlStr](identity_wasm.DIDUrl.md#urlstr) +- [fragment](identity_wasm.DIDUrl.md#fragment) +- [setFragment](identity_wasm.DIDUrl.md#setfragment) +- [path](identity_wasm.DIDUrl.md#path) +- [setPath](identity_wasm.DIDUrl.md#setpath) +- [query](identity_wasm.DIDUrl.md#query) +- [setQuery](identity_wasm.DIDUrl.md#setquery) +- [join](identity_wasm.DIDUrl.md#join) +- [fromJSON](identity_wasm.DIDUrl.md#fromjson) +- [clone](identity_wasm.DIDUrl.md#clone) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Returns the [DIDUrl](identity_wasm.DIDUrl.md) as a string. + +#### Returns + +`string` + +___ + +### parse + +▸ `Static` **parse**(`input`): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Parses a [DIDUrl](identity_wasm.DIDUrl.md) from the input string. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `input` | `string` | + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### did + +▸ **did**(): [`CoreDID`](identity_wasm.CoreDID.md) + +Return a copy of the [CoreDID](identity_wasm.CoreDID.md) section of the [DIDUrl](identity_wasm.DIDUrl.md). + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### urlStr + +▸ **urlStr**(): `string` + +Return a copy of the relative DID Url as a string, including only the path, query, and fragment. + +#### Returns + +`string` + +___ + +### fragment + +▸ **fragment**(): `undefined` \| `string` + +Returns a copy of the [DIDUrl](identity_wasm.DIDUrl.md) method fragment, if any. Excludes the leading '#'. + +#### Returns + +`undefined` \| `string` + +___ + +### setFragment + +▸ **setFragment**(`value?`): `void` + +Sets the `fragment` component of the [DIDUrl](identity_wasm.DIDUrl.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value?` | `string` | + +#### Returns + +`void` + +___ + +### path + +▸ **path**(): `undefined` \| `string` + +Returns a copy of the [DIDUrl](identity_wasm.DIDUrl.md) path. + +#### Returns + +`undefined` \| `string` + +___ + +### setPath + +▸ **setPath**(`value?`): `void` + +Sets the `path` component of the [DIDUrl](identity_wasm.DIDUrl.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value?` | `string` | + +#### Returns + +`void` + +___ + +### query + +▸ **query**(): `undefined` \| `string` + +Returns a copy of the [DIDUrl](identity_wasm.DIDUrl.md) method query, if any. Excludes the leading '?'. + +#### Returns + +`undefined` \| `string` + +___ + +### setQuery + +▸ **setQuery**(`value?`): `void` + +Sets the `query` component of the [DIDUrl](identity_wasm.DIDUrl.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value?` | `string` | + +#### Returns + +`void` + +___ + +### join + +▸ **join**(`segment`): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Append a string representing a path, query, and/or fragment, returning a new [DIDUrl](identity_wasm.DIDUrl.md). + +Must begin with a valid delimiter character: '/', '?', '#'. Overwrites the existing URL +segment and any following segments in order of path, query, then fragment. + +I.e. +- joining a path will clear the query and fragment. +- joining a query will clear the fragment. +- joining a fragment will only overwrite the fragment. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `segment` | `string` | + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### clone + +▸ **clone**(): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Deep clones the object. + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJptCredential.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJptCredential.md new file mode 100644 index 00000000000..32e04c8aa0e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJptCredential.md @@ -0,0 +1,58 @@ +# Class: DecodedJptCredential + +[identity\_wasm](../modules/identity_wasm.md).DecodedJptCredential + +## Table of contents + +### Methods + +- [clone](identity_wasm.DecodedJptCredential.md#clone) +- [credential](identity_wasm.DecodedJptCredential.md#credential) +- [customClaims](identity_wasm.DecodedJptCredential.md#customclaims) +- [decodedJwp](identity_wasm.DecodedJptCredential.md#decodedjwp) + +## Methods + +### clone + +▸ **clone**(): [`DecodedJptCredential`](identity_wasm.DecodedJptCredential.md) + +Deep clones the object. + +#### Returns + +[`DecodedJptCredential`](identity_wasm.DecodedJptCredential.md) + +___ + +### credential + +▸ **credential**(): [`Credential`](identity_wasm.Credential.md) + +Returns the [Credential](identity_wasm.Credential.md) embedded into this JPT. + +#### Returns + +[`Credential`](identity_wasm.Credential.md) + +___ + +### customClaims + +▸ **customClaims**(): `Map`\<`string`, `any`\> + +Returns the custom claims parsed from the JPT. + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### decodedJwp + +▸ **decodedJwp**(): [`JwpIssued`](identity_wasm.JwpIssued.md) + +#### Returns + +[`JwpIssued`](identity_wasm.JwpIssued.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJptPresentation.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJptPresentation.md new file mode 100644 index 00000000000..c85b6a83d4a --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJptPresentation.md @@ -0,0 +1,60 @@ +# Class: DecodedJptPresentation + +[identity\_wasm](../modules/identity_wasm.md).DecodedJptPresentation + +## Table of contents + +### Methods + +- [clone](identity_wasm.DecodedJptPresentation.md#clone) +- [credential](identity_wasm.DecodedJptPresentation.md#credential) +- [customClaims](identity_wasm.DecodedJptPresentation.md#customclaims) +- [aud](identity_wasm.DecodedJptPresentation.md#aud) + +## Methods + +### clone + +▸ **clone**(): [`DecodedJptPresentation`](identity_wasm.DecodedJptPresentation.md) + +Deep clones the object. + +#### Returns + +[`DecodedJptPresentation`](identity_wasm.DecodedJptPresentation.md) + +___ + +### credential + +▸ **credential**(): [`Credential`](identity_wasm.Credential.md) + +Returns the [Credential](identity_wasm.Credential.md) embedded into this JPT. + +#### Returns + +[`Credential`](identity_wasm.Credential.md) + +___ + +### customClaims + +▸ **customClaims**(): `Map`\<`string`, `any`\> + +Returns the custom claims parsed from the JPT. + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### aud + +▸ **aud**(): `undefined` \| `string` + +Returns the `aud` property parsed from the JWT claims. + +#### Returns + +`undefined` \| `string` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJws.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJws.md new file mode 100644 index 00000000000..aa10e8ce0ce --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJws.md @@ -0,0 +1,103 @@ +# Class: DecodedJws + +[identity\_wasm](../modules/identity_wasm.md).DecodedJws + +A cryptographically verified decoded token from a JWS. + +Contains the decoded headers and the raw claims. + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.DecodedJws.md#tojson) +- [toString](identity_wasm.DecodedJws.md#tostring) +- [claims](identity_wasm.DecodedJws.md#claims) +- [claimsBytes](identity_wasm.DecodedJws.md#claimsbytes) +- [protectedHeader](identity_wasm.DecodedJws.md#protectedheader) +- [clone](identity_wasm.DecodedJws.md#clone) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### claims + +▸ **claims**(): `string` + +Returns a copy of the parsed claims represented as a string. + +# Errors +An error is thrown if the claims cannot be represented as a string. + +This error can only occur if the Token was decoded from a detached payload. + +#### Returns + +`string` + +___ + +### claimsBytes + +▸ **claimsBytes**(): `Uint8Array` + +Return a copy of the parsed claims represented as an array of bytes. + +#### Returns + +`Uint8Array` + +___ + +### protectedHeader + +▸ **protectedHeader**(): [`JwsHeader`](identity_wasm.JwsHeader.md) + +Returns a copy of the protected header. + +#### Returns + +[`JwsHeader`](identity_wasm.JwsHeader.md) + +___ + +### clone + +▸ **clone**(): [`DecodedJws`](identity_wasm.DecodedJws.md) + +Deep clones the object. + +#### Returns + +[`DecodedJws`](identity_wasm.DecodedJws.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJwtCredential.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJwtCredential.md new file mode 100644 index 00000000000..8a5df4734f0 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJwtCredential.md @@ -0,0 +1,69 @@ +# Class: DecodedJwtCredential + +[identity\_wasm](../modules/identity_wasm.md).DecodedJwtCredential + +A cryptographically verified and decoded Credential. + +Note that having an instance of this type only means the JWS it was constructed from was verified. +It does not imply anything about a potentially present proof property on the credential itself. + +## Table of contents + +### Methods + +- [credential](identity_wasm.DecodedJwtCredential.md#credential) +- [protectedHeader](identity_wasm.DecodedJwtCredential.md#protectedheader) +- [customClaims](identity_wasm.DecodedJwtCredential.md#customclaims) +- [intoCredential](identity_wasm.DecodedJwtCredential.md#intocredential) + +## Methods + +### credential + +▸ **credential**(): [`Credential`](identity_wasm.Credential.md) + +Returns a copy of the credential parsed to the [Verifiable Credentials Data model](https://www.w3.org/TR/vc-data-model/). + +#### Returns + +[`Credential`](identity_wasm.Credential.md) + +___ + +### protectedHeader + +▸ **protectedHeader**(): [`JwsHeader`](identity_wasm.JwsHeader.md) + +Returns a copy of the protected header parsed from the decoded JWS. + +#### Returns + +[`JwsHeader`](identity_wasm.JwsHeader.md) + +___ + +### customClaims + +▸ **customClaims**(): `undefined` \| `Record`\<`string`, `any`\> + +The custom claims parsed from the JWT. + +#### Returns + +`undefined` \| `Record`\<`string`, `any`\> + +___ + +### intoCredential + +▸ **intoCredential**(): [`Credential`](identity_wasm.Credential.md) + +Consumes the object and returns the decoded credential. + +### Warning + +This destroys the [DecodedJwtCredential](identity_wasm.DecodedJwtCredential.md) object. + +#### Returns + +[`Credential`](identity_wasm.Credential.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJwtPresentation.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJwtPresentation.md new file mode 100644 index 00000000000..61d3a6c3c34 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DecodedJwtPresentation.md @@ -0,0 +1,105 @@ +# Class: DecodedJwtPresentation + +[identity\_wasm](../modules/identity_wasm.md).DecodedJwtPresentation + +A cryptographically verified and decoded presentation. + +Note that having an instance of this type only means the JWS it was constructed from was verified. +It does not imply anything about a potentially present proof property on the presentation itself. + +## Table of contents + +### Methods + +- [presentation](identity_wasm.DecodedJwtPresentation.md#presentation) +- [protectedHeader](identity_wasm.DecodedJwtPresentation.md#protectedheader) +- [intoPresentation](identity_wasm.DecodedJwtPresentation.md#intopresentation) +- [expirationDate](identity_wasm.DecodedJwtPresentation.md#expirationdate) +- [issuanceDate](identity_wasm.DecodedJwtPresentation.md#issuancedate) +- [audience](identity_wasm.DecodedJwtPresentation.md#audience) +- [customClaims](identity_wasm.DecodedJwtPresentation.md#customclaims) + +## Methods + +### presentation + +▸ **presentation**(): [`Presentation`](identity_wasm.Presentation.md) + +#### Returns + +[`Presentation`](identity_wasm.Presentation.md) + +___ + +### protectedHeader + +▸ **protectedHeader**(): [`JwsHeader`](identity_wasm.JwsHeader.md) + +Returns a copy of the protected header parsed from the decoded JWS. + +#### Returns + +[`JwsHeader`](identity_wasm.JwsHeader.md) + +___ + +### intoPresentation + +▸ **intoPresentation**(): [`Presentation`](identity_wasm.Presentation.md) + +Consumes the object and returns the decoded presentation. + +### Warning +This destroys the [DecodedJwtPresentation](identity_wasm.DecodedJwtPresentation.md) object. + +#### Returns + +[`Presentation`](identity_wasm.Presentation.md) + +___ + +### expirationDate + +▸ **expirationDate**(): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +The expiration date parsed from the JWT claims. + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### issuanceDate + +▸ **issuanceDate**(): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +The issuance date parsed from the JWT claims. + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### audience + +▸ **audience**(): `undefined` \| `string` + +The `aud` property parsed from JWT claims. + +#### Returns + +`undefined` \| `string` + +___ + +### customClaims + +▸ **customClaims**(): `undefined` \| `Record`\<`string`, `any`\> + +The custom claims parsed from the JWT. + +#### Returns + +`undefined` \| `Record`\<`string`, `any`\> diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Disclosure.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Disclosure.md new file mode 100644 index 00000000000..4c6991a6f9a --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Disclosure.md @@ -0,0 +1,180 @@ +# Class: Disclosure + +[identity\_wasm](../modules/identity_wasm.md).Disclosure + +Represents an elements constructing a disclosure. +Object properties and array elements disclosures are supported. + +See: https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-07.html#name-disclosures + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Disclosure.md#constructor) + +### Methods + +- [toJSON](identity_wasm.Disclosure.md#tojson) +- [toString](identity_wasm.Disclosure.md#tostring) +- [parse](identity_wasm.Disclosure.md#parse) +- [disclosure](identity_wasm.Disclosure.md#disclosure) +- [toEncodedString](identity_wasm.Disclosure.md#toencodedstring) +- [salt](identity_wasm.Disclosure.md#salt) +- [claimName](identity_wasm.Disclosure.md#claimname) +- [claimValue](identity_wasm.Disclosure.md#claimvalue) +- [fromJSON](identity_wasm.Disclosure.md#fromjson) + +## Constructors + +### constructor + +• **new Disclosure**(`salt`, `claim_name`, `claim_value`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `salt` | `string` | +| `claim_name` | `undefined` \| `string` | +| `claim_value` | `any` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Returns a copy of the base64url-encoded string. + +#### Returns + +`string` + +___ + +### parse + +▸ `Static` **parse**(`disclosure`): [`Disclosure`](identity_wasm.Disclosure.md) + +Parses a Base64 encoded disclosure into a `Disclosure`. + +## Error + +Returns an `InvalidDisclosure` if input is not a valid disclosure. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `disclosure` | `string` | + +#### Returns + +[`Disclosure`](identity_wasm.Disclosure.md) + +___ + +### disclosure + +▸ **disclosure**(): `string` + +Returns a copy of the base64url-encoded string. + +#### Returns + +`string` + +___ + +### toEncodedString + +▸ **toEncodedString**(): `string` + +Returns a copy of the base64url-encoded string. + +#### Returns + +`string` + +___ + +### salt + +▸ **salt**(): `string` + +Returns a copy of the salt value. + +#### Returns + +`string` + +___ + +### claimName + +▸ **claimName**(): `undefined` \| `string` + +Returns a copy of the claim name, optional for array elements. + +#### Returns + +`undefined` \| `string` + +___ + +### claimValue + +▸ **claimValue**(): `any` + +Returns a copy of the claim Value which can be of any type. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Disclosure`](identity_wasm.Disclosure.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Disclosure`](identity_wasm.Disclosure.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.DomainLinkageConfiguration.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DomainLinkageConfiguration.md new file mode 100644 index 00000000000..4cf222b6f38 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.DomainLinkageConfiguration.md @@ -0,0 +1,125 @@ +# Class: DomainLinkageConfiguration + +[identity\_wasm](../modules/identity_wasm.md).DomainLinkageConfiguration + +DID Configuration Resource which contains Domain Linkage Credentials. +It can be placed in an origin's `.well-known` directory to prove linkage between the origin and a DID. +See: + +Note: +- Only the [JSON Web Token Proof Format](https://identity.foundation/.well-known/resources/did-configuration/#json-web-token-proof-format) + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.DomainLinkageConfiguration.md#constructor) + +### Methods + +- [toJSON](identity_wasm.DomainLinkageConfiguration.md#tojson) +- [toString](identity_wasm.DomainLinkageConfiguration.md#tostring) +- [linkedDids](identity_wasm.DomainLinkageConfiguration.md#linkeddids) +- [issuers](identity_wasm.DomainLinkageConfiguration.md#issuers) +- [fromJSON](identity_wasm.DomainLinkageConfiguration.md#fromjson) +- [clone](identity_wasm.DomainLinkageConfiguration.md#clone) + +## Constructors + +### constructor + +• **new DomainLinkageConfiguration**(`linkedDids`) + +Constructs a new [DomainLinkageConfiguration](identity_wasm.DomainLinkageConfiguration.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `linkedDids` | [`Jwt`](identity_wasm.Jwt.md)[] | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### linkedDids + +▸ **linkedDids**(): [`Jwt`](identity_wasm.Jwt.md)[] + +List of the Domain Linkage Credentials. + +#### Returns + +[`Jwt`](identity_wasm.Jwt.md)[] + +___ + +### issuers + +▸ **issuers**(): [`CoreDID`](identity_wasm.CoreDID.md)[] + +List of the issuers of the Domain Linkage Credentials. + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md)[] + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`DomainLinkageConfiguration`](identity_wasm.DomainLinkageConfiguration.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`DomainLinkageConfiguration`](identity_wasm.DomainLinkageConfiguration.md) + +___ + +### clone + +▸ **clone**(): [`DomainLinkageConfiguration`](identity_wasm.DomainLinkageConfiguration.md) + +Deep clones the object. + +#### Returns + +[`DomainLinkageConfiguration`](identity_wasm.DomainLinkageConfiguration.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Duration.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Duration.md new file mode 100644 index 00000000000..1c9d9ebe08f --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Duration.md @@ -0,0 +1,158 @@ +# Class: Duration + +[identity\_wasm](../modules/identity_wasm.md).Duration + +A span of time. + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.Duration.md#tojson) +- [toString](identity_wasm.Duration.md#tostring) +- [seconds](identity_wasm.Duration.md#seconds) +- [minutes](identity_wasm.Duration.md#minutes) +- [hours](identity_wasm.Duration.md#hours) +- [days](identity_wasm.Duration.md#days) +- [weeks](identity_wasm.Duration.md#weeks) +- [fromJSON](identity_wasm.Duration.md#fromjson) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### seconds + +▸ `Static` **seconds**(`seconds`): [`Duration`](identity_wasm.Duration.md) + +Create a new [Duration](identity_wasm.Duration.md) with the given number of seconds. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `seconds` | `number` | + +#### Returns + +[`Duration`](identity_wasm.Duration.md) + +___ + +### minutes + +▸ `Static` **minutes**(`minutes`): [`Duration`](identity_wasm.Duration.md) + +Create a new [Duration](identity_wasm.Duration.md) with the given number of minutes. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `minutes` | `number` | + +#### Returns + +[`Duration`](identity_wasm.Duration.md) + +___ + +### hours + +▸ `Static` **hours**(`hours`): [`Duration`](identity_wasm.Duration.md) + +Create a new [Duration](identity_wasm.Duration.md) with the given number of hours. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `hours` | `number` | + +#### Returns + +[`Duration`](identity_wasm.Duration.md) + +___ + +### days + +▸ `Static` **days**(`days`): [`Duration`](identity_wasm.Duration.md) + +Create a new [Duration](identity_wasm.Duration.md) with the given number of days. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `days` | `number` | + +#### Returns + +[`Duration`](identity_wasm.Duration.md) + +___ + +### weeks + +▸ `Static` **weeks**(`weeks`): [`Duration`](identity_wasm.Duration.md) + +Create a new [Duration](identity_wasm.Duration.md) with the given number of weeks. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `weeks` | `number` | + +#### Returns + +[`Duration`](identity_wasm.Duration.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Duration`](identity_wasm.Duration.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Duration`](identity_wasm.Duration.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.EcDSAJwsVerifier.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.EcDSAJwsVerifier.md new file mode 100644 index 00000000000..30323808228 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.EcDSAJwsVerifier.md @@ -0,0 +1,51 @@ +# Class: EcDSAJwsVerifier + +[identity\_wasm](../modules/identity_wasm.md).EcDSAJwsVerifier + +An implementor of `IJwsVerifier` that can handle the +`EcDSA` algorithm. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.EcDSAJwsVerifier.md#constructor) + +### Methods + +- [verify](identity_wasm.EcDSAJwsVerifier.md#verify) + +## Constructors + +### constructor + +• **new EcDSAJwsVerifier**() + +Constructs an EcDSAJwsVerifier. + +## Methods + +### verify + +▸ **verify**(`alg`, `signingInput`, `decodedSignature`, `publicKey`): `void` + +Verify a JWS signature secured with the `EcDSA` algorithm. +Only the `ES256` and `ES256K` curves are supported for now. + +# Warning + +This function does not check the `alg` property in the protected header. Callers are expected to assert this +prior to calling the function. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alg` | [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) | +| `signingInput` | `Uint8Array` | +| `decodedSignature` | `Uint8Array` | +| `publicKey` | [`Jwk`](identity_wasm.Jwk.md) | + +#### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.EdDSAJwsVerifier.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.EdDSAJwsVerifier.md new file mode 100644 index 00000000000..c4e3df84fb9 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.EdDSAJwsVerifier.md @@ -0,0 +1,54 @@ +# Class: EdDSAJwsVerifier + +[identity\_wasm](../modules/identity_wasm.md).EdDSAJwsVerifier + +An implementor of `IJwsVerifier` that can handle the +`EdDSA` algorithm. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.EdDSAJwsVerifier.md#constructor) + +### Methods + +- [verify](identity_wasm.EdDSAJwsVerifier.md#verify) + +## Constructors + +### constructor + +• **new EdDSAJwsVerifier**() + +Constructs an EdDSAJwsVerifier. + +## Methods + +### verify + +▸ **verify**(`alg`, `signingInput`, `decodedSignature`, `publicKey`): `void` + +Verify a JWS signature secured with the `EdDSA` algorithm. +Only the `Ed25519` curve is supported for now. + +This function is useful when one is building an `IJwsVerifier` that extends the default provided by +the IOTA Identity Framework. + +# Warning + +This function does not check whether `alg = EdDSA` in the protected header. Callers are expected to assert this +prior to calling the function. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alg` | [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) | +| `signingInput` | `Uint8Array` | +| `decodedSignature` | `Uint8Array` | +| `publicKey` | [`Jwk`](identity_wasm.Jwk.md) | + +#### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDID.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDID.md new file mode 100644 index 00000000000..5f16c3a71f0 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDID.md @@ -0,0 +1,357 @@ +# Class: IotaDID + +[identity\_wasm](../modules/identity_wasm.md).IotaDID + +A DID conforming to the IOTA DID method specification. + +**`Typicalname`** + +did + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.IotaDID.md#constructor) + +### Properties + +- [DEFAULT\_NETWORK](identity_wasm.IotaDID.md#default_network) +- [METHOD](identity_wasm.IotaDID.md#method-1) + +### Methods + +- [toJSON](identity_wasm.IotaDID.md#tojson) +- [toString](identity_wasm.IotaDID.md#tostring) +- [fromAliasId](identity_wasm.IotaDID.md#fromaliasid) +- [placeholder](identity_wasm.IotaDID.md#placeholder) +- [parse](identity_wasm.IotaDID.md#parse) +- [network](identity_wasm.IotaDID.md#network) +- [tag](identity_wasm.IotaDID.md#tag) +- [toCoreDid](identity_wasm.IotaDID.md#tocoredid) +- [scheme](identity_wasm.IotaDID.md#scheme) +- [authority](identity_wasm.IotaDID.md#authority) +- [method](identity_wasm.IotaDID.md#method) +- [methodId](identity_wasm.IotaDID.md#methodid) +- [join](identity_wasm.IotaDID.md#join) +- [toUrl](identity_wasm.IotaDID.md#tourl) +- [toAliasId](identity_wasm.IotaDID.md#toaliasid) +- [intoUrl](identity_wasm.IotaDID.md#intourl) +- [fromJSON](identity_wasm.IotaDID.md#fromjson) +- [clone](identity_wasm.IotaDID.md#clone) + +## Constructors + +### constructor + +• **new IotaDID**(`bytes`, `network`) + +Constructs a new [IotaDID](identity_wasm.IotaDID.md) from a byte representation of the tag and the given +network name. + +See also [placeholder](identity_wasm.IotaDID.md#placeholder). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `bytes` | `Uint8Array` | +| `network` | `string` | + +## Properties + +### DEFAULT\_NETWORK + +▪ `Static` `Readonly` **DEFAULT\_NETWORK**: `string` + +The default Tangle network (`"iota"`). + +___ + +### METHOD + +▪ `Static` `Readonly` **METHOD**: `string` + +The IOTA DID method name (`"iota"`). + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Returns the `DID` as a string. + +#### Returns + +`string` + +___ + +### fromAliasId + +▸ `Static` **fromAliasId**(`aliasId`, `network`): [`IotaDID`](identity_wasm.IotaDID.md) + +Constructs a new [IotaDID](identity_wasm.IotaDID.md) from a hex representation of an Alias Id and the given +network name. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `aliasId` | `string` | +| `network` | `string` | + +#### Returns + +[`IotaDID`](identity_wasm.IotaDID.md) + +___ + +### placeholder + +▸ `Static` **placeholder**(`network`): [`IotaDID`](identity_wasm.IotaDID.md) + +Creates a new placeholder [IotaDID](identity_wasm.IotaDID.md) with the given network name. + +E.g. `did:iota:smr:0x0000000000000000000000000000000000000000000000000000000000000000`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | `string` | + +#### Returns + +[`IotaDID`](identity_wasm.IotaDID.md) + +___ + +### parse + +▸ `Static` **parse**(`input`): [`IotaDID`](identity_wasm.IotaDID.md) + +Parses a [IotaDID](identity_wasm.IotaDID.md) from the input string. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `input` | `string` | + +#### Returns + +[`IotaDID`](identity_wasm.IotaDID.md) + +___ + +### network + +▸ **network**(): `string` + +Returns the Tangle network name of the [IotaDID](identity_wasm.IotaDID.md). + +#### Returns + +`string` + +___ + +### tag + +▸ **tag**(): `string` + +Returns a copy of the unique tag of the [IotaDID](identity_wasm.IotaDID.md). + +#### Returns + +`string` + +___ + +### toCoreDid + +▸ **toCoreDid**(): [`CoreDID`](identity_wasm.CoreDID.md) + +Returns the DID represented as a [CoreDID](identity_wasm.CoreDID.md). + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### scheme + +▸ **scheme**(): `string` + +Returns the `DID` scheme. + +E.g. +- `"did:example:12345678" -> "did"` +- `"did:iota:main:12345678" -> "did"` + +#### Returns + +`string` + +___ + +### authority + +▸ **authority**(): `string` + +Returns the `DID` authority: the method name and method-id. + +E.g. +- `"did:example:12345678" -> "example:12345678"` +- `"did:iota:main:12345678" -> "iota:main:12345678"` + +#### Returns + +`string` + +___ + +### method + +▸ **method**(): `string` + +Returns the `DID` method name. + +E.g. +- `"did:example:12345678" -> "example"` +- `"did:iota:main:12345678" -> "iota"` + +#### Returns + +`string` + +___ + +### methodId + +▸ **methodId**(): `string` + +Returns the `DID` method-specific ID. + +E.g. +- `"did:example:12345678" -> "12345678"` +- `"did:iota:main:12345678" -> "main:12345678"` + +#### Returns + +`string` + +___ + +### join + +▸ **join**(`segment`): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Construct a new [DIDUrl](identity_wasm.DIDUrl.md) by joining with a relative DID Url string. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `segment` | `string` | + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### toUrl + +▸ **toUrl**(): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Clones the `DID` into a [DIDUrl](identity_wasm.DIDUrl.md). + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### toAliasId + +▸ **toAliasId**(): `string` + +Returns the hex-encoded AliasId with a '0x' prefix, from the DID tag. + +#### Returns + +`string` + +___ + +### intoUrl + +▸ **intoUrl**(): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Converts the `DID` into a [DIDUrl](identity_wasm.DIDUrl.md), consuming it. + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`IotaDID`](identity_wasm.IotaDID.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`IotaDID`](identity_wasm.IotaDID.md) + +___ + +### clone + +▸ **clone**(): [`IotaDID`](identity_wasm.IotaDID.md) + +Deep clones the object. + +#### Returns + +[`IotaDID`](identity_wasm.IotaDID.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDocument.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDocument.md new file mode 100644 index 00000000000..956d0f3d862 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDocument.md @@ -0,0 +1,1059 @@ +# Class: IotaDocument + +[identity\_wasm](../modules/identity_wasm.md).IotaDocument + +A DID Document adhering to the IOTA DID method specification. + +Note: All methods that involve reading from this class may potentially raise an error +if the object is being concurrently modified. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.IotaDocument.md#constructor) + +### Methods + +- [toJSON](identity_wasm.IotaDocument.md#tojson) +- [toString](identity_wasm.IotaDocument.md#tostring) +- [newWithId](identity_wasm.IotaDocument.md#newwithid) +- [id](identity_wasm.IotaDocument.md#id) +- [controller](identity_wasm.IotaDocument.md#controller) +- [setController](identity_wasm.IotaDocument.md#setcontroller) +- [alsoKnownAs](identity_wasm.IotaDocument.md#alsoknownas) +- [setAlsoKnownAs](identity_wasm.IotaDocument.md#setalsoknownas) +- [properties](identity_wasm.IotaDocument.md#properties) +- [setPropertyUnchecked](identity_wasm.IotaDocument.md#setpropertyunchecked) +- [service](identity_wasm.IotaDocument.md#service) +- [insertService](identity_wasm.IotaDocument.md#insertservice) +- [removeService](identity_wasm.IotaDocument.md#removeservice) +- [resolveService](identity_wasm.IotaDocument.md#resolveservice) +- [methods](identity_wasm.IotaDocument.md#methods) +- [insertMethod](identity_wasm.IotaDocument.md#insertmethod) +- [removeMethod](identity_wasm.IotaDocument.md#removemethod) +- [resolveMethod](identity_wasm.IotaDocument.md#resolvemethod) +- [attachMethodRelationship](identity_wasm.IotaDocument.md#attachmethodrelationship) +- [detachMethodRelationship](identity_wasm.IotaDocument.md#detachmethodrelationship) +- [verifyJws](identity_wasm.IotaDocument.md#verifyjws) +- [pack](identity_wasm.IotaDocument.md#pack) +- [packWithEncoding](identity_wasm.IotaDocument.md#packwithencoding) +- [unpackFromOutput](identity_wasm.IotaDocument.md#unpackfromoutput) +- [unpackFromBlock](identity_wasm.IotaDocument.md#unpackfromblock) +- [metadata](identity_wasm.IotaDocument.md#metadata) +- [metadataCreated](identity_wasm.IotaDocument.md#metadatacreated) +- [setMetadataCreated](identity_wasm.IotaDocument.md#setmetadatacreated) +- [metadataUpdated](identity_wasm.IotaDocument.md#metadataupdated) +- [setMetadataUpdated](identity_wasm.IotaDocument.md#setmetadataupdated) +- [metadataDeactivated](identity_wasm.IotaDocument.md#metadatadeactivated) +- [setMetadataDeactivated](identity_wasm.IotaDocument.md#setmetadatadeactivated) +- [metadataStateControllerAddress](identity_wasm.IotaDocument.md#metadatastatecontrolleraddress) +- [metadataGovernorAddress](identity_wasm.IotaDocument.md#metadatagovernoraddress) +- [setMetadataPropertyUnchecked](identity_wasm.IotaDocument.md#setmetadatapropertyunchecked) +- [revokeCredentials](identity_wasm.IotaDocument.md#revokecredentials) +- [unrevokeCredentials](identity_wasm.IotaDocument.md#unrevokecredentials) +- [clone](identity_wasm.IotaDocument.md#clone) +- [\_shallowCloneInternal](identity_wasm.IotaDocument.md#_shallowcloneinternal) +- [\_strongCountInternal](identity_wasm.IotaDocument.md#_strongcountinternal) +- [fromJSON](identity_wasm.IotaDocument.md#fromjson) +- [toCoreDocument](identity_wasm.IotaDocument.md#tocoredocument) +- [generateMethod](identity_wasm.IotaDocument.md#generatemethod) +- [purgeMethod](identity_wasm.IotaDocument.md#purgemethod) +- [createJwt](identity_wasm.IotaDocument.md#createjwt) +- [createJws](identity_wasm.IotaDocument.md#createjws) +- [createCredentialJwt](identity_wasm.IotaDocument.md#createcredentialjwt) +- [createPresentationJwt](identity_wasm.IotaDocument.md#createpresentationjwt) +- [generateMethodJwp](identity_wasm.IotaDocument.md#generatemethodjwp) +- [createIssuedJwp](identity_wasm.IotaDocument.md#createissuedjwp) +- [createPresentedJwp](identity_wasm.IotaDocument.md#createpresentedjwp) +- [createCredentialJpt](identity_wasm.IotaDocument.md#createcredentialjpt) +- [createPresentationJpt](identity_wasm.IotaDocument.md#createpresentationjpt) + +## Constructors + +### constructor + +• **new IotaDocument**(`network`) + +Constructs an empty IOTA DID Document with a [placeholder](identity_wasm.IotaDID.md#placeholder) identifier +for the given `network`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | `string` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes to a plain JS representation. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### newWithId + +▸ `Static` **newWithId**(`id`): [`IotaDocument`](identity_wasm.IotaDocument.md) + +Constructs an empty DID Document with the given identifier. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | [`IotaDID`](identity_wasm.IotaDID.md) | + +#### Returns + +[`IotaDocument`](identity_wasm.IotaDocument.md) + +___ + +### id + +▸ **id**(): [`IotaDID`](identity_wasm.IotaDID.md) + +Returns a copy of the DID Document `id`. + +#### Returns + +[`IotaDID`](identity_wasm.IotaDID.md) + +___ + +### controller + +▸ **controller**(): [`IotaDID`](identity_wasm.IotaDID.md)[] + +Returns a copy of the list of document controllers. + +NOTE: controllers are determined by the `state_controller` unlock condition of the output +during resolution and are omitted when publishing. + +#### Returns + +[`IotaDID`](identity_wasm.IotaDID.md)[] + +___ + +### setController + +▸ **setController**(`controller`): `void` + +Sets the controllers of the document. + +Note: Duplicates will be ignored. +Use `null` to remove all controllers. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `controller` | ``null`` \| [`IotaDID`](identity_wasm.IotaDID.md)[] | + +#### Returns + +`void` + +___ + +### alsoKnownAs + +▸ **alsoKnownAs**(): `string`[] + +Returns a copy of the document's `alsoKnownAs` set. + +#### Returns + +`string`[] + +___ + +### setAlsoKnownAs + +▸ **setAlsoKnownAs**(`urls`): `void` + +Sets the `alsoKnownAs` property in the DID document. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `urls` | ``null`` \| `string` \| `string`[] | + +#### Returns + +`void` + +___ + +### properties + +▸ **properties**(): `Map`\<`string`, `any`\> + +Returns a copy of the custom DID Document properties. + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### setPropertyUnchecked + +▸ **setPropertyUnchecked**(`key`, `value`): `void` + +Sets a custom property in the DID Document. +If the value is set to `null`, the custom property will be removed. + +### WARNING + +This method can overwrite existing properties like `id` and result in an invalid document. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | +| `value` | `any` | + +#### Returns + +`void` + +___ + +### service + +▸ **service**(): [`Service`](identity_wasm.Service.md)[] + +Return a set of all [Service](identity_wasm.Service.md) in the document. + +#### Returns + +[`Service`](identity_wasm.Service.md)[] + +___ + +### insertService + +▸ **insertService**(`service`): `void` + +Add a new [Service](identity_wasm.Service.md) to the document. + +Returns `true` if the service was added. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `service` | [`Service`](identity_wasm.Service.md) | + +#### Returns + +`void` + +___ + +### removeService + +▸ **removeService**(`did`): `undefined` \| [`Service`](identity_wasm.Service.md) + +Remove a [Service](identity_wasm.Service.md) identified by the given [DIDUrl](identity_wasm.DIDUrl.md) from the document. + +Returns `true` if a service was removed. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`undefined` \| [`Service`](identity_wasm.Service.md) + +___ + +### resolveService + +▸ **resolveService**(`query`): `undefined` \| [`Service`](identity_wasm.Service.md) + +Returns the first [Service](identity_wasm.Service.md) with an `id` property matching the provided `query`, +if present. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `query` | `string` \| [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`undefined` \| [`Service`](identity_wasm.Service.md) + +___ + +### methods + +▸ **methods**(`scope?`): [`VerificationMethod`](identity_wasm.VerificationMethod.md)[] + +Returns a list of all [VerificationMethod](identity_wasm.VerificationMethod.md) in the DID Document, +whose verification relationship matches `scope`. + +If `scope` is not set, a list over the **embedded** methods is returned. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `scope?` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +[`VerificationMethod`](identity_wasm.VerificationMethod.md)[] + +___ + +### insertMethod + +▸ **insertMethod**(`method`, `scope`): `void` + +Adds a new `method` to the document in the given `scope`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `method` | [`VerificationMethod`](identity_wasm.VerificationMethod.md) | +| `scope` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +`void` + +___ + +### removeMethod + +▸ **removeMethod**(`did`): `undefined` \| [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +Removes all references to the specified Verification Method. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`undefined` \| [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +___ + +### resolveMethod + +▸ **resolveMethod**(`query`, `scope?`): `undefined` \| [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +Returns a copy of the first verification method with an `id` property +matching the provided `query` and the verification relationship +specified by `scope`, if present. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `query` | `string` \| [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `scope?` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +`undefined` \| [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +___ + +### attachMethodRelationship + +▸ **attachMethodRelationship**(`didUrl`, `relationship`): `boolean` + +Attaches the relationship to the given method, if the method exists. + +Note: The method needs to be in the set of verification methods, +so it cannot be an embedded one. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `didUrl` | [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `relationship` | [`MethodRelationship`](../enums/identity_wasm.MethodRelationship.md) | + +#### Returns + +`boolean` + +___ + +### detachMethodRelationship + +▸ **detachMethodRelationship**(`didUrl`, `relationship`): `boolean` + +Detaches the given relationship from the given method, if the method exists. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `didUrl` | [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `relationship` | [`MethodRelationship`](../enums/identity_wasm.MethodRelationship.md) | + +#### Returns + +`boolean` + +___ + +### verifyJws + +▸ **verifyJws**(`jws`, `options`, `signatureVerifier?`, `detachedPayload?`): [`DecodedJws`](identity_wasm.DecodedJws.md) + +Decodes and verifies the provided JWS according to the passed `options` and `signatureVerifier`. +If a `signatureVerifier` is provided it will be used when +verifying decoded JWS signatures, otherwise a default verifier capable of handling the `EdDSA`, `ES256`, `ES256K` +algorithms will be used. + +Regardless of which options are passed the following conditions must be met in order for a verification attempt to +take place. +- The JWS must be encoded according to the JWS compact serialization. +- The `kid` value in the protected header must be an identifier of a verification method in this DID document. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jws` | [`Jws`](identity_wasm.Jws.md) | +| `options` | [`JwsVerificationOptions`](identity_wasm.JwsVerificationOptions.md) | +| `signatureVerifier?` | [`IJwsVerifier`](../interfaces/identity_wasm.IJwsVerifier.md) | +| `detachedPayload?` | `string` | + +#### Returns + +[`DecodedJws`](identity_wasm.DecodedJws.md) + +___ + +### pack + +▸ **pack**(): `Uint8Array` + +Serializes the document for inclusion in an Alias Output's state metadata +with the default [StateMetadataEncoding](../enums/identity_wasm.StateMetadataEncoding.md). + +#### Returns + +`Uint8Array` + +___ + +### packWithEncoding + +▸ **packWithEncoding**(`encoding`): `Uint8Array` + +Serializes the document for inclusion in an Alias Output's state metadata. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `encoding` | [`Json`](../enums/identity_wasm.StateMetadataEncoding.md#json) | + +#### Returns + +`Uint8Array` + +___ + +### unpackFromOutput + +▸ `Static` **unpackFromOutput**(`did`, `aliasOutput`, `allowEmpty`): [`IotaDocument`](identity_wasm.IotaDocument.md) + +Deserializes the document from an Alias Output. + +If `allowEmpty` is true, this will return an empty DID document marked as `deactivated` +if `stateMetadata` is empty. + +The `tokenSupply` must be equal to the token supply of the network the DID is associated with. + +NOTE: `did` is required since it is omitted from the serialized DID Document and +cannot be inferred from the state metadata. It also indicates the network, which is not +encoded in the `AliasId` alone. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`IotaDID`](identity_wasm.IotaDID.md) | +| `aliasOutput` | `AliasOutputBuilderParams` | +| `allowEmpty` | `boolean` | + +#### Returns + +[`IotaDocument`](identity_wasm.IotaDocument.md) + +___ + +### unpackFromBlock + +▸ `Static` **unpackFromBlock**(`network`, `block`): [`IotaDocument`](identity_wasm.IotaDocument.md)[] + +Returns all DID documents of the Alias Outputs contained in the block's transaction payload +outputs, if any. + +Errors if any Alias Output does not contain a valid or empty DID Document. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `network` | `string` | +| `block` | `Block` | + +#### Returns + +[`IotaDocument`](identity_wasm.IotaDocument.md)[] + +___ + +### metadata + +▸ **metadata**(): [`IotaDocumentMetadata`](identity_wasm.IotaDocumentMetadata.md) + +Returns a copy of the metadata associated with this document. + +NOTE: Copies all the metadata. See also `metadataCreated`, `metadataUpdated`, +`metadataPreviousMessageId`, `metadataProof` if only a subset of the metadata required. + +#### Returns + +[`IotaDocumentMetadata`](identity_wasm.IotaDocumentMetadata.md) + +___ + +### metadataCreated + +▸ **metadataCreated**(): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +Returns a copy of the timestamp of when the DID document was created. + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### setMetadataCreated + +▸ **setMetadataCreated**(`timestamp`): `void` + +Sets the timestamp of when the DID document was created. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `timestamp` | `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) | + +#### Returns + +`void` + +___ + +### metadataUpdated + +▸ **metadataUpdated**(): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +Returns a copy of the timestamp of the last DID document update. + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### setMetadataUpdated + +▸ **setMetadataUpdated**(`timestamp`): `void` + +Sets the timestamp of the last DID document update. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `timestamp` | `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) | + +#### Returns + +`void` + +___ + +### metadataDeactivated + +▸ **metadataDeactivated**(): `undefined` \| `boolean` + +Returns a copy of the deactivated status of the DID document. + +#### Returns + +`undefined` \| `boolean` + +___ + +### setMetadataDeactivated + +▸ **setMetadataDeactivated**(`deactivated?`): `void` + +Sets the deactivated status of the DID document. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `deactivated?` | `boolean` | + +#### Returns + +`void` + +___ + +### metadataStateControllerAddress + +▸ **metadataStateControllerAddress**(): `undefined` \| `string` + +Returns a copy of the Bech32-encoded state controller address, if present. + +#### Returns + +`undefined` \| `string` + +___ + +### metadataGovernorAddress + +▸ **metadataGovernorAddress**(): `undefined` \| `string` + +Returns a copy of the Bech32-encoded governor address, if present. + +#### Returns + +`undefined` \| `string` + +___ + +### setMetadataPropertyUnchecked + +▸ **setMetadataPropertyUnchecked**(`key`, `value`): `void` + +Sets a custom property in the document metadata. +If the value is set to `null`, the custom property will be removed. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | +| `value` | `any` | + +#### Returns + +`void` + +___ + +### revokeCredentials + +▸ **revokeCredentials**(`serviceQuery`, `indices`): `void` + +If the document has a [RevocationBitmap](identity_wasm.RevocationBitmap.md) service identified by `serviceQuery`, +revoke all specified `indices`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `serviceQuery` | `string` \| [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `indices` | `number` \| `number`[] | + +#### Returns + +`void` + +___ + +### unrevokeCredentials + +▸ **unrevokeCredentials**(`serviceQuery`, `indices`): `void` + +If the document has a [RevocationBitmap](identity_wasm.RevocationBitmap.md) service identified by `serviceQuery`, +unrevoke all specified `indices`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `serviceQuery` | `string` \| [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `indices` | `number` \| `number`[] | + +#### Returns + +`void` + +___ + +### clone + +▸ **clone**(): [`IotaDocument`](identity_wasm.IotaDocument.md) + +Returns a deep clone of the [IotaDocument](identity_wasm.IotaDocument.md). + +#### Returns + +[`IotaDocument`](identity_wasm.IotaDocument.md) + +___ + +### \_shallowCloneInternal + +▸ **_shallowCloneInternal**(): [`IotaDocument`](identity_wasm.IotaDocument.md) + +### Warning +This is for internal use only. Do not rely on or call this method. + +#### Returns + +[`IotaDocument`](identity_wasm.IotaDocument.md) + +___ + +### \_strongCountInternal + +▸ **_strongCountInternal**(): `number` + +### Warning +This is for internal use only. Do not rely on or call this method. + +#### Returns + +`number` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`IotaDocument`](identity_wasm.IotaDocument.md) + +Deserializes an instance from a plain JS representation. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`IotaDocument`](identity_wasm.IotaDocument.md) + +___ + +### toCoreDocument + +▸ **toCoreDocument**(): [`CoreDocument`](identity_wasm.CoreDocument.md) + +Transforms the [IotaDocument](identity_wasm.IotaDocument.md) to its [CoreDocument](identity_wasm.CoreDocument.md) representation. + +#### Returns + +[`CoreDocument`](identity_wasm.CoreDocument.md) + +___ + +### generateMethod + +▸ **generateMethod**(`storage`, `keyType`, `alg`, `fragment`, `scope`): `Promise`\<`string`\> + +Generate new key material in the given `storage` and insert a new verification method with the corresponding +public key material into the DID document. + +- If no fragment is given the `kid` of the generated JWK is used, if it is set, otherwise an error is returned. +- The `keyType` must be compatible with the given `storage`. `Storage`s are expected to export key type constants +for that use case. + +The fragment of the generated method is returned. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `keyType` | `string` | +| `alg` | [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) | +| `fragment` | `undefined` \| `string` | +| `scope` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +`Promise`\<`string`\> + +___ + +### purgeMethod + +▸ **purgeMethod**(`storage`, `id`): `Promise`\<`void`\> + +Remove the method identified by the given fragment from the document and delete the corresponding key material in +the given `storage`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `id` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`Promise`\<`void`\> + +___ + +### createJwt + +▸ **createJwt**(`storage`, `fragment`, `payload`, `options`): `Promise`\<[`Jws`](identity_wasm.Jws.md)\> + +Sign the `payload` according to `options` with the storage backed private key corresponding to the public key +material in the verification method identified by the given `fragment. + +Upon success a string representing a JWS encoded according to the Compact JWS Serialization format is returned. +See [RFC7515 section 3.1](https://www.rfc-editor.org/rfc/rfc7515#section-3.1). + +@deprecated Use `createJws()` instead. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `payload` | `string` | +| `options` | [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) | + +#### Returns + +`Promise`\<[`Jws`](identity_wasm.Jws.md)\> + +___ + +### createJws + +▸ **createJws**(`storage`, `fragment`, `payload`, `options`): `Promise`\<[`Jws`](identity_wasm.Jws.md)\> + +Sign the `payload` according to `options` with the storage backed private key corresponding to the public key +material in the verification method identified by the given `fragment. + +Upon success a string representing a JWS encoded according to the Compact JWS Serialization format is returned. +See [RFC7515 section 3.1](https://www.rfc-editor.org/rfc/rfc7515#section-3.1). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `payload` | `string` | +| `options` | [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) | + +#### Returns + +`Promise`\<[`Jws`](identity_wasm.Jws.md)\> + +___ + +### createCredentialJwt + +▸ **createCredentialJwt**(`storage`, `fragment`, `credential`, `options`, `custom_claims?`): `Promise`\<[`Jwt`](identity_wasm.Jwt.md)\> + +Produces a JWS where the payload is produced from the given `credential` +in accordance with [VC Data Model v1.1](https://www.w3.org/TR/vc-data-model/#json-web-token). + +Unless the `kid` is explicitly set in the options, the `kid` in the protected header is the `id` +of the method identified by `fragment` and the JWS signature will be produced by the corresponding +private key backed by the `storage` in accordance with the passed `options`. + +The `custom_claims` can be used to set additional claims on the resulting JWT. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `options` | [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) | +| `custom_claims?` | `Record`\<`string`, `any`\> | + +#### Returns + +`Promise`\<[`Jwt`](identity_wasm.Jwt.md)\> + +___ + +### createPresentationJwt + +▸ **createPresentationJwt**(`storage`, `fragment`, `presentation`, `signature_options`, `presentation_options`): `Promise`\<[`Jwt`](identity_wasm.Jwt.md)\> + +Produces a JWT where the payload is produced from the given presentation. +in accordance with [VC Data Model v1.1](https://www.w3.org/TR/vc-data-model/#json-web-token). + +Unless the `kid` is explicitly set in the options, the `kid` in the protected header is the `id` +of the method identified by `fragment` and the JWS signature will be produced by the corresponding +private key backed by the `storage` in accordance with the passed `options`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `presentation` | [`Presentation`](identity_wasm.Presentation.md) | +| `signature_options` | [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) | +| `presentation_options` | [`JwtPresentationOptions`](identity_wasm.JwtPresentationOptions.md) | + +#### Returns + +`Promise`\<[`Jwt`](identity_wasm.Jwt.md)\> + +___ + +### generateMethodJwp + +▸ **generateMethodJwp**(`storage`, `alg`, `fragment`, `scope`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `alg` | [`ProofAlgorithm`](../enums/identity_wasm.ProofAlgorithm.md) | +| `fragment` | `undefined` \| `string` | +| `scope` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +`Promise`\<`string`\> + +___ + +### createIssuedJwp + +▸ **createIssuedJwp**(`storage`, `fragment`, `jpt_claims`, `options`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `jpt_claims` | [`JptClaims`](../interfaces/identity_wasm.JptClaims.md) | +| `options` | [`JwpCredentialOptions`](identity_wasm.JwpCredentialOptions.md) | + +#### Returns + +`Promise`\<`string`\> + +___ + +### createPresentedJwp + +▸ **createPresentedJwp**(`presentation`, `method_id`, `options`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `presentation` | [`SelectiveDisclosurePresentation`](identity_wasm.SelectiveDisclosurePresentation.md) | +| `method_id` | `string` | +| `options` | [`JwpPresentationOptions`](identity_wasm.JwpPresentationOptions.md) | + +#### Returns + +`Promise`\<`string`\> + +___ + +### createCredentialJpt + +▸ **createCredentialJpt**(`credential`, `storage`, `fragment`, `options`, `custom_claims?`): `Promise`\<[`Jpt`](identity_wasm.Jpt.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `storage` | [`Storage`](identity_wasm.Storage.md) | +| `fragment` | `string` | +| `options` | [`JwpCredentialOptions`](identity_wasm.JwpCredentialOptions.md) | +| `custom_claims?` | `Map`\<`string`, `any`\> | + +#### Returns + +`Promise`\<[`Jpt`](identity_wasm.Jpt.md)\> + +___ + +### createPresentationJpt + +▸ **createPresentationJpt**(`presentation`, `method_id`, `options`): `Promise`\<[`Jpt`](identity_wasm.Jpt.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `presentation` | [`SelectiveDisclosurePresentation`](identity_wasm.SelectiveDisclosurePresentation.md) | +| `method_id` | `string` | +| `options` | [`JwpPresentationOptions`](identity_wasm.JwpPresentationOptions.md) | + +#### Returns + +`Promise`\<[`Jpt`](identity_wasm.Jpt.md)\> diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDocumentMetadata.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDocumentMetadata.md new file mode 100644 index 00000000000..4a55a1c1715 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaDocumentMetadata.md @@ -0,0 +1,154 @@ +# Class: IotaDocumentMetadata + +[identity\_wasm](../modules/identity_wasm.md).IotaDocumentMetadata + +Additional attributes related to an IOTA DID Document. + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.IotaDocumentMetadata.md#tojson) +- [toString](identity_wasm.IotaDocumentMetadata.md#tostring) +- [created](identity_wasm.IotaDocumentMetadata.md#created) +- [updated](identity_wasm.IotaDocumentMetadata.md#updated) +- [deactivated](identity_wasm.IotaDocumentMetadata.md#deactivated) +- [stateControllerAddress](identity_wasm.IotaDocumentMetadata.md#statecontrolleraddress) +- [governorAddress](identity_wasm.IotaDocumentMetadata.md#governoraddress) +- [properties](identity_wasm.IotaDocumentMetadata.md#properties) +- [fromJSON](identity_wasm.IotaDocumentMetadata.md#fromjson) +- [clone](identity_wasm.IotaDocumentMetadata.md#clone) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### created + +▸ **created**(): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +Returns a copy of the timestamp of when the DID document was created. + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### updated + +▸ **updated**(): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +Returns a copy of the timestamp of the last DID document update. + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### deactivated + +▸ **deactivated**(): `undefined` \| `boolean` + +Returns a copy of the deactivated status of the DID document. + +#### Returns + +`undefined` \| `boolean` + +___ + +### stateControllerAddress + +▸ **stateControllerAddress**(): `undefined` \| `string` + +Returns a copy of the Bech32-encoded state controller address, if present. + +#### Returns + +`undefined` \| `string` + +___ + +### governorAddress + +▸ **governorAddress**(): `undefined` \| `string` + +Returns a copy of the Bech32-encoded governor address, if present. + +#### Returns + +`undefined` \| `string` + +___ + +### properties + +▸ **properties**(): `Map`\<`string`, `any`\> + +Returns a copy of the custom metadata properties. + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`IotaDocumentMetadata`](identity_wasm.IotaDocumentMetadata.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`IotaDocumentMetadata`](identity_wasm.IotaDocumentMetadata.md) + +___ + +### clone + +▸ **clone**(): [`IotaDocumentMetadata`](identity_wasm.IotaDocumentMetadata.md) + +Deep clones the object. + +#### Returns + +[`IotaDocumentMetadata`](identity_wasm.IotaDocumentMetadata.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaIdentityClientExt.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaIdentityClientExt.md new file mode 100644 index 00000000000..0f47887c248 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IotaIdentityClientExt.md @@ -0,0 +1,132 @@ +# Class: IotaIdentityClientExt + +[identity\_wasm](../modules/identity_wasm.md).IotaIdentityClientExt + +An extension interface that provides helper functions for publication +and resolution of DID documents in Alias Outputs. + +## Table of contents + +### Methods + +- [newDidOutput](identity_wasm.IotaIdentityClientExt.md#newdidoutput) +- [updateDidOutput](identity_wasm.IotaIdentityClientExt.md#updatedidoutput) +- [deactivateDidOutput](identity_wasm.IotaIdentityClientExt.md#deactivatedidoutput) +- [resolveDid](identity_wasm.IotaIdentityClientExt.md#resolvedid) +- [resolveDidOutput](identity_wasm.IotaIdentityClientExt.md#resolvedidoutput) + +## Methods + +### newDidOutput + +▸ `Static` **newDidOutput**(`client`, `address`, `document`, `rentStructure?`): `Promise`\<`AliasOutputBuilderParams`\> + +Create a DID with a new Alias Output containing the given `document`. + +The `address` will be set as the state controller and governor unlock conditions. +The minimum required token deposit amount will be set according to the given +`rent_structure`, which will be fetched from the node if not provided. +The returned Alias Output can be further customised before publication, if desired. + +NOTE: this does *not* publish the Alias Output. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `client` | [`IIotaIdentityClient`](../interfaces/identity_wasm.IIotaIdentityClient.md) | +| `address` | `Address` | +| `document` | [`IotaDocument`](identity_wasm.IotaDocument.md) | +| `rentStructure?` | `IRent` | + +#### Returns + +`Promise`\<`AliasOutputBuilderParams`\> + +___ + +### updateDidOutput + +▸ `Static` **updateDidOutput**(`client`, `document`): `Promise`\<`AliasOutputBuilderParams`\> + +Fetches the associated Alias Output and updates it with `document` in its state metadata. +The storage deposit on the output is left unchanged. If the size of the document increased, +the amount should be increased manually. + +NOTE: this does *not* publish the updated Alias Output. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `client` | [`IIotaIdentityClient`](../interfaces/identity_wasm.IIotaIdentityClient.md) | +| `document` | [`IotaDocument`](identity_wasm.IotaDocument.md) | + +#### Returns + +`Promise`\<`AliasOutputBuilderParams`\> + +___ + +### deactivateDidOutput + +▸ `Static` **deactivateDidOutput**(`client`, `did`): `Promise`\<`AliasOutputBuilderParams`\> + +Removes the DID document from the state metadata of its Alias Output, +effectively deactivating it. The storage deposit on the output is left unchanged, +and should be reallocated manually. + +Deactivating does not destroy the output. Hence, it can be re-activated by publishing +an update containing a DID document. + +NOTE: this does *not* publish the updated Alias Output. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `client` | [`IIotaIdentityClient`](../interfaces/identity_wasm.IIotaIdentityClient.md) | +| `did` | [`IotaDID`](identity_wasm.IotaDID.md) | + +#### Returns + +`Promise`\<`AliasOutputBuilderParams`\> + +___ + +### resolveDid + +▸ `Static` **resolveDid**(`client`, `did`): `Promise`\<[`IotaDocument`](identity_wasm.IotaDocument.md)\> + +Resolve a [IotaDocument](identity_wasm.IotaDocument.md). Returns an empty, deactivated document if the state metadata +of the Alias Output is empty. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `client` | [`IIotaIdentityClient`](../interfaces/identity_wasm.IIotaIdentityClient.md) | +| `did` | [`IotaDID`](identity_wasm.IotaDID.md) | + +#### Returns + +`Promise`\<[`IotaDocument`](identity_wasm.IotaDocument.md)\> + +___ + +### resolveDidOutput + +▸ `Static` **resolveDidOutput**(`client`, `did`): `Promise`\<`AliasOutputBuilderParams`\> + +Fetches the `IAliasOutput` associated with the given DID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `client` | [`IIotaIdentityClient`](../interfaces/identity_wasm.IIotaIdentityClient.md) | +| `did` | [`IotaDID`](identity_wasm.IotaDID.md) | + +#### Returns + +`Promise`\<`AliasOutputBuilderParams`\> diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.IssuerProtectedHeader.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IssuerProtectedHeader.md new file mode 100644 index 00000000000..c397f4f2490 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.IssuerProtectedHeader.md @@ -0,0 +1,84 @@ +# Class: IssuerProtectedHeader + +[identity\_wasm](../modules/identity_wasm.md).IssuerProtectedHeader + +## Table of contents + +### Properties + +- [alg](identity_wasm.IssuerProtectedHeader.md#alg) +- [cid](identity_wasm.IssuerProtectedHeader.md#cid) +- [kid](identity_wasm.IssuerProtectedHeader.md#kid) +- [typ](identity_wasm.IssuerProtectedHeader.md#typ) + +### Methods + +- [toJSON](identity_wasm.IssuerProtectedHeader.md#tojson) +- [toString](identity_wasm.IssuerProtectedHeader.md#tostring) +- [claims](identity_wasm.IssuerProtectedHeader.md#claims) + +## Properties + +### alg + +• **alg**: [`ProofAlgorithm`](../enums/identity_wasm.ProofAlgorithm.md) + +Algorithm used for the JWP. + +___ + +### cid + +• `Optional` **cid**: `string` + +Not handled for now. Will be used in the future to resolve external claims + +___ + +### kid + +• `Optional` **kid**: `string` + +ID for the key used for the JWP. + +___ + +### typ + +• `Optional` **typ**: `string` + +JWP type (JPT). + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### claims + +▸ **claims**(): `string`[] + +#### Returns + +`string`[] diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jpt.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jpt.md new file mode 100644 index 00000000000..9ce19d9e3d8 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jpt.md @@ -0,0 +1,52 @@ +# Class: Jpt + +[identity\_wasm](../modules/identity_wasm.md).Jpt + +A JSON Proof Token (JPT). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Jpt.md#constructor) + +### Methods + +- [toString](identity_wasm.Jpt.md#tostring) +- [clone](identity_wasm.Jpt.md#clone) + +## Constructors + +### constructor + +• **new Jpt**(`jpt_string`) + +Creates a new [Jpt](identity_wasm.Jpt.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jpt_string` | `string` | + +## Methods + +### toString + +▸ **toString**(): `string` + +#### Returns + +`string` + +___ + +### clone + +▸ **clone**(): [`Jpt`](identity_wasm.Jpt.md) + +Deep clones the object. + +#### Returns + +[`Jpt`](identity_wasm.Jpt.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidationOptions.md new file mode 100644 index 00000000000..5a3f8f86cd4 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidationOptions.md @@ -0,0 +1,94 @@ +# Class: JptCredentialValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).JptCredentialValidationOptions + +Options to declare validation criteria for [Jpt](identity_wasm.Jpt.md). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JptCredentialValidationOptions.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JptCredentialValidationOptions.md#tojson) +- [toString](identity_wasm.JptCredentialValidationOptions.md#tostring) +- [clone](identity_wasm.JptCredentialValidationOptions.md#clone) +- [fromJSON](identity_wasm.JptCredentialValidationOptions.md#fromjson) + +## Constructors + +### constructor + +• **new JptCredentialValidationOptions**(`opts?`) + +Creates a new default istance. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `opts?` | [`IJptCredentialValidationOptions`](../interfaces/identity_wasm.IJptCredentialValidationOptions.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### clone + +▸ **clone**(): [`JptCredentialValidationOptions`](identity_wasm.JptCredentialValidationOptions.md) + +Deep clones the object. + +#### Returns + +[`JptCredentialValidationOptions`](identity_wasm.JptCredentialValidationOptions.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JptCredentialValidationOptions`](identity_wasm.JptCredentialValidationOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JptCredentialValidationOptions`](identity_wasm.JptCredentialValidationOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidator.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidator.md new file mode 100644 index 00000000000..3d07ff20f59 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidator.md @@ -0,0 +1,28 @@ +# Class: JptCredentialValidator + +[identity\_wasm](../modules/identity_wasm.md).JptCredentialValidator + +## Table of contents + +### Methods + +- [validate](identity_wasm.JptCredentialValidator.md#validate) + +## Methods + +### validate + +▸ `Static` **validate**(`credential_jpt`, `issuer`, `options`, `fail_fast`): [`DecodedJptCredential`](identity_wasm.DecodedJptCredential.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential_jpt` | [`Jpt`](identity_wasm.Jpt.md) | +| `issuer` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `options` | [`JptCredentialValidationOptions`](identity_wasm.JptCredentialValidationOptions.md) | +| `fail_fast` | [`FailFast`](../enums/identity_wasm.FailFast.md) | + +#### Returns + +[`DecodedJptCredential`](identity_wasm.DecodedJptCredential.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidatorUtils.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidatorUtils.md new file mode 100644 index 00000000000..9a464875a87 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptCredentialValidatorUtils.md @@ -0,0 +1,128 @@ +# Class: JptCredentialValidatorUtils + +[identity\_wasm](../modules/identity_wasm.md).JptCredentialValidatorUtils + +Utility functions for validating JPT credentials. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JptCredentialValidatorUtils.md#constructor) + +### Methods + +- [extractIssuer](identity_wasm.JptCredentialValidatorUtils.md#extractissuer) +- [extractIssuerFromIssuedJpt](identity_wasm.JptCredentialValidatorUtils.md#extractissuerfromissuedjpt) +- [checkTimeframesWithValidityTimeframe2024](identity_wasm.JptCredentialValidatorUtils.md#checktimeframeswithvaliditytimeframe2024) +- [checkRevocationWithValidityTimeframe2024](identity_wasm.JptCredentialValidatorUtils.md#checkrevocationwithvaliditytimeframe2024) +- [checkTimeframesAndRevocationWithValidityTimeframe2024](identity_wasm.JptCredentialValidatorUtils.md#checktimeframesandrevocationwithvaliditytimeframe2024) + +## Constructors + +### constructor + +• **new JptCredentialValidatorUtils**() + +## Methods + +### extractIssuer + +▸ `Static` **extractIssuer**(`credential`): [`CoreDID`](identity_wasm.CoreDID.md) + +Utility for extracting the issuer field of a [Credential](identity_wasm.Credential.md) as a DID. +# Errors +Fails if the issuer field is not a valid DID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### extractIssuerFromIssuedJpt + +▸ `Static` **extractIssuerFromIssuedJpt**(`credential`): [`CoreDID`](identity_wasm.CoreDID.md) + +Utility for extracting the issuer field of a credential in JPT representation as DID. +# Errors +If the JPT decoding fails or the issuer field is not a valid DID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Jpt`](identity_wasm.Jpt.md) | + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### checkTimeframesWithValidityTimeframe2024 + +▸ `Static` **checkTimeframesWithValidityTimeframe2024**(`credential`, `validity_timeframe`, `status_check`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `validity_timeframe` | `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) | +| `status_check` | [`StatusCheck`](../enums/identity_wasm.StatusCheck.md) | + +#### Returns + +`void` + +___ + +### checkRevocationWithValidityTimeframe2024 + +▸ `Static` **checkRevocationWithValidityTimeframe2024**(`credential`, `issuer`, `status_check`): `void` + +Checks whether the credential status has been revoked. + +Only supports `RevocationTimeframe2024`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `issuer` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `status_check` | [`StatusCheck`](../enums/identity_wasm.StatusCheck.md) | + +#### Returns + +`void` + +___ + +### checkTimeframesAndRevocationWithValidityTimeframe2024 + +▸ `Static` **checkTimeframesAndRevocationWithValidityTimeframe2024**(`credential`, `issuer`, `validity_timeframe`, `status_check`): `void` + +Checks whether the credential status has been revoked or the timeframe interval is INVALID + +Only supports `RevocationTimeframe2024`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `issuer` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `validity_timeframe` | `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) | +| `status_check` | [`StatusCheck`](../enums/identity_wasm.StatusCheck.md) | + +#### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidationOptions.md new file mode 100644 index 00000000000..2524b51f00d --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidationOptions.md @@ -0,0 +1,92 @@ +# Class: JptPresentationValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).JptPresentationValidationOptions + +Options to declare validation criteria for a [Jpt](identity_wasm.Jpt.md) presentation. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JptPresentationValidationOptions.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JptPresentationValidationOptions.md#tojson) +- [toString](identity_wasm.JptPresentationValidationOptions.md#tostring) +- [clone](identity_wasm.JptPresentationValidationOptions.md#clone) +- [fromJSON](identity_wasm.JptPresentationValidationOptions.md#fromjson) + +## Constructors + +### constructor + +• **new JptPresentationValidationOptions**(`opts?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `opts?` | [`IJptPresentationValidationOptions`](../interfaces/identity_wasm.IJptPresentationValidationOptions.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### clone + +▸ **clone**(): [`JptPresentationValidationOptions`](identity_wasm.JptPresentationValidationOptions.md) + +Deep clones the object. + +#### Returns + +[`JptPresentationValidationOptions`](identity_wasm.JptPresentationValidationOptions.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JptPresentationValidationOptions`](identity_wasm.JptPresentationValidationOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JptPresentationValidationOptions`](identity_wasm.JptPresentationValidationOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidator.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidator.md new file mode 100644 index 00000000000..1b8afe8e778 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidator.md @@ -0,0 +1,37 @@ +# Class: JptPresentationValidator + +[identity\_wasm](../modules/identity_wasm.md).JptPresentationValidator + +## Table of contents + +### Methods + +- [validate](identity_wasm.JptPresentationValidator.md#validate) + +## Methods + +### validate + +▸ `Static` **validate**(`presentation_jpt`, `issuer`, `options`, `fail_fast`): [`DecodedJptPresentation`](identity_wasm.DecodedJptPresentation.md) + +Decodes and validates a Presented [Credential](identity_wasm.Credential.md) issued as a JPT (JWP Presented Form). A +[DecodedJptPresentation](identity_wasm.DecodedJptPresentation.md) is returned upon success. + +The following properties are validated according to `options`: +- the holder's proof on the JWP, +- the expiration date, +- the issuance date, +- the semantic structure. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `presentation_jpt` | [`Jpt`](identity_wasm.Jpt.md) | +| `issuer` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `options` | [`JptPresentationValidationOptions`](identity_wasm.JptPresentationValidationOptions.md) | +| `fail_fast` | [`FailFast`](../enums/identity_wasm.FailFast.md) | + +#### Returns + +[`DecodedJptPresentation`](identity_wasm.DecodedJptPresentation.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidatorUtils.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidatorUtils.md new file mode 100644 index 00000000000..9795df06379 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JptPresentationValidatorUtils.md @@ -0,0 +1,52 @@ +# Class: JptPresentationValidatorUtils + +[identity\_wasm](../modules/identity_wasm.md).JptPresentationValidatorUtils + +Utility functions for verifying JPT presentations. + +## Table of contents + +### Methods + +- [extractIssuerFromPresentedJpt](identity_wasm.JptPresentationValidatorUtils.md#extractissuerfrompresentedjpt) +- [checkTimeframesWithValidityTimeframe2024](identity_wasm.JptPresentationValidatorUtils.md#checktimeframeswithvaliditytimeframe2024) + +## Methods + +### extractIssuerFromPresentedJpt + +▸ `Static` **extractIssuerFromPresentedJpt**(`presentation`): [`CoreDID`](identity_wasm.CoreDID.md) + +Utility for extracting the issuer field of a credential in JPT representation as DID. +# Errors +If the JPT decoding fails or the issuer field is not a valid DID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `presentation` | [`Jpt`](identity_wasm.Jpt.md) | + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### checkTimeframesWithValidityTimeframe2024 + +▸ `Static` **checkTimeframesWithValidityTimeframe2024**(`credential`, `validity_timeframe`, `status_check`): `void` + +Check timeframe interval in credentialStatus with `RevocationTimeframeStatus`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `validity_timeframe` | `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) | +| `status_check` | [`StatusCheck`](../enums/identity_wasm.StatusCheck.md) | + +#### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jwk.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jwk.md new file mode 100644 index 00000000000..67141b9e92e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jwk.md @@ -0,0 +1,297 @@ +# Class: Jwk + +[identity\_wasm](../modules/identity_wasm.md).Jwk + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Jwk.md#constructor) + +### Methods + +- [toJSON](identity_wasm.Jwk.md#tojson) +- [toString](identity_wasm.Jwk.md#tostring) +- [kty](identity_wasm.Jwk.md#kty) +- [use](identity_wasm.Jwk.md#use) +- [keyOps](identity_wasm.Jwk.md#keyops) +- [alg](identity_wasm.Jwk.md#alg) +- [kid](identity_wasm.Jwk.md#kid) +- [x5u](identity_wasm.Jwk.md#x5u) +- [x5c](identity_wasm.Jwk.md#x5c) +- [x5t](identity_wasm.Jwk.md#x5t) +- [x5t256](identity_wasm.Jwk.md#x5t256) +- [paramsEc](identity_wasm.Jwk.md#paramsec) +- [paramsOkp](identity_wasm.Jwk.md#paramsokp) +- [paramsOct](identity_wasm.Jwk.md#paramsoct) +- [paramsRsa](identity_wasm.Jwk.md#paramsrsa) +- [toPublic](identity_wasm.Jwk.md#topublic) +- [isPublic](identity_wasm.Jwk.md#ispublic) +- [isPrivate](identity_wasm.Jwk.md#isprivate) +- [fromJSON](identity_wasm.Jwk.md#fromjson) +- [clone](identity_wasm.Jwk.md#clone) + +## Constructors + +### constructor + +• **new Jwk**(`jwk`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jwk` | `IJwkParams` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### kty + +▸ **kty**(): [`JwkType`](../enums/jose_jwk_type.JwkType.md) + +Returns the value for the key type parameter (kty). + +#### Returns + +[`JwkType`](../enums/jose_jwk_type.JwkType.md) + +___ + +### use + +▸ **use**(): `undefined` \| [`JwkUse`](../enums/jose_jwk_use.JwkUse.md) + +Returns the value for the use property (use). + +#### Returns + +`undefined` \| [`JwkUse`](../enums/jose_jwk_use.JwkUse.md) + +___ + +### keyOps + +▸ **keyOps**(): [`JwkOperation`](../enums/jose_jwk_operation.JwkOperation.md)[] + +#### Returns + +[`JwkOperation`](../enums/jose_jwk_operation.JwkOperation.md)[] + +___ + +### alg + +▸ **alg**(): `undefined` \| [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +Returns the value for the algorithm property (alg). + +#### Returns + +`undefined` \| [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +___ + +### kid + +▸ **kid**(): `undefined` \| `string` + +Returns the value of the key ID property (kid). + +#### Returns + +`undefined` \| `string` + +___ + +### x5u + +▸ **x5u**(): `undefined` \| `string` + +Returns the value of the X.509 URL property (x5u). + +#### Returns + +`undefined` \| `string` + +___ + +### x5c + +▸ **x5c**(): `string`[] + +Returns the value of the X.509 certificate chain property (x5c). + +#### Returns + +`string`[] + +___ + +### x5t + +▸ **x5t**(): `undefined` \| `string` + +Returns the value of the X.509 certificate SHA-1 thumbprint property (x5t). + +#### Returns + +`undefined` \| `string` + +___ + +### x5t256 + +▸ **x5t256**(): `undefined` \| `string` + +Returns the value of the X.509 certificate SHA-256 thumbprint property (x5t#S256). + +#### Returns + +`undefined` \| `string` + +___ + +### paramsEc + +▸ **paramsEc**(): `undefined` \| [`JwkParamsEc`](../interfaces/identity_wasm.JwkParamsEc.md) + +If this JWK is of kty EC, returns those parameters. + +#### Returns + +`undefined` \| [`JwkParamsEc`](../interfaces/identity_wasm.JwkParamsEc.md) + +___ + +### paramsOkp + +▸ **paramsOkp**(): `undefined` \| [`JwkParamsOkp`](../interfaces/identity_wasm.JwkParamsOkp.md) + +If this JWK is of kty OKP, returns those parameters. + +#### Returns + +`undefined` \| [`JwkParamsOkp`](../interfaces/identity_wasm.JwkParamsOkp.md) + +___ + +### paramsOct + +▸ **paramsOct**(): `undefined` \| [`JwkParamsOct`](../interfaces/identity_wasm.JwkParamsOct.md) + +If this JWK is of kty OCT, returns those parameters. + +#### Returns + +`undefined` \| [`JwkParamsOct`](../interfaces/identity_wasm.JwkParamsOct.md) + +___ + +### paramsRsa + +▸ **paramsRsa**(): `undefined` \| [`JwkParamsRsa`](../interfaces/identity_wasm.JwkParamsRsa.md) + +If this JWK is of kty RSA, returns those parameters. + +#### Returns + +`undefined` \| [`JwkParamsRsa`](../interfaces/identity_wasm.JwkParamsRsa.md) + +___ + +### toPublic + +▸ **toPublic**(): `undefined` \| [`Jwk`](identity_wasm.Jwk.md) + +Returns a clone of the [Jwk](identity_wasm.Jwk.md) with _all_ private key components unset. +Nothing is returned when `kty = oct` as this key type is not considered public by this library. + +#### Returns + +`undefined` \| [`Jwk`](identity_wasm.Jwk.md) + +___ + +### isPublic + +▸ **isPublic**(): `boolean` + +Returns `true` if _all_ private key components of the key are unset, `false` otherwise. + +#### Returns + +`boolean` + +___ + +### isPrivate + +▸ **isPrivate**(): `boolean` + +Returns `true` if _all_ private key components of the key are set, `false` otherwise. + +#### Returns + +`boolean` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Jwk`](identity_wasm.Jwk.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Jwk`](identity_wasm.Jwk.md) + +___ + +### clone + +▸ **clone**(): [`Jwk`](identity_wasm.Jwk.md) + +Deep clones the object. + +#### Returns + +[`Jwk`](identity_wasm.Jwk.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwkGenOutput.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwkGenOutput.md new file mode 100644 index 00000000000..3268d3adc7a --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwkGenOutput.md @@ -0,0 +1,119 @@ +# Class: JwkGenOutput + +[identity\_wasm](../modules/identity_wasm.md).JwkGenOutput + +The result of a key generation in `JwkStorage`. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwkGenOutput.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JwkGenOutput.md#tojson) +- [toString](identity_wasm.JwkGenOutput.md#tostring) +- [jwk](identity_wasm.JwkGenOutput.md#jwk) +- [keyId](identity_wasm.JwkGenOutput.md#keyid) +- [fromJSON](identity_wasm.JwkGenOutput.md#fromjson) +- [clone](identity_wasm.JwkGenOutput.md#clone) + +## Constructors + +### constructor + +• **new JwkGenOutput**(`key_id`, `jwk`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key_id` | `string` | +| `jwk` | [`Jwk`](identity_wasm.Jwk.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### jwk + +▸ **jwk**(): [`Jwk`](identity_wasm.Jwk.md) + +Returns the generated public [Jwk](identity_wasm.Jwk.md). + +#### Returns + +[`Jwk`](identity_wasm.Jwk.md) + +___ + +### keyId + +▸ **keyId**(): `string` + +Returns the key id of the generated [Jwk](identity_wasm.Jwk.md). + +#### Returns + +`string` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwkGenOutput`](identity_wasm.JwkGenOutput.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwkGenOutput`](identity_wasm.JwkGenOutput.md) + +___ + +### clone + +▸ **clone**(): [`JwkGenOutput`](identity_wasm.JwkGenOutput.md) + +Deep clones the object. + +#### Returns + +[`JwkGenOutput`](identity_wasm.JwkGenOutput.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpCredentialOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpCredentialOptions.md new file mode 100644 index 00000000000..38342e64aaa --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpCredentialOptions.md @@ -0,0 +1,77 @@ +# Class: JwpCredentialOptions + +[identity\_wasm](../modules/identity_wasm.md).JwpCredentialOptions + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwpCredentialOptions.md#constructor) + +### Properties + +- [kid](identity_wasm.JwpCredentialOptions.md#kid) + +### Methods + +- [toJSON](identity_wasm.JwpCredentialOptions.md#tojson) +- [toString](identity_wasm.JwpCredentialOptions.md#tostring) +- [fromJSON](identity_wasm.JwpCredentialOptions.md#fromjson) + +## Constructors + +### constructor + +• **new JwpCredentialOptions**() + +## Properties + +### kid + +• `Optional` **kid**: `string` + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`value`): [`JwpCredentialOptions`](identity_wasm.JwpCredentialOptions.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `any` | + +#### Returns + +[`JwpCredentialOptions`](identity_wasm.JwpCredentialOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpIssued.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpIssued.md new file mode 100644 index 00000000000..43a91ff1dfe --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpIssued.md @@ -0,0 +1,137 @@ +# Class: JwpIssued + +[identity\_wasm](../modules/identity_wasm.md).JwpIssued + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.JwpIssued.md#tojson) +- [fromJSON](identity_wasm.JwpIssued.md#fromjson) +- [clone](identity_wasm.JwpIssued.md#clone) +- [encode](identity_wasm.JwpIssued.md#encode) +- [setProof](identity_wasm.JwpIssued.md#setproof) +- [getProof](identity_wasm.JwpIssued.md#getproof) +- [getPayloads](identity_wasm.JwpIssued.md#getpayloads) +- [setPayloads](identity_wasm.JwpIssued.md#setpayloads) +- [getIssuerProtectedHeader](identity_wasm.JwpIssued.md#getissuerprotectedheader) + +## Methods + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwpIssued`](identity_wasm.JwpIssued.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwpIssued`](identity_wasm.JwpIssued.md) + +___ + +### clone + +▸ **clone**(): [`JwpIssued`](identity_wasm.JwpIssued.md) + +Deep clones the object. + +#### Returns + +[`JwpIssued`](identity_wasm.JwpIssued.md) + +___ + +### encode + +▸ **encode**(`serialization`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `serialization` | [`SerializationType`](../enums/identity_wasm.SerializationType.md) | + +#### Returns + +`string` + +___ + +### setProof + +▸ **setProof**(`proof`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proof` | `Uint8Array` | + +#### Returns + +`void` + +___ + +### getProof + +▸ **getProof**(): `Uint8Array` + +#### Returns + +`Uint8Array` + +___ + +### getPayloads + +▸ **getPayloads**(): [`Payloads`](identity_wasm.Payloads.md) + +#### Returns + +[`Payloads`](identity_wasm.Payloads.md) + +___ + +### setPayloads + +▸ **setPayloads**(`payloads`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `payloads` | [`Payloads`](identity_wasm.Payloads.md) | + +#### Returns + +`void` + +___ + +### getIssuerProtectedHeader + +▸ **getIssuerProtectedHeader**(): [`IssuerProtectedHeader`](identity_wasm.IssuerProtectedHeader.md) + +#### Returns + +[`IssuerProtectedHeader`](identity_wasm.IssuerProtectedHeader.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpPresentationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpPresentationOptions.md new file mode 100644 index 00000000000..5df77ddea10 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpPresentationOptions.md @@ -0,0 +1,67 @@ +# Class: JwpPresentationOptions + +[identity\_wasm](../modules/identity_wasm.md).JwpPresentationOptions + +Options to be set in the JWT claims of a verifiable presentation. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwpPresentationOptions.md#constructor) + +### Properties + +- [audience](identity_wasm.JwpPresentationOptions.md#audience) +- [nonce](identity_wasm.JwpPresentationOptions.md#nonce) + +### Methods + +- [toJSON](identity_wasm.JwpPresentationOptions.md#tojson) +- [toString](identity_wasm.JwpPresentationOptions.md#tostring) + +## Constructors + +### constructor + +• **new JwpPresentationOptions**() + +## Properties + +### audience + +• `Optional` **audience**: `string` + +Sets the audience for presentation (`aud` property in JWP Presentation Header). + +___ + +### nonce + +• `Optional` **nonce**: `string` + +The nonce to be placed in the Presentation Protected Header. + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpVerificationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpVerificationOptions.md new file mode 100644 index 00000000000..8eadc9f9801 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwpVerificationOptions.md @@ -0,0 +1,91 @@ +# Class: JwpVerificationOptions + +[identity\_wasm](../modules/identity_wasm.md).JwpVerificationOptions + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.JwpVerificationOptions.md#tojson) +- [toString](identity_wasm.JwpVerificationOptions.md#tostring) +- [clone](identity_wasm.JwpVerificationOptions.md#clone) +- [fromJSON](identity_wasm.JwpVerificationOptions.md#fromjson) +- [new](identity_wasm.JwpVerificationOptions.md#new) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### clone + +▸ **clone**(): [`JwpVerificationOptions`](identity_wasm.JwpVerificationOptions.md) + +Deep clones the object. + +#### Returns + +[`JwpVerificationOptions`](identity_wasm.JwpVerificationOptions.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwpVerificationOptions`](identity_wasm.JwpVerificationOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwpVerificationOptions`](identity_wasm.JwpVerificationOptions.md) + +___ + +### new + +▸ `Static` **new**(`opts?`): [`JwpVerificationOptions`](identity_wasm.JwpVerificationOptions.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `opts?` | [`IJwpVerificationOptions`](../interfaces/identity_wasm.IJwpVerificationOptions.md) | + +#### Returns + +[`JwpVerificationOptions`](identity_wasm.JwpVerificationOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jws.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jws.md new file mode 100644 index 00000000000..d75c8d61b2a --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jws.md @@ -0,0 +1,41 @@ +# Class: Jws + +[identity\_wasm](../modules/identity_wasm.md).Jws + +A wrapper around a JSON Web Signature (JWS). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Jws.md#constructor) + +### Methods + +- [toString](identity_wasm.Jws.md#tostring) + +## Constructors + +### constructor + +• **new Jws**(`jws_string`) + +Creates a new [Jws](identity_wasm.Jws.md) from the given string. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jws_string` | `string` | + +## Methods + +### toString + +▸ **toString**(): `string` + +Returns a clone of the JWS string. + +#### Returns + +`string` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsHeader.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsHeader.md new file mode 100644 index 00000000000..1b101c245bf --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsHeader.md @@ -0,0 +1,564 @@ +# Class: JwsHeader + +[identity\_wasm](../modules/identity_wasm.md).JwsHeader + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwsHeader.md#constructor) + +### Methods + +- [alg](identity_wasm.JwsHeader.md#alg) +- [setAlg](identity_wasm.JwsHeader.md#setalg) +- [b64](identity_wasm.JwsHeader.md#b64) +- [setB64](identity_wasm.JwsHeader.md#setb64) +- [custom](identity_wasm.JwsHeader.md#custom) +- [has](identity_wasm.JwsHeader.md#has) +- [isDisjoint](identity_wasm.JwsHeader.md#isdisjoint) +- [jku](identity_wasm.JwsHeader.md#jku) +- [setJku](identity_wasm.JwsHeader.md#setjku) +- [jwk](identity_wasm.JwsHeader.md#jwk) +- [setJwk](identity_wasm.JwsHeader.md#setjwk) +- [kid](identity_wasm.JwsHeader.md#kid) +- [setKid](identity_wasm.JwsHeader.md#setkid) +- [x5u](identity_wasm.JwsHeader.md#x5u) +- [setX5u](identity_wasm.JwsHeader.md#setx5u) +- [x5c](identity_wasm.JwsHeader.md#x5c) +- [setX5c](identity_wasm.JwsHeader.md#setx5c) +- [x5t](identity_wasm.JwsHeader.md#x5t) +- [setX5t](identity_wasm.JwsHeader.md#setx5t) +- [x5tS256](identity_wasm.JwsHeader.md#x5ts256) +- [setX5tS256](identity_wasm.JwsHeader.md#setx5ts256) +- [typ](identity_wasm.JwsHeader.md#typ) +- [setTyp](identity_wasm.JwsHeader.md#settyp) +- [cty](identity_wasm.JwsHeader.md#cty) +- [setCty](identity_wasm.JwsHeader.md#setcty) +- [crit](identity_wasm.JwsHeader.md#crit) +- [setCrit](identity_wasm.JwsHeader.md#setcrit) +- [url](identity_wasm.JwsHeader.md#url) +- [setUrl](identity_wasm.JwsHeader.md#seturl) +- [nonce](identity_wasm.JwsHeader.md#nonce) +- [setNonce](identity_wasm.JwsHeader.md#setnonce) +- [toJSON](identity_wasm.JwsHeader.md#tojson) +- [fromJSON](identity_wasm.JwsHeader.md#fromjson) +- [clone](identity_wasm.JwsHeader.md#clone) + +## Constructors + +### constructor + +• **new JwsHeader**() + +Create a new empty [JwsHeader](identity_wasm.JwsHeader.md). + +## Methods + +### alg + +▸ **alg**(): `undefined` \| [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +Returns the value for the algorithm claim (alg). + +#### Returns + +`undefined` \| [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +___ + +### setAlg + +▸ **setAlg**(`value`): `void` + +Sets a value for the algorithm claim (alg). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) | + +#### Returns + +`void` + +___ + +### b64 + +▸ **b64**(): `undefined` \| `boolean` + +Returns the value of the base64url-encode payload claim (b64). + +#### Returns + +`undefined` \| `boolean` + +___ + +### setB64 + +▸ **setB64**(`value`): `void` + +Sets a value for the base64url-encode payload claim (b64). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `boolean` | + +#### Returns + +`void` + +___ + +### custom + +▸ **custom**(): `undefined` \| `Record`\<`string`, `any`\> + +Additional header parameters. + +#### Returns + +`undefined` \| `Record`\<`string`, `any`\> + +___ + +### has + +▸ **has**(`claim`): `boolean` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `claim` | `string` | + +#### Returns + +`boolean` + +___ + +### isDisjoint + +▸ **isDisjoint**(`other`): `boolean` + +Returns `true` if none of the fields are set in both `self` and `other`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `other` | [`JwsHeader`](identity_wasm.JwsHeader.md) | + +#### Returns + +`boolean` + +___ + +### jku + +▸ **jku**(): `undefined` \| `string` + +Returns the value of the JWK Set URL claim (jku). + +#### Returns + +`undefined` \| `string` + +___ + +### setJku + +▸ **setJku**(`value`): `void` + +Sets a value for the JWK Set URL claim (jku). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### jwk + +▸ **jwk**(): `undefined` \| [`Jwk`](identity_wasm.Jwk.md) + +Returns the value of the JWK claim (jwk). + +#### Returns + +`undefined` \| [`Jwk`](identity_wasm.Jwk.md) + +___ + +### setJwk + +▸ **setJwk**(`value`): `void` + +Sets a value for the JWK claim (jwk). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | [`Jwk`](identity_wasm.Jwk.md) | + +#### Returns + +`void` + +___ + +### kid + +▸ **kid**(): `undefined` \| `string` + +Returns the value of the key ID claim (kid). + +#### Returns + +`undefined` \| `string` + +___ + +### setKid + +▸ **setKid**(`value`): `void` + +Sets a value for the key ID claim (kid). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### x5u + +▸ **x5u**(): `undefined` \| `string` + +Returns the value of the X.509 URL claim (x5u). + +#### Returns + +`undefined` \| `string` + +___ + +### setX5u + +▸ **setX5u**(`value`): `void` + +Sets a value for the X.509 URL claim (x5u). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### x5c + +▸ **x5c**(): `string`[] + +Returns the value of the X.509 certificate chain claim (x5c). + +#### Returns + +`string`[] + +___ + +### setX5c + +▸ **setX5c**(`value`): `void` + +Sets values for the X.509 certificate chain claim (x5c). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string`[] | + +#### Returns + +`void` + +___ + +### x5t + +▸ **x5t**(): `undefined` \| `string` + +Returns the value of the X.509 certificate SHA-1 thumbprint claim (x5t). + +#### Returns + +`undefined` \| `string` + +___ + +### setX5t + +▸ **setX5t**(`value`): `void` + +Sets a value for the X.509 certificate SHA-1 thumbprint claim (x5t). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### x5tS256 + +▸ **x5tS256**(): `undefined` \| `string` + +Returns the value of the X.509 certificate SHA-256 thumbprint claim +(x5t#S256). + +#### Returns + +`undefined` \| `string` + +___ + +### setX5tS256 + +▸ **setX5tS256**(`value`): `void` + +Sets a value for the X.509 certificate SHA-256 thumbprint claim +(x5t#S256). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### typ + +▸ **typ**(): `undefined` \| `string` + +Returns the value of the token type claim (typ). + +#### Returns + +`undefined` \| `string` + +___ + +### setTyp + +▸ **setTyp**(`value`): `void` + +Sets a value for the token type claim (typ). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### cty + +▸ **cty**(): `undefined` \| `string` + +Returns the value of the content type claim (cty). + +#### Returns + +`undefined` \| `string` + +___ + +### setCty + +▸ **setCty**(`value`): `void` + +Sets a value for the content type claim (cty). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### crit + +▸ **crit**(): `string`[] + +Returns the value of the critical claim (crit). + +#### Returns + +`string`[] + +___ + +### setCrit + +▸ **setCrit**(`value`): `void` + +Sets values for the critical claim (crit). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string`[] | + +#### Returns + +`void` + +___ + +### url + +▸ **url**(): `undefined` \| `string` + +Returns the value of the url claim (url). + +#### Returns + +`undefined` \| `string` + +___ + +### setUrl + +▸ **setUrl**(`value`): `void` + +Sets a value for the url claim (url). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### nonce + +▸ **nonce**(): `undefined` \| `string` + +Returns the value of the nonce claim (nonce). + +#### Returns + +`undefined` \| `string` + +___ + +### setNonce + +▸ **setNonce**(`value`): `void` + +Sets a value for the nonce claim (nonce). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwsHeader`](identity_wasm.JwsHeader.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwsHeader`](identity_wasm.JwsHeader.md) + +___ + +### clone + +▸ **clone**(): [`JwsHeader`](identity_wasm.JwsHeader.md) + +Deep clones the object. + +#### Returns + +[`JwsHeader`](identity_wasm.JwsHeader.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsSignatureOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsSignatureOptions.md new file mode 100644 index 00000000000..8b636059d02 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsSignatureOptions.md @@ -0,0 +1,261 @@ +# Class: JwsSignatureOptions + +[identity\_wasm](../modules/identity_wasm.md).JwsSignatureOptions + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwsSignatureOptions.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JwsSignatureOptions.md#tojson) +- [toString](identity_wasm.JwsSignatureOptions.md#tostring) +- [setAttachJwk](identity_wasm.JwsSignatureOptions.md#setattachjwk) +- [setB64](identity_wasm.JwsSignatureOptions.md#setb64) +- [setTyp](identity_wasm.JwsSignatureOptions.md#settyp) +- [setCty](identity_wasm.JwsSignatureOptions.md#setcty) +- [serUrl](identity_wasm.JwsSignatureOptions.md#serurl) +- [setNonce](identity_wasm.JwsSignatureOptions.md#setnonce) +- [setKid](identity_wasm.JwsSignatureOptions.md#setkid) +- [setDetachedPayload](identity_wasm.JwsSignatureOptions.md#setdetachedpayload) +- [setCustomHeaderParameters](identity_wasm.JwsSignatureOptions.md#setcustomheaderparameters) +- [fromJSON](identity_wasm.JwsSignatureOptions.md#fromjson) +- [clone](identity_wasm.JwsSignatureOptions.md#clone) + +## Constructors + +### constructor + +• **new JwsSignatureOptions**(`options?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`IJwsSignatureOptions`](../interfaces/identity_wasm.IJwsSignatureOptions.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### setAttachJwk + +▸ **setAttachJwk**(`value`): `void` + +Replace the value of the `attachJwk` field. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `boolean` | + +#### Returns + +`void` + +___ + +### setB64 + +▸ **setB64**(`value`): `void` + +Replace the value of the `b64` field. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `boolean` | + +#### Returns + +`void` + +___ + +### setTyp + +▸ **setTyp**(`value`): `void` + +Replace the value of the `typ` field. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### setCty + +▸ **setCty**(`value`): `void` + +Replace the value of the `cty` field. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### serUrl + +▸ **serUrl**(`value`): `void` + +Replace the value of the `url` field. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### setNonce + +▸ **setNonce**(`value`): `void` + +Replace the value of the `nonce` field. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### setKid + +▸ **setKid**(`value`): `void` + +Replace the value of the `kid` field. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### setDetachedPayload + +▸ **setDetachedPayload**(`value`): `void` + +Replace the value of the `detached_payload` field. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `boolean` | + +#### Returns + +`void` + +___ + +### setCustomHeaderParameters + +▸ **setCustomHeaderParameters**(`value`): `void` + +Add additional header parameters. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `Record`\<`string`, `any`\> | + +#### Returns + +`void` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) + +___ + +### clone + +▸ **clone**(): [`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) + +Deep clones the object. + +#### Returns + +[`JwsSignatureOptions`](identity_wasm.JwsSignatureOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsVerificationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsVerificationOptions.md new file mode 100644 index 00000000000..2831928b1f8 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwsVerificationOptions.md @@ -0,0 +1,149 @@ +# Class: JwsVerificationOptions + +[identity\_wasm](../modules/identity_wasm.md).JwsVerificationOptions + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwsVerificationOptions.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JwsVerificationOptions.md#tojson) +- [toString](identity_wasm.JwsVerificationOptions.md#tostring) +- [setNonce](identity_wasm.JwsVerificationOptions.md#setnonce) +- [setMethodScope](identity_wasm.JwsVerificationOptions.md#setmethodscope) +- [setMethodId](identity_wasm.JwsVerificationOptions.md#setmethodid) +- [fromJSON](identity_wasm.JwsVerificationOptions.md#fromjson) +- [clone](identity_wasm.JwsVerificationOptions.md#clone) + +## Constructors + +### constructor + +• **new JwsVerificationOptions**(`options?`) + +Creates a new [JwsVerificationOptions](identity_wasm.JwsVerificationOptions.md) from the given fields. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`IJwsVerificationOptions`](../interfaces/identity_wasm.IJwsVerificationOptions.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### setNonce + +▸ **setNonce**(`value`): `void` + +Set the expected value for the `nonce` parameter of the protected header. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `string` | + +#### Returns + +`void` + +___ + +### setMethodScope + +▸ **setMethodScope**(`value`): `void` + +Set the scope of the verification methods that may be used to verify the given JWS. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | [`MethodScope`](identity_wasm.MethodScope.md) | + +#### Returns + +`void` + +___ + +### setMethodId + +▸ **setMethodId**(`value`): `void` + +Set the DID URl of the method, whose JWK should be used to verify the JWS. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`void` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwsVerificationOptions`](identity_wasm.JwsVerificationOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwsVerificationOptions`](identity_wasm.JwsVerificationOptions.md) + +___ + +### clone + +▸ **clone**(): [`JwsVerificationOptions`](identity_wasm.JwsVerificationOptions.md) + +Deep clones the object. + +#### Returns + +[`JwsVerificationOptions`](identity_wasm.JwsVerificationOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jwt.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jwt.md new file mode 100644 index 00000000000..44b470afed7 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Jwt.md @@ -0,0 +1,86 @@ +# Class: Jwt + +[identity\_wasm](../modules/identity_wasm.md).Jwt + +A wrapper around a JSON Web Token (JWK). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Jwt.md#constructor) + +### Methods + +- [toString](identity_wasm.Jwt.md#tostring) +- [toJSON](identity_wasm.Jwt.md#tojson) +- [fromJSON](identity_wasm.Jwt.md#fromjson) +- [clone](identity_wasm.Jwt.md#clone) + +## Constructors + +### constructor + +• **new Jwt**(`jwt_string`) + +Creates a new [Jwt](identity_wasm.Jwt.md) from the given string. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jwt_string` | `string` | + +## Methods + +### toString + +▸ **toString**(): `string` + +Returns a clone of the JWT string. + +#### Returns + +`string` + +___ + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Jwt`](identity_wasm.Jwt.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Jwt`](identity_wasm.Jwt.md) + +___ + +### clone + +▸ **clone**(): [`Jwt`](identity_wasm.Jwt.md) + +Deep clones the object. + +#### Returns + +[`Jwt`](identity_wasm.Jwt.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtCredentialValidationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtCredentialValidationOptions.md new file mode 100644 index 00000000000..41161d3bcf6 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtCredentialValidationOptions.md @@ -0,0 +1,71 @@ +# Class: JwtCredentialValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).JwtCredentialValidationOptions + +Options to declare validation criteria when validating credentials. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwtCredentialValidationOptions.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JwtCredentialValidationOptions.md#tojson) +- [fromJSON](identity_wasm.JwtCredentialValidationOptions.md#fromjson) +- [clone](identity_wasm.JwtCredentialValidationOptions.md#clone) + +## Constructors + +### constructor + +• **new JwtCredentialValidationOptions**(`options?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`IJwtCredentialValidationOptions`](../interfaces/identity_wasm.IJwtCredentialValidationOptions.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwtCredentialValidationOptions`](identity_wasm.JwtCredentialValidationOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwtCredentialValidationOptions`](identity_wasm.JwtCredentialValidationOptions.md) + +___ + +### clone + +▸ **clone**(): [`JwtCredentialValidationOptions`](identity_wasm.JwtCredentialValidationOptions.md) + +Deep clones the object. + +#### Returns + +[`JwtCredentialValidationOptions`](identity_wasm.JwtCredentialValidationOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtCredentialValidator.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtCredentialValidator.md new file mode 100644 index 00000000000..ecfbfcca754 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtCredentialValidator.md @@ -0,0 +1,263 @@ +# Class: JwtCredentialValidator + +[identity\_wasm](../modules/identity_wasm.md).JwtCredentialValidator + +A type for decoding and validating [Credential](identity_wasm.Credential.md). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwtCredentialValidator.md#constructor) + +### Methods + +- [validate](identity_wasm.JwtCredentialValidator.md#validate) +- [verifySignature](identity_wasm.JwtCredentialValidator.md#verifysignature) +- [checkExpiresOnOrAfter](identity_wasm.JwtCredentialValidator.md#checkexpiresonorafter) +- [checkIssuedOnOrBefore](identity_wasm.JwtCredentialValidator.md#checkissuedonorbefore) +- [checkSubjectHolderRelationship](identity_wasm.JwtCredentialValidator.md#checksubjectholderrelationship) +- [checkStatus](identity_wasm.JwtCredentialValidator.md#checkstatus) +- [checkStatusWithStatusList2021](identity_wasm.JwtCredentialValidator.md#checkstatuswithstatuslist2021) +- [extractIssuer](identity_wasm.JwtCredentialValidator.md#extractissuer) +- [extractIssuerFromJwt](identity_wasm.JwtCredentialValidator.md#extractissuerfromjwt) + +## Constructors + +### constructor + +• **new JwtCredentialValidator**(`signatureVerifier?`) + +Creates a new [JwtCredentialValidator](identity_wasm.JwtCredentialValidator.md). If a `signatureVerifier` is provided it will be used when +verifying decoded JWS signatures, otherwise a default verifier capable of handling the `EdDSA`, `ES256`, `ES256K` +algorithms will be used. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `signatureVerifier?` | [`IJwsVerifier`](../interfaces/identity_wasm.IJwsVerifier.md) | + +## Methods + +### validate + +▸ **validate**(`credential_jwt`, `issuer`, `options`, `fail_fast`): [`DecodedJwtCredential`](identity_wasm.DecodedJwtCredential.md) + +Decodes and validates a [Credential](identity_wasm.Credential.md) issued as a JWS. A [DecodedJwtCredential](identity_wasm.DecodedJwtCredential.md) is returned upon +success. + +The following properties are validated according to `options`: +- the issuer's signature on the JWS, +- the expiration date, +- the issuance date, +- the semantic structure. + +# Warning +The lack of an error returned from this method is in of itself not enough to conclude that the credential can be +trusted. This section contains more information on additional checks that should be carried out before and after +calling this method. + +## The state of the issuer's DID Document +The caller must ensure that `issuer` represents an up-to-date DID Document. + +## Properties that are not validated + There are many properties defined in [The Verifiable Credentials Data Model](https://www.w3.org/TR/vc-data-model/) that are **not** validated, such as: +`proof`, `credentialStatus`, `type`, `credentialSchema`, `refreshService` **and more**. +These should be manually checked after validation, according to your requirements. + +# Errors +An error is returned whenever a validated condition is not satisfied. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential_jwt` | [`Jwt`](identity_wasm.Jwt.md) | +| `issuer` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `options` | [`JwtCredentialValidationOptions`](identity_wasm.JwtCredentialValidationOptions.md) | +| `fail_fast` | [`FailFast`](../enums/identity_wasm.FailFast.md) | + +#### Returns + +[`DecodedJwtCredential`](identity_wasm.DecodedJwtCredential.md) + +___ + +### verifySignature + +▸ **verifySignature**(`credential`, `trustedIssuers`, `options`): [`DecodedJwtCredential`](identity_wasm.DecodedJwtCredential.md) + +Decode and verify the JWS signature of a [Credential](identity_wasm.Credential.md) issued as a JWT using the DID Document of a trusted +issuer. + +A [DecodedJwtCredential](identity_wasm.DecodedJwtCredential.md) is returned upon success. + +# Warning +The caller must ensure that the DID Documents of the trusted issuers are up-to-date. + +## Proofs + Only the JWS signature is verified. If the [Credential](identity_wasm.Credential.md) contains a `proof` property this will not be +verified by this method. + +# Errors +This method immediately returns an error if +the credential issuer' url cannot be parsed to a DID belonging to one of the trusted issuers. Otherwise an attempt +to verify the credential's signature will be made and an error is returned upon failure. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Jwt`](identity_wasm.Jwt.md) | +| `trustedIssuers` | (`IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md))[] | +| `options` | [`JwsVerificationOptions`](identity_wasm.JwsVerificationOptions.md) | + +#### Returns + +[`DecodedJwtCredential`](identity_wasm.DecodedJwtCredential.md) + +___ + +### checkExpiresOnOrAfter + +▸ `Static` **checkExpiresOnOrAfter**(`credential`, `timestamp`): `void` + +Validate that the credential expires on or after the specified timestamp. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `timestamp` | [`Timestamp`](identity_wasm.Timestamp.md) | + +#### Returns + +`void` + +___ + +### checkIssuedOnOrBefore + +▸ `Static` **checkIssuedOnOrBefore**(`credential`, `timestamp`): `void` + +Validate that the credential is issued on or before the specified timestamp. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `timestamp` | [`Timestamp`](identity_wasm.Timestamp.md) | + +#### Returns + +`void` + +___ + +### checkSubjectHolderRelationship + +▸ `Static` **checkSubjectHolderRelationship**(`credential`, `holder`, `relationship`): `void` + +Validate that the relationship between the `holder` and the credential subjects is in accordance with +`relationship`. The `holder` parameter is expected to be the URL of the holder. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `holder` | `string` | +| `relationship` | [`SubjectHolderRelationship`](../enums/identity_wasm.SubjectHolderRelationship.md) | + +#### Returns + +`void` + +___ + +### checkStatus + +▸ `Static` **checkStatus**(`credential`, `trustedIssuers`, `statusCheck`): `void` + +Checks whether the credential status has been revoked. + +Only supports `RevocationBitmap2022`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `trustedIssuers` | (`IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md))[] | +| `statusCheck` | [`StatusCheck`](../enums/identity_wasm.StatusCheck.md) | + +#### Returns + +`void` + +___ + +### checkStatusWithStatusList2021 + +▸ `Static` **checkStatusWithStatusList2021**(`credential`, `status_list`, `status_check`): `void` + +Checks wheter the credential status has been revoked using `StatusList2021`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `status_list` | [`StatusList2021Credential`](identity_wasm.StatusList2021Credential.md) | +| `status_check` | [`StatusCheck`](../enums/identity_wasm.StatusCheck.md) | + +#### Returns + +`void` + +___ + +### extractIssuer + +▸ `Static` **extractIssuer**(`credential`): [`CoreDID`](identity_wasm.CoreDID.md) + +Utility for extracting the issuer field of a [Credential](identity_wasm.Credential.md) as a DID. + +### Errors + +Fails if the issuer field is not a valid DID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### extractIssuerFromJwt + +▸ `Static` **extractIssuerFromJwt**(`credential`): [`CoreDID`](identity_wasm.CoreDID.md) + +Utility for extracting the issuer field of a credential in JWT representation as DID. + +# Errors + +If the JWT decoding fails or the issuer field is not a valid DID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Jwt`](identity_wasm.Jwt.md) | + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtDomainLinkageValidator.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtDomainLinkageValidator.md new file mode 100644 index 00000000000..85d1b07e6a2 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtDomainLinkageValidator.md @@ -0,0 +1,90 @@ +# Class: JwtDomainLinkageValidator + +[identity\_wasm](../modules/identity_wasm.md).JwtDomainLinkageValidator + +A validator for a Domain Linkage Configuration and Credentials. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwtDomainLinkageValidator.md#constructor) + +### Methods + +- [validateLinkage](identity_wasm.JwtDomainLinkageValidator.md#validatelinkage) +- [validateCredential](identity_wasm.JwtDomainLinkageValidator.md#validatecredential) + +## Constructors + +### constructor + +• **new JwtDomainLinkageValidator**(`signatureVerifier?`) + +Creates a new [JwtDomainLinkageValidator](identity_wasm.JwtDomainLinkageValidator.md). If a `signatureVerifier` is provided it will be used when +verifying decoded JWS signatures, otherwise a default verifier capable of handling the `EdDSA`, `ES256`, `ES256K` +algorithms will be used. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `signatureVerifier?` | [`IJwsVerifier`](../interfaces/identity_wasm.IJwsVerifier.md) | + +## Methods + +### validateLinkage + +▸ **validateLinkage**(`issuer`, `configuration`, `domain`, `options`): `void` + +Validates the linkage between a domain and a DID. +[DomainLinkageConfiguration](identity_wasm.DomainLinkageConfiguration.md) is validated according to [DID Configuration Resource Verification](https://identity.foundation/.well-known/resources/did-configuration/#did-configuration-resource-verification). + +Linkage is valid if no error is thrown. + +# Note: +- Only the [JSON Web Token Proof Format](https://identity.foundation/.well-known/resources/did-configuration/#json-web-token-proof-format) + is supported. +- Only the Credential issued by `issuer` is verified. + +# Errors + + - Semantic structure of `configuration` is invalid. + - `configuration` includes multiple credentials issued by `issuer`. + - Validation of the matched Domain Linkage Credential fails. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `issuer` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `configuration` | [`DomainLinkageConfiguration`](identity_wasm.DomainLinkageConfiguration.md) | +| `domain` | `string` | +| `options` | [`JwtCredentialValidationOptions`](identity_wasm.JwtCredentialValidationOptions.md) | + +#### Returns + +`void` + +___ + +### validateCredential + +▸ **validateCredential**(`issuer`, `credentialJwt`, `domain`, `options`): `void` + +Validates a [Domain Linkage Credential](https://identity.foundation/.well-known/resources/did-configuration/#domain-linkage-credential). + +Error will be thrown in case the validation fails. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `issuer` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `credentialJwt` | [`Jwt`](identity_wasm.Jwt.md) | +| `domain` | `string` | +| `options` | [`JwtCredentialValidationOptions`](identity_wasm.JwtCredentialValidationOptions.md) | + +#### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationOptions.md new file mode 100644 index 00000000000..846937dcdbb --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationOptions.md @@ -0,0 +1,73 @@ +# Class: JwtPresentationOptions + +[identity\_wasm](../modules/identity_wasm.md).JwtPresentationOptions + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwtPresentationOptions.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JwtPresentationOptions.md#tojson) +- [fromJSON](identity_wasm.JwtPresentationOptions.md#fromjson) +- [clone](identity_wasm.JwtPresentationOptions.md#clone) + +## Constructors + +### constructor + +• **new JwtPresentationOptions**(`options?`) + +Creates a new [JwtPresentationOptions](identity_wasm.JwtPresentationOptions.md) from the given fields. + +Throws an error if any of the options are invalid. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`IJwtPresentationOptions`](../interfaces/identity_wasm.IJwtPresentationOptions.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwtPresentationOptions`](identity_wasm.JwtPresentationOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwtPresentationOptions`](identity_wasm.JwtPresentationOptions.md) + +___ + +### clone + +▸ **clone**(): [`JwtPresentationOptions`](identity_wasm.JwtPresentationOptions.md) + +Deep clones the object. + +#### Returns + +[`JwtPresentationOptions`](identity_wasm.JwtPresentationOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationValidationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationValidationOptions.md new file mode 100644 index 00000000000..8ba13012c59 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationValidationOptions.md @@ -0,0 +1,75 @@ +# Class: JwtPresentationValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).JwtPresentationValidationOptions + +Options to declare validation criteria when validating presentation. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwtPresentationValidationOptions.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JwtPresentationValidationOptions.md#tojson) +- [fromJSON](identity_wasm.JwtPresentationValidationOptions.md#fromjson) +- [clone](identity_wasm.JwtPresentationValidationOptions.md#clone) + +## Constructors + +### constructor + +• **new JwtPresentationValidationOptions**(`options?`) + +Creates a new [JwtPresentationValidationOptions](identity_wasm.JwtPresentationValidationOptions.md) from the given fields. + +Throws an error if any of the options are invalid. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`IJwtPresentationValidationOptions`](../interfaces/identity_wasm.IJwtPresentationValidationOptions.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`JwtPresentationValidationOptions`](identity_wasm.JwtPresentationValidationOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`JwtPresentationValidationOptions`](identity_wasm.JwtPresentationValidationOptions.md) + +___ + +### clone + +▸ **clone**(): [`JwtPresentationValidationOptions`](identity_wasm.JwtPresentationValidationOptions.md) + +Deep clones the object. + +#### Returns + +[`JwtPresentationValidationOptions`](identity_wasm.JwtPresentationValidationOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationValidator.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationValidator.md new file mode 100644 index 00000000000..1376b27f5e1 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.JwtPresentationValidator.md @@ -0,0 +1,140 @@ +# Class: JwtPresentationValidator + +[identity\_wasm](../modules/identity_wasm.md).JwtPresentationValidator + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.JwtPresentationValidator.md#constructor) + +### Methods + +- [toJSON](identity_wasm.JwtPresentationValidator.md#tojson) +- [toString](identity_wasm.JwtPresentationValidator.md#tostring) +- [validate](identity_wasm.JwtPresentationValidator.md#validate) +- [checkStructure](identity_wasm.JwtPresentationValidator.md#checkstructure) +- [extractHolder](identity_wasm.JwtPresentationValidator.md#extractholder) + +## Constructors + +### constructor + +• **new JwtPresentationValidator**(`signatureVerifier?`) + +Creates a new [JwtPresentationValidator](identity_wasm.JwtPresentationValidator.md). If a `signatureVerifier` is provided it will be used when +verifying decoded JWS signatures, otherwise a default verifier capable of handling the `EdDSA`, `ES256`, `ES256K` +algorithms will be used. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `signatureVerifier?` | [`IJwsVerifier`](../interfaces/identity_wasm.IJwsVerifier.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### validate + +▸ **validate**(`presentationJwt`, `holder`, `validation_options`): [`DecodedJwtPresentation`](identity_wasm.DecodedJwtPresentation.md) + +Validates a [Presentation](identity_wasm.Presentation.md) encoded as a [Jwt](identity_wasm.Jwt.md). + +The following properties are validated according to `options`: +- the JWT can be decoded into a semantically valid presentation. +- the expiration and issuance date contained in the JWT claims. +- the holder's signature. + +Validation is done with respect to the properties set in `options`. + +# Warning + +* This method does NOT validate the constituent credentials and therefore also not the relationship between the +credentials' subjects and the presentation holder. This can be done with [JwtCredentialValidationOptions](identity_wasm.JwtCredentialValidationOptions.md). +* The lack of an error returned from this method is in of itself not enough to conclude that the presentation can +be trusted. This section contains more information on additional checks that should be carried out before and +after calling this method. + +## The state of the supplied DID Documents. + +The caller must ensure that the DID Documents in `holder` are up-to-date. + +# Errors + +An error is returned whenever a validated condition is not satisfied or when decoding fails. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `presentationJwt` | [`Jwt`](identity_wasm.Jwt.md) | +| `holder` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `validation_options` | [`JwtPresentationValidationOptions`](identity_wasm.JwtPresentationValidationOptions.md) | + +#### Returns + +[`DecodedJwtPresentation`](identity_wasm.DecodedJwtPresentation.md) + +___ + +### checkStructure + +▸ `Static` **checkStructure**(`presentation`): `void` + +Validates the semantic structure of the [Presentation](identity_wasm.Presentation.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `presentation` | [`Presentation`](identity_wasm.Presentation.md) | + +#### Returns + +`void` + +___ + +### extractHolder + +▸ `Static` **extractHolder**(`presentation`): [`CoreDID`](identity_wasm.CoreDID.md) + +Attempt to extract the holder of the presentation. + +# Errors: +* If deserialization/decoding of the presentation fails. +* If the holder can't be parsed as DIDs. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `presentation` | [`Jwt`](identity_wasm.Jwt.md) | + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.KeyBindingJWTValidationOptions.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.KeyBindingJWTValidationOptions.md new file mode 100644 index 00000000000..3bb2d15bbb4 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.KeyBindingJWTValidationOptions.md @@ -0,0 +1,71 @@ +# Class: KeyBindingJWTValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).KeyBindingJWTValidationOptions + +Options to declare validation criteria when validating credentials. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.KeyBindingJWTValidationOptions.md#constructor) + +### Methods + +- [toJSON](identity_wasm.KeyBindingJWTValidationOptions.md#tojson) +- [fromJSON](identity_wasm.KeyBindingJWTValidationOptions.md#fromjson) +- [clone](identity_wasm.KeyBindingJWTValidationOptions.md#clone) + +## Constructors + +### constructor + +• **new KeyBindingJWTValidationOptions**(`options?`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | [`IKeyBindingJWTValidationOptions`](../interfaces/identity_wasm.IKeyBindingJWTValidationOptions.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`KeyBindingJWTValidationOptions`](identity_wasm.KeyBindingJWTValidationOptions.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`KeyBindingJWTValidationOptions`](identity_wasm.KeyBindingJWTValidationOptions.md) + +___ + +### clone + +▸ **clone**(): [`KeyBindingJWTValidationOptions`](identity_wasm.KeyBindingJWTValidationOptions.md) + +Deep clones the object. + +#### Returns + +[`KeyBindingJWTValidationOptions`](identity_wasm.KeyBindingJWTValidationOptions.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.KeyBindingJwtClaims.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.KeyBindingJwtClaims.md new file mode 100644 index 00000000000..c88f07b6d9f --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.KeyBindingJwtClaims.md @@ -0,0 +1,190 @@ +# Class: KeyBindingJwtClaims + +[identity\_wasm](../modules/identity_wasm.md).KeyBindingJwtClaims + +Claims set for key binding JWT. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.KeyBindingJwtClaims.md#constructor) + +### Methods + +- [toJSON](identity_wasm.KeyBindingJwtClaims.md#tojson) +- [toString](identity_wasm.KeyBindingJwtClaims.md#tostring) +- [iat](identity_wasm.KeyBindingJwtClaims.md#iat) +- [aud](identity_wasm.KeyBindingJwtClaims.md#aud) +- [nonce](identity_wasm.KeyBindingJwtClaims.md#nonce) +- [sdHash](identity_wasm.KeyBindingJwtClaims.md#sdhash) +- [customProperties](identity_wasm.KeyBindingJwtClaims.md#customproperties) +- [keyBindingJwtHeaderTyp](identity_wasm.KeyBindingJwtClaims.md#keybindingjwtheadertyp) +- [fromJSON](identity_wasm.KeyBindingJwtClaims.md#fromjson) +- [clone](identity_wasm.KeyBindingJwtClaims.md#clone) + +## Constructors + +### constructor + +• **new KeyBindingJwtClaims**(`jwt`, `disclosures`, `nonce`, `aud`, `issued_at?`, `custom_properties?`) + +Creates a new [`KeyBindingJwtClaims`]. +When `issued_at` is left as None, it will automatically default to the current time. + +# Error +When `issued_at` is set to `None` and the system returns time earlier than `SystemTime::UNIX_EPOCH`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jwt` | `string` | +| `disclosures` | `string`[] | +| `nonce` | `string` | +| `aud` | `string` | +| `issued_at?` | [`Timestamp`](identity_wasm.Timestamp.md) | +| `custom_properties?` | `Record`\<`string`, `any`\> | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Returns a string representation of the claims. + +#### Returns + +`string` + +___ + +### iat + +▸ **iat**(): `bigint` + +Returns a copy of the issued at `iat` property. + +#### Returns + +`bigint` + +___ + +### aud + +▸ **aud**(): `string` + +Returns a copy of the audience `aud` property. + +#### Returns + +`string` + +___ + +### nonce + +▸ **nonce**(): `string` + +Returns a copy of the `nonce` property. + +#### Returns + +`string` + +___ + +### sdHash + +▸ **sdHash**(): `string` + +Returns a copy of the `sd_hash` property. + +#### Returns + +`string` + +___ + +### customProperties + +▸ **customProperties**(): `Record`\<`string`, `any`\> + +Returns a copy of the custom properties. + +#### Returns + +`Record`\<`string`, `any`\> + +___ + +### keyBindingJwtHeaderTyp + +▸ `Static` **keyBindingJwtHeaderTyp**(): `string` + +Returns the value of the `typ` property of the JWT header according to +https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-07.html#name-key-binding-jwt + +#### Returns + +`string` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`KeyBindingJwtClaims`](identity_wasm.KeyBindingJwtClaims.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`KeyBindingJwtClaims`](identity_wasm.KeyBindingJwtClaims.md) + +___ + +### clone + +▸ **clone**(): [`KeyBindingJwtClaims`](identity_wasm.KeyBindingJwtClaims.md) + +Deep clones the object. + +#### Returns + +[`KeyBindingJwtClaims`](identity_wasm.KeyBindingJwtClaims.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.LinkedDomainService.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.LinkedDomainService.md new file mode 100644 index 00000000000..d9e4f86a717 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.LinkedDomainService.md @@ -0,0 +1,135 @@ +# Class: LinkedDomainService + +[identity\_wasm](../modules/identity_wasm.md).LinkedDomainService + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.LinkedDomainService.md#constructor) + +### Methods + +- [toJSON](identity_wasm.LinkedDomainService.md#tojson) +- [toString](identity_wasm.LinkedDomainService.md#tostring) +- [domains](identity_wasm.LinkedDomainService.md#domains) +- [toService](identity_wasm.LinkedDomainService.md#toservice) +- [fromService](identity_wasm.LinkedDomainService.md#fromservice) +- [isValid](identity_wasm.LinkedDomainService.md#isvalid) +- [clone](identity_wasm.LinkedDomainService.md#clone) + +## Constructors + +### constructor + +• **new LinkedDomainService**(`options`) + +Constructs a new [LinkedDomainService](identity_wasm.LinkedDomainService.md) that wraps a spec compliant [Linked Domain Service Endpoint](https://identity.foundation/.well-known/resources/did-configuration/#linked-domain-service-endpoint). + +Domain URLs must include the `https` scheme in order to pass the domain linkage validation. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`ILinkedDomainService`](../interfaces/identity_wasm.ILinkedDomainService.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### domains + +▸ **domains**(): `string`[] + +Returns the domains contained in the Linked Domain Service. + +#### Returns + +`string`[] + +___ + +### toService + +▸ **toService**(): [`Service`](identity_wasm.Service.md) + +Returns the inner service which can be added to a DID Document. + +#### Returns + +[`Service`](identity_wasm.Service.md) + +___ + +### fromService + +▸ `Static` **fromService**(`service`): [`LinkedDomainService`](identity_wasm.LinkedDomainService.md) + +Creates a new [LinkedDomainService](identity_wasm.LinkedDomainService.md) from a [Service](identity_wasm.Service.md). + +# Error + +Errors if `service` is not a valid Linked Domain Service. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `service` | [`Service`](identity_wasm.Service.md) | + +#### Returns + +[`LinkedDomainService`](identity_wasm.LinkedDomainService.md) + +___ + +### isValid + +▸ `Static` **isValid**(`service`): `boolean` + +Returns `true` if a [Service](identity_wasm.Service.md) is a valid Linked Domain Service. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `service` | [`Service`](identity_wasm.Service.md) | + +#### Returns + +`boolean` + +___ + +### clone + +▸ **clone**(): [`LinkedDomainService`](identity_wasm.LinkedDomainService.md) + +Deep clones the object. + +#### Returns + +[`LinkedDomainService`](identity_wasm.LinkedDomainService.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.LinkedVerifiablePresentationService.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.LinkedVerifiablePresentationService.md new file mode 100644 index 00000000000..76266c1e3da --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.LinkedVerifiablePresentationService.md @@ -0,0 +1,160 @@ +# Class: LinkedVerifiablePresentationService + +[identity\_wasm](../modules/identity_wasm.md).LinkedVerifiablePresentationService + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.LinkedVerifiablePresentationService.md#constructor) + +### Methods + +- [toJSON](identity_wasm.LinkedVerifiablePresentationService.md#tojson) +- [toString](identity_wasm.LinkedVerifiablePresentationService.md#tostring) +- [verifiablePresentationUrls](identity_wasm.LinkedVerifiablePresentationService.md#verifiablepresentationurls) +- [toService](identity_wasm.LinkedVerifiablePresentationService.md#toservice) +- [fromService](identity_wasm.LinkedVerifiablePresentationService.md#fromservice) +- [isValid](identity_wasm.LinkedVerifiablePresentationService.md#isvalid) +- [clone](identity_wasm.LinkedVerifiablePresentationService.md#clone) +- [fromJSON](identity_wasm.LinkedVerifiablePresentationService.md#fromjson) + +## Constructors + +### constructor + +• **new LinkedVerifiablePresentationService**(`options`) + +Constructs a new [LinkedVerifiablePresentationService](identity_wasm.LinkedVerifiablePresentationService.md) that wraps a spec compliant [Linked Verifiable Presentation Service Endpoint](https://identity.foundation/linked-vp/#linked-verifiable-presentation-service-endpoint). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options` | [`ILinkedVerifiablePresentationService`](../interfaces/identity_wasm.ILinkedVerifiablePresentationService.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### verifiablePresentationUrls + +▸ **verifiablePresentationUrls**(): `string`[] + +Returns the domains contained in the Linked Verifiable Presentation Service. + +#### Returns + +`string`[] + +___ + +### toService + +▸ **toService**(): [`Service`](identity_wasm.Service.md) + +Returns the inner service which can be added to a DID Document. + +#### Returns + +[`Service`](identity_wasm.Service.md) + +___ + +### fromService + +▸ `Static` **fromService**(`service`): [`LinkedVerifiablePresentationService`](identity_wasm.LinkedVerifiablePresentationService.md) + +Creates a new [LinkedVerifiablePresentationService](identity_wasm.LinkedVerifiablePresentationService.md) from a [Service](identity_wasm.Service.md). + +# Error + +Errors if `service` is not a valid Linked Verifiable Presentation Service. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `service` | [`Service`](identity_wasm.Service.md) | + +#### Returns + +[`LinkedVerifiablePresentationService`](identity_wasm.LinkedVerifiablePresentationService.md) + +___ + +### isValid + +▸ `Static` **isValid**(`service`): `boolean` + +Returns `true` if a [Service](identity_wasm.Service.md) is a valid Linked Verifiable Presentation Service. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `service` | [`Service`](identity_wasm.Service.md) | + +#### Returns + +`boolean` + +___ + +### clone + +▸ **clone**(): [`LinkedVerifiablePresentationService`](identity_wasm.LinkedVerifiablePresentationService.md) + +Deep clones the object. + +#### Returns + +[`LinkedVerifiablePresentationService`](identity_wasm.LinkedVerifiablePresentationService.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`LinkedVerifiablePresentationService`](identity_wasm.LinkedVerifiablePresentationService.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`LinkedVerifiablePresentationService`](identity_wasm.LinkedVerifiablePresentationService.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodData.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodData.md new file mode 100644 index 00000000000..0437c3e4d31 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodData.md @@ -0,0 +1,201 @@ +# Class: MethodData + +[identity\_wasm](../modules/identity_wasm.md).MethodData + +Supported verification method data formats. + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.MethodData.md#tojson) +- [toString](identity_wasm.MethodData.md#tostring) +- [newBase58](identity_wasm.MethodData.md#newbase58) +- [newMultibase](identity_wasm.MethodData.md#newmultibase) +- [newJwk](identity_wasm.MethodData.md#newjwk) +- [newCustom](identity_wasm.MethodData.md#newcustom) +- [tryCustom](identity_wasm.MethodData.md#trycustom) +- [tryDecode](identity_wasm.MethodData.md#trydecode) +- [tryPublicKeyJwk](identity_wasm.MethodData.md#trypublickeyjwk) +- [fromJSON](identity_wasm.MethodData.md#fromjson) +- [clone](identity_wasm.MethodData.md#clone) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### newBase58 + +▸ `Static` **newBase58**(`data`): [`MethodData`](identity_wasm.MethodData.md) + +Creates a new [MethodData](identity_wasm.MethodData.md) variant with Base58-BTC encoded content. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | + +#### Returns + +[`MethodData`](identity_wasm.MethodData.md) + +___ + +### newMultibase + +▸ `Static` **newMultibase**(`data`): [`MethodData`](identity_wasm.MethodData.md) + +Creates a new [MethodData](identity_wasm.MethodData.md) variant with Multibase-encoded content. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | + +#### Returns + +[`MethodData`](identity_wasm.MethodData.md) + +___ + +### newJwk + +▸ `Static` **newJwk**(`key`): [`MethodData`](identity_wasm.MethodData.md) + +Creates a new [MethodData](identity_wasm.MethodData.md) variant consisting of the given `key`. + +### Errors +An error is thrown if the given `key` contains any private components. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | [`Jwk`](identity_wasm.Jwk.md) | + +#### Returns + +[`MethodData`](identity_wasm.MethodData.md) + +___ + +### newCustom + +▸ `Static` **newCustom**(`name`, `data`): [`MethodData`](identity_wasm.MethodData.md) + +Creates a new custom [MethodData](identity_wasm.MethodData.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `name` | `string` | +| `data` | `any` | + +#### Returns + +[`MethodData`](identity_wasm.MethodData.md) + +___ + +### tryCustom + +▸ **tryCustom**(): [`CustomMethodData`](identity_wasm.CustomMethodData.md) + +Returns the wrapped custom method data format is `Custom`. + +#### Returns + +[`CustomMethodData`](identity_wasm.CustomMethodData.md) + +___ + +### tryDecode + +▸ **tryDecode**(): `Uint8Array` + +Returns a `Uint8Array` containing the decoded bytes of the [MethodData](identity_wasm.MethodData.md). + +This is generally a public key identified by a [MethodData](identity_wasm.MethodData.md) value. + +### Errors +Decoding can fail if [MethodData](identity_wasm.MethodData.md) has invalid content or cannot be +represented as a vector of bytes. + +#### Returns + +`Uint8Array` + +___ + +### tryPublicKeyJwk + +▸ **tryPublicKeyJwk**(): [`Jwk`](identity_wasm.Jwk.md) + +Returns the wrapped [Jwk](identity_wasm.Jwk.md) if the format is `PublicKeyJwk`. + +#### Returns + +[`Jwk`](identity_wasm.Jwk.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`MethodData`](identity_wasm.MethodData.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`MethodData`](identity_wasm.MethodData.md) + +___ + +### clone + +▸ **clone**(): [`MethodData`](identity_wasm.MethodData.md) + +Deep clones the object. + +#### Returns + +[`MethodData`](identity_wasm.MethodData.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodDigest.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodDigest.md new file mode 100644 index 00000000000..fef9c41c898 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodDigest.md @@ -0,0 +1,101 @@ +# Class: MethodDigest + +[identity\_wasm](../modules/identity_wasm.md).MethodDigest + +Unique identifier of a [VerificationMethod](identity_wasm.VerificationMethod.md). + +NOTE: +This class does not have a JSON representation, +use the methods `pack` and `unpack` instead. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.MethodDigest.md#constructor) + +### Methods + +- [toJSON](identity_wasm.MethodDigest.md#tojson) +- [toString](identity_wasm.MethodDigest.md#tostring) +- [pack](identity_wasm.MethodDigest.md#pack) +- [unpack](identity_wasm.MethodDigest.md#unpack) +- [clone](identity_wasm.MethodDigest.md#clone) + +## Constructors + +### constructor + +• **new MethodDigest**(`verification_method`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `verification_method` | [`VerificationMethod`](identity_wasm.VerificationMethod.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### pack + +▸ **pack**(): `Uint8Array` + +Packs [MethodDigest](identity_wasm.MethodDigest.md) into bytes. + +#### Returns + +`Uint8Array` + +___ + +### unpack + +▸ `Static` **unpack**(`bytes`): [`MethodDigest`](identity_wasm.MethodDigest.md) + +Unpacks bytes into [MethodDigest](identity_wasm.MethodDigest.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `bytes` | `Uint8Array` | + +#### Returns + +[`MethodDigest`](identity_wasm.MethodDigest.md) + +___ + +### clone + +▸ **clone**(): [`MethodDigest`](identity_wasm.MethodDigest.md) + +Deep clones the object. + +#### Returns + +[`MethodDigest`](identity_wasm.MethodDigest.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodScope.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodScope.md new file mode 100644 index 00000000000..2b25296b739 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodScope.md @@ -0,0 +1,150 @@ +# Class: MethodScope + +[identity\_wasm](../modules/identity_wasm.md).MethodScope + +Supported verification method types. + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.MethodScope.md#tojson) +- [toString](identity_wasm.MethodScope.md#tostring) +- [VerificationMethod](identity_wasm.MethodScope.md#verificationmethod) +- [Authentication](identity_wasm.MethodScope.md#authentication) +- [AssertionMethod](identity_wasm.MethodScope.md#assertionmethod) +- [KeyAgreement](identity_wasm.MethodScope.md#keyagreement) +- [CapabilityDelegation](identity_wasm.MethodScope.md#capabilitydelegation) +- [CapabilityInvocation](identity_wasm.MethodScope.md#capabilityinvocation) +- [fromJSON](identity_wasm.MethodScope.md#fromjson) +- [clone](identity_wasm.MethodScope.md#clone) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Returns the [MethodScope](identity_wasm.MethodScope.md) as a string. + +#### Returns + +`string` + +___ + +### VerificationMethod + +▸ `Static` **VerificationMethod**(): [`MethodScope`](identity_wasm.MethodScope.md) + +#### Returns + +[`MethodScope`](identity_wasm.MethodScope.md) + +___ + +### Authentication + +▸ `Static` **Authentication**(): [`MethodScope`](identity_wasm.MethodScope.md) + +#### Returns + +[`MethodScope`](identity_wasm.MethodScope.md) + +___ + +### AssertionMethod + +▸ `Static` **AssertionMethod**(): [`MethodScope`](identity_wasm.MethodScope.md) + +#### Returns + +[`MethodScope`](identity_wasm.MethodScope.md) + +___ + +### KeyAgreement + +▸ `Static` **KeyAgreement**(): [`MethodScope`](identity_wasm.MethodScope.md) + +#### Returns + +[`MethodScope`](identity_wasm.MethodScope.md) + +___ + +### CapabilityDelegation + +▸ `Static` **CapabilityDelegation**(): [`MethodScope`](identity_wasm.MethodScope.md) + +#### Returns + +[`MethodScope`](identity_wasm.MethodScope.md) + +___ + +### CapabilityInvocation + +▸ `Static` **CapabilityInvocation**(): [`MethodScope`](identity_wasm.MethodScope.md) + +#### Returns + +[`MethodScope`](identity_wasm.MethodScope.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`MethodScope`](identity_wasm.MethodScope.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`MethodScope`](identity_wasm.MethodScope.md) + +___ + +### clone + +▸ **clone**(): [`MethodScope`](identity_wasm.MethodScope.md) + +Deep clones the object. + +#### Returns + +[`MethodScope`](identity_wasm.MethodScope.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodType.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodType.md new file mode 100644 index 00000000000..a7ebd56ee54 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.MethodType.md @@ -0,0 +1,154 @@ +# Class: MethodType + +[identity\_wasm](../modules/identity_wasm.md).MethodType + +Supported verification method types. + +## Table of contents + +### Methods + +- [toJSON](identity_wasm.MethodType.md#tojson) +- [toString](identity_wasm.MethodType.md#tostring) +- [Ed25519VerificationKey2018](identity_wasm.MethodType.md#ed25519verificationkey2018) +- [X25519KeyAgreementKey2019](identity_wasm.MethodType.md#x25519keyagreementkey2019) +- [JsonWebKey](identity_wasm.MethodType.md#jsonwebkey) +- [JsonWebKey2020](identity_wasm.MethodType.md#jsonwebkey2020) +- [custom](identity_wasm.MethodType.md#custom) +- [fromJSON](identity_wasm.MethodType.md#fromjson) +- [clone](identity_wasm.MethodType.md#clone) + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Returns the [MethodType](identity_wasm.MethodType.md) as a string. + +#### Returns + +`string` + +___ + +### Ed25519VerificationKey2018 + +▸ `Static` **Ed25519VerificationKey2018**(): [`MethodType`](identity_wasm.MethodType.md) + +#### Returns + +[`MethodType`](identity_wasm.MethodType.md) + +___ + +### X25519KeyAgreementKey2019 + +▸ `Static` **X25519KeyAgreementKey2019**(): [`MethodType`](identity_wasm.MethodType.md) + +#### Returns + +[`MethodType`](identity_wasm.MethodType.md) + +___ + +### JsonWebKey + +▸ `Static` **JsonWebKey**(): [`MethodType`](identity_wasm.MethodType.md) + +#### Returns + +[`MethodType`](identity_wasm.MethodType.md) + +**`Deprecated`** + +Use [JsonWebKey2020](identity_wasm.MethodType.md#jsonwebkey2020) instead. + +___ + +### JsonWebKey2020 + +▸ `Static` **JsonWebKey2020**(): [`MethodType`](identity_wasm.MethodType.md) + +A verification method for use with JWT verification as prescribed by the [Jwk](identity_wasm.Jwk.md) +in the `publicKeyJwk` entry. + +#### Returns + +[`MethodType`](identity_wasm.MethodType.md) + +___ + +### custom + +▸ `Static` **custom**(`type_`): [`MethodType`](identity_wasm.MethodType.md) + +A custom method. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type_` | `string` | + +#### Returns + +[`MethodType`](identity_wasm.MethodType.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`MethodType`](identity_wasm.MethodType.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`MethodType`](identity_wasm.MethodType.md) + +___ + +### clone + +▸ **clone**(): [`MethodType`](identity_wasm.MethodType.md) + +Deep clones the object. + +#### Returns + +[`MethodType`](identity_wasm.MethodType.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.PayloadEntry.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.PayloadEntry.md new file mode 100644 index 00000000000..224e47eda7f --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.PayloadEntry.md @@ -0,0 +1,22 @@ +# Class: PayloadEntry + +[identity\_wasm](../modules/identity_wasm.md).PayloadEntry + +## Table of contents + +### Properties + +- [1](identity_wasm.PayloadEntry.md#1) +- [value](identity_wasm.PayloadEntry.md#value) + +## Properties + +### 1 + +• **1**: [`PayloadType`](../enums/identity_wasm.PayloadType.md) + +___ + +### value + +• **value**: `any` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Payloads.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Payloads.md new file mode 100644 index 00000000000..fb9bc4363f2 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Payloads.md @@ -0,0 +1,197 @@ +# Class: Payloads + +[identity\_wasm](../modules/identity_wasm.md).Payloads + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Payloads.md#constructor) + +### Methods + +- [toJSON](identity_wasm.Payloads.md#tojson) +- [toString](identity_wasm.Payloads.md#tostring) +- [fromJSON](identity_wasm.Payloads.md#fromjson) +- [clone](identity_wasm.Payloads.md#clone) +- [newFromValues](identity_wasm.Payloads.md#newfromvalues) +- [getValues](identity_wasm.Payloads.md#getvalues) +- [getUndisclosedIndexes](identity_wasm.Payloads.md#getundisclosedindexes) +- [getDisclosedIndexes](identity_wasm.Payloads.md#getdisclosedindexes) +- [getUndisclosedPayloads](identity_wasm.Payloads.md#getundisclosedpayloads) +- [getDisclosedPayloads](identity_wasm.Payloads.md#getdisclosedpayloads) +- [setUndisclosed](identity_wasm.Payloads.md#setundisclosed) +- [replacePayloadAtIndex](identity_wasm.Payloads.md#replacepayloadatindex) + +## Constructors + +### constructor + +• **new Payloads**(`entries`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `entries` | [`PayloadEntry`](identity_wasm.PayloadEntry.md)[] | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Payloads`](identity_wasm.Payloads.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Payloads`](identity_wasm.Payloads.md) + +___ + +### clone + +▸ **clone**(): [`Payloads`](identity_wasm.Payloads.md) + +Deep clones the object. + +#### Returns + +[`Payloads`](identity_wasm.Payloads.md) + +___ + +### newFromValues + +▸ `Static` **newFromValues**(`values`): [`Payloads`](identity_wasm.Payloads.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `values` | `any`[] | + +#### Returns + +[`Payloads`](identity_wasm.Payloads.md) + +___ + +### getValues + +▸ **getValues**(): `any`[] + +#### Returns + +`any`[] + +___ + +### getUndisclosedIndexes + +▸ **getUndisclosedIndexes**(): `Uint32Array` + +#### Returns + +`Uint32Array` + +___ + +### getDisclosedIndexes + +▸ **getDisclosedIndexes**(): `Uint32Array` + +#### Returns + +`Uint32Array` + +___ + +### getUndisclosedPayloads + +▸ **getUndisclosedPayloads**(): `any`[] + +#### Returns + +`any`[] + +___ + +### getDisclosedPayloads + +▸ **getDisclosedPayloads**(): [`Payloads`](identity_wasm.Payloads.md) + +#### Returns + +[`Payloads`](identity_wasm.Payloads.md) + +___ + +### setUndisclosed + +▸ **setUndisclosed**(`index`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `number` | + +#### Returns + +`void` + +___ + +### replacePayloadAtIndex + +▸ **replacePayloadAtIndex**(`index`, `value`): `any` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `number` | +| `value` | `any` | + +#### Returns + +`any` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Presentation.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Presentation.md new file mode 100644 index 00000000000..363337afa66 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Presentation.md @@ -0,0 +1,256 @@ +# Class: Presentation + +[identity\_wasm](../modules/identity_wasm.md).Presentation + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Presentation.md#constructor) + +### Methods + +- [toJSON](identity_wasm.Presentation.md#tojson) +- [toString](identity_wasm.Presentation.md#tostring) +- [BaseContext](identity_wasm.Presentation.md#basecontext) +- [BaseType](identity_wasm.Presentation.md#basetype) +- [context](identity_wasm.Presentation.md#context) +- [id](identity_wasm.Presentation.md#id) +- [type](identity_wasm.Presentation.md#type) +- [verifiableCredential](identity_wasm.Presentation.md#verifiablecredential) +- [holder](identity_wasm.Presentation.md#holder) +- [refreshService](identity_wasm.Presentation.md#refreshservice) +- [termsOfUse](identity_wasm.Presentation.md#termsofuse) +- [proof](identity_wasm.Presentation.md#proof) +- [setProof](identity_wasm.Presentation.md#setproof) +- [properties](identity_wasm.Presentation.md#properties) +- [fromJSON](identity_wasm.Presentation.md#fromjson) +- [clone](identity_wasm.Presentation.md#clone) + +## Constructors + +### constructor + +• **new Presentation**(`values`) + +Constructs a new presentation. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `values` | [`IPresentation`](../interfaces/identity_wasm.IPresentation.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### BaseContext + +▸ `Static` **BaseContext**(): `string` + +Returns the base JSON-LD context. + +#### Returns + +`string` + +___ + +### BaseType + +▸ `Static` **BaseType**(): `string` + +Returns the base type. + +#### Returns + +`string` + +___ + +### context + +▸ **context**(): (`string` \| `Record`\<`string`, `any`\>)[] + +Returns a copy of the JSON-LD context(s) applicable to the presentation. + +#### Returns + +(`string` \| `Record`\<`string`, `any`\>)[] + +___ + +### id + +▸ **id**(): `undefined` \| `string` + +Returns a copy of the unique `URI` identifying the presentation. + +#### Returns + +`undefined` \| `string` + +___ + +### type + +▸ **type**(): `string`[] + +Returns a copy of the URIs defining the type of the presentation. + +#### Returns + +`string`[] + +___ + +### verifiableCredential + +▸ **verifiableCredential**(): [`UnknownCredential`](identity_wasm.UnknownCredential.md)[] + +Returns the JWT credentials expressing the claims of the presentation. + +#### Returns + +[`UnknownCredential`](identity_wasm.UnknownCredential.md)[] + +___ + +### holder + +▸ **holder**(): `string` + +Returns a copy of the URI of the entity that generated the presentation. + +#### Returns + +`string` + +___ + +### refreshService + +▸ **refreshService**(): [`RefreshService`](../interfaces/identity_wasm.RefreshService.md)[] + +Returns a copy of the service(s) used to refresh an expired [Credential](identity_wasm.Credential.md) in the presentation. + +#### Returns + +[`RefreshService`](../interfaces/identity_wasm.RefreshService.md)[] + +___ + +### termsOfUse + +▸ **termsOfUse**(): [`Policy`](../interfaces/identity_wasm.Policy.md)[] + +Returns a copy of the terms-of-use specified by the presentation holder + +#### Returns + +[`Policy`](../interfaces/identity_wasm.Policy.md)[] + +___ + +### proof + +▸ **proof**(): `undefined` \| [`Proof`](identity_wasm.Proof.md) + +Optional cryptographic proof, unrelated to JWT. + +#### Returns + +`undefined` \| [`Proof`](identity_wasm.Proof.md) + +___ + +### setProof + +▸ **setProof**(`proof?`): `void` + +Sets the proof property of the [Presentation](identity_wasm.Presentation.md). + +Note that this proof is not related to JWT. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proof?` | [`Proof`](identity_wasm.Proof.md) | + +#### Returns + +`void` + +___ + +### properties + +▸ **properties**(): `Map`\<`string`, `any`\> + +Returns a copy of the miscellaneous properties on the presentation. + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Presentation`](identity_wasm.Presentation.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Presentation`](identity_wasm.Presentation.md) + +___ + +### clone + +▸ **clone**(): [`Presentation`](identity_wasm.Presentation.md) + +Deep clones the object. + +#### Returns + +[`Presentation`](identity_wasm.Presentation.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.PresentationProtectedHeader.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.PresentationProtectedHeader.md new file mode 100644 index 00000000000..9cfd961cba3 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.PresentationProtectedHeader.md @@ -0,0 +1,71 @@ +# Class: PresentationProtectedHeader + +[identity\_wasm](../modules/identity_wasm.md).PresentationProtectedHeader + +## Table of contents + +### Properties + +- [alg](identity_wasm.PresentationProtectedHeader.md#alg) +- [aud](identity_wasm.PresentationProtectedHeader.md#aud) +- [kid](identity_wasm.PresentationProtectedHeader.md#kid) +- [nonce](identity_wasm.PresentationProtectedHeader.md#nonce) + +### Methods + +- [toJSON](identity_wasm.PresentationProtectedHeader.md#tojson) +- [toString](identity_wasm.PresentationProtectedHeader.md#tostring) + +## Properties + +### alg + +• **alg**: [`PresentationProofAlgorithm`](../enums/identity_wasm.PresentationProofAlgorithm.md) + +___ + +### aud + +• `Optional` **aud**: `string` + +Who have received the JPT. + +___ + +### kid + +• `Optional` **kid**: `string` + +ID for the key used for the JWP. + +___ + +### nonce + +• `Optional` **nonce**: `string` + +For replay attacks. + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Proof.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Proof.md new file mode 100644 index 00000000000..63c82657bd7 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Proof.md @@ -0,0 +1,106 @@ +# Class: Proof + +[identity\_wasm](../modules/identity_wasm.md).Proof + +Represents a cryptographic proof that can be used to validate verifiable credentials and +presentations. + +This representation does not inherently implement any standard; instead, it +can be utilized to implement standards or user-defined proofs. The presence of the +`type` field is necessary to accommodate different types of cryptographic proofs. + +Note that this proof is not related to JWT and can be used in combination or as an alternative +to it. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Proof.md#constructor) + +### Methods + +- [type](identity_wasm.Proof.md#type) +- [properties](identity_wasm.Proof.md#properties) +- [toJSON](identity_wasm.Proof.md#tojson) +- [fromJSON](identity_wasm.Proof.md#fromjson) +- [clone](identity_wasm.Proof.md#clone) + +## Constructors + +### constructor + +• **new Proof**(`type_`, `properties`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type_` | `string` | +| `properties` | `any` | + +## Methods + +### type + +▸ **type**(): `string` + +Returns the type of proof. + +#### Returns + +`string` + +___ + +### properties + +▸ **properties**(): `any` + +Returns the properties of the proof. + +#### Returns + +`any` + +___ + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Proof`](identity_wasm.Proof.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Proof`](identity_wasm.Proof.md) + +___ + +### clone + +▸ **clone**(): [`Proof`](identity_wasm.Proof.md) + +Deep clones the object. + +#### Returns + +[`Proof`](identity_wasm.Proof.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.ProofUpdateCtx.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.ProofUpdateCtx.md new file mode 100644 index 00000000000..c169cda856e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.ProofUpdateCtx.md @@ -0,0 +1,100 @@ +# Class: ProofUpdateCtx + +[identity\_wasm](../modules/identity_wasm.md).ProofUpdateCtx + +## Table of contents + +### Properties + +- [index\_end\_validity\_timeframe](identity_wasm.ProofUpdateCtx.md#index_end_validity_timeframe) +- [index\_start\_validity\_timeframe](identity_wasm.ProofUpdateCtx.md#index_start_validity_timeframe) +- [new\_end\_validity\_timeframe](identity_wasm.ProofUpdateCtx.md#new_end_validity_timeframe) +- [new\_start\_validity\_timeframe](identity_wasm.ProofUpdateCtx.md#new_start_validity_timeframe) +- [number\_of\_signed\_messages](identity_wasm.ProofUpdateCtx.md#number_of_signed_messages) +- [old\_end\_validity\_timeframe](identity_wasm.ProofUpdateCtx.md#old_end_validity_timeframe) +- [old\_start\_validity\_timeframe](identity_wasm.ProofUpdateCtx.md#old_start_validity_timeframe) + +### Methods + +- [toJSON](identity_wasm.ProofUpdateCtx.md#tojson) +- [toString](identity_wasm.ProofUpdateCtx.md#tostring) + +## Properties + +### index\_end\_validity\_timeframe + +• **index\_end\_validity\_timeframe**: `number` + +Index of `endValidityTimeframe` claim inside the array of Claims + +___ + +### index\_start\_validity\_timeframe + +• **index\_start\_validity\_timeframe**: `number` + +Index of `startValidityTimeframe` claim inside the array of Claims + +___ + +### new\_end\_validity\_timeframe + +• **new\_end\_validity\_timeframe**: `Uint8Array` + +New `endValidityTimeframe` value to be signed + +___ + +### new\_start\_validity\_timeframe + +• **new\_start\_validity\_timeframe**: `Uint8Array` + +New `startValidityTimeframe` value to be signed + +___ + +### number\_of\_signed\_messages + +• **number\_of\_signed\_messages**: `number` + +Number of signed messages, number of payloads in a JWP + +___ + +### old\_end\_validity\_timeframe + +• **old\_end\_validity\_timeframe**: `Uint8Array` + +Old `endValidityTimeframe` value + +___ + +### old\_start\_validity\_timeframe + +• **old\_start\_validity\_timeframe**: `Uint8Array` + +Old `startValidityTimeframe` value + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Resolver.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Resolver.md new file mode 100644 index 00000000000..f30a73acf04 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Resolver.md @@ -0,0 +1,91 @@ +# Class: Resolver + +[identity\_wasm](../modules/identity_wasm.md).Resolver + +Convenience type for resolving DID documents from different DID methods. + +Also provides methods for resolving DID Documents associated with +verifiable [Credential](identity_wasm.Credential.md)s and [Presentation](identity_wasm.Presentation.md)s. + +# Configuration + +The resolver will only be able to resolve DID documents for methods it has been configured for in the constructor. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Resolver.md#constructor) + +### Methods + +- [resolve](identity_wasm.Resolver.md#resolve) +- [resolveMultiple](identity_wasm.Resolver.md#resolvemultiple) + +## Constructors + +### constructor + +• **new Resolver**(`config`) + +Constructs a new [Resolver](identity_wasm.Resolver.md). + +# Errors +If both a `client` is given and the `handlers` map contains the "iota" key the construction process +will throw an error because the handler for the "iota" method then becomes ambiguous. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config` | [`ResolverConfig`](../modules/identity_wasm.md#resolverconfig) | + +## Methods + +### resolve + +▸ **resolve**(`did`): `Promise`\<`IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md)\> + +Fetches the DID Document of the given DID. + +### Errors + +Errors if the resolver has not been configured to handle the method +corresponding to the given DID or the resolution process itself fails. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | `string` | + +#### Returns + +`Promise`\<`IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md)\> + +___ + +### resolveMultiple + +▸ **resolveMultiple**(`dids`): `Promise`\<(`IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md))[]\> + +Concurrently fetches the DID Documents of the multiple given DIDs. + +# Errors +* If the resolver has not been configured to handle the method of any of the given DIDs. +* If the resolution process of any DID fails. + +## Note +* The order of the documents in the returned array matches that in `dids`. +* If `dids` contains duplicates, these will be resolved only once and the resolved document +is copied into the returned array to match the order of `dids`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `dids` | `string`[] | + +#### Returns + +`Promise`\<(`IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md))[]\> diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.RevocationBitmap.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.RevocationBitmap.md new file mode 100644 index 00000000000..93250006c47 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.RevocationBitmap.md @@ -0,0 +1,177 @@ +# Class: RevocationBitmap + +[identity\_wasm](../modules/identity_wasm.md).RevocationBitmap + +A compressed bitmap for managing credential revocation. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.RevocationBitmap.md#constructor) + +### Methods + +- [toJSON](identity_wasm.RevocationBitmap.md#tojson) +- [toString](identity_wasm.RevocationBitmap.md#tostring) +- [type](identity_wasm.RevocationBitmap.md#type) +- [isRevoked](identity_wasm.RevocationBitmap.md#isrevoked) +- [revoke](identity_wasm.RevocationBitmap.md#revoke) +- [unrevoke](identity_wasm.RevocationBitmap.md#unrevoke) +- [len](identity_wasm.RevocationBitmap.md#len) +- [toService](identity_wasm.RevocationBitmap.md#toservice) +- [fromEndpoint](identity_wasm.RevocationBitmap.md#fromendpoint) + +## Constructors + +### constructor + +• **new RevocationBitmap**() + +Creates a new [RevocationBitmap](identity_wasm.RevocationBitmap.md) instance. + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### type + +▸ `Static` **type**(): `string` + +The name of the service type. + +#### Returns + +`string` + +___ + +### isRevoked + +▸ **isRevoked**(`index`): `boolean` + +Returns `true` if the credential at the given `index` is revoked. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `number` | + +#### Returns + +`boolean` + +___ + +### revoke + +▸ **revoke**(`index`): `boolean` + +Mark the given index as revoked. + +Returns true if the index was absent from the set. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `number` | + +#### Returns + +`boolean` + +___ + +### unrevoke + +▸ **unrevoke**(`index`): `boolean` + +Mark the index as not revoked. + +Returns true if the index was present in the set. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `number` | + +#### Returns + +`boolean` + +___ + +### len + +▸ **len**(): `number` + +Returns the number of revoked credentials. + +#### Returns + +`number` + +___ + +### toService + +▸ **toService**(`serviceId`): [`Service`](identity_wasm.Service.md) + +Return a `Service` with: +- the service's id set to `serviceId`, +- of type `RevocationBitmap2022`, +- and with the bitmap embedded in a data url in the service's endpoint. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `serviceId` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +[`Service`](identity_wasm.Service.md) + +___ + +### fromEndpoint + +▸ `Static` **fromEndpoint**(`service`): [`RevocationBitmap`](identity_wasm.RevocationBitmap.md) + +Try to construct a [RevocationBitmap](identity_wasm.RevocationBitmap.md) from a service +if it is a valid Revocation Bitmap Service. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `service` | [`Service`](identity_wasm.Service.md) | + +#### Returns + +[`RevocationBitmap`](identity_wasm.RevocationBitmap.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.RevocationTimeframeStatus.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.RevocationTimeframeStatus.md new file mode 100644 index 00000000000..6b37e137095 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.RevocationTimeframeStatus.md @@ -0,0 +1,149 @@ +# Class: RevocationTimeframeStatus + +[identity\_wasm](../modules/identity_wasm.md).RevocationTimeframeStatus + +Information used to determine the current status of a [Credential](identity_wasm.Credential.md). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.RevocationTimeframeStatus.md#constructor) + +### Methods + +- [toJSON](identity_wasm.RevocationTimeframeStatus.md#tojson) +- [toString](identity_wasm.RevocationTimeframeStatus.md#tostring) +- [clone](identity_wasm.RevocationTimeframeStatus.md#clone) +- [fromJSON](identity_wasm.RevocationTimeframeStatus.md#fromjson) +- [startValidityTimeframe](identity_wasm.RevocationTimeframeStatus.md#startvaliditytimeframe) +- [endValidityTimeframe](identity_wasm.RevocationTimeframeStatus.md#endvaliditytimeframe) +- [id](identity_wasm.RevocationTimeframeStatus.md#id) +- [index](identity_wasm.RevocationTimeframeStatus.md#index) + +## Constructors + +### constructor + +• **new RevocationTimeframeStatus**(`id`, `index`, `duration`, `start_validity?`) + +Creates a new `RevocationTimeframeStatus`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | +| `index` | `number` | +| `duration` | [`Duration`](identity_wasm.Duration.md) | +| `start_validity?` | [`Timestamp`](identity_wasm.Timestamp.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### clone + +▸ **clone**(): [`RevocationTimeframeStatus`](identity_wasm.RevocationTimeframeStatus.md) + +Deep clones the object. + +#### Returns + +[`RevocationTimeframeStatus`](identity_wasm.RevocationTimeframeStatus.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`RevocationTimeframeStatus`](identity_wasm.RevocationTimeframeStatus.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`RevocationTimeframeStatus`](identity_wasm.RevocationTimeframeStatus.md) + +___ + +### startValidityTimeframe + +▸ **startValidityTimeframe**(): [`Timestamp`](identity_wasm.Timestamp.md) + +Get startValidityTimeframe value. + +#### Returns + +[`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### endValidityTimeframe + +▸ **endValidityTimeframe**(): [`Timestamp`](identity_wasm.Timestamp.md) + +Get endValidityTimeframe value. + +#### Returns + +[`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### id + +▸ **id**(): `string` + +Return the URL fo the `RevocationBitmapStatus`. + +#### Returns + +`string` + +___ + +### index + +▸ **index**(): `undefined` \| `number` + +Return the index of the credential in the issuer's revocation bitmap + +#### Returns + +`undefined` \| `number` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdJwt.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdJwt.md new file mode 100644 index 00000000000..19f91546d33 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdJwt.md @@ -0,0 +1,152 @@ +# Class: SdJwt + +[identity\_wasm](../modules/identity_wasm.md).SdJwt + +Representation of an SD-JWT of the format +`~~~...~~`. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.SdJwt.md#constructor) + +### Methods + +- [toJSON](identity_wasm.SdJwt.md#tojson) +- [toString](identity_wasm.SdJwt.md#tostring) +- [presentation](identity_wasm.SdJwt.md#presentation) +- [parse](identity_wasm.SdJwt.md#parse) +- [jwt](identity_wasm.SdJwt.md#jwt) +- [disclosures](identity_wasm.SdJwt.md#disclosures) +- [keyBindingJwt](identity_wasm.SdJwt.md#keybindingjwt) +- [clone](identity_wasm.SdJwt.md#clone) + +## Constructors + +### constructor + +• **new SdJwt**(`jwt`, `disclosures`, `key_binding_jwt?`) + +Creates a new `SdJwt` from its components. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jwt` | `string` | +| `disclosures` | `string`[] | +| `key_binding_jwt?` | `string` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Serializes the components into the final SD-JWT. + +#### Returns + +`string` + +___ + +### presentation + +▸ **presentation**(): `string` + +Serializes the components into the final SD-JWT. + +#### Returns + +`string` + +___ + +### parse + +▸ `Static` **parse**(`sd_jwt`): [`SdJwt`](identity_wasm.SdJwt.md) + +Parses an SD-JWT into its components as [`SdJwt`]. + +## Error +Returns `DeserializationError` if parsing fails. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sd_jwt` | `string` | + +#### Returns + +[`SdJwt`](identity_wasm.SdJwt.md) + +___ + +### jwt + +▸ **jwt**(): `string` + +The JWT part. + +#### Returns + +`string` + +___ + +### disclosures + +▸ **disclosures**(): `string`[] + +The disclosures part. + +#### Returns + +`string`[] + +___ + +### keyBindingJwt + +▸ **keyBindingJwt**(): `undefined` \| `string` + +The optional key binding JWT. + +#### Returns + +`undefined` \| `string` + +___ + +### clone + +▸ **clone**(): [`SdJwt`](identity_wasm.SdJwt.md) + +Deep clones the object. + +#### Returns + +[`SdJwt`](identity_wasm.SdJwt.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdJwtCredentialValidator.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdJwtCredentialValidator.md new file mode 100644 index 00000000000..1dd0dd4cb86 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdJwtCredentialValidator.md @@ -0,0 +1,140 @@ +# Class: SdJwtCredentialValidator + +[identity\_wasm](../modules/identity_wasm.md).SdJwtCredentialValidator + +A type for decoding and validating [Credential](identity_wasm.Credential.md). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.SdJwtCredentialValidator.md#constructor) + +### Methods + +- [validateCredential](identity_wasm.SdJwtCredentialValidator.md#validatecredential) +- [verifySignature](identity_wasm.SdJwtCredentialValidator.md#verifysignature) +- [validateKeyBindingJwt](identity_wasm.SdJwtCredentialValidator.md#validatekeybindingjwt) + +## Constructors + +### constructor + +• **new SdJwtCredentialValidator**(`signatureVerifier?`) + +Creates a new `SdJwtCredentialValidator`. If a `signatureVerifier` is provided it will be used when +verifying decoded JWS signatures, otherwise a default verifier capable of handling the `EdDSA`, `ES256`, `ES256K` +algorithms will be used. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `signatureVerifier?` | [`IJwsVerifier`](../interfaces/identity_wasm.IJwsVerifier.md) | + +## Methods + +### validateCredential + +▸ **validateCredential**(`sd_jwt`, `issuer`, `options`, `fail_fast`): [`DecodedJwtCredential`](identity_wasm.DecodedJwtCredential.md) + +Decodes and validates a `Credential` issued as an SD-JWT. A `DecodedJwtCredential` is returned upon success. +The credential is constructed by replacing disclosures following the +[`Selective Disclosure for JWTs (SD-JWT)`](https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-07.html) standard. + +The following properties are validated according to `options`: +- the issuer's signature on the JWS, +- the expiration date, +- the issuance date, +- the semantic structure. + +# Warning +* The key binding JWT is not validated. If needed, it must be validated separately using +`SdJwtValidator::validate_key_binding_jwt`. +* The lack of an error returned from this method is in of itself not enough to conclude that the credential can be +trusted. This section contains more information on additional checks that should be carried out before and after +calling this method. + +## The state of the issuer's DID Document +The caller must ensure that `issuer` represents an up-to-date DID Document. + +## Properties that are not validated + There are many properties defined in [The Verifiable Credentials Data Model](https://www.w3.org/TR/vc-data-model/) that are **not** validated, such as: +`proof`, `credentialStatus`, `type`, `credentialSchema`, `refreshService` **and more**. +These should be manually checked after validation, according to your requirements. + +# Errors +An error is returned whenever a validated condition is not satisfied. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sd_jwt` | [`SdJwt`](identity_wasm.SdJwt.md) | +| `issuer` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `options` | [`JwtCredentialValidationOptions`](identity_wasm.JwtCredentialValidationOptions.md) | +| `fail_fast` | [`FailFast`](../enums/identity_wasm.FailFast.md) | + +#### Returns + +[`DecodedJwtCredential`](identity_wasm.DecodedJwtCredential.md) + +___ + +### verifySignature + +▸ **verifySignature**(`credential`, `trustedIssuers`, `options`): [`DecodedJwtCredential`](identity_wasm.DecodedJwtCredential.md) + +Decode and verify the JWS signature of a `Credential` issued as an SD-JWT using the DID Document of a trusted +issuer and replaces the disclosures. + +A `DecodedJwtCredential` is returned upon success. + +# Warning +The caller must ensure that the DID Documents of the trusted issuers are up-to-date. + +## Proofs + Only the JWS signature is verified. If the `Credential` contains a `proof` property this will not be verified +by this method. + +# Errors +* If the issuer' URL cannot be parsed. +* If Signature verification fails. +* If SD decoding fails. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`SdJwt`](identity_wasm.SdJwt.md) | +| `trustedIssuers` | (`IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md))[] | +| `options` | [`JwsVerificationOptions`](identity_wasm.JwsVerificationOptions.md) | + +#### Returns + +[`DecodedJwtCredential`](identity_wasm.DecodedJwtCredential.md) + +___ + +### validateKeyBindingJwt + +▸ **validateKeyBindingJwt**(`sdJwt`, `holder`, `options`): [`KeyBindingJwtClaims`](identity_wasm.KeyBindingJwtClaims.md) + +Validates a Key Binding JWT (KB-JWT) according to `https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-07.html#name-key-binding-jwt`. +The Validation process includes: + * Signature validation using public key materials defined in the `holder` document. + * `typ` value in KB-JWT header. + * `sd_hash` claim value in the KB-JWT claim. + * Optional `nonce`, `aud` and issuance date validation. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `sdJwt` | [`SdJwt`](identity_wasm.SdJwt.md) | +| `holder` | `IToCoreDocument` \| [`CoreDocument`](identity_wasm.CoreDocument.md) | +| `options` | [`KeyBindingJWTValidationOptions`](identity_wasm.KeyBindingJWTValidationOptions.md) | + +#### Returns + +[`KeyBindingJwtClaims`](identity_wasm.KeyBindingJwtClaims.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdObjectDecoder.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdObjectDecoder.md new file mode 100644 index 00000000000..a94f61e2954 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdObjectDecoder.md @@ -0,0 +1,73 @@ +# Class: SdObjectDecoder + +[identity\_wasm](../modules/identity_wasm.md).SdObjectDecoder + +Substitutes digests in an SD-JWT object by their corresponding plaintext values provided by disclosures. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.SdObjectDecoder.md#constructor) + +### Methods + +- [toJSON](identity_wasm.SdObjectDecoder.md#tojson) +- [toString](identity_wasm.SdObjectDecoder.md#tostring) +- [decode](identity_wasm.SdObjectDecoder.md#decode) + +## Constructors + +### constructor + +• **new SdObjectDecoder**() + +Creates a new `SdObjectDecoder` with `sha-256` hasher. + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### decode + +▸ **decode**(`object`, `disclosures`): `Record`\<`string`, `any`\> + +Decodes an SD-JWT `object` containing by Substituting the digests with their corresponding +plaintext values provided by `disclosures`. + +## Notes +* Claims like `exp` or `iat` are not validated in the process of decoding. +* `_sd_alg` property will be removed if present. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `object` | `Record`\<`string`, `any`\> | +| `disclosures` | `string`[] | + +#### Returns + +`Record`\<`string`, `any`\> diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdObjectEncoder.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdObjectEncoder.md new file mode 100644 index 00000000000..e754bf0f513 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SdObjectEncoder.md @@ -0,0 +1,178 @@ +# Class: SdObjectEncoder + +[identity\_wasm](../modules/identity_wasm.md).SdObjectEncoder + +Transforms a JSON object into an SD-JWT object by substituting selected values +with their corresponding disclosure digests. + +Note: digests are created using the sha-256 algorithm. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.SdObjectEncoder.md#constructor) + +### Methods + +- [toJSON](identity_wasm.SdObjectEncoder.md#tojson) +- [toString](identity_wasm.SdObjectEncoder.md#tostring) +- [conceal](identity_wasm.SdObjectEncoder.md#conceal) +- [addSdAlgProperty](identity_wasm.SdObjectEncoder.md#addsdalgproperty) +- [encodeToString](identity_wasm.SdObjectEncoder.md#encodetostring) +- [encodeToObject](identity_wasm.SdObjectEncoder.md#encodetoobject) +- [addDecoys](identity_wasm.SdObjectEncoder.md#adddecoys) + +## Constructors + +### constructor + +• **new SdObjectEncoder**(`object`) + +Creates a new `SdObjectEncoder` with `sha-256` hash function. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `object` | `any` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Returns the modified object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +▸ **toString**(): `string` + +Returns the modified object as a string. + +#### Returns + +`string` + +___ + +### conceal + +▸ **conceal**(`path`, `salt?`): [`Disclosure`](identity_wasm.Disclosure.md) + +Substitutes a value with the digest of its disclosure. +If no salt is provided, the disclosure will be created with a random salt value. + +`path` indicates the pointer to the value that will be concealed using the syntax of +[JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901). + +For the following object: + + ``` +{ + "id": "did:value", + "claim1": { + "abc": true + }, + "claim2": ["val_1", "val_2"] +} +``` + +Path "/id" conceals `"id": "did:value"` +Path "/claim1/abc" conceals `"abc": true` +Path "/claim2/0" conceals `val_1` + +## Errors +* `InvalidPath` if pointer is invalid. +* `DataTypeMismatch` if existing SD format is invalid. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `path` | `string` | +| `salt?` | `string` | + +#### Returns + +[`Disclosure`](identity_wasm.Disclosure.md) + +___ + +### addSdAlgProperty + +▸ **addSdAlgProperty**(): `void` + +Adds the `_sd_alg` property to the top level of the object, with +its value set to "sha-256". + +#### Returns + +`void` + +___ + +### encodeToString + +▸ **encodeToString**(): `string` + +Returns the modified object as a string. + +#### Returns + +`string` + +___ + +### encodeToObject + +▸ **encodeToObject**(): `Record`\<`string`, `any`\> + +Returns the modified object. + +#### Returns + +`Record`\<`string`, `any`\> + +___ + +### addDecoys + +▸ **addDecoys**(`path`, `number_of_decoys`): `void` + +Adds a decoy digest to the specified path. +If path is an empty slice, decoys will be added to the top level. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `path` | `string` | +| `number_of_decoys` | `number` | + +#### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.SelectiveDisclosurePresentation.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SelectiveDisclosurePresentation.md new file mode 100644 index 00000000000..d980ef92d8e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.SelectiveDisclosurePresentation.md @@ -0,0 +1,120 @@ +# Class: SelectiveDisclosurePresentation + +[identity\_wasm](../modules/identity_wasm.md).SelectiveDisclosurePresentation + +Used to construct a JwpPresentedBuilder and handle the selective disclosure of attributes +- + +**`Context`** + +MUST NOT be blinded +- id MUST be blinded +- type MUST NOT be blinded +- issuer MUST NOT be blinded +- issuanceDate MUST be blinded (if Timeframe Revocation mechanism is used) +- expirationDate MUST be blinded (if Timeframe Revocation mechanism is used) +- credentialSubject (User have to choose which attribute must be blinded) +- credentialSchema MUST NOT be blinded +- credentialStatus MUST NOT be blinded +- refreshService MUST NOT be blinded (probably will be used for Timeslot Revocation mechanism) +- termsOfUse NO reason to use it in ZK VC (will be in any case blinded) +- evidence (User have to choose which attribute must be blinded) + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.SelectiveDisclosurePresentation.md#constructor) + +### Methods + +- [concealInSubject](identity_wasm.SelectiveDisclosurePresentation.md#concealinsubject) +- [concealInEvidence](identity_wasm.SelectiveDisclosurePresentation.md#concealinevidence) +- [setPresentationHeader](identity_wasm.SelectiveDisclosurePresentation.md#setpresentationheader) + +## Constructors + +### constructor + +• **new SelectiveDisclosurePresentation**(`issued_jwp`) + +Initialize a presentation starting from an Issued JWP. +The properties `jti`, `nbf`, `issuanceDate`, `expirationDate` and `termsOfUse` are concealed by default. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `issued_jwp` | [`JwpIssued`](identity_wasm.JwpIssued.md) | + +## Methods + +### concealInSubject + +▸ **concealInSubject**(`path`): `void` + +Selectively disclose "credentialSubject" attributes. +# Example +``` +{ + "id": 1234, + "name": "Alice", + "mainCourses": ["Object-oriented Programming", "Mathematics"], + "degree": { + "type": "BachelorDegree", + "name": "Bachelor of Science and Arts", + }, + "GPA": "4.0", +} +``` +If you want to undisclose for example the Mathematics course and the name of the degree: +``` +undisclose_subject("mainCourses[1]"); +undisclose_subject("degree.name"); +``` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `path` | `string` | + +#### Returns + +`void` + +___ + +### concealInEvidence + +▸ **concealInEvidence**(`path`): `void` + +Undiscloses "evidence" attributes. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `path` | `string` | + +#### Returns + +`void` + +___ + +### setPresentationHeader + +▸ **setPresentationHeader**(`header`): `void` + +Sets presentation protected header. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `header` | [`PresentationProtectedHeader`](identity_wasm.PresentationProtectedHeader.md) | + +#### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Service.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Service.md new file mode 100644 index 00000000000..91c8a33c3fa --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Service.md @@ -0,0 +1,144 @@ +# Class: Service + +[identity\_wasm](../modules/identity_wasm.md).Service + +A DID Document Service used to enable trusted interactions associated with a DID subject. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Service.md#constructor) + +### Methods + +- [toJSON](identity_wasm.Service.md#tojson) +- [toString](identity_wasm.Service.md#tostring) +- [id](identity_wasm.Service.md#id) +- [type](identity_wasm.Service.md#type) +- [serviceEndpoint](identity_wasm.Service.md#serviceendpoint) +- [properties](identity_wasm.Service.md#properties) +- [fromJSON](identity_wasm.Service.md#fromjson) +- [clone](identity_wasm.Service.md#clone) + +## Constructors + +### constructor + +• **new Service**(`service`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `service` | [`IService`](../interfaces/identity_wasm.IService.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### id + +▸ **id**(): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Returns a copy of the [Service](identity_wasm.Service.md) id. + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### type + +▸ **type**(): `string`[] + +Returns a copy of the [Service](identity_wasm.Service.md) type. + +#### Returns + +`string`[] + +___ + +### serviceEndpoint + +▸ **serviceEndpoint**(): `string` \| `string`[] \| `Map`\<`string`, `string`[]\> + +Returns a copy of the [Service](identity_wasm.Service.md) endpoint. + +#### Returns + +`string` \| `string`[] \| `Map`\<`string`, `string`[]\> + +___ + +### properties + +▸ **properties**(): `Map`\<`string`, `any`\> + +Returns a copy of the custom properties on the [Service](identity_wasm.Service.md). + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Service`](identity_wasm.Service.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Service`](identity_wasm.Service.md) + +___ + +### clone + +▸ **clone**(): [`Service`](identity_wasm.Service.md) + +Deep clones the object. + +#### Returns + +[`Service`](identity_wasm.Service.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021.md new file mode 100644 index 00000000000..c4b514c25b0 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021.md @@ -0,0 +1,152 @@ +# Class: StatusList2021 + +[identity\_wasm](../modules/identity_wasm.md).StatusList2021 + +StatusList2021 data structure as described in [W3C's VC status list 2021](https://www.w3.org/TR/2023/WD-vc-status-list-20230427/). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.StatusList2021.md#constructor) + +### Methods + +- [toJSON](identity_wasm.StatusList2021.md#tojson) +- [toString](identity_wasm.StatusList2021.md#tostring) +- [clone](identity_wasm.StatusList2021.md#clone) +- [len](identity_wasm.StatusList2021.md#len) +- [get](identity_wasm.StatusList2021.md#get) +- [set](identity_wasm.StatusList2021.md#set) +- [intoEncodedStr](identity_wasm.StatusList2021.md#intoencodedstr) +- [fromEncodedStr](identity_wasm.StatusList2021.md#fromencodedstr) + +## Constructors + +### constructor + +• **new StatusList2021**(`size?`) + +Creates a new [StatusList2021](identity_wasm.StatusList2021.md) of `size` entries. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `size?` | `number` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### clone + +▸ **clone**(): [`StatusList2021`](identity_wasm.StatusList2021.md) + +Deep clones the object. + +#### Returns + +[`StatusList2021`](identity_wasm.StatusList2021.md) + +___ + +### len + +▸ **len**(): `number` + +Returns the number of entries in this [StatusList2021](identity_wasm.StatusList2021.md). + +#### Returns + +`number` + +___ + +### get + +▸ **get**(`index`): `boolean` + +Returns whether the entry at `index` is set. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `number` | + +#### Returns + +`boolean` + +___ + +### set + +▸ **set**(`index`, `value`): `void` + +Sets the value of the `index`-th entry. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `number` | +| `value` | `boolean` | + +#### Returns + +`void` + +___ + +### intoEncodedStr + +▸ **intoEncodedStr**(): `string` + +Encodes this [StatusList2021](identity_wasm.StatusList2021.md) into its compressed +base64 string representation. + +#### Returns + +`string` + +___ + +### fromEncodedStr + +▸ `Static` **fromEncodedStr**(`s`): [`StatusList2021`](identity_wasm.StatusList2021.md) + +Attempts to decode a [StatusList2021](identity_wasm.StatusList2021.md) from a string. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `s` | `string` | + +#### Returns + +[`StatusList2021`](identity_wasm.StatusList2021.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021Credential.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021Credential.md new file mode 100644 index 00000000000..eae4637fc9d --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021Credential.md @@ -0,0 +1,153 @@ +# Class: StatusList2021Credential + +[identity\_wasm](../modules/identity_wasm.md).StatusList2021Credential + +A parsed [StatusList2021Credential](https://www.w3.org/TR/2023/WD-vc-status-list-20230427/#statuslist2021credential). + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.StatusList2021Credential.md#constructor) + +### Methods + +- [toJSON](identity_wasm.StatusList2021Credential.md#tojson) +- [toString](identity_wasm.StatusList2021Credential.md#tostring) +- [id](identity_wasm.StatusList2021Credential.md#id) +- [setCredentialStatus](identity_wasm.StatusList2021Credential.md#setcredentialstatus) +- [purpose](identity_wasm.StatusList2021Credential.md#purpose) +- [entry](identity_wasm.StatusList2021Credential.md#entry) +- [clone](identity_wasm.StatusList2021Credential.md#clone) +- [fromJSON](identity_wasm.StatusList2021Credential.md#fromjson) + +## Constructors + +### constructor + +• **new StatusList2021Credential**(`credential`) + +Creates a new [StatusList2021Credential](identity_wasm.StatusList2021Credential.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### id + +▸ **id**(): `string` + +#### Returns + +`string` + +___ + +### setCredentialStatus + +▸ **setCredentialStatus**(`credential`, `index`, `revoked_or_suspended`): [`StatusList2021Entry`](identity_wasm.StatusList2021Entry.md) + +Sets the given credential's status using the `index`-th entry of this status list. +Returns the created `credentialStatus`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `credential` | [`Credential`](identity_wasm.Credential.md) | +| `index` | `number` | +| `revoked_or_suspended` | `boolean` | + +#### Returns + +[`StatusList2021Entry`](identity_wasm.StatusList2021Entry.md) + +___ + +### purpose + +▸ **purpose**(): [`StatusPurpose`](../enums/identity_wasm.StatusPurpose.md) + +Returns the [StatusPurpose](../enums/identity_wasm.StatusPurpose.md) of this [StatusList2021Credential](identity_wasm.StatusList2021Credential.md). + +#### Returns + +[`StatusPurpose`](../enums/identity_wasm.StatusPurpose.md) + +___ + +### entry + +▸ **entry**(`index`): [`CredentialStatus`](../enums/identity_wasm.CredentialStatus.md) + +Returns the state of the `index`-th entry, if any. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `number` | + +#### Returns + +[`CredentialStatus`](../enums/identity_wasm.CredentialStatus.md) + +___ + +### clone + +▸ **clone**(): [`StatusList2021Credential`](identity_wasm.StatusList2021Credential.md) + +#### Returns + +[`StatusList2021Credential`](identity_wasm.StatusList2021Credential.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`StatusList2021Credential`](identity_wasm.StatusList2021Credential.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`StatusList2021Credential`](identity_wasm.StatusList2021Credential.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021CredentialBuilder.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021CredentialBuilder.md new file mode 100644 index 00000000000..40c36027e85 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021CredentialBuilder.md @@ -0,0 +1,174 @@ +# Class: StatusList2021CredentialBuilder + +[identity\_wasm](../modules/identity_wasm.md).StatusList2021CredentialBuilder + +Builder type to construct valid [StatusList2021Credential](identity_wasm.StatusList2021Credential.md) istances. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.StatusList2021CredentialBuilder.md#constructor) + +### Methods + +- [purpose](identity_wasm.StatusList2021CredentialBuilder.md#purpose) +- [subjectId](identity_wasm.StatusList2021CredentialBuilder.md#subjectid) +- [expirationDate](identity_wasm.StatusList2021CredentialBuilder.md#expirationdate) +- [issuer](identity_wasm.StatusList2021CredentialBuilder.md#issuer) +- [context](identity_wasm.StatusList2021CredentialBuilder.md#context) +- [type](identity_wasm.StatusList2021CredentialBuilder.md#type) +- [proof](identity_wasm.StatusList2021CredentialBuilder.md#proof) +- [build](identity_wasm.StatusList2021CredentialBuilder.md#build) + +## Constructors + +### constructor + +• **new StatusList2021CredentialBuilder**(`status_list?`) + +Creates a new [StatusList2021CredentialBuilder](identity_wasm.StatusList2021CredentialBuilder.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `status_list?` | [`StatusList2021`](identity_wasm.StatusList2021.md) | + +## Methods + +### purpose + +▸ **purpose**(`purpose`): [`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +Sets the purpose of the [StatusList2021Credential](identity_wasm.StatusList2021Credential.md) that is being created. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `purpose` | [`StatusPurpose`](../enums/identity_wasm.StatusPurpose.md) | + +#### Returns + +[`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +___ + +### subjectId + +▸ **subjectId**(`id`): [`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +Sets `credentialSubject.id`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | `string` | + +#### Returns + +[`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +___ + +### expirationDate + +▸ **expirationDate**(`time`): [`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +Sets the expiration date of the credential. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `time` | [`Timestamp`](identity_wasm.Timestamp.md) | + +#### Returns + +[`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +___ + +### issuer + +▸ **issuer**(`issuer`): [`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +Sets the issuer of the credential. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `issuer` | `string` | + +#### Returns + +[`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +___ + +### context + +▸ **context**(`context`): [`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +Sets the context of the credential. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `context` | `string` | + +#### Returns + +[`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +___ + +### type + +▸ **type**(`t`): [`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +Adds a credential type. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `t` | `string` | + +#### Returns + +[`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +___ + +### proof + +▸ **proof**(`proof`): [`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +Adds a credential's proof. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `proof` | [`Proof`](identity_wasm.Proof.md) | + +#### Returns + +[`StatusList2021CredentialBuilder`](identity_wasm.StatusList2021CredentialBuilder.md) + +___ + +### build + +▸ **build**(): [`StatusList2021Credential`](identity_wasm.StatusList2021Credential.md) + +Attempts to build a valid [StatusList2021Credential](identity_wasm.StatusList2021Credential.md) with the previously provided data. + +#### Returns + +[`StatusList2021Credential`](identity_wasm.StatusList2021Credential.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021Entry.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021Entry.md new file mode 100644 index 00000000000..8c1c5d7ab8e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.StatusList2021Entry.md @@ -0,0 +1,162 @@ +# Class: StatusList2021Entry + +[identity\_wasm](../modules/identity_wasm.md).StatusList2021Entry + +[StatusList2021Entry](https://www.w3.org/TR/2023/WD-vc-status-list-20230427/#statuslist2021entry) implementation. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.StatusList2021Entry.md#constructor) + +### Methods + +- [toJSON](identity_wasm.StatusList2021Entry.md#tojson) +- [toString](identity_wasm.StatusList2021Entry.md#tostring) +- [id](identity_wasm.StatusList2021Entry.md#id) +- [purpose](identity_wasm.StatusList2021Entry.md#purpose) +- [index](identity_wasm.StatusList2021Entry.md#index) +- [statusListCredential](identity_wasm.StatusList2021Entry.md#statuslistcredential) +- [toStatus](identity_wasm.StatusList2021Entry.md#tostatus) +- [clone](identity_wasm.StatusList2021Entry.md#clone) +- [fromJSON](identity_wasm.StatusList2021Entry.md#fromjson) + +## Constructors + +### constructor + +• **new StatusList2021Entry**(`status_list`, `purpose`, `index`, `id?`) + +Creates a new [StatusList2021Entry](identity_wasm.StatusList2021Entry.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `status_list` | `string` | +| `purpose` | [`StatusPurpose`](../enums/identity_wasm.StatusPurpose.md) | +| `index` | `number` | +| `id?` | `string` | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### id + +▸ **id**(): `string` + +Returns this `credentialStatus`'s `id`. + +#### Returns + +`string` + +___ + +### purpose + +▸ **purpose**(): [`StatusPurpose`](../enums/identity_wasm.StatusPurpose.md) + +Returns the purpose of this entry. + +#### Returns + +[`StatusPurpose`](../enums/identity_wasm.StatusPurpose.md) + +___ + +### index + +▸ **index**(): `number` + +Returns the index of this entry. + +#### Returns + +`number` + +___ + +### statusListCredential + +▸ **statusListCredential**(): `string` + +Returns the referenced [StatusList2021Credential](identity_wasm.StatusList2021Credential.md)'s url. + +#### Returns + +`string` + +___ + +### toStatus + +▸ **toStatus**(): [`Status`](../interfaces/identity_wasm.Status.md) + +Downcasts this to [Status](../interfaces/identity_wasm.Status.md) + +#### Returns + +[`Status`](../interfaces/identity_wasm.Status.md) + +___ + +### clone + +▸ **clone**(): [`StatusList2021Entry`](identity_wasm.StatusList2021Entry.md) + +Deep clones the object. + +#### Returns + +[`StatusList2021Entry`](identity_wasm.StatusList2021Entry.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`StatusList2021Entry`](identity_wasm.StatusList2021Entry.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`StatusList2021Entry`](identity_wasm.StatusList2021Entry.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Storage.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Storage.md new file mode 100644 index 00000000000..210fa7d267c --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Storage.md @@ -0,0 +1,56 @@ +# Class: Storage + +[identity\_wasm](../modules/identity_wasm.md).Storage + +A type wrapping a `JwkStorage` and `KeyIdStorage` that should always be used together when +working with storage backed DID documents. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Storage.md#constructor) + +### Methods + +- [keyIdStorage](identity_wasm.Storage.md#keyidstorage) +- [keyStorage](identity_wasm.Storage.md#keystorage) + +## Constructors + +### constructor + +• **new Storage**(`jwkStorage`, `keyIdStorage`) + +Constructs a new `Storage`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `jwkStorage` | [`JwkStorage`](../interfaces/identity_wasm.JwkStorage.md) | +| `keyIdStorage` | [`KeyIdStorage`](../interfaces/identity_wasm.KeyIdStorage.md) | + +## Methods + +### keyIdStorage + +▸ **keyIdStorage**(): [`KeyIdStorage`](../interfaces/identity_wasm.KeyIdStorage.md) + +Obtain the wrapped `KeyIdStorage`. + +#### Returns + +[`KeyIdStorage`](../interfaces/identity_wasm.KeyIdStorage.md) + +___ + +### keyStorage + +▸ **keyStorage**(): [`JwkStorage`](../interfaces/identity_wasm.JwkStorage.md) + +Obtain the wrapped `JwkStorage`. + +#### Returns + +[`JwkStorage`](../interfaces/identity_wasm.JwkStorage.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.Timestamp.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Timestamp.md new file mode 100644 index 00000000000..675b5ffd52c --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.Timestamp.md @@ -0,0 +1,160 @@ +# Class: Timestamp + +[identity\_wasm](../modules/identity_wasm.md).Timestamp + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.Timestamp.md#constructor) + +### Methods + +- [toJSON](identity_wasm.Timestamp.md#tojson) +- [toString](identity_wasm.Timestamp.md#tostring) +- [parse](identity_wasm.Timestamp.md#parse) +- [nowUTC](identity_wasm.Timestamp.md#nowutc) +- [toRFC3339](identity_wasm.Timestamp.md#torfc3339) +- [checkedAdd](identity_wasm.Timestamp.md#checkedadd) +- [checkedSub](identity_wasm.Timestamp.md#checkedsub) +- [fromJSON](identity_wasm.Timestamp.md#fromjson) + +## Constructors + +### constructor + +• **new Timestamp**() + +Creates a new [Timestamp](identity_wasm.Timestamp.md) with the current date and time. + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### parse + +▸ `Static` **parse**(`input`): [`Timestamp`](identity_wasm.Timestamp.md) + +Parses a [Timestamp](identity_wasm.Timestamp.md) from the provided input string. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `input` | `string` | + +#### Returns + +[`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### nowUTC + +▸ `Static` **nowUTC**(): [`Timestamp`](identity_wasm.Timestamp.md) + +Creates a new [Timestamp](identity_wasm.Timestamp.md) with the current date and time. + +#### Returns + +[`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### toRFC3339 + +▸ **toRFC3339**(): `string` + +Returns the [Timestamp](identity_wasm.Timestamp.md) as an RFC 3339 `String`. + +#### Returns + +`string` + +___ + +### checkedAdd + +▸ **checkedAdd**(`duration`): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +Computes `self + duration` + +Returns `null` if the operation leads to a timestamp not in the valid range for [RFC 3339](https://tools.ietf.org/html/rfc3339). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `duration` | [`Duration`](identity_wasm.Duration.md) | + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### checkedSub + +▸ **checkedSub**(`duration`): `undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +Computes `self - duration` + +Returns `null` if the operation leads to a timestamp not in the valid range for [RFC 3339](https://tools.ietf.org/html/rfc3339). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `duration` | [`Duration`](identity_wasm.Duration.md) | + +#### Returns + +`undefined` \| [`Timestamp`](identity_wasm.Timestamp.md) + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`Timestamp`](identity_wasm.Timestamp.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`Timestamp`](identity_wasm.Timestamp.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.UnknownCredential.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.UnknownCredential.md new file mode 100644 index 00000000000..aa77801375b --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.UnknownCredential.md @@ -0,0 +1,92 @@ +# Class: UnknownCredential + +[identity\_wasm](../modules/identity_wasm.md).UnknownCredential + +## Table of contents + +### Methods + +- [tryIntoJwt](identity_wasm.UnknownCredential.md#tryintojwt) +- [tryIntoCredential](identity_wasm.UnknownCredential.md#tryintocredential) +- [tryIntoRaw](identity_wasm.UnknownCredential.md#tryintoraw) +- [toJSON](identity_wasm.UnknownCredential.md#tojson) +- [fromJSON](identity_wasm.UnknownCredential.md#fromjson) +- [clone](identity_wasm.UnknownCredential.md#clone) + +## Methods + +### tryIntoJwt + +▸ **tryIntoJwt**(): `undefined` \| [`Jwt`](identity_wasm.Jwt.md) + +Returns a [Jwt](identity_wasm.Jwt.md) if the credential is of type string, `undefined` otherwise. + +#### Returns + +`undefined` \| [`Jwt`](identity_wasm.Jwt.md) + +___ + +### tryIntoCredential + +▸ **tryIntoCredential**(): `undefined` \| [`Credential`](identity_wasm.Credential.md) + +Returns a [Credential](identity_wasm.Credential.md) if the credential is of said type, `undefined` otherwise. + +#### Returns + +`undefined` \| [`Credential`](identity_wasm.Credential.md) + +___ + +### tryIntoRaw + +▸ **tryIntoRaw**(): `undefined` \| `Record`\<`string`, `any`\> + +Returns the contained value as an Object, if it can be converted, `undefined` otherwise. + +#### Returns + +`undefined` \| `Record`\<`string`, `any`\> + +___ + +### toJSON + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`UnknownCredential`](identity_wasm.UnknownCredential.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`UnknownCredential`](identity_wasm.UnknownCredential.md) + +___ + +### clone + +▸ **clone**(): [`UnknownCredential`](identity_wasm.UnknownCredential.md) + +Deep clones the object. + +#### Returns + +[`UnknownCredential`](identity_wasm.UnknownCredential.md) diff --git a/docs/content/references/iota-identity/wasm/classes/identity_wasm.VerificationMethod.md b/docs/content/references/iota-identity/wasm/classes/identity_wasm.VerificationMethod.md new file mode 100644 index 00000000000..fa212d94f88 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/identity_wasm.VerificationMethod.md @@ -0,0 +1,292 @@ +# Class: VerificationMethod + +[identity\_wasm](../modules/identity_wasm.md).VerificationMethod + +A DID Document Verification Method. + +## Table of contents + +### Constructors + +- [constructor](identity_wasm.VerificationMethod.md#constructor) + +### Methods + +- [toJSON](identity_wasm.VerificationMethod.md#tojson) +- [toString](identity_wasm.VerificationMethod.md#tostring) +- [newFromJwk](identity_wasm.VerificationMethod.md#newfromjwk) +- [id](identity_wasm.VerificationMethod.md#id) +- [setId](identity_wasm.VerificationMethod.md#setid) +- [controller](identity_wasm.VerificationMethod.md#controller) +- [setController](identity_wasm.VerificationMethod.md#setcontroller) +- [type](identity_wasm.VerificationMethod.md#type) +- [setType](identity_wasm.VerificationMethod.md#settype) +- [data](identity_wasm.VerificationMethod.md#data) +- [setData](identity_wasm.VerificationMethod.md#setdata) +- [properties](identity_wasm.VerificationMethod.md#properties) +- [setPropertyUnchecked](identity_wasm.VerificationMethod.md#setpropertyunchecked) +- [fromJSON](identity_wasm.VerificationMethod.md#fromjson) +- [clone](identity_wasm.VerificationMethod.md#clone) + +## Constructors + +### constructor + +• **new VerificationMethod**(`id`, `controller`, `type_`, `data`) + +Create a custom [VerificationMethod](identity_wasm.VerificationMethod.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | [`DIDUrl`](identity_wasm.DIDUrl.md) | +| `controller` | [`CoreDID`](identity_wasm.CoreDID.md) | +| `type_` | [`MethodType`](identity_wasm.MethodType.md) | +| `data` | [`MethodData`](identity_wasm.MethodData.md) | + +## Methods + +### toJSON + +▸ **toJSON**(): `Object` + +* Return copy of self without private attributes. + +#### Returns + +`Object` + +▸ **toJSON**(): `any` + +Serializes this to a JSON object. + +#### Returns + +`any` + +___ + +### toString + +▸ **toString**(): `string` + +Return stringified version of self. + +#### Returns + +`string` + +___ + +### newFromJwk + +▸ `Static` **newFromJwk**(`did`, `key`, `fragment?`): [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +Creates a new [VerificationMethod](identity_wasm.VerificationMethod.md) from the given `did` and [Jwk](identity_wasm.Jwk.md). If `fragment` is not given +the `kid` value of the given `key` will be used, if present, otherwise an error is returned. + +### Recommendations +The following recommendations are essentially taken from the `publicKeyJwk` description from the [DID specification](https://www.w3.org/TR/did-core/#dfn-publickeyjwk): +- It is recommended that verification methods that use `Jwks` to represent their public keys use the value of + `kid` as their fragment identifier. This is +done automatically if `None` is passed in as the fragment. +- It is recommended that [Jwk](identity_wasm.Jwk.md) kid values are set to the public key fingerprint. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | `IToCoreDID` \| [`CoreDID`](identity_wasm.CoreDID.md) | +| `key` | [`Jwk`](identity_wasm.Jwk.md) | +| `fragment?` | `string` | + +#### Returns + +[`VerificationMethod`](identity_wasm.VerificationMethod.md) + +___ + +### id + +▸ **id**(): [`DIDUrl`](identity_wasm.DIDUrl.md) + +Returns a copy of the [DIDUrl](identity_wasm.DIDUrl.md) of the [VerificationMethod](identity_wasm.VerificationMethod.md)'s `id`. + +#### Returns + +[`DIDUrl`](identity_wasm.DIDUrl.md) + +___ + +### setId + +▸ **setId**(`id`): `void` + +Sets the id of the [VerificationMethod](identity_wasm.VerificationMethod.md). + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `id` | [`DIDUrl`](identity_wasm.DIDUrl.md) | + +#### Returns + +`void` + +___ + +### controller + +▸ **controller**(): [`CoreDID`](identity_wasm.CoreDID.md) + +Returns a copy of the `controller` `DID` of the [VerificationMethod](identity_wasm.VerificationMethod.md). + +#### Returns + +[`CoreDID`](identity_wasm.CoreDID.md) + +___ + +### setController + +▸ **setController**(`did`): `void` + +Sets the `controller` `DID` of the [VerificationMethod](identity_wasm.VerificationMethod.md) object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`CoreDID`](identity_wasm.CoreDID.md) | + +#### Returns + +`void` + +___ + +### type + +▸ **type**(): [`MethodType`](identity_wasm.MethodType.md) + +Returns a copy of the [VerificationMethod](identity_wasm.VerificationMethod.md) type. + +#### Returns + +[`MethodType`](identity_wasm.MethodType.md) + +___ + +### setType + +▸ **setType**(`type_`): `void` + +Sets the [VerificationMethod](identity_wasm.VerificationMethod.md) type. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `type_` | [`MethodType`](identity_wasm.MethodType.md) | + +#### Returns + +`void` + +___ + +### data + +▸ **data**(): [`MethodData`](identity_wasm.MethodData.md) + +Returns a copy of the [VerificationMethod](identity_wasm.VerificationMethod.md) public key data. + +#### Returns + +[`MethodData`](identity_wasm.MethodData.md) + +___ + +### setData + +▸ **setData**(`data`): `void` + +Sets [VerificationMethod](identity_wasm.VerificationMethod.md) public key data. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | [`MethodData`](identity_wasm.MethodData.md) | + +#### Returns + +`void` + +___ + +### properties + +▸ **properties**(): `Map`\<`string`, `any`\> + +Get custom properties of the Verification Method. + +#### Returns + +`Map`\<`string`, `any`\> + +___ + +### setPropertyUnchecked + +▸ **setPropertyUnchecked**(`key`, `value`): `void` + +Adds a custom property to the Verification Method. +If the value is set to `null`, the custom property will be removed. + +### WARNING +This method can overwrite existing properties like `id` and result +in an invalid Verification Method. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `key` | `string` | +| `value` | `any` | + +#### Returns + +`void` + +___ + +### fromJSON + +▸ `Static` **fromJSON**(`json`): [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +Deserializes an instance from a JSON object. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `json` | `any` | + +#### Returns + +[`VerificationMethod`](identity_wasm.VerificationMethod.md) + +___ + +### clone + +▸ **clone**(): [`VerificationMethod`](identity_wasm.VerificationMethod.md) + +Deep clones the object. + +#### Returns + +[`VerificationMethod`](identity_wasm.VerificationMethod.md) diff --git a/docs/content/references/iota-identity/wasm/classes/iota_identity_client.IotaIdentityClient.md b/docs/content/references/iota-identity/wasm/classes/iota_identity_client.IotaIdentityClient.md new file mode 100644 index 00000000000..bc1ea3d580b --- /dev/null +++ b/docs/content/references/iota-identity/wasm/classes/iota_identity_client.IotaIdentityClient.md @@ -0,0 +1,185 @@ +# Class: IotaIdentityClient + +[iota\_identity\_client](../modules/iota_identity_client.md).IotaIdentityClient + +Provides operations for IOTA DID Documents with Alias Outputs. + +## Implements + +- [`IIotaIdentityClient`](../interfaces/identity_wasm.IIotaIdentityClient.md) + +## Table of contents + +### Methods + +- [newDidOutput](iota_identity_client.IotaIdentityClient.md#newdidoutput) +- [updateDidOutput](iota_identity_client.IotaIdentityClient.md#updatedidoutput) +- [deactivateDidOutput](iota_identity_client.IotaIdentityClient.md#deactivatedidoutput) +- [resolveDid](iota_identity_client.IotaIdentityClient.md#resolvedid) +- [resolveDidOutput](iota_identity_client.IotaIdentityClient.md#resolvedidoutput) +- [publishDidOutput](iota_identity_client.IotaIdentityClient.md#publishdidoutput) +- [deleteDidOutput](iota_identity_client.IotaIdentityClient.md#deletedidoutput) + +## Methods + +### newDidOutput + +▸ **newDidOutput**(`address`, `document`, `rentStructure?`): `Promise`\<`AliasOutput`\> + +Create a DID with a new Alias Output containing the given `document`. + +The `address` will be set as the state controller and governor unlock conditions. +The minimum required token deposit amount will be set according to the given +`rent_structure`, which will be fetched from the node if not provided. +The returned Alias Output can be further customized before publication, if desired. + +NOTE: this does *not* publish the Alias Output. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `address` | `Address` | +| `document` | [`IotaDocument`](identity_wasm.IotaDocument.md) | +| `rentStructure?` | `IRent` | + +#### Returns + +`Promise`\<`AliasOutput`\> + +___ + +### updateDidOutput + +▸ **updateDidOutput**(`document`): `Promise`\<`AliasOutput`\> + +Fetches the associated Alias Output and updates it with `document` in its state metadata. +The storage deposit on the output is left unchanged. If the size of the document increased, +the amount should be increased manually. + +NOTE: this does *not* publish the updated Alias Output. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `document` | [`IotaDocument`](identity_wasm.IotaDocument.md) | + +#### Returns + +`Promise`\<`AliasOutput`\> + +___ + +### deactivateDidOutput + +▸ **deactivateDidOutput**(`did`): `Promise`\<`AliasOutput`\> + +Removes the DID document from the state metadata of its Alias Output, +effectively deactivating it. The storage deposit on the output is left unchanged, +and should be reallocated manually. + +Deactivating does not destroy the output. Hence, it can be re-activated by publishing +an update containing a DID document. + +NOTE: this does *not* publish the updated Alias Output. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`IotaDID`](identity_wasm.IotaDID.md) | + +#### Returns + +`Promise`\<`AliasOutput`\> + +___ + +### resolveDid + +▸ **resolveDid**(`did`): `Promise`\<[`IotaDocument`](identity_wasm.IotaDocument.md)\> + +Resolve a [IotaDocument](identity_wasm.IotaDocument.md). Returns an empty, deactivated document if the state +metadata of the Alias Output is empty. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`IotaDID`](identity_wasm.IotaDID.md) | + +#### Returns + +`Promise`\<[`IotaDocument`](identity_wasm.IotaDocument.md)\> + +___ + +### resolveDidOutput + +▸ **resolveDidOutput**(`did`): `Promise`\<`AliasOutput`\> + +Fetches the Alias Output associated with the given DID. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `did` | [`IotaDID`](identity_wasm.IotaDID.md) | + +#### Returns + +`Promise`\<`AliasOutput`\> + +___ + +### publishDidOutput + +▸ **publishDidOutput**(`secretManager`, `aliasOutput`): `Promise`\<[`IotaDocument`](identity_wasm.IotaDocument.md)\> + +Publish the given `aliasOutput` with the provided `secretManager`, and returns +the DID document extracted from the published block. + +Note that only the state controller of an Alias Output is allowed to update its state. +This will attempt to move tokens to or from the state controller address to match +the storage deposit amount specified on `aliasOutput`. + +This method modifies the on-ledger state. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `secretManager` | `SecretManagerType` | +| `aliasOutput` | `AliasOutput` | + +#### Returns + +`Promise`\<[`IotaDocument`](identity_wasm.IotaDocument.md)\> + +___ + +### deleteDidOutput + +▸ **deleteDidOutput**(`secretManager`, `address`, `did`): `Promise`\<`void`\> + +Destroy the Alias Output containing the given `did`, sending its tokens to a new Basic Output +unlockable by the given address. + +Note that only the governor of an Alias Output is allowed to destroy it. + +### WARNING + +This destroys the Alias Output and DID document, rendering them permanently unrecoverable. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `secretManager` | `SecretManagerType` | +| `address` | `Address` | +| `did` | [`IotaDID`](identity_wasm.IotaDID.md) | + +#### Returns + +`Promise`\<`void`\> diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.CredentialStatus.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.CredentialStatus.md new file mode 100644 index 00000000000..53b1ac1cdd1 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.CredentialStatus.md @@ -0,0 +1,29 @@ +# Enumeration: CredentialStatus + +[identity\_wasm](../modules/identity_wasm.md).CredentialStatus + +## Table of contents + +### Enumeration Members + +- [Revoked](identity_wasm.CredentialStatus.md#revoked) +- [Suspended](identity_wasm.CredentialStatus.md#suspended) +- [Valid](identity_wasm.CredentialStatus.md#valid) + +## Enumeration Members + +### Revoked + +• **Revoked** = ``0`` + +___ + +### Suspended + +• **Suspended** = ``1`` + +___ + +### Valid + +• **Valid** = ``2`` diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.FailFast.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.FailFast.md new file mode 100644 index 00000000000..280d577b180 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.FailFast.md @@ -0,0 +1,28 @@ +# Enumeration: FailFast + +[identity\_wasm](../modules/identity_wasm.md).FailFast + +Declares when validation should return if an error occurs. + +## Table of contents + +### Enumeration Members + +- [AllErrors](identity_wasm.FailFast.md#allerrors) +- [FirstError](identity_wasm.FailFast.md#firsterror) + +## Enumeration Members + +### AllErrors + +• **AllErrors** = ``0`` + +Return all errors that occur during validation. + +___ + +### FirstError + +• **FirstError** = ``1`` + +Return after the first error occurs. diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.MethodRelationship.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.MethodRelationship.md new file mode 100644 index 00000000000..52765ce1299 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.MethodRelationship.md @@ -0,0 +1,43 @@ +# Enumeration: MethodRelationship + +[identity\_wasm](../modules/identity_wasm.md).MethodRelationship + +## Table of contents + +### Enumeration Members + +- [Authentication](identity_wasm.MethodRelationship.md#authentication) +- [AssertionMethod](identity_wasm.MethodRelationship.md#assertionmethod) +- [KeyAgreement](identity_wasm.MethodRelationship.md#keyagreement) +- [CapabilityDelegation](identity_wasm.MethodRelationship.md#capabilitydelegation) +- [CapabilityInvocation](identity_wasm.MethodRelationship.md#capabilityinvocation) + +## Enumeration Members + +### Authentication + +• **Authentication** = ``0`` + +___ + +### AssertionMethod + +• **AssertionMethod** = ``1`` + +___ + +### KeyAgreement + +• **KeyAgreement** = ``2`` + +___ + +### CapabilityDelegation + +• **CapabilityDelegation** = ``3`` + +___ + +### CapabilityInvocation + +• **CapabilityInvocation** = ``4`` diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.PayloadType.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.PayloadType.md new file mode 100644 index 00000000000..70f0d5171c3 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.PayloadType.md @@ -0,0 +1,29 @@ +# Enumeration: PayloadType + +[identity\_wasm](../modules/identity_wasm.md).PayloadType + +## Table of contents + +### Enumeration Members + +- [Disclosed](identity_wasm.PayloadType.md#disclosed) +- [Undisclosed](identity_wasm.PayloadType.md#undisclosed) +- [ProofMethods](identity_wasm.PayloadType.md#proofmethods) + +## Enumeration Members + +### Disclosed + +• **Disclosed** = ``0`` + +___ + +### Undisclosed + +• **Undisclosed** = ``1`` + +___ + +### ProofMethods + +• **ProofMethods** = ``2`` diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.PresentationProofAlgorithm.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.PresentationProofAlgorithm.md new file mode 100644 index 00000000000..bb1e0f67dcc --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.PresentationProofAlgorithm.md @@ -0,0 +1,71 @@ +# Enumeration: PresentationProofAlgorithm + +[identity\_wasm](../modules/identity_wasm.md).PresentationProofAlgorithm + +## Table of contents + +### Enumeration Members + +- [BLS12381\_SHA256\_PROOF](identity_wasm.PresentationProofAlgorithm.md#bls12381_sha256_proof) +- [BLS12381\_SHAKE256\_PROOF](identity_wasm.PresentationProofAlgorithm.md#bls12381_shake256_proof) +- [SU\_ES256](identity_wasm.PresentationProofAlgorithm.md#su_es256) +- [MAC\_H256](identity_wasm.PresentationProofAlgorithm.md#mac_h256) +- [MAC\_H384](identity_wasm.PresentationProofAlgorithm.md#mac_h384) +- [MAC\_H512](identity_wasm.PresentationProofAlgorithm.md#mac_h512) +- [MAC\_K25519](identity_wasm.PresentationProofAlgorithm.md#mac_k25519) +- [MAC\_K448](identity_wasm.PresentationProofAlgorithm.md#mac_k448) +- [MAC\_H256K](identity_wasm.PresentationProofAlgorithm.md#mac_h256k) + +## Enumeration Members + +### BLS12381\_SHA256\_PROOF + +• **BLS12381\_SHA256\_PROOF** = ``0`` + +___ + +### BLS12381\_SHAKE256\_PROOF + +• **BLS12381\_SHAKE256\_PROOF** = ``1`` + +___ + +### SU\_ES256 + +• **SU\_ES256** = ``2`` + +___ + +### MAC\_H256 + +• **MAC\_H256** = ``3`` + +___ + +### MAC\_H384 + +• **MAC\_H384** = ``4`` + +___ + +### MAC\_H512 + +• **MAC\_H512** = ``5`` + +___ + +### MAC\_K25519 + +• **MAC\_K25519** = ``6`` + +___ + +### MAC\_K448 + +• **MAC\_K448** = ``7`` + +___ + +### MAC\_H256K + +• **MAC\_H256K** = ``8`` diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.ProofAlgorithm.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.ProofAlgorithm.md new file mode 100644 index 00000000000..94a02ae62db --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.ProofAlgorithm.md @@ -0,0 +1,71 @@ +# Enumeration: ProofAlgorithm + +[identity\_wasm](../modules/identity_wasm.md).ProofAlgorithm + +## Table of contents + +### Enumeration Members + +- [BLS12381\_SHA256](identity_wasm.ProofAlgorithm.md#bls12381_sha256) +- [BLS12381\_SHAKE256](identity_wasm.ProofAlgorithm.md#bls12381_shake256) +- [SU\_ES256](identity_wasm.ProofAlgorithm.md#su_es256) +- [MAC\_H256](identity_wasm.ProofAlgorithm.md#mac_h256) +- [MAC\_H384](identity_wasm.ProofAlgorithm.md#mac_h384) +- [MAC\_H512](identity_wasm.ProofAlgorithm.md#mac_h512) +- [MAC\_K25519](identity_wasm.ProofAlgorithm.md#mac_k25519) +- [MAC\_K448](identity_wasm.ProofAlgorithm.md#mac_k448) +- [MAC\_H256K](identity_wasm.ProofAlgorithm.md#mac_h256k) + +## Enumeration Members + +### BLS12381\_SHA256 + +• **BLS12381\_SHA256** = ``0`` + +___ + +### BLS12381\_SHAKE256 + +• **BLS12381\_SHAKE256** = ``1`` + +___ + +### SU\_ES256 + +• **SU\_ES256** = ``2`` + +___ + +### MAC\_H256 + +• **MAC\_H256** = ``3`` + +___ + +### MAC\_H384 + +• **MAC\_H384** = ``4`` + +___ + +### MAC\_H512 + +• **MAC\_H512** = ``5`` + +___ + +### MAC\_K25519 + +• **MAC\_K25519** = ``6`` + +___ + +### MAC\_K448 + +• **MAC\_K448** = ``7`` + +___ + +### MAC\_H256K + +• **MAC\_H256K** = ``8`` diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.SerializationType.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.SerializationType.md new file mode 100644 index 00000000000..c5e297b94d5 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.SerializationType.md @@ -0,0 +1,22 @@ +# Enumeration: SerializationType + +[identity\_wasm](../modules/identity_wasm.md).SerializationType + +## Table of contents + +### Enumeration Members + +- [COMPACT](identity_wasm.SerializationType.md#compact) +- [JSON](identity_wasm.SerializationType.md#json) + +## Enumeration Members + +### COMPACT + +• **COMPACT** = ``0`` + +___ + +### JSON + +• **JSON** = ``1`` diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.StateMetadataEncoding.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.StateMetadataEncoding.md new file mode 100644 index 00000000000..f360505e9f1 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.StateMetadataEncoding.md @@ -0,0 +1,15 @@ +# Enumeration: StateMetadataEncoding + +[identity\_wasm](../modules/identity_wasm.md).StateMetadataEncoding + +## Table of contents + +### Enumeration Members + +- [Json](identity_wasm.StateMetadataEncoding.md#json) + +## Enumeration Members + +### Json + +• **Json** = ``0`` diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.StatusCheck.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.StatusCheck.md new file mode 100644 index 00000000000..46240dbbbac --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.StatusCheck.md @@ -0,0 +1,44 @@ +# Enumeration: StatusCheck + +[identity\_wasm](../modules/identity_wasm.md).StatusCheck + +Controls validation behaviour when checking whether or not a credential has been revoked by its +[`credentialStatus`](https://www.w3.org/TR/vc-data-model/#status). + +## Table of contents + +### Enumeration Members + +- [Strict](identity_wasm.StatusCheck.md#strict) +- [SkipUnsupported](identity_wasm.StatusCheck.md#skipunsupported) +- [SkipAll](identity_wasm.StatusCheck.md#skipall) + +## Enumeration Members + +### Strict + +• **Strict** = ``0`` + +Validate the status if supported, reject any unsupported +[`credentialStatus`](https://www.w3.org/TR/vc-data-model/#status) types. + +Only `RevocationBitmap2022` is currently supported. + +This is the default. + +___ + +### SkipUnsupported + +• **SkipUnsupported** = ``1`` + +Validate the status if supported, skip any unsupported +[`credentialStatus`](https://www.w3.org/TR/vc-data-model/#status) types. + +___ + +### SkipAll + +• **SkipAll** = ``2`` + +Skip all status checks. diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.StatusPurpose.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.StatusPurpose.md new file mode 100644 index 00000000000..d1151f2a5ab --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.StatusPurpose.md @@ -0,0 +1,24 @@ +# Enumeration: StatusPurpose + +[identity\_wasm](../modules/identity_wasm.md).StatusPurpose + +Purpose of a [StatusList2021](../classes/identity_wasm.StatusList2021.md). + +## Table of contents + +### Enumeration Members + +- [Revocation](identity_wasm.StatusPurpose.md#revocation) +- [Suspension](identity_wasm.StatusPurpose.md#suspension) + +## Enumeration Members + +### Revocation + +• **Revocation** = ``0`` + +___ + +### Suspension + +• **Suspension** = ``1`` diff --git a/docs/content/references/iota-identity/wasm/enums/identity_wasm.SubjectHolderRelationship.md b/docs/content/references/iota-identity/wasm/enums/identity_wasm.SubjectHolderRelationship.md new file mode 100644 index 00000000000..9e9f7ecb01b --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/identity_wasm.SubjectHolderRelationship.md @@ -0,0 +1,40 @@ +# Enumeration: SubjectHolderRelationship + +[identity\_wasm](../modules/identity_wasm.md).SubjectHolderRelationship + +Declares how credential subjects must relate to the presentation holder. + +See also the [Subject-Holder Relationship](https://www.w3.org/TR/vc-data-model/#subject-holder-relationships) section of the specification. + +## Table of contents + +### Enumeration Members + +- [AlwaysSubject](identity_wasm.SubjectHolderRelationship.md#alwayssubject) +- [SubjectOnNonTransferable](identity_wasm.SubjectHolderRelationship.md#subjectonnontransferable) +- [Any](identity_wasm.SubjectHolderRelationship.md#any) + +## Enumeration Members + +### AlwaysSubject + +• **AlwaysSubject** = ``0`` + +The holder must always match the subject on all credentials, regardless of their [`nonTransferable`](https://www.w3.org/TR/vc-data-model/#nontransferable-property) property. +This variant is the default. + +___ + +### SubjectOnNonTransferable + +• **SubjectOnNonTransferable** = ``1`` + +The holder must match the subject only for credentials where the [`nonTransferable`](https://www.w3.org/TR/vc-data-model/#nontransferable-property) property is `true`. + +___ + +### Any + +• **Any** = ``2`` + +The holder is not required to have any kind of relationship to any credential subject. diff --git a/docs/content/references/iota-identity/wasm/enums/jose_ec_curve.EcCurve.md b/docs/content/references/iota-identity/wasm/enums/jose_ec_curve.EcCurve.md new file mode 100644 index 00000000000..60e6bfc09df --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/jose_ec_curve.EcCurve.md @@ -0,0 +1,48 @@ +# Enumeration: EcCurve + +[jose/ec\_curve](../modules/jose_ec_curve.md).EcCurve + +Supported Elliptic Curves. + +[More Info](https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve) + +## Table of contents + +### Enumeration Members + +- [P256](jose_ec_curve.EcCurve.md#p256) +- [P384](jose_ec_curve.EcCurve.md#p384) +- [P521](jose_ec_curve.EcCurve.md#p521) +- [Secp256K1](jose_ec_curve.EcCurve.md#secp256k1) + +## Enumeration Members + +### P256 + +• **P256** = ``0`` + +P-256 Curve. + +___ + +### P384 + +• **P384** = ``1`` + +P-384 Curve. + +___ + +### P521 + +• **P521** = ``2`` + +P-521 Curve. + +___ + +### Secp256K1 + +• **Secp256K1** = ``3`` + +SECG secp256k1 curve. diff --git a/docs/content/references/iota-identity/wasm/enums/jose_ed_curve.EdCurve.md b/docs/content/references/iota-identity/wasm/enums/jose_ed_curve.EdCurve.md new file mode 100644 index 00000000000..ac315db8dc8 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/jose_ed_curve.EdCurve.md @@ -0,0 +1,30 @@ +# Enumeration: EdCurve + +[jose/ed\_curve](../modules/jose_ed_curve.md).EdCurve + +Supported Elliptic Curves. + +[More Info](https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve) + +## Table of contents + +### Enumeration Members + +- [Ed25519](jose_ed_curve.EdCurve.md#ed25519) +- [Ed448](jose_ed_curve.EdCurve.md#ed448) + +## Enumeration Members + +### Ed25519 + +• **Ed25519** = ``"Ed25519"`` + +Ed25519 signature algorithm key pairs. + +___ + +### Ed448 + +• **Ed448** = ``"Ed448"`` + +Ed448 signature algorithm key pairs. diff --git a/docs/content/references/iota-identity/wasm/enums/jose_jwk_operation.JwkOperation.md b/docs/content/references/iota-identity/wasm/enums/jose_jwk_operation.JwkOperation.md new file mode 100644 index 00000000000..d9dc6ea6dff --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/jose_jwk_operation.JwkOperation.md @@ -0,0 +1,84 @@ +# Enumeration: JwkOperation + +[jose/jwk\_operation](../modules/jose_jwk_operation.md).JwkOperation + +Supported algorithms for the JSON Web Key `key_ops` property. + +[More Info](https://www.iana.org/assignments/jose/jose.xhtml#web-key-operations) + +## Table of contents + +### Enumeration Members + +- [Sign](jose_jwk_operation.JwkOperation.md#sign) +- [Verify](jose_jwk_operation.JwkOperation.md#verify) +- [Encrypt](jose_jwk_operation.JwkOperation.md#encrypt) +- [Decrypt](jose_jwk_operation.JwkOperation.md#decrypt) +- [WrapKey](jose_jwk_operation.JwkOperation.md#wrapkey) +- [UnwrapKey](jose_jwk_operation.JwkOperation.md#unwrapkey) +- [DeriveKey](jose_jwk_operation.JwkOperation.md#derivekey) +- [DeriveBits](jose_jwk_operation.JwkOperation.md#derivebits) + +## Enumeration Members + +### Sign + +• **Sign** = ``"sign"`` + +Compute digital signature or MAC. + +___ + +### Verify + +• **Verify** = ``"verify"`` + +Verify digital signature or MAC. + +___ + +### Encrypt + +• **Encrypt** = ``"encrypt"`` + +Encrypt content. + +___ + +### Decrypt + +• **Decrypt** = ``"decrypt"`` + +Decrypt content and validate decryption, if applicable. + +___ + +### WrapKey + +• **WrapKey** = ``"wrapKey"`` + +Encrypt key. + +___ + +### UnwrapKey + +• **UnwrapKey** = ``"unwrapKey"`` + +Decrypt key and validate decryption, if applicable. + +___ + +### DeriveKey + +• **DeriveKey** = ``"deriveKey"`` + +Derive key. + +___ + +### DeriveBits + +• **DeriveBits** = ``"deriveBits"`` + +Derive bits not to be used as a key. diff --git a/docs/content/references/iota-identity/wasm/enums/jose_jwk_type.JwkType.md b/docs/content/references/iota-identity/wasm/enums/jose_jwk_type.JwkType.md new file mode 100644 index 00000000000..4502fcc62e2 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/jose_jwk_type.JwkType.md @@ -0,0 +1,48 @@ +# Enumeration: JwkType + +[jose/jwk\_type](../modules/jose_jwk_type.md).JwkType + +Supported types for the JSON Web Key `kty` property. + +[More Info](https://www.iana.org/assignments/jose/jose.xhtml#web-key-types) + +## Table of contents + +### Enumeration Members + +- [Ec](jose_jwk_type.JwkType.md#ec) +- [Rsa](jose_jwk_type.JwkType.md#rsa) +- [Oct](jose_jwk_type.JwkType.md#oct) +- [Okp](jose_jwk_type.JwkType.md#okp) + +## Enumeration Members + +### Ec + +• **Ec** = ``"EC"`` + +Elliptic Curve. + +___ + +### Rsa + +• **Rsa** = ``"RSA"`` + +RSA. + +___ + +### Oct + +• **Oct** = ``"oct"`` + +Octet sequence. + +___ + +### Okp + +• **Okp** = ``"OKP"`` + +Octet string key pairs. diff --git a/docs/content/references/iota-identity/wasm/enums/jose_jwk_use.JwkUse.md b/docs/content/references/iota-identity/wasm/enums/jose_jwk_use.JwkUse.md new file mode 100644 index 00000000000..97435b73a9c --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/jose_jwk_use.JwkUse.md @@ -0,0 +1,30 @@ +# Enumeration: JwkUse + +[jose/jwk\_use](../modules/jose_jwk_use.md).JwkUse + +Supported algorithms for the JSON Web Key `use` property. + +[More Info](https://www.iana.org/assignments/jose/jose.xhtml#web-key-use) + +## Table of contents + +### Enumeration Members + +- [Signature](jose_jwk_use.JwkUse.md#signature) +- [Encryption](jose_jwk_use.JwkUse.md#encryption) + +## Enumeration Members + +### Signature + +• **Signature** = ``"sig"`` + +Digital Signature or MAC. + +___ + +### Encryption + +• **Encryption** = ``"enc"`` + +Encryption. diff --git a/docs/content/references/iota-identity/wasm/enums/jose_jws_algorithm.JwsAlgorithm.md b/docs/content/references/iota-identity/wasm/enums/jose_jws_algorithm.JwsAlgorithm.md new file mode 100644 index 00000000000..8212b9cd95f --- /dev/null +++ b/docs/content/references/iota-identity/wasm/enums/jose_jws_algorithm.JwsAlgorithm.md @@ -0,0 +1,147 @@ +# Enumeration: JwsAlgorithm + +[jose/jws\_algorithm](../modules/jose_jws_algorithm.md).JwsAlgorithm + +Supported algorithms for the JSON Web Signatures `alg` claim. + +[More Info](https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms) + +## Table of contents + +### Enumeration Members + +- [HS256](jose_jws_algorithm.JwsAlgorithm.md#hs256) +- [HS384](jose_jws_algorithm.JwsAlgorithm.md#hs384) +- [HS512](jose_jws_algorithm.JwsAlgorithm.md#hs512) +- [RS256](jose_jws_algorithm.JwsAlgorithm.md#rs256) +- [RS384](jose_jws_algorithm.JwsAlgorithm.md#rs384) +- [RS512](jose_jws_algorithm.JwsAlgorithm.md#rs512) +- [PS256](jose_jws_algorithm.JwsAlgorithm.md#ps256) +- [PS384](jose_jws_algorithm.JwsAlgorithm.md#ps384) +- [PS512](jose_jws_algorithm.JwsAlgorithm.md#ps512) +- [ES256](jose_jws_algorithm.JwsAlgorithm.md#es256) +- [ES384](jose_jws_algorithm.JwsAlgorithm.md#es384) +- [ES512](jose_jws_algorithm.JwsAlgorithm.md#es512) +- [ES256K](jose_jws_algorithm.JwsAlgorithm.md#es256k) +- [NONE](jose_jws_algorithm.JwsAlgorithm.md#none) +- [EdDSA](jose_jws_algorithm.JwsAlgorithm.md#eddsa) + +## Enumeration Members + +### HS256 + +• **HS256** = ``"HS256"`` + +HMAC using SHA-256 + +___ + +### HS384 + +• **HS384** = ``"HS384"`` + +HMAC using SHA-384 + +___ + +### HS512 + +• **HS512** = ``"HS512"`` + +HMAC using SHA-512 + +___ + +### RS256 + +• **RS256** = ``"RS256"`` + +RSASSA-PKCS1-v1_5 using SHA-256 + +___ + +### RS384 + +• **RS384** = ``"RS384"`` + +RSASSA-PKCS1-v1_5 using SHA-384 + +___ + +### RS512 + +• **RS512** = ``"RS512"`` + +RSASSA-PKCS1-v1_5 using SHA-512 + +___ + +### PS256 + +• **PS256** = ``"PS256"`` + +RSASSA-PSS using SHA-256 and MGF1 with SHA-256 + +___ + +### PS384 + +• **PS384** = ``"PS384"`` + +RSASSA-PSS using SHA-384 and MGF1 with SHA-384 + +___ + +### PS512 + +• **PS512** = ``"PS512"`` + +RSASSA-PSS using SHA-512 and MGF1 with SHA-512 + +___ + +### ES256 + +• **ES256** = ``"ES256"`` + +ECDSA using P-256 and SHA-256 + +___ + +### ES384 + +• **ES384** = ``"ES384"`` + +ECDSA using P-384 and SHA-384 + +___ + +### ES512 + +• **ES512** = ``"ES512"`` + +ECDSA using P-521 and SHA-512 + +___ + +### ES256K + +• **ES256K** = ``"ES256K"`` + +ECDSA using secp256k1 curve and SHA-256 + +___ + +### NONE + +• **NONE** = ``"none"`` + +No digital signature or MAC performed + +___ + +### EdDSA + +• **EdDSA** = ``"EdDSA"`` + +EdDSA signature algorithms diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Evidence.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Evidence.md new file mode 100644 index 00000000000..656cfaaec93 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Evidence.md @@ -0,0 +1,30 @@ +# Interface: Evidence + +[identity\_wasm](../modules/identity_wasm.md).Evidence + +Information used to increase confidence in the claims of a [Credential](../classes/identity_wasm.Credential.md). + +[More Info](https://www.w3.org/TR/vc-data-model/#evidence) + +## Table of contents + +### Properties + +- [id](identity_wasm.Evidence.md#id) +- [type](identity_wasm.Evidence.md#type) + +## Properties + +### id + +• `Optional` `Readonly` **id**: `string` + +A URL that allows retrieval of information about the evidence. + +___ + +### type + +• `Readonly` **type**: `string` \| `string`[] + +The type(s) of the credential evidence. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ICredential.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ICredential.md new file mode 100644 index 00000000000..c5502f5f98d --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ICredential.md @@ -0,0 +1,127 @@ +# Interface: ICredential + +[identity\_wasm](../modules/identity_wasm.md).ICredential + +Fields for constructing a new [Credential](../classes/identity_wasm.Credential.md). + +## Table of contents + +### Properties + +- [context](identity_wasm.ICredential.md#context) +- [id](identity_wasm.ICredential.md#id) +- [type](identity_wasm.ICredential.md#type) +- [credentialSubject](identity_wasm.ICredential.md#credentialsubject) +- [issuer](identity_wasm.ICredential.md#issuer) +- [issuanceDate](identity_wasm.ICredential.md#issuancedate) +- [expirationDate](identity_wasm.ICredential.md#expirationdate) +- [credentialStatus](identity_wasm.ICredential.md#credentialstatus) +- [credentialSchema](identity_wasm.ICredential.md#credentialschema) +- [refreshService](identity_wasm.ICredential.md#refreshservice) +- [termsOfUse](identity_wasm.ICredential.md#termsofuse) +- [evidence](identity_wasm.ICredential.md#evidence) +- [nonTransferable](identity_wasm.ICredential.md#nontransferable) + +## Properties + +### context + +• `Optional` `Readonly` **context**: `string` \| `Record`\<`string`, `any`\> \| (`string` \| `Record`\<`string`, `any`\>)[] + +The JSON-LD context(s) applicable to the [Credential](../classes/identity_wasm.Credential.md). + +___ + +### id + +• `Optional` `Readonly` **id**: `string` + +A unique URI that may be used to identify the [Credential](../classes/identity_wasm.Credential.md). + +___ + +### type + +• `Optional` `Readonly` **type**: `string` \| `string`[] + +One or more URIs defining the type of the [Credential](../classes/identity_wasm.Credential.md). Contains the base context by default. + +___ + +### credentialSubject + +• `Readonly` **credentialSubject**: [`Subject`](identity_wasm.Subject.md) \| [`Subject`](identity_wasm.Subject.md)[] + +One or more objects representing the [Credential](../classes/identity_wasm.Credential.md) subject(s). + +___ + +### issuer + +• `Readonly` **issuer**: `string` \| [`CoreDID`](../classes/identity_wasm.CoreDID.md) \| [`IotaDID`](../classes/identity_wasm.IotaDID.md) \| [`Issuer`](identity_wasm.Issuer.md) + +A reference to the issuer of the [Credential](../classes/identity_wasm.Credential.md). + +___ + +### issuanceDate + +• `Optional` `Readonly` **issuanceDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +A timestamp of when the [Credential](../classes/identity_wasm.Credential.md) becomes valid. Defaults to the current datetime. + +___ + +### expirationDate + +• `Optional` `Readonly` **expirationDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +A timestamp of when the [Credential](../classes/identity_wasm.Credential.md) should no longer be considered valid. + +___ + +### credentialStatus + +• `Optional` `Readonly` **credentialStatus**: [`Status`](identity_wasm.Status.md) + +Information used to determine the current status of the [Credential](../classes/identity_wasm.Credential.md). + +___ + +### credentialSchema + +• `Optional` `Readonly` **credentialSchema**: [`Schema`](identity_wasm.Schema.md) \| [`Schema`](identity_wasm.Schema.md)[] + +Information used to assist in the enforcement of a specific [Credential](../classes/identity_wasm.Credential.md) structure. + +___ + +### refreshService + +• `Optional` `Readonly` **refreshService**: [`RefreshService`](identity_wasm.RefreshService.md) \| [`RefreshService`](identity_wasm.RefreshService.md)[] + +Service(s) used to refresh an expired [Credential](../classes/identity_wasm.Credential.md). + +___ + +### termsOfUse + +• `Optional` `Readonly` **termsOfUse**: [`Policy`](identity_wasm.Policy.md) \| [`Policy`](identity_wasm.Policy.md)[] + +Terms-of-use specified by the [Credential](../classes/identity_wasm.Credential.md) issuer. + +___ + +### evidence + +• `Optional` `Readonly` **evidence**: [`Evidence`](identity_wasm.Evidence.md) \| [`Evidence`](identity_wasm.Evidence.md)[] + +Human-readable evidence used to support the claims within the [Credential](../classes/identity_wasm.Credential.md). + +___ + +### nonTransferable + +• `Optional` `Readonly` **nonTransferable**: `boolean` + +Indicates that the [Credential](../classes/identity_wasm.Credential.md) must only be contained within a [Presentation](../classes/identity_wasm.Presentation.md) with a proof issued from the [Credential](../classes/identity_wasm.Credential.md) subject. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IDomainLinkageCredential.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IDomainLinkageCredential.md new file mode 100644 index 00000000000..6d291bf6096 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IDomainLinkageCredential.md @@ -0,0 +1,46 @@ +# Interface: IDomainLinkageCredential + +[identity\_wasm](../modules/identity_wasm.md).IDomainLinkageCredential + +Fields to create a new Domain Linkage [Credential](../classes/identity_wasm.Credential.md). + +## Table of contents + +### Properties + +- [issuer](identity_wasm.IDomainLinkageCredential.md#issuer) +- [issuanceDate](identity_wasm.IDomainLinkageCredential.md#issuancedate) +- [expirationDate](identity_wasm.IDomainLinkageCredential.md#expirationdate) +- [origin](identity_wasm.IDomainLinkageCredential.md#origin) + +## Properties + +### issuer + +• `Readonly` **issuer**: [`CoreDID`](../classes/identity_wasm.CoreDID.md) \| [`IotaDID`](../classes/identity_wasm.IotaDID.md) + +A reference to the issuer of the [Credential](../classes/identity_wasm.Credential.md). + +___ + +### issuanceDate + +• `Optional` `Readonly` **issuanceDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +A timestamp of when the [Credential](../classes/identity_wasm.Credential.md) becomes valid. Defaults to the current datetime. + +___ + +### expirationDate + +• `Readonly` **expirationDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +A timestamp of when the [Credential](../classes/identity_wasm.Credential.md) should no longer be considered valid. + +___ + +### origin + +• `Readonly` **origin**: `string` + +The origin, on which the [Credential](../classes/identity_wasm.Credential.md) is issued. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IIotaIdentityClient.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IIotaIdentityClient.md new file mode 100644 index 00000000000..32b1742e1df --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IIotaIdentityClient.md @@ -0,0 +1,46 @@ +# Interface: IIotaIdentityClient + +[identity\_wasm](../modules/identity_wasm.md).IIotaIdentityClient + +Helper interface necessary for `IotaIdentityClientExt`. + +## Implemented by + +- [`IotaIdentityClient`](../classes/iota_identity_client.IotaIdentityClient.md) + +## Table of contents + +### Methods + +- [getAliasOutput](identity_wasm.IIotaIdentityClient.md#getaliasoutput) +- [getProtocolParameters](identity_wasm.IIotaIdentityClient.md#getprotocolparameters) + +## Methods + +### getAliasOutput + +▸ **getAliasOutput**(`aliasId`): `Promise`\<[`string`, `AliasOutput`]\> + +Resolve an Alias identifier, returning its latest `OutputId` and `AliasOutput`. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `aliasId` | `string` | + +#### Returns + +`Promise`\<[`string`, `AliasOutput`]\> + +___ + +### getProtocolParameters + +▸ **getProtocolParameters**(): `Promise`\<`INodeInfoProtocol`\> + +Returns the protocol parameters. + +#### Returns + +`Promise`\<`INodeInfoProtocol`\> diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJptCredentialValidationOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJptCredentialValidationOptions.md new file mode 100644 index 00000000000..532308a8f57 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJptCredentialValidationOptions.md @@ -0,0 +1,59 @@ +# Interface: IJptCredentialValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).IJptCredentialValidationOptions + +Holds options to create a new [JptCredentialValidationOptions](../classes/identity_wasm.JptCredentialValidationOptions.md). + +## Table of contents + +### Properties + +- [earliestExpiryDate](identity_wasm.IJptCredentialValidationOptions.md#earliestexpirydate) +- [latestIssuanceDate](identity_wasm.IJptCredentialValidationOptions.md#latestissuancedate) +- [status](identity_wasm.IJptCredentialValidationOptions.md#status) +- [subjectHolderRelationship](identity_wasm.IJptCredentialValidationOptions.md#subjectholderrelationship) +- [verificationOptions](identity_wasm.IJptCredentialValidationOptions.md#verificationoptions) + +## Properties + +### earliestExpiryDate + +• `Optional` `Readonly` **earliestExpiryDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Declare that the credential is **not** considered valid if it expires before this [Timestamp](../classes/identity_wasm.Timestamp.md). +Uses the current datetime during validation if not set. + +___ + +### latestIssuanceDate + +• `Optional` `Readonly` **latestIssuanceDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Declare that the credential is **not** considered valid if it was issued later than this [Timestamp](../classes/identity_wasm.Timestamp.md). +Uses the current datetime during validation if not set. + +___ + +### status + +• `Optional` `Readonly` **status**: [`StatusCheck`](../enums/identity_wasm.StatusCheck.md) + +Validation behaviour for [`credentialStatus`](https://www.w3.org/TR/vc-data-model/#status). + +___ + +### subjectHolderRelationship + +• `Optional` `Readonly` **subjectHolderRelationship**: [`string`, [`SubjectHolderRelationship`](../enums/identity_wasm.SubjectHolderRelationship.md)] + +Declares how credential subjects must relate to the presentation holder during validation. + + + +___ + +### verificationOptions + +• `Optional` `Readonly` **verificationOptions**: [`JwpVerificationOptions`](../classes/identity_wasm.JwpVerificationOptions.md) + +Options which affect the verification of the proof on the credential. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJptPresentationValidationOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJptPresentationValidationOptions.md new file mode 100644 index 00000000000..0dd7aa5c4e2 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJptPresentationValidationOptions.md @@ -0,0 +1,28 @@ +# Interface: IJptPresentationValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).IJptPresentationValidationOptions + +Holds options to create a new [JptPresentationValidationOptions](../classes/identity_wasm.JptPresentationValidationOptions.md). + +## Table of contents + +### Properties + +- [nonce](identity_wasm.IJptPresentationValidationOptions.md#nonce) +- [verificationOptions](identity_wasm.IJptPresentationValidationOptions.md#verificationoptions) + +## Properties + +### nonce + +• `Optional` `Readonly` **nonce**: `string` + +The nonce to be placed in the Presentation Protected Header. + +___ + +### verificationOptions + +• `Optional` `Readonly` **verificationOptions**: [`JwpVerificationOptions`](../classes/identity_wasm.JwpVerificationOptions.md) + +Options which affect the verification of the proof on the credential. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwk.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwk.md new file mode 100644 index 00000000000..dbd95a7a9d5 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwk.md @@ -0,0 +1,142 @@ +# Interface: IJwk + +[identity\_wasm](../modules/identity_wasm.md).IJwk + +A JSON Web Key. + +## Hierarchy + +- **`IJwk`** + + ↳ [`IJwkEc`](identity_wasm.IJwkEc.md) + + ↳ [`IJwkRsa`](identity_wasm.IJwkRsa.md) + + ↳ [`IJwkOkp`](identity_wasm.IJwkOkp.md) + + ↳ [`IJwkOct`](identity_wasm.IJwkOct.md) + +## Table of contents + +### Properties + +- [kty](identity_wasm.IJwk.md#kty) +- [use](identity_wasm.IJwk.md#use) +- [key\_ops](identity_wasm.IJwk.md#key_ops) +- [alg](identity_wasm.IJwk.md#alg) +- [kid](identity_wasm.IJwk.md#kid) +- [x5u](identity_wasm.IJwk.md#x5u) +- [x5c](identity_wasm.IJwk.md#x5c) +- [x5t](identity_wasm.IJwk.md#x5t) +- [x5t#S256](identity_wasm.IJwk.md#x5ts256) + +## Properties + +### kty + +• **kty**: [`JwkType`](../enums/jose_jwk_type.JwkType.md) + +Key Type. + +Identifies the cryptographic algorithm family used with the key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.1) + +___ + +### use + +• `Optional` **use**: [`JwkUse`](../enums/jose_jwk_use.JwkUse.md) + +Public Key Use. + +Identifies the intended use of the public key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.2) + +___ + +### key\_ops + +• `Optional` **key\_ops**: [`JwkOperation`](../enums/jose_jwk_operation.JwkOperation.md)[] + +Key Operations. + +Identifies the operation(s) for which the key is intended to be used. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.3) + +___ + +### alg + +• `Optional` **alg**: [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +Algorithm. + +Identifies the algorithm intended for use with the key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.4) + +___ + +### kid + +• `Optional` **kid**: `string` + +Key ID. + +Used to match a specific key among a set of keys within a JWK Set. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.5) + +___ + +### x5u + +• `Optional` **x5u**: `string` + +X.509 URL. + +A URI that refers to a resource for an X.509 public key certificate or +certificate chain. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.6) + +___ + +### x5c + +• `Optional` **x5c**: `string`[] + +X.509 Certificate Chain. + +Contains a chain of one or more PKIX certificates. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.7) + +___ + +### x5t + +• `Optional` **x5t**: `string` + +X.509 Certificate SHA-1 Thumbprint. + +A base64url-encoded SHA-1 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.8) + +___ + +### x5t#S256 + +• `Optional` **x5t#S256**: `string` + +X.509 Certificate SHA-256 Thumbprint. + +A base64url-encoded SHA-256 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.9) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkEc.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkEc.md new file mode 100644 index 00000000000..72870678975 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkEc.md @@ -0,0 +1,217 @@ +# Interface: IJwkEc + +[identity\_wasm](../modules/identity_wasm.md).IJwkEc + +A JSON Web Key with EC params. + +## Hierarchy + +- [`IJwk`](identity_wasm.IJwk.md) + +- [`JwkParamsEc`](identity_wasm.JwkParamsEc.md) + + ↳ **`IJwkEc`** + +## Table of contents + +### Properties + +- [use](identity_wasm.IJwkEc.md#use) +- [key\_ops](identity_wasm.IJwkEc.md#key_ops) +- [alg](identity_wasm.IJwkEc.md#alg) +- [kid](identity_wasm.IJwkEc.md#kid) +- [x5u](identity_wasm.IJwkEc.md#x5u) +- [x5c](identity_wasm.IJwkEc.md#x5c) +- [x5t](identity_wasm.IJwkEc.md#x5t) +- [x5t#S256](identity_wasm.IJwkEc.md#x5ts256) +- [crv](identity_wasm.IJwkEc.md#crv) +- [x](identity_wasm.IJwkEc.md#x) +- [y](identity_wasm.IJwkEc.md#y) +- [d](identity_wasm.IJwkEc.md#d) + +## Properties + +### use + +• `Optional` **use**: [`JwkUse`](../enums/jose_jwk_use.JwkUse.md) + +Public Key Use. + +Identifies the intended use of the public key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.2) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[use](identity_wasm.IJwk.md#use) + +___ + +### key\_ops + +• `Optional` **key\_ops**: [`JwkOperation`](../enums/jose_jwk_operation.JwkOperation.md)[] + +Key Operations. + +Identifies the operation(s) for which the key is intended to be used. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.3) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[key_ops](identity_wasm.IJwk.md#key_ops) + +___ + +### alg + +• `Optional` **alg**: [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +Algorithm. + +Identifies the algorithm intended for use with the key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.4) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[alg](identity_wasm.IJwk.md#alg) + +___ + +### kid + +• `Optional` **kid**: `string` + +Key ID. + +Used to match a specific key among a set of keys within a JWK Set. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.5) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[kid](identity_wasm.IJwk.md#kid) + +___ + +### x5u + +• `Optional` **x5u**: `string` + +X.509 URL. + +A URI that refers to a resource for an X.509 public key certificate or +certificate chain. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.6) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5u](identity_wasm.IJwk.md#x5u) + +___ + +### x5c + +• `Optional` **x5c**: `string`[] + +X.509 Certificate Chain. + +Contains a chain of one or more PKIX certificates. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.7) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5c](identity_wasm.IJwk.md#x5c) + +___ + +### x5t + +• `Optional` **x5t**: `string` + +X.509 Certificate SHA-1 Thumbprint. + +A base64url-encoded SHA-1 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.8) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5t](identity_wasm.IJwk.md#x5t) + +___ + +### x5t#S256 + +• `Optional` **x5t#S256**: `string` + +X.509 Certificate SHA-256 Thumbprint. + +A base64url-encoded SHA-256 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.9) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5t#S256](identity_wasm.IJwk.md#x5ts256) + +___ + +### crv + +• **crv**: `string` + +Identifies the cryptographic curve used with the key. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2.1.1) + +#### Inherited from + +[JwkParamsEc](identity_wasm.JwkParamsEc.md).[crv](identity_wasm.JwkParamsEc.md#crv) + +___ + +### x + +• **x**: `string` + +The `x` coordinate for the Elliptic Curve point as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2.1.2) + +#### Inherited from + +[JwkParamsEc](identity_wasm.JwkParamsEc.md).[x](identity_wasm.JwkParamsEc.md#x) + +___ + +### y + +• **y**: `string` + +The `y` coordinate for the Elliptic Curve point as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2.1.3) + +#### Inherited from + +[JwkParamsEc](identity_wasm.JwkParamsEc.md).[y](identity_wasm.JwkParamsEc.md#y) + +___ + +### d + +• `Optional` **d**: `string` + +The Elliptic Curve private key as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2.2.1) + +#### Inherited from + +[JwkParamsEc](identity_wasm.JwkParamsEc.md).[d](identity_wasm.JwkParamsEc.md#d) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkOct.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkOct.md new file mode 100644 index 00000000000..8cd4614eb1a --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkOct.md @@ -0,0 +1,172 @@ +# Interface: IJwkOct + +[identity\_wasm](../modules/identity_wasm.md).IJwkOct + +A JSON Web Key with OCT params. + +## Hierarchy + +- [`IJwk`](identity_wasm.IJwk.md) + +- [`JwkParamsOct`](identity_wasm.JwkParamsOct.md) + + ↳ **`IJwkOct`** + +## Table of contents + +### Properties + +- [use](identity_wasm.IJwkOct.md#use) +- [key\_ops](identity_wasm.IJwkOct.md#key_ops) +- [alg](identity_wasm.IJwkOct.md#alg) +- [kid](identity_wasm.IJwkOct.md#kid) +- [x5u](identity_wasm.IJwkOct.md#x5u) +- [x5c](identity_wasm.IJwkOct.md#x5c) +- [x5t](identity_wasm.IJwkOct.md#x5t) +- [x5t#S256](identity_wasm.IJwkOct.md#x5ts256) +- [k](identity_wasm.IJwkOct.md#k) + +## Properties + +### use + +• `Optional` **use**: [`JwkUse`](../enums/jose_jwk_use.JwkUse.md) + +Public Key Use. + +Identifies the intended use of the public key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.2) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[use](identity_wasm.IJwk.md#use) + +___ + +### key\_ops + +• `Optional` **key\_ops**: [`JwkOperation`](../enums/jose_jwk_operation.JwkOperation.md)[] + +Key Operations. + +Identifies the operation(s) for which the key is intended to be used. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.3) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[key_ops](identity_wasm.IJwk.md#key_ops) + +___ + +### alg + +• `Optional` **alg**: [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +Algorithm. + +Identifies the algorithm intended for use with the key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.4) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[alg](identity_wasm.IJwk.md#alg) + +___ + +### kid + +• `Optional` **kid**: `string` + +Key ID. + +Used to match a specific key among a set of keys within a JWK Set. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.5) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[kid](identity_wasm.IJwk.md#kid) + +___ + +### x5u + +• `Optional` **x5u**: `string` + +X.509 URL. + +A URI that refers to a resource for an X.509 public key certificate or +certificate chain. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.6) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5u](identity_wasm.IJwk.md#x5u) + +___ + +### x5c + +• `Optional` **x5c**: `string`[] + +X.509 Certificate Chain. + +Contains a chain of one or more PKIX certificates. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.7) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5c](identity_wasm.IJwk.md#x5c) + +___ + +### x5t + +• `Optional` **x5t**: `string` + +X.509 Certificate SHA-1 Thumbprint. + +A base64url-encoded SHA-1 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.8) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5t](identity_wasm.IJwk.md#x5t) + +___ + +### x5t#S256 + +• `Optional` **x5t#S256**: `string` + +X.509 Certificate SHA-256 Thumbprint. + +A base64url-encoded SHA-256 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.9) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5t#S256](identity_wasm.IJwk.md#x5ts256) + +___ + +### k + +• **k**: `string` + +The symmetric key as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.4.1) + +#### Inherited from + +[JwkParamsOct](identity_wasm.JwkParamsOct.md).[k](identity_wasm.JwkParamsOct.md#k) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkOkp.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkOkp.md new file mode 100644 index 00000000000..f634d517235 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkOkp.md @@ -0,0 +1,202 @@ +# Interface: IJwkOkp + +[identity\_wasm](../modules/identity_wasm.md).IJwkOkp + +A JSON Web Key with OKP params. + +## Hierarchy + +- [`IJwk`](identity_wasm.IJwk.md) + +- [`JwkParamsOkp`](identity_wasm.JwkParamsOkp.md) + + ↳ **`IJwkOkp`** + +## Table of contents + +### Properties + +- [use](identity_wasm.IJwkOkp.md#use) +- [key\_ops](identity_wasm.IJwkOkp.md#key_ops) +- [alg](identity_wasm.IJwkOkp.md#alg) +- [kid](identity_wasm.IJwkOkp.md#kid) +- [x5u](identity_wasm.IJwkOkp.md#x5u) +- [x5c](identity_wasm.IJwkOkp.md#x5c) +- [x5t](identity_wasm.IJwkOkp.md#x5t) +- [x5t#S256](identity_wasm.IJwkOkp.md#x5ts256) +- [crv](identity_wasm.IJwkOkp.md#crv) +- [x](identity_wasm.IJwkOkp.md#x) +- [d](identity_wasm.IJwkOkp.md#d) + +## Properties + +### use + +• `Optional` **use**: [`JwkUse`](../enums/jose_jwk_use.JwkUse.md) + +Public Key Use. + +Identifies the intended use of the public key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.2) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[use](identity_wasm.IJwk.md#use) + +___ + +### key\_ops + +• `Optional` **key\_ops**: [`JwkOperation`](../enums/jose_jwk_operation.JwkOperation.md)[] + +Key Operations. + +Identifies the operation(s) for which the key is intended to be used. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.3) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[key_ops](identity_wasm.IJwk.md#key_ops) + +___ + +### alg + +• `Optional` **alg**: [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +Algorithm. + +Identifies the algorithm intended for use with the key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.4) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[alg](identity_wasm.IJwk.md#alg) + +___ + +### kid + +• `Optional` **kid**: `string` + +Key ID. + +Used to match a specific key among a set of keys within a JWK Set. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.5) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[kid](identity_wasm.IJwk.md#kid) + +___ + +### x5u + +• `Optional` **x5u**: `string` + +X.509 URL. + +A URI that refers to a resource for an X.509 public key certificate or +certificate chain. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.6) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5u](identity_wasm.IJwk.md#x5u) + +___ + +### x5c + +• `Optional` **x5c**: `string`[] + +X.509 Certificate Chain. + +Contains a chain of one or more PKIX certificates. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.7) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5c](identity_wasm.IJwk.md#x5c) + +___ + +### x5t + +• `Optional` **x5t**: `string` + +X.509 Certificate SHA-1 Thumbprint. + +A base64url-encoded SHA-1 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.8) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5t](identity_wasm.IJwk.md#x5t) + +___ + +### x5t#S256 + +• `Optional` **x5t#S256**: `string` + +X.509 Certificate SHA-256 Thumbprint. + +A base64url-encoded SHA-256 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.9) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5t#S256](identity_wasm.IJwk.md#x5ts256) + +___ + +### crv + +• **crv**: `string` + +The subtype of the key pair. + +[More Info](https://tools.ietf.org/html/rfc8037#section-2) + +#### Inherited from + +[JwkParamsOkp](identity_wasm.JwkParamsOkp.md).[crv](identity_wasm.JwkParamsOkp.md#crv) + +___ + +### x + +• **x**: `string` + +The public key as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc8037#section-2) + +#### Inherited from + +[JwkParamsOkp](identity_wasm.JwkParamsOkp.md).[x](identity_wasm.JwkParamsOkp.md#x) + +___ + +### d + +• `Optional` **d**: `string` + +The private key as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc8037#section-2) + +#### Inherited from + +[JwkParamsOkp](identity_wasm.JwkParamsOkp.md).[d](identity_wasm.JwkParamsOkp.md#d) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkRsa.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkRsa.md new file mode 100644 index 00000000000..fd265ce5eea --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwkRsa.md @@ -0,0 +1,292 @@ +# Interface: IJwkRsa + +[identity\_wasm](../modules/identity_wasm.md).IJwkRsa + +A JSON Web Key with RSA params. + +## Hierarchy + +- [`IJwk`](identity_wasm.IJwk.md) + +- [`JwkParamsRsa`](identity_wasm.JwkParamsRsa.md) + + ↳ **`IJwkRsa`** + +## Table of contents + +### Properties + +- [use](identity_wasm.IJwkRsa.md#use) +- [key\_ops](identity_wasm.IJwkRsa.md#key_ops) +- [alg](identity_wasm.IJwkRsa.md#alg) +- [kid](identity_wasm.IJwkRsa.md#kid) +- [x5u](identity_wasm.IJwkRsa.md#x5u) +- [x5c](identity_wasm.IJwkRsa.md#x5c) +- [x5t](identity_wasm.IJwkRsa.md#x5t) +- [x5t#S256](identity_wasm.IJwkRsa.md#x5ts256) +- [n](identity_wasm.IJwkRsa.md#n) +- [e](identity_wasm.IJwkRsa.md#e) +- [d](identity_wasm.IJwkRsa.md#d) +- [p](identity_wasm.IJwkRsa.md#p) +- [q](identity_wasm.IJwkRsa.md#q) +- [dp](identity_wasm.IJwkRsa.md#dp) +- [dq](identity_wasm.IJwkRsa.md#dq) +- [qi](identity_wasm.IJwkRsa.md#qi) +- [oth](identity_wasm.IJwkRsa.md#oth) + +## Properties + +### use + +• `Optional` **use**: [`JwkUse`](../enums/jose_jwk_use.JwkUse.md) + +Public Key Use. + +Identifies the intended use of the public key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.2) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[use](identity_wasm.IJwk.md#use) + +___ + +### key\_ops + +• `Optional` **key\_ops**: [`JwkOperation`](../enums/jose_jwk_operation.JwkOperation.md)[] + +Key Operations. + +Identifies the operation(s) for which the key is intended to be used. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.3) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[key_ops](identity_wasm.IJwk.md#key_ops) + +___ + +### alg + +• `Optional` **alg**: [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) + +Algorithm. + +Identifies the algorithm intended for use with the key. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.4) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[alg](identity_wasm.IJwk.md#alg) + +___ + +### kid + +• `Optional` **kid**: `string` + +Key ID. + +Used to match a specific key among a set of keys within a JWK Set. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.5) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[kid](identity_wasm.IJwk.md#kid) + +___ + +### x5u + +• `Optional` **x5u**: `string` + +X.509 URL. + +A URI that refers to a resource for an X.509 public key certificate or +certificate chain. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.6) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5u](identity_wasm.IJwk.md#x5u) + +___ + +### x5c + +• `Optional` **x5c**: `string`[] + +X.509 Certificate Chain. + +Contains a chain of one or more PKIX certificates. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.7) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5c](identity_wasm.IJwk.md#x5c) + +___ + +### x5t + +• `Optional` **x5t**: `string` + +X.509 Certificate SHA-1 Thumbprint. + +A base64url-encoded SHA-1 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.8) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5t](identity_wasm.IJwk.md#x5t) + +___ + +### x5t#S256 + +• `Optional` **x5t#S256**: `string` + +X.509 Certificate SHA-256 Thumbprint. + +A base64url-encoded SHA-256 thumbprint of the DER encoding of an X.509 +certificate. + +[More Info](https://tools.ietf.org/html/rfc7517#section-4.9) + +#### Inherited from + +[IJwk](identity_wasm.IJwk.md).[x5t#S256](identity_wasm.IJwk.md#x5ts256) + +___ + +### n + +• **n**: `string` + +The modulus value for the RSA public key as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.1.1) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[n](identity_wasm.JwkParamsRsa.md#n) + +___ + +### e + +• **e**: `string` + +The exponent value for the RSA public key as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.1.2) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[e](identity_wasm.JwkParamsRsa.md#e) + +___ + +### d + +• `Optional` **d**: `string` + +The private exponent value for the RSA private key as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.1) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[d](identity_wasm.JwkParamsRsa.md#d) + +___ + +### p + +• `Optional` **p**: `string` + +The first prime factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.2) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[p](identity_wasm.JwkParamsRsa.md#p) + +___ + +### q + +• `Optional` **q**: `string` + +The second prime factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.3) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[q](identity_wasm.JwkParamsRsa.md#q) + +___ + +### dp + +• `Optional` **dp**: `string` + +The Chinese Remainder Theorem (CRT) exponent of the first factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.4) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[dp](identity_wasm.JwkParamsRsa.md#dp) + +___ + +### dq + +• `Optional` **dq**: `string` + +The CRT exponent of the second factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.5) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[dq](identity_wasm.JwkParamsRsa.md#dq) + +___ + +### qi + +• `Optional` **qi**: `string` + +The CRT coefficient of the second factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.6) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[qi](identity_wasm.JwkParamsRsa.md#qi) + +___ + +### oth + +• `Optional` **oth**: [`JwkParamsRsaPrime`](identity_wasm.JwkParamsRsaPrime.md)[] + +An array of information about any third and subsequent primes, should they exist. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.7) + +#### Inherited from + +[JwkParamsRsa](identity_wasm.JwkParamsRsa.md).[oth](identity_wasm.JwkParamsRsa.md#oth) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwpVerificationOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwpVerificationOptions.md new file mode 100644 index 00000000000..6a8347f0c2d --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwpVerificationOptions.md @@ -0,0 +1,29 @@ +# Interface: IJwpVerificationOptions + +[identity\_wasm](../modules/identity_wasm.md).IJwpVerificationOptions + +Holds options to create a new [JwpVerificationOptions](../classes/identity_wasm.JwpVerificationOptions.md). + +## Table of contents + +### Properties + +- [methodScope](identity_wasm.IJwpVerificationOptions.md#methodscope) +- [methodId](identity_wasm.IJwpVerificationOptions.md#methodid) + +## Properties + +### methodScope + +• `Optional` `Readonly` **methodScope**: [`MethodScope`](../classes/identity_wasm.MethodScope.md) + +Verify the signing verification method relation matches this. + +___ + +### methodId + +• `Optional` `Readonly` **methodId**: [`DIDUrl`](../classes/identity_wasm.DIDUrl.md) + +The DID URL of the method, whose JWK should be used to verify the JWP. +If unset, the `kid` of the JWP is used as the DID URL. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsSignatureOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsSignatureOptions.md new file mode 100644 index 00000000000..dd354909800 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsSignatureOptions.md @@ -0,0 +1,109 @@ +# Interface: IJwsSignatureOptions + +[identity\_wasm](../modules/identity_wasm.md).IJwsSignatureOptions + +Holds options to create [JwsSignatureOptions](../classes/identity_wasm.JwsSignatureOptions.md). + +## Table of contents + +### Properties + +- [attachJwk](identity_wasm.IJwsSignatureOptions.md#attachjwk) +- [b64](identity_wasm.IJwsSignatureOptions.md#b64) +- [typ](identity_wasm.IJwsSignatureOptions.md#typ) +- [cty](identity_wasm.IJwsSignatureOptions.md#cty) +- [url](identity_wasm.IJwsSignatureOptions.md#url) +- [nonce](identity_wasm.IJwsSignatureOptions.md#nonce) +- [kid](identity_wasm.IJwsSignatureOptions.md#kid) +- [detachedPayload](identity_wasm.IJwsSignatureOptions.md#detachedpayload) +- [customHeaderParameters](identity_wasm.IJwsSignatureOptions.md#customheaderparameters) + +## Properties + +### attachJwk + +• `Optional` `Readonly` **attachJwk**: `boolean` + +Whether to attach the public key in the corresponding method +to the JWS header. + +Default: false + +___ + +### b64 + +• `Optional` `Readonly` **b64**: `boolean` + +Whether to Base64url encode the payload or not. + +[More Info](https://tools.ietf.org/html/rfc7797#section-3) + +___ + +### typ + +• `Optional` `Readonly` **typ**: `string` + +The Type value to be placed in the protected header. + +[More Info](https://tools.ietf.org/html/rfc7515#section-4.1.9) + +___ + +### cty + +• `Optional` `Readonly` **cty**: `string` + +Content Type to be placed in the protected header. + +[More Info](https://tools.ietf.org/html/rfc7515#section-4.1.10) + +___ + +### url + +• `Optional` `Readonly` **url**: `string` + +The URL to be placed in the protected header. + +[More Info](https://tools.ietf.org/html/rfc8555#section-6.4.1) + +___ + +### nonce + +• `Optional` `Readonly` **nonce**: `string` + +The nonce to be placed in the protected header. + +[More Info](https://tools.ietf.org/html/rfc8555#section-6.5.2) + +___ + +### kid + +• `Optional` `Readonly` **kid**: `string` + +The kid to set in the protected header. +If unset, the kid of the JWK with which the JWS is produced is used. + +[More Info](https://www.rfc-editor.org/rfc/rfc7515#section-4.1.4) + +___ + +### detachedPayload + +• `Optional` `Readonly` **detachedPayload**: `boolean` + +/// Whether the payload should be detached from the JWS. + +[More Info](https://www.rfc-editor.org/rfc/rfc7515#appendix-F). + +___ + +### customHeaderParameters + +• `Optional` `Readonly` **customHeaderParameters**: `Record`\<`string`, `any`\> + +Additional header parameters. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsVerificationOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsVerificationOptions.md new file mode 100644 index 00000000000..e12bb46e1bf --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsVerificationOptions.md @@ -0,0 +1,40 @@ +# Interface: IJwsVerificationOptions + +[identity\_wasm](../modules/identity_wasm.md).IJwsVerificationOptions + +Holds options to create [JwsVerificationOptions](../classes/identity_wasm.JwsVerificationOptions.md). + +## Table of contents + +### Properties + +- [nonce](identity_wasm.IJwsVerificationOptions.md#nonce) +- [methodScope](identity_wasm.IJwsVerificationOptions.md#methodscope) +- [methodId](identity_wasm.IJwsVerificationOptions.md#methodid) + +## Properties + +### nonce + +• `Optional` `Readonly` **nonce**: `string` + +Verify that the `nonce` set in the protected header matches this. + +[More Info](https://tools.ietf.org/html/rfc8555#section-6.5.2) + +___ + +### methodScope + +• `Optional` `Readonly` **methodScope**: [`MethodScope`](../classes/identity_wasm.MethodScope.md) + +Verify the signing verification method relationship matches this. + +___ + +### methodId + +• `Optional` `Readonly` **methodId**: [`DIDUrl`](../classes/identity_wasm.DIDUrl.md) + +The DID URL of the method, whose JWK should be used to verify the JWS. +If unset, the `kid` of the JWS is used as the DID Url. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsVerifier.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsVerifier.md new file mode 100644 index 00000000000..0317d450d60 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwsVerifier.md @@ -0,0 +1,45 @@ +# Interface: IJwsVerifier + +[identity\_wasm](../modules/identity_wasm.md).IJwsVerifier + +Interface for cryptographically verifying a JWS signature. + +Implementers are expected to provide a procedure for step 8 of [RFC 7515 section 5.2](https://www.rfc-editor.org/rfc/rfc7515#section-5.2) for +the JWS signature algorithms they want to support. + +## Table of contents + +### Properties + +- [verify](identity_wasm.IJwsVerifier.md#verify) + +## Properties + +### verify + +• **verify**: (`alg`: [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md), `signingInput`: `Uint8Array`, `decodedSignature`: `Uint8Array`, `publicKey`: [`Jwk`](../classes/identity_wasm.Jwk.md)) => `void` + +#### Type declaration + +▸ (`alg`, `signingInput`, `decodedSignature`, `publicKey`): `void` + +Validate the `decodedSignature` against the `signingInput` in the manner defined by `alg` using the `publicKey`. + + See [RFC 7515: section 5.2 part 8.](https://www.rfc-editor.org/rfc/rfc7515#section-5.2) and + [RFC 7797 section 3](https://www.rfc-editor.org/rfc/rfc7797#section-3). + +### Failures +Upon verification failure an error must be thrown. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `alg` | [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) | +| `signingInput` | `Uint8Array` | +| `decodedSignature` | `Uint8Array` | +| `publicKey` | [`Jwk`](../classes/identity_wasm.Jwk.md) | + +##### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtCredentialValidationOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtCredentialValidationOptions.md new file mode 100644 index 00000000000..9be5dbc7666 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtCredentialValidationOptions.md @@ -0,0 +1,61 @@ +# Interface: IJwtCredentialValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).IJwtCredentialValidationOptions + +Holds options to create a new [JwtCredentialValidationOptions](../classes/identity_wasm.JwtCredentialValidationOptions.md). + +## Table of contents + +### Properties + +- [earliestExpiryDate](identity_wasm.IJwtCredentialValidationOptions.md#earliestexpirydate) +- [latestIssuanceDate](identity_wasm.IJwtCredentialValidationOptions.md#latestissuancedate) +- [status](identity_wasm.IJwtCredentialValidationOptions.md#status) +- [subjectHolderRelationship](identity_wasm.IJwtCredentialValidationOptions.md#subjectholderrelationship) +- [verifierOptions](identity_wasm.IJwtCredentialValidationOptions.md#verifieroptions) + +## Properties + +### earliestExpiryDate + +• `Optional` `Readonly` **earliestExpiryDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Declare that the credential is **not** considered valid if it expires before this [Timestamp](../classes/identity_wasm.Timestamp.md). +Uses the current datetime during validation if not set. + +___ + +### latestIssuanceDate + +• `Optional` `Readonly` **latestIssuanceDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Declare that the credential is **not** considered valid if it was issued later than this [Timestamp](../classes/identity_wasm.Timestamp.md). +Uses the current datetime during validation if not set. + +___ + +### status + +• `Optional` `Readonly` **status**: [`StatusCheck`](../enums/identity_wasm.StatusCheck.md) + +Validation behaviour for `credentialStatus`. + +Default: `StatusCheck.Strict`. + +___ + +### subjectHolderRelationship + +• `Optional` `Readonly` **subjectHolderRelationship**: [`string`, [`SubjectHolderRelationship`](../enums/identity_wasm.SubjectHolderRelationship.md)] + +Declares how credential subjects must relate to the presentation holder during validation. + + + +___ + +### verifierOptions + +• `Optional` `Readonly` **verifierOptions**: [`JwsVerificationOptions`](../classes/identity_wasm.JwsVerificationOptions.md) + +Options which affect the verification of the signature on the credential. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtPresentationOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtPresentationOptions.md new file mode 100644 index 00000000000..a7157d6b346 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtPresentationOptions.md @@ -0,0 +1,53 @@ +# Interface: IJwtPresentationOptions + +[identity\_wasm](../modules/identity_wasm.md).IJwtPresentationOptions + +Options to be set in the JWT claims of a verifiable presentation. + +## Table of contents + +### Properties + +- [expirationDate](identity_wasm.IJwtPresentationOptions.md#expirationdate) +- [issuanceDate](identity_wasm.IJwtPresentationOptions.md#issuancedate) +- [audience](identity_wasm.IJwtPresentationOptions.md#audience) +- [customClaims](identity_wasm.IJwtPresentationOptions.md#customclaims) + +## Properties + +### expirationDate + +• `Optional` `Readonly` **expirationDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Set the presentation's expiration date. +Default: `undefined`. + +___ + +### issuanceDate + +• `Optional` `Readonly` **issuanceDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Set the presentation's issuance date. +Default: current datetime. + +___ + +### audience + +• `Optional` `Readonly` **audience**: `string` + +Sets the audience for presentation (`aud` property in JWT claims). + +## Note: +Value must be a valid URL. + +Default: `undefined`. + +___ + +### customClaims + +• `Optional` `Readonly` **customClaims**: `Record`\<`string`, `any`\> + +Custom claims that can be used to set additional claims on the resulting JWT. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtPresentationValidationOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtPresentationValidationOptions.md new file mode 100644 index 00000000000..21be20cfda8 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IJwtPresentationValidationOptions.md @@ -0,0 +1,39 @@ +# Interface: IJwtPresentationValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).IJwtPresentationValidationOptions + +Holds options to create a new [JwtPresentationValidationOptions](../classes/identity_wasm.JwtPresentationValidationOptions.md). + +## Table of contents + +### Properties + +- [presentationVerifierOptions](identity_wasm.IJwtPresentationValidationOptions.md#presentationverifieroptions) +- [earliestExpiryDate](identity_wasm.IJwtPresentationValidationOptions.md#earliestexpirydate) +- [latestIssuanceDate](identity_wasm.IJwtPresentationValidationOptions.md#latestissuancedate) + +## Properties + +### presentationVerifierOptions + +• `Optional` `Readonly` **presentationVerifierOptions**: [`JwsVerificationOptions`](../classes/identity_wasm.JwsVerificationOptions.md) + +Options which affect the verification of the signature on the presentation. + +___ + +### earliestExpiryDate + +• `Optional` `Readonly` **earliestExpiryDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Declare that the presentation is **not** considered valid if it expires before this [Timestamp](../classes/identity_wasm.Timestamp.md). +Uses the current datetime during validation if not set. + +___ + +### latestIssuanceDate + +• `Optional` `Readonly` **latestIssuanceDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Declare that the presentation is **not** considered valid if it was issued later than this [Timestamp](../classes/identity_wasm.Timestamp.md). +Uses the current datetime during validation if not set. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IKeyBindingJWTValidationOptions.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IKeyBindingJWTValidationOptions.md new file mode 100644 index 00000000000..c3eea1c19fc --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IKeyBindingJWTValidationOptions.md @@ -0,0 +1,59 @@ +# Interface: IKeyBindingJWTValidationOptions + +[identity\_wasm](../modules/identity_wasm.md).IKeyBindingJWTValidationOptions + +Holds options to create a new `KeyBindingJWTValidationOptions`. + +## Table of contents + +### Properties + +- [nonce](identity_wasm.IKeyBindingJWTValidationOptions.md#nonce) +- [aud](identity_wasm.IKeyBindingJWTValidationOptions.md#aud) +- [jwsOptions](identity_wasm.IKeyBindingJWTValidationOptions.md#jwsoptions) +- [earliestIssuanceDate](identity_wasm.IKeyBindingJWTValidationOptions.md#earliestissuancedate) +- [latestIssuanceDate](identity_wasm.IKeyBindingJWTValidationOptions.md#latestissuancedate) + +## Properties + +### nonce + +• `Optional` `Readonly` **nonce**: `string` + +Validates the nonce value of the KB-JWT claims. + +___ + +### aud + +• `Optional` `Readonly` **aud**: `string` + +Validates the `aud` properties in the KB-JWT claims. + +___ + +### jwsOptions + +• `Readonly` **jwsOptions**: [`JwsVerificationOptions`](../classes/identity_wasm.JwsVerificationOptions.md) + +Options which affect the verification of the signature on the KB-JWT. + +___ + +### earliestIssuanceDate + +• `Optional` `Readonly` **earliestIssuanceDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Declares that the KB-JWT is considered invalid if the `iat` value in the claims +is earlier than this timestamp. + +___ + +### latestIssuanceDate + +• `Optional` `Readonly` **latestIssuanceDate**: [`Timestamp`](../classes/identity_wasm.Timestamp.md) + +Declares that the KB-JWT is considered invalid if the `iat` value in the claims is +later than this timestamp. + +Uses the current timestamp during validation if not set. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ILinkedDomainService.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ILinkedDomainService.md new file mode 100644 index 00000000000..24b3ed3b7be --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ILinkedDomainService.md @@ -0,0 +1,28 @@ +# Interface: ILinkedDomainService + +[identity\_wasm](../modules/identity_wasm.md).ILinkedDomainService + +Fields for constructing a new [LinkedDomainService](../classes/identity_wasm.LinkedDomainService.md). + +## Table of contents + +### Properties + +- [id](identity_wasm.ILinkedDomainService.md#id) +- [domains](identity_wasm.ILinkedDomainService.md#domains) + +## Properties + +### id + +• `Readonly` **id**: [`DIDUrl`](../classes/identity_wasm.DIDUrl.md) + +Service id. + +___ + +### domains + +• `Readonly` **domains**: `string`[] + +A unique URI that may be used to identify the [Credential](../classes/identity_wasm.Credential.md). diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ILinkedVerifiablePresentationService.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ILinkedVerifiablePresentationService.md new file mode 100644 index 00000000000..8e13f8aa2cb --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.ILinkedVerifiablePresentationService.md @@ -0,0 +1,28 @@ +# Interface: ILinkedVerifiablePresentationService + +[identity\_wasm](../modules/identity_wasm.md).ILinkedVerifiablePresentationService + +Fields for constructing a new [LinkedVerifiablePresentationService](../classes/identity_wasm.LinkedVerifiablePresentationService.md). + +## Table of contents + +### Properties + +- [id](identity_wasm.ILinkedVerifiablePresentationService.md#id) +- [linked\_vp](identity_wasm.ILinkedVerifiablePresentationService.md#linked_vp) + +## Properties + +### id + +• `Readonly` **id**: [`DIDUrl`](../classes/identity_wasm.DIDUrl.md) + +Service id. + +___ + +### linked\_vp + +• `Readonly` **linked\_vp**: `string` \| `string`[] + +A unique URI that may be used to identify the [Credential](../classes/identity_wasm.Credential.md). diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IPresentation.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IPresentation.md new file mode 100644 index 00000000000..f32a97855bb --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IPresentation.md @@ -0,0 +1,73 @@ +# Interface: IPresentation + +[identity\_wasm](../modules/identity_wasm.md).IPresentation + +Fields for constructing a new [Presentation](../classes/identity_wasm.Presentation.md). + +## Table of contents + +### Properties + +- [context](identity_wasm.IPresentation.md#context) +- [id](identity_wasm.IPresentation.md#id) +- [type](identity_wasm.IPresentation.md#type) +- [verifiableCredential](identity_wasm.IPresentation.md#verifiablecredential) +- [holder](identity_wasm.IPresentation.md#holder) +- [refreshService](identity_wasm.IPresentation.md#refreshservice) +- [termsOfUse](identity_wasm.IPresentation.md#termsofuse) + +## Properties + +### context + +• `Optional` `Readonly` **context**: `string` \| `Record`\<`string`, `any`\> \| (`string` \| `Record`\<`string`, `any`\>)[] + +The JSON-LD context(s) applicable to the presentation. + +___ + +### id + +• `Optional` `Readonly` **id**: `string` + +A unique URI that may be used to identify the presentation. + +___ + +### type + +• `Optional` `Readonly` **type**: `string` \| `string`[] + +One or more URIs defining the type of the presentation. Contains the base context by default. + +___ + +### verifiableCredential + +• `Readonly` **verifiableCredential**: `Record`\<`string`, `any`\> \| [`Jwt`](../classes/identity_wasm.Jwt.md) \| [`Credential`](../classes/identity_wasm.Credential.md) \| (`Record`\<`string`, `any`\> \| [`Jwt`](../classes/identity_wasm.Jwt.md) \| [`Credential`](../classes/identity_wasm.Credential.md))[] + +JWT Credential(s) expressing the claims of the presentation. + +___ + +### holder + +• `Readonly` **holder**: `string` \| [`CoreDID`](../classes/identity_wasm.CoreDID.md) \| [`IotaDID`](../classes/identity_wasm.IotaDID.md) + +The entity that generated the presentation. + +___ + +### refreshService + +• `Optional` `Readonly` **refreshService**: [`RefreshService`](identity_wasm.RefreshService.md) \| [`RefreshService`](identity_wasm.RefreshService.md)[] + +Service(s) used to refresh an expired [Credential](../classes/identity_wasm.Credential.md) in the presentation. + +___ + +### termsOfUse + +• `Optional` `Readonly` **termsOfUse**: [`Policy`](identity_wasm.Policy.md) \| [`Policy`](identity_wasm.Policy.md)[] + +Terms-of-use specified by the presentation holder. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IService.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IService.md new file mode 100644 index 00000000000..b37926e3f04 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.IService.md @@ -0,0 +1,54 @@ +# Interface: IService + +[identity\_wasm](../modules/identity_wasm.md).IService + +Base [Service](../classes/identity_wasm.Service.md) properties. + +## Table of contents + +### Properties + +- [id](identity_wasm.IService.md#id) +- [type](identity_wasm.IService.md#type) +- [serviceEndpoint](identity_wasm.IService.md#serviceendpoint) +- [properties](identity_wasm.IService.md#properties) + +## Properties + +### id + +• `Readonly` **id**: `string` \| [`DIDUrl`](../classes/identity_wasm.DIDUrl.md) + +Identifier of the service. + +Must be a valid DIDUrl with a fragment. + +___ + +### type + +• `Readonly` **type**: `string` \| `string`[] + +Type of service. + +E.g. "LinkedDomains". + +___ + +### serviceEndpoint + +• `Readonly` **serviceEndpoint**: `string` \| `string`[] \| `Map`\<`string`, `string`[]\> \| `Record`\<`string`, `string`[]\> + +A URL, set of URLs, or map of URL sets. + +NOTE: throws an error if any entry is not a valid URL string. List entries must be unique. + +___ + +### properties + +• `Optional` `Readonly` **properties**: `Record`\<`string`, `any`\> \| `Map`\<`string`, `any`\> + +Additional custom properties to embed in the service. + +WARNING: entries may overwrite existing fields and result in invalid documents. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Issuer.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Issuer.md new file mode 100644 index 00000000000..6219f8f4ba3 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Issuer.md @@ -0,0 +1,21 @@ +# Interface: Issuer + +[identity\_wasm](../modules/identity_wasm.md).Issuer + +An identifier representing the issuer of a [Credential](../classes/identity_wasm.Credential.md). + +[More Info](https://www.w3.org/TR/vc-data-model/#issuer) + +## Table of contents + +### Properties + +- [id](identity_wasm.Issuer.md#id) + +## Properties + +### id + +• `Readonly` **id**: `string` + +A URL identifying the credential issuer. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JptClaims.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JptClaims.md new file mode 100644 index 00000000000..6486768e838 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JptClaims.md @@ -0,0 +1,64 @@ +# Interface: JptClaims + +[identity\_wasm](../modules/identity_wasm.md).JptClaims + +JPT claims + +## Table of contents + +### Properties + +- [iss](identity_wasm.JptClaims.md#iss) +- [sub](identity_wasm.JptClaims.md#sub) +- [exp](identity_wasm.JptClaims.md#exp) +- [iat](identity_wasm.JptClaims.md#iat) +- [nbf](identity_wasm.JptClaims.md#nbf) +- [jti](identity_wasm.JptClaims.md#jti) + +## Properties + +### iss + +• `Optional` `Readonly` **iss**: `string` + +Who issued the JWP + +___ + +### sub + +• `Optional` `Readonly` **sub**: `string` + +Subject of the JPT. + +___ + +### exp + +• `Optional` `Readonly` **exp**: `number` + +Expiration time. + +___ + +### iat + +• `Optional` `Readonly` **iat**: `number` + +Issuance date. + +___ + +### nbf + +• `Optional` `Readonly` **nbf**: `number` + +Time before which the JPT MUST NOT be accepted + +___ + +### jti + +• `Optional` `Readonly` **jti**: `string` + +Unique ID for the JPT. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsEc.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsEc.md new file mode 100644 index 00000000000..139b3e486fe --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsEc.md @@ -0,0 +1,62 @@ +# Interface: JwkParamsEc + +[identity\_wasm](../modules/identity_wasm.md).JwkParamsEc + +Parameters for Elliptic Curve Keys. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2) + +## Hierarchy + +- **`JwkParamsEc`** + + ↳ [`IJwkEc`](identity_wasm.IJwkEc.md) + +## Table of contents + +### Properties + +- [crv](identity_wasm.JwkParamsEc.md#crv) +- [x](identity_wasm.JwkParamsEc.md#x) +- [y](identity_wasm.JwkParamsEc.md#y) +- [d](identity_wasm.JwkParamsEc.md#d) + +## Properties + +### crv + +• **crv**: `string` + +Identifies the cryptographic curve used with the key. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2.1.1) + +___ + +### x + +• **x**: `string` + +The `x` coordinate for the Elliptic Curve point as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2.1.2) + +___ + +### y + +• **y**: `string` + +The `y` coordinate for the Elliptic Curve point as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2.1.3) + +___ + +### d + +• `Optional` **d**: `string` + +The Elliptic Curve private key as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.2.2.1) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsOct.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsOct.md new file mode 100644 index 00000000000..6cec2f87e18 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsOct.md @@ -0,0 +1,29 @@ +# Interface: JwkParamsOct + +[identity\_wasm](../modules/identity_wasm.md).JwkParamsOct + +Parameters for Symmetric Keys. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.4) + +## Hierarchy + +- **`JwkParamsOct`** + + ↳ [`IJwkOct`](identity_wasm.IJwkOct.md) + +## Table of contents + +### Properties + +- [k](identity_wasm.JwkParamsOct.md#k) + +## Properties + +### k + +• **k**: `string` + +The symmetric key as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.4.1) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsOkp.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsOkp.md new file mode 100644 index 00000000000..9ce419038c4 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsOkp.md @@ -0,0 +1,51 @@ +# Interface: JwkParamsOkp + +[identity\_wasm](../modules/identity_wasm.md).JwkParamsOkp + +Parameters for Octet Key Pairs. + +[More Info](https://tools.ietf.org/html/rfc8037#section-2) + +## Hierarchy + +- **`JwkParamsOkp`** + + ↳ [`IJwkOkp`](identity_wasm.IJwkOkp.md) + +## Table of contents + +### Properties + +- [crv](identity_wasm.JwkParamsOkp.md#crv) +- [x](identity_wasm.JwkParamsOkp.md#x) +- [d](identity_wasm.JwkParamsOkp.md#d) + +## Properties + +### crv + +• **crv**: `string` + +The subtype of the key pair. + +[More Info](https://tools.ietf.org/html/rfc8037#section-2) + +___ + +### x + +• **x**: `string` + +The public key as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc8037#section-2) + +___ + +### d + +• `Optional` **d**: `string` + +The private key as a base64url-encoded value. + +[More Info](https://tools.ietf.org/html/rfc8037#section-2) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsRsa.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsRsa.md new file mode 100644 index 00000000000..f84ce003898 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsRsa.md @@ -0,0 +1,117 @@ +# Interface: JwkParamsRsa + +[identity\_wasm](../modules/identity_wasm.md).JwkParamsRsa + +Parameters for RSA Keys. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3) + +## Hierarchy + +- **`JwkParamsRsa`** + + ↳ [`IJwkRsa`](identity_wasm.IJwkRsa.md) + +## Table of contents + +### Properties + +- [n](identity_wasm.JwkParamsRsa.md#n) +- [e](identity_wasm.JwkParamsRsa.md#e) +- [d](identity_wasm.JwkParamsRsa.md#d) +- [p](identity_wasm.JwkParamsRsa.md#p) +- [q](identity_wasm.JwkParamsRsa.md#q) +- [dp](identity_wasm.JwkParamsRsa.md#dp) +- [dq](identity_wasm.JwkParamsRsa.md#dq) +- [qi](identity_wasm.JwkParamsRsa.md#qi) +- [oth](identity_wasm.JwkParamsRsa.md#oth) + +## Properties + +### n + +• **n**: `string` + +The modulus value for the RSA public key as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.1.1) + +___ + +### e + +• **e**: `string` + +The exponent value for the RSA public key as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.1.2) + +___ + +### d + +• `Optional` **d**: `string` + +The private exponent value for the RSA private key as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.1) + +___ + +### p + +• `Optional` **p**: `string` + +The first prime factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.2) + +___ + +### q + +• `Optional` **q**: `string` + +The second prime factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.3) + +___ + +### dp + +• `Optional` **dp**: `string` + +The Chinese Remainder Theorem (CRT) exponent of the first factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.4) + +___ + +### dq + +• `Optional` **dq**: `string` + +The CRT exponent of the second factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.5) + +___ + +### qi + +• `Optional` **qi**: `string` + +The CRT coefficient of the second factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.6) + +___ + +### oth + +• `Optional` **oth**: [`JwkParamsRsaPrime`](identity_wasm.JwkParamsRsaPrime.md)[] + +An array of information about any third and subsequent primes, should they exist. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.7) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsRsaPrime.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsRsaPrime.md new file mode 100644 index 00000000000..c907ad55d8e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkParamsRsaPrime.md @@ -0,0 +1,45 @@ +# Interface: JwkParamsRsaPrime + +[identity\_wasm](../modules/identity_wasm.md).JwkParamsRsaPrime + +Parameters for RSA Primes + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.7) + +## Table of contents + +### Properties + +- [r](identity_wasm.JwkParamsRsaPrime.md#r) +- [d](identity_wasm.JwkParamsRsaPrime.md#d) +- [t](identity_wasm.JwkParamsRsaPrime.md#t) + +## Properties + +### r + +• **r**: `string` + +The value of a subsequent prime factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.7.1) + +___ + +### d + +• **d**: `string` + +The CRT exponent of the corresponding prime factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.7.2) + +___ + +### t + +• **t**: `string` + +The CRT coefficient of the corresponding prime factor as a base64urlUInt-encoded value. + +[More Info](https://tools.ietf.org/html/rfc7518#section-6.3.2.7.3) diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkStorage.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkStorage.md new file mode 100644 index 00000000000..b491cc2d7b8 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.JwkStorage.md @@ -0,0 +1,136 @@ +# Interface: JwkStorage + +[identity\_wasm](../modules/identity_wasm.md).JwkStorage + +Secure storage for cryptographic keys represented as JWKs. + +## Table of contents + +### Properties + +- [generate](identity_wasm.JwkStorage.md#generate) +- [insert](identity_wasm.JwkStorage.md#insert) +- [sign](identity_wasm.JwkStorage.md#sign) +- [delete](identity_wasm.JwkStorage.md#delete) +- [exists](identity_wasm.JwkStorage.md#exists) + +## Properties + +### generate + +• **generate**: (`keyType`: `string`, `algorithm`: [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md)) => `Promise`\<[`JwkGenOutput`](../classes/identity_wasm.JwkGenOutput.md)\> + +#### Type declaration + +▸ (`keyType`, `algorithm`): `Promise`\<[`JwkGenOutput`](../classes/identity_wasm.JwkGenOutput.md)\> + +Generate a new key represented as a JSON Web Key. + +It's recommend that the implementer exposes constants for the supported key type string. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `keyType` | `string` | +| `algorithm` | [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) | + +##### Returns + +`Promise`\<[`JwkGenOutput`](../classes/identity_wasm.JwkGenOutput.md)\> + +___ + +### insert + +• **insert**: (`jwk`: [`Jwk`](../classes/identity_wasm.Jwk.md)) => `Promise`\<`string`\> + +#### Type declaration + +▸ (`jwk`): `Promise`\<`string`\> + +Insert an existing JSON Web Key into the storage. + +All private key components of the `jwk` must be set. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `jwk` | [`Jwk`](../classes/identity_wasm.Jwk.md) | + +##### Returns + +`Promise`\<`string`\> + +___ + +### sign + +• **sign**: (`keyId`: `string`, `data`: `Uint8Array`, `publicKey`: [`Jwk`](../classes/identity_wasm.Jwk.md)) => `Promise`\<`Uint8Array`\> + +#### Type declaration + +▸ (`keyId`, `data`, `publicKey`): `Promise`\<`Uint8Array`\> + +Sign the provided `data` using the private key identified by `keyId` according to the requirements of the given `public_key` corresponding to `keyId`. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `keyId` | `string` | +| `data` | `Uint8Array` | +| `publicKey` | [`Jwk`](../classes/identity_wasm.Jwk.md) | + +##### Returns + +`Promise`\<`Uint8Array`\> + +___ + +### delete + +• **delete**: (`keyId`: `string`) => `Promise`\<`void`\> + +#### Type declaration + +▸ (`keyId`): `Promise`\<`void`\> + +Deletes the key identified by `keyId`. + +# Warning + +This operation cannot be undone. The keys are purged permanently. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `keyId` | `string` | + +##### Returns + +`Promise`\<`void`\> + +___ + +### exists + +• **exists**: (`keyId`: `string`) => `Promise`\<`boolean`\> + +#### Type declaration + +▸ (`keyId`): `Promise`\<`boolean`\> + +Returns `true` if the key with the given `keyId` exists in storage, `false` otherwise. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `keyId` | `string` | + +##### Returns + +`Promise`\<`boolean`\> diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.KeyIdStorage.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.KeyIdStorage.md new file mode 100644 index 00000000000..18da26d42e3 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.KeyIdStorage.md @@ -0,0 +1,85 @@ +# Interface: KeyIdStorage + +[identity\_wasm](../modules/identity_wasm.md).KeyIdStorage + +Key value Storage for key ids under [MethodDigest](../classes/identity_wasm.MethodDigest.md). + +## Table of contents + +### Properties + +- [insertKeyId](identity_wasm.KeyIdStorage.md#insertkeyid) +- [getKeyId](identity_wasm.KeyIdStorage.md#getkeyid) +- [deleteKeyId](identity_wasm.KeyIdStorage.md#deletekeyid) + +## Properties + +### insertKeyId + +• **insertKeyId**: (`methodDigest`: [`MethodDigest`](../classes/identity_wasm.MethodDigest.md), `keyId`: `string`) => `Promise`\<`void`\> + +#### Type declaration + +▸ (`methodDigest`, `keyId`): `Promise`\<`void`\> + +Insert a key id into the `KeyIdStorage` under the given [MethodDigest](../classes/identity_wasm.MethodDigest.md). + +If an entry for `key` already exists in the storage an error must be returned +immediately without altering the state of the storage. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `methodDigest` | [`MethodDigest`](../classes/identity_wasm.MethodDigest.md) | +| `keyId` | `string` | + +##### Returns + +`Promise`\<`void`\> + +___ + +### getKeyId + +• **getKeyId**: (`methodDigest`: [`MethodDigest`](../classes/identity_wasm.MethodDigest.md)) => `Promise`\<`string`\> + +#### Type declaration + +▸ (`methodDigest`): `Promise`\<`string`\> + +Obtain the key id associated with the given [MethodDigest](../classes/identity_wasm.MethodDigest.md). + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `methodDigest` | [`MethodDigest`](../classes/identity_wasm.MethodDigest.md) | + +##### Returns + +`Promise`\<`string`\> + +___ + +### deleteKeyId + +• **deleteKeyId**: (`methodDigest`: [`MethodDigest`](../classes/identity_wasm.MethodDigest.md)) => `Promise`\<`void`\> + +#### Type declaration + +▸ (`methodDigest`): `Promise`\<`void`\> + +Delete the `KeyId` associated with the given [MethodDigest](../classes/identity_wasm.MethodDigest.md) from the [KeyIdStorage](identity_wasm.KeyIdStorage.md). + +If `key` is not found in storage, an Error must be returned. + +##### Parameters + +| Name | Type | +| :------ | :------ | +| `methodDigest` | [`MethodDigest`](../classes/identity_wasm.MethodDigest.md) | + +##### Returns + +`Promise`\<`void`\> diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Policy.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Policy.md new file mode 100644 index 00000000000..4002b58d76e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Policy.md @@ -0,0 +1,30 @@ +# Interface: Policy + +[identity\_wasm](../modules/identity_wasm.md).Policy + +Information used to express obligations, prohibitions, and permissions about a [Credential](../classes/identity_wasm.Credential.md) or [Presentation](../classes/identity_wasm.Presentation.md). + +[More Info](https://www.w3.org/TR/vc-data-model/#terms-of-use) + +## Table of contents + +### Properties + +- [id](identity_wasm.Policy.md#id) +- [type](identity_wasm.Policy.md#type) + +## Properties + +### id + +• `Optional` `Readonly` **id**: `string` + +A URL identifying the credential terms-of-use. + +___ + +### type + +• `Readonly` **type**: `string` \| `string`[] + +The type(s) of the credential terms-of-use. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.RefreshService.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.RefreshService.md new file mode 100644 index 00000000000..e4089a2b375 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.RefreshService.md @@ -0,0 +1,30 @@ +# Interface: RefreshService + +[identity\_wasm](../modules/identity_wasm.md).RefreshService + +Information used to refresh or assert the status of a [Credential](../classes/identity_wasm.Credential.md). + +[More Info](https://www.w3.org/TR/vc-data-model/#refreshing) + +## Table of contents + +### Properties + +- [id](identity_wasm.RefreshService.md#id) +- [type](identity_wasm.RefreshService.md#type) + +## Properties + +### id + +• `Readonly` **id**: `string` + +The URL of the credential refresh service. + +___ + +### type + +• `Readonly` **type**: `string` \| `string`[] + +The type(s) of the credential refresh service. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Schema.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Schema.md new file mode 100644 index 00000000000..ce33fa46ceb --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Schema.md @@ -0,0 +1,30 @@ +# Interface: Schema + +[identity\_wasm](../modules/identity_wasm.md).Schema + +Information used to validate the structure of a [Credential](../classes/identity_wasm.Credential.md). + +[More Info](https://www.w3.org/TR/vc-data-model/#data-schemas) + +## Table of contents + +### Properties + +- [id](identity_wasm.Schema.md#id) +- [type](identity_wasm.Schema.md#type) + +## Properties + +### id + +• `Readonly` **id**: `string` + +A URL identifying the credential schema file. + +___ + +### type + +• `Readonly` **type**: `string` \| `string`[] + +The type(s) of the credential schema. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Status.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Status.md new file mode 100644 index 00000000000..f9c8e3f45bc --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Status.md @@ -0,0 +1,30 @@ +# Interface: Status + +[identity\_wasm](../modules/identity_wasm.md).Status + +Information used to determine the current status of a [Credential](../classes/identity_wasm.Credential.md). + +[More Info](https://www.w3.org/TR/vc-data-model/#status) + +## Table of contents + +### Properties + +- [id](identity_wasm.Status.md#id) +- [type](identity_wasm.Status.md#type) + +## Properties + +### id + +• `Readonly` **id**: `string` + +A URL identifying the credential status. + +___ + +### type + +• `Readonly` **type**: `string` + +The type of the credential status. diff --git a/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Subject.md b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Subject.md new file mode 100644 index 00000000000..c66d9d5212f --- /dev/null +++ b/docs/content/references/iota-identity/wasm/interfaces/identity_wasm.Subject.md @@ -0,0 +1,21 @@ +# Interface: Subject + +[identity\_wasm](../modules/identity_wasm.md).Subject + +An entity who is the target of a set of claims in a [Credential](../classes/identity_wasm.Credential.md). + +[More Info](https://www.w3.org/TR/vc-data-model/#credential-subject) + +## Table of contents + +### Properties + +- [id](identity_wasm.Subject.md#id) + +## Properties + +### id + +• `Optional` `Readonly` **id**: `string` \| [`CoreDID`](../classes/identity_wasm.CoreDID.md) \| [`IotaDID`](../classes/identity_wasm.IotaDID.md) + +A URI identifying the credential subject. diff --git a/docs/content/references/iota-identity/wasm/modules/identity_wasm.md b/docs/content/references/iota-identity/wasm/modules/identity_wasm.md new file mode 100644 index 00000000000..883d0ad09ab --- /dev/null +++ b/docs/content/references/iota-identity/wasm/modules/identity_wasm.md @@ -0,0 +1,239 @@ +# Module: identity\_wasm + +## Table of contents + +### Enumerations + +- [FailFast](../enums/identity_wasm.FailFast.md) +- [SubjectHolderRelationship](../enums/identity_wasm.SubjectHolderRelationship.md) +- [MethodRelationship](../enums/identity_wasm.MethodRelationship.md) +- [StateMetadataEncoding](../enums/identity_wasm.StateMetadataEncoding.md) +- [StatusCheck](../enums/identity_wasm.StatusCheck.md) +- [PresentationProofAlgorithm](../enums/identity_wasm.PresentationProofAlgorithm.md) +- [CredentialStatus](../enums/identity_wasm.CredentialStatus.md) +- [StatusPurpose](../enums/identity_wasm.StatusPurpose.md) +- [PayloadType](../enums/identity_wasm.PayloadType.md) +- [SerializationType](../enums/identity_wasm.SerializationType.md) +- [ProofAlgorithm](../enums/identity_wasm.ProofAlgorithm.md) + +### Classes + +- [CoreDID](../classes/identity_wasm.CoreDID.md) +- [CoreDocument](../classes/identity_wasm.CoreDocument.md) +- [Credential](../classes/identity_wasm.Credential.md) +- [CustomMethodData](../classes/identity_wasm.CustomMethodData.md) +- [DIDJwk](../classes/identity_wasm.DIDJwk.md) +- [DIDUrl](../classes/identity_wasm.DIDUrl.md) +- [DecodedJptCredential](../classes/identity_wasm.DecodedJptCredential.md) +- [DecodedJptPresentation](../classes/identity_wasm.DecodedJptPresentation.md) +- [DecodedJws](../classes/identity_wasm.DecodedJws.md) +- [DecodedJwtCredential](../classes/identity_wasm.DecodedJwtCredential.md) +- [DecodedJwtPresentation](../classes/identity_wasm.DecodedJwtPresentation.md) +- [Disclosure](../classes/identity_wasm.Disclosure.md) +- [DomainLinkageConfiguration](../classes/identity_wasm.DomainLinkageConfiguration.md) +- [Duration](../classes/identity_wasm.Duration.md) +- [EcDSAJwsVerifier](../classes/identity_wasm.EcDSAJwsVerifier.md) +- [EdDSAJwsVerifier](../classes/identity_wasm.EdDSAJwsVerifier.md) +- [IotaDID](../classes/identity_wasm.IotaDID.md) +- [IotaDocument](../classes/identity_wasm.IotaDocument.md) +- [IotaDocumentMetadata](../classes/identity_wasm.IotaDocumentMetadata.md) +- [IotaIdentityClientExt](../classes/identity_wasm.IotaIdentityClientExt.md) +- [IssuerProtectedHeader](../classes/identity_wasm.IssuerProtectedHeader.md) +- [Jpt](../classes/identity_wasm.Jpt.md) +- [JptCredentialValidationOptions](../classes/identity_wasm.JptCredentialValidationOptions.md) +- [JptCredentialValidator](../classes/identity_wasm.JptCredentialValidator.md) +- [JptCredentialValidatorUtils](../classes/identity_wasm.JptCredentialValidatorUtils.md) +- [JptPresentationValidationOptions](../classes/identity_wasm.JptPresentationValidationOptions.md) +- [JptPresentationValidator](../classes/identity_wasm.JptPresentationValidator.md) +- [JptPresentationValidatorUtils](../classes/identity_wasm.JptPresentationValidatorUtils.md) +- [Jwk](../classes/identity_wasm.Jwk.md) +- [JwkGenOutput](../classes/identity_wasm.JwkGenOutput.md) +- [JwpCredentialOptions](../classes/identity_wasm.JwpCredentialOptions.md) +- [JwpIssued](../classes/identity_wasm.JwpIssued.md) +- [JwpPresentationOptions](../classes/identity_wasm.JwpPresentationOptions.md) +- [JwpVerificationOptions](../classes/identity_wasm.JwpVerificationOptions.md) +- [Jws](../classes/identity_wasm.Jws.md) +- [JwsHeader](../classes/identity_wasm.JwsHeader.md) +- [JwsSignatureOptions](../classes/identity_wasm.JwsSignatureOptions.md) +- [JwsVerificationOptions](../classes/identity_wasm.JwsVerificationOptions.md) +- [Jwt](../classes/identity_wasm.Jwt.md) +- [JwtCredentialValidationOptions](../classes/identity_wasm.JwtCredentialValidationOptions.md) +- [JwtCredentialValidator](../classes/identity_wasm.JwtCredentialValidator.md) +- [JwtDomainLinkageValidator](../classes/identity_wasm.JwtDomainLinkageValidator.md) +- [JwtPresentationOptions](../classes/identity_wasm.JwtPresentationOptions.md) +- [JwtPresentationValidationOptions](../classes/identity_wasm.JwtPresentationValidationOptions.md) +- [JwtPresentationValidator](../classes/identity_wasm.JwtPresentationValidator.md) +- [KeyBindingJWTValidationOptions](../classes/identity_wasm.KeyBindingJWTValidationOptions.md) +- [KeyBindingJwtClaims](../classes/identity_wasm.KeyBindingJwtClaims.md) +- [LinkedDomainService](../classes/identity_wasm.LinkedDomainService.md) +- [LinkedVerifiablePresentationService](../classes/identity_wasm.LinkedVerifiablePresentationService.md) +- [MethodData](../classes/identity_wasm.MethodData.md) +- [MethodDigest](../classes/identity_wasm.MethodDigest.md) +- [MethodScope](../classes/identity_wasm.MethodScope.md) +- [MethodType](../classes/identity_wasm.MethodType.md) +- [PayloadEntry](../classes/identity_wasm.PayloadEntry.md) +- [Payloads](../classes/identity_wasm.Payloads.md) +- [Presentation](../classes/identity_wasm.Presentation.md) +- [PresentationProtectedHeader](../classes/identity_wasm.PresentationProtectedHeader.md) +- [Proof](../classes/identity_wasm.Proof.md) +- [ProofUpdateCtx](../classes/identity_wasm.ProofUpdateCtx.md) +- [Resolver](../classes/identity_wasm.Resolver.md) +- [RevocationBitmap](../classes/identity_wasm.RevocationBitmap.md) +- [RevocationTimeframeStatus](../classes/identity_wasm.RevocationTimeframeStatus.md) +- [SdJwt](../classes/identity_wasm.SdJwt.md) +- [SdJwtCredentialValidator](../classes/identity_wasm.SdJwtCredentialValidator.md) +- [SdObjectDecoder](../classes/identity_wasm.SdObjectDecoder.md) +- [SdObjectEncoder](../classes/identity_wasm.SdObjectEncoder.md) +- [SelectiveDisclosurePresentation](../classes/identity_wasm.SelectiveDisclosurePresentation.md) +- [Service](../classes/identity_wasm.Service.md) +- [StatusList2021](../classes/identity_wasm.StatusList2021.md) +- [StatusList2021Credential](../classes/identity_wasm.StatusList2021Credential.md) +- [StatusList2021CredentialBuilder](../classes/identity_wasm.StatusList2021CredentialBuilder.md) +- [StatusList2021Entry](../classes/identity_wasm.StatusList2021Entry.md) +- [Storage](../classes/identity_wasm.Storage.md) +- [Timestamp](../classes/identity_wasm.Timestamp.md) +- [UnknownCredential](../classes/identity_wasm.UnknownCredential.md) +- [VerificationMethod](../classes/identity_wasm.VerificationMethod.md) + +### Interfaces + +- [IJptCredentialValidationOptions](../interfaces/identity_wasm.IJptCredentialValidationOptions.md) +- [IJwpVerificationOptions](../interfaces/identity_wasm.IJwpVerificationOptions.md) +- [IJptPresentationValidationOptions](../interfaces/identity_wasm.IJptPresentationValidationOptions.md) +- [IPresentation](../interfaces/identity_wasm.IPresentation.md) +- [JwkStorage](../interfaces/identity_wasm.JwkStorage.md) +- [KeyIdStorage](../interfaces/identity_wasm.KeyIdStorage.md) +- [IDomainLinkageCredential](../interfaces/identity_wasm.IDomainLinkageCredential.md) +- [IJwsVerificationOptions](../interfaces/identity_wasm.IJwsVerificationOptions.md) +- [IJwkEc](../interfaces/identity_wasm.IJwkEc.md) +- [IJwkRsa](../interfaces/identity_wasm.IJwkRsa.md) +- [IJwkOkp](../interfaces/identity_wasm.IJwkOkp.md) +- [IJwkOct](../interfaces/identity_wasm.IJwkOct.md) +- [IJwk](../interfaces/identity_wasm.IJwk.md) +- [JwkParamsEc](../interfaces/identity_wasm.JwkParamsEc.md) +- [JwkParamsOkp](../interfaces/identity_wasm.JwkParamsOkp.md) +- [JwkParamsRsa](../interfaces/identity_wasm.JwkParamsRsa.md) +- [JwkParamsRsaPrime](../interfaces/identity_wasm.JwkParamsRsaPrime.md) +- [JwkParamsOct](../interfaces/identity_wasm.JwkParamsOct.md) +- [JptClaims](../interfaces/identity_wasm.JptClaims.md) +- [IJwtPresentationOptions](../interfaces/identity_wasm.IJwtPresentationOptions.md) +- [IKeyBindingJWTValidationOptions](../interfaces/identity_wasm.IKeyBindingJWTValidationOptions.md) +- [IJwtCredentialValidationOptions](../interfaces/identity_wasm.IJwtCredentialValidationOptions.md) +- [IJwtPresentationValidationOptions](../interfaces/identity_wasm.IJwtPresentationValidationOptions.md) +- [ILinkedDomainService](../interfaces/identity_wasm.ILinkedDomainService.md) +- [ILinkedVerifiablePresentationService](../interfaces/identity_wasm.ILinkedVerifiablePresentationService.md) +- [IService](../interfaces/identity_wasm.IService.md) +- [IJwsSignatureOptions](../interfaces/identity_wasm.IJwsSignatureOptions.md) +- [Evidence](../interfaces/identity_wasm.Evidence.md) +- [Issuer](../interfaces/identity_wasm.Issuer.md) +- [Policy](../interfaces/identity_wasm.Policy.md) +- [RefreshService](../interfaces/identity_wasm.RefreshService.md) +- [Schema](../interfaces/identity_wasm.Schema.md) +- [Status](../interfaces/identity_wasm.Status.md) +- [Subject](../interfaces/identity_wasm.Subject.md) +- [ICredential](../interfaces/identity_wasm.ICredential.md) +- [IIotaIdentityClient](../interfaces/identity_wasm.IIotaIdentityClient.md) +- [IJwsVerifier](../interfaces/identity_wasm.IJwsVerifier.md) + +### Type Aliases + +- [ResolverConfig](identity_wasm.md#resolverconfig) + +### Functions + +- [verifyEd25519](identity_wasm.md#verifyed25519) +- [encodeB64](identity_wasm.md#encodeb64) +- [decodeB64](identity_wasm.md#decodeb64) +- [start](identity_wasm.md#start) + +## Type Aliases + +### ResolverConfig + +Ƭ **ResolverConfig**: `Object` + +Configurations for the [Resolver](../classes/identity_wasm.Resolver.md). + +#### Type declaration + +| Name | Type | Description | +| :------ | :------ | :------ | +| `client?` | [`IIotaIdentityClient`](../interfaces/identity_wasm.IIotaIdentityClient.md) | Client for resolving DIDs of the iota method. | +| `handlers?` | `Map`\<`string`, (`did`: `string`) => `Promise`\<[`CoreDocument`](../classes/identity_wasm.CoreDocument.md) \| `IToCoreDocument`\>\> | Handlers for resolving DIDs from arbitrary DID methods. The keys to the map are expected to match the method name and the values are asynchronous functions returning DID documents. Note that if a `client` is given the key "iota" may NOT be present in this map. | + +## Functions + +### verifyEd25519 + +▸ **verifyEd25519**(`alg`, `signingInput`, `decodedSignature`, `publicKey`): `void` + +Verify a JWS signature secured with the `EdDSA` algorithm and curve `Ed25519`. + +This function is useful when one is composing a `IJwsVerifier` that delegates +`EdDSA` verification with curve `Ed25519` to this function. + +# Warning + +This function does not check whether `alg = EdDSA` in the protected header. Callers are expected to assert this +prior to calling the function. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `alg` | [`JwsAlgorithm`](../enums/jose_jws_algorithm.JwsAlgorithm.md) | +| `signingInput` | `Uint8Array` | +| `decodedSignature` | `Uint8Array` | +| `publicKey` | [`Jwk`](../classes/identity_wasm.Jwk.md) | + +#### Returns + +`void` + +___ + +### encodeB64 + +▸ **encodeB64**(`data`): `string` + +Encode the given bytes in url-safe base64. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | + +#### Returns + +`string` + +___ + +### decodeB64 + +▸ **decodeB64**(`data`): `Uint8Array` + +Decode the given url-safe base64-encoded slice into its raw bytes. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `data` | `Uint8Array` | + +#### Returns + +`Uint8Array` + +___ + +### start + +▸ **start**(): `void` + +Initializes the console error panic hook for better error messages + +#### Returns + +`void` diff --git a/docs/content/references/iota-identity/wasm/modules/iota_identity_client.md b/docs/content/references/iota-identity/wasm/modules/iota_identity_client.md new file mode 100644 index 00000000000..f1f6bd53dbe --- /dev/null +++ b/docs/content/references/iota-identity/wasm/modules/iota_identity_client.md @@ -0,0 +1,7 @@ +# Module: iota\_identity\_client + +## Table of contents + +### Classes + +- [IotaIdentityClient](../classes/iota_identity_client.IotaIdentityClient.md) diff --git a/docs/content/references/iota-identity/wasm/modules/jose_ec_curve.md b/docs/content/references/iota-identity/wasm/modules/jose_ec_curve.md new file mode 100644 index 00000000000..321c87106c2 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/modules/jose_ec_curve.md @@ -0,0 +1,7 @@ +# Module: jose/ec\_curve + +## Table of contents + +### Enumerations + +- [EcCurve](../enums/jose_ec_curve.EcCurve.md) diff --git a/docs/content/references/iota-identity/wasm/modules/jose_ed_curve.md b/docs/content/references/iota-identity/wasm/modules/jose_ed_curve.md new file mode 100644 index 00000000000..ea722fab01e --- /dev/null +++ b/docs/content/references/iota-identity/wasm/modules/jose_ed_curve.md @@ -0,0 +1,7 @@ +# Module: jose/ed\_curve + +## Table of contents + +### Enumerations + +- [EdCurve](../enums/jose_ed_curve.EdCurve.md) diff --git a/docs/content/references/iota-identity/wasm/modules/jose_jwk_operation.md b/docs/content/references/iota-identity/wasm/modules/jose_jwk_operation.md new file mode 100644 index 00000000000..20ea3ea2196 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/modules/jose_jwk_operation.md @@ -0,0 +1,7 @@ +# Module: jose/jwk\_operation + +## Table of contents + +### Enumerations + +- [JwkOperation](../enums/jose_jwk_operation.JwkOperation.md) diff --git a/docs/content/references/iota-identity/wasm/modules/jose_jwk_type.md b/docs/content/references/iota-identity/wasm/modules/jose_jwk_type.md new file mode 100644 index 00000000000..792dc9b5f96 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/modules/jose_jwk_type.md @@ -0,0 +1,7 @@ +# Module: jose/jwk\_type + +## Table of contents + +### Enumerations + +- [JwkType](../enums/jose_jwk_type.JwkType.md) diff --git a/docs/content/references/iota-identity/wasm/modules/jose_jwk_use.md b/docs/content/references/iota-identity/wasm/modules/jose_jwk_use.md new file mode 100644 index 00000000000..6d1f0991ec1 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/modules/jose_jwk_use.md @@ -0,0 +1,7 @@ +# Module: jose/jwk\_use + +## Table of contents + +### Enumerations + +- [JwkUse](../enums/jose_jwk_use.JwkUse.md) diff --git a/docs/content/references/iota-identity/wasm/modules/jose_jws_algorithm.md b/docs/content/references/iota-identity/wasm/modules/jose_jws_algorithm.md new file mode 100644 index 00000000000..908211c4e46 --- /dev/null +++ b/docs/content/references/iota-identity/wasm/modules/jose_jws_algorithm.md @@ -0,0 +1,7 @@ +# Module: jose/jws\_algorithm + +## Table of contents + +### Enumerations + +- [JwsAlgorithm](../enums/jose_jws_algorithm.JwsAlgorithm.md) From 58173688d71b33343e26ffdeca6f1b9be8e080c4 Mon Sep 17 00:00:00 2001 From: Gino Date: Wed, 13 Nov 2024 16:00:37 +0100 Subject: [PATCH 4/4] fix(devx) update sui mention --- docs/content/developer/advanced/asset-tokenization.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/developer/advanced/asset-tokenization.mdx b/docs/content/developer/advanced/asset-tokenization.mdx index 1257b3cb300..bc897ad67f9 100644 --- a/docs/content/developer/advanced/asset-tokenization.mdx +++ b/docs/content/developer/advanced/asset-tokenization.mdx @@ -734,7 +734,7 @@ Afterward, it's necessary to modify the `Move.toml` file. Under the `[addresses] ##### Automatically -The fields that are automatically filled are: `SUI_NETWORK`, `ASSET_TOKENIZATION_PACKAGE_ID` and `REGISTRY`. +The fields that are automatically filled are: `IOTA_NETWORK`, `ASSET_TOKENIZATION_PACKAGE_ID` and `REGISTRY`. To publish with the bash script run: