MATTR Wallet SDK React Native / Exports
- CredentialFormatSupported
- CredentialOfferType
- CredentialProfileSupported
- CredentialStatusType
- DiscoverErrorType
- ExpandWebSemanticCredentialErrorType
- GenerateAuthorizeUrlErrorType
- MobileCredentialHolderErrorType
- QueryType
- ResolveDidCommUriErrorType
- RetrieveCredentialsErrorType
- RetrieveTokenErrorType
- SendWebSemanticPresentationResponseErrorType
- VerifyFailureReasonType
- CheckStatusResult
- Credential
- CredentialExample
- CredentialFrame
- CredentialQueryByExample
- CredentialQueryByFrame
- CredentialSubject
- DidAuthQuery
- DidDocument
- DidService
- DidServiceInfoResponse
- JsonLdFrame
- Jwm
- KeyManagementService
- MobileCredentialHolderError
- QueryByExample
- QueryByFrame
- RevocableVerifiableCredential
- TrustedIssuer
- VerifiableCredentialProof
- VerifiablePresentation
- VerifiablePresentationRequest
- AddTrustedIssuerCertificatesError
- AddTrustedIssuerCertificatesOptions
- AuthorizeRequestParameters
- BaseError
- CloseWalletError
- CompactCredentialOffered
- CompactCredentialPayload
- CompactSemanticCredentialOffered
- CompactSemanticCredentialPayload
- CompactSemanticVerifyFailureReasonType
- CompactVerifyFailureReasonType
- CreateDidError
- CreateDidResponse
- CreateProximityPresentationSessionError
- CreateProximityPresentationSessionOptions
- CreateWebSemanticPresentationErrorCouldNotFindSubjectSigningKey
- CreateWebSemanticPresentationErrorHolderNotADid
- CreateWebSemanticPresentationErrorSubjectDidHasNoAuthenticationUrl
- CreateWebSemanticPresentationErrorSubjectNotADid
- CreateWebSemanticPresentationErrors
- CreateWebSemanticPresentationOptions
- CredentialIssuer
- CredentialNotFoundInTokenError
- CredentialOffered
- CwtPayload
- CwtPayloadRecord
- DecryptError
- DeleteDidError
- DeleteTrustedIssuerCertificateError
- DeprecatedWebSemanticCredentialOffered
- DeriveWebSemanticCredentialError
- DeriveWebSemanticCredentialOptions
- DidConfigurationValidateResult
- DidDeletionError
- DidNotFoundError
- DidResolutionError
- DiscoverResult
- EncryptError
- EncryptOptions
- ExpandWebSemanticCredentialOptions
- FilterWebSemanticCredentialsByQueryError
- FilterWebSemanticCredentialsByQueryOptions
- FilterWebSemanticCredentialsByQueryResponse
- GenerateAuthorizeResult
- GenerateAuthorizeUrlOptions
- GenericSdkError
- GetDidsError
- GetMobileCredentialError
- HttpCacheError
- InitialiseOptions
- InvalidBase64URLDecodeError
- InvalidCborldDecodeError
- InvalidCborldEncodeError
- InvalidDidError
- InvalidIdTokenError
- InvalidIssuerUriError
- InvalidJSONError
- InvalidOpenIdConfigurationError
- MobileCredential
- OidcCredentialOffer
- OpenDidCommError
- OpenidIssuanceCredentialDefinition
- OpenidIssuanceCredentialOffer
- OpenidIssuanceDiscoverResult
- OpenidIssuanceGenerateAuthorizeResult
- OpenidIssuanceGenerateAuthorizeUrlOptions
- OpenidIssuanceRetrieveCompactCredentialsResult
- OpenidIssuanceRetrieveCompactSemanticCredentialsResult
- OpenidIssuanceRetrieveCredential
- OpenidIssuanceRetrieveCredentialFailure
- OpenidIssuanceRetrieveCredentialSuccess
- OpenidIssuanceRetrieveCredentialsOptions
- OpenidIssuanceRetrieveCredentialsResult
- OpenidIssuanceRetrieveTokenOptions
- OpenidIssuanceRetrieveTokenResult
- OpenidIssuanceRetrieveWebSemanticCredentialsResult
- PresentationRequestError
- PresentationRequestJwm
- ProximityPresentationSession
- Result
- RetrieveCredentialError
- RetrieveCredentialOptions
- RetrieveCredentialResult
- SendProximityPresentationResponseError
- SendProximityPresentationSessionOptions
- SendWebSemanticPresentationResponseOptions
- SignError
- TrustedIssuerCertificate
- UserAuthenticationCancelledError
- UserAuthenticationOnDeviceNotSetupError
- VerifiableCredential
- VerifiablePresentationRequestQuery
- VerifyCompactCredentialError
- VerifyCompactCredentialOptions
- VerifyCompactCredentialResult
- VerifyCompactSemanticCredentialError
- VerifyCompactSemanticCredentialOptions
- VerifyCompactSemanticCredentialResult
- VerifyCredentialStatus
- VerifyError
- VerifyWebSemanticCredentialError
- VerifyWebSemanticCredentialOptions
- VerifyWebSemanticCredentialResult
- Wallet
- WalletBase
- WalletExtension
- WalletNotFoundError
- WebSemanticCredentialData
- WebSemanticCredentialOffered
- AuthorizeRequestParametersValidator
- CompactCredentialOfferedValidator
- CompactSemanticCredentialOfferedValidator
- CredentialOfferedValidator
- DeprecatedWebSemanticCredentialOfferedValidator
- OpenidIssuanceCredentialOfferValidator
- OpenidIssuanceGenerateAuthorizeUrlOptionsValidator
- OpenidIssuanceRetrieveCredentialsOptionsValidator
- RNSecureKeyStoreLegacy
- WebSemanticCredentialOfferedValidator
- assertType
- assertUnreachable
- destroy
- initialise
- isPresentationRequestJwm
- isType
- isVerifiableCredential
- unwrap
Ƭ AddTrustedIssuerCertificatesError: MobileCredentialHolderError
<InvalidCertificate
>
Ƭ AddTrustedIssuerCertificatesOptions: readonly string
[]
Ƭ AuthorizeRequestParameters: Object
Name | Type |
---|---|
login_hint? |
string |
prompt? |
string |
Ƭ BaseError<T
>: Object
Base error type used for all sdk error responses
Name | Type | Description |
---|---|---|
T |
string |
the error type |
Name | Type | Description |
---|---|---|
cause? |
Error | unknown |
Information about underlying root cause |
details? |
unknown |
Additional details |
message |
string |
Message containing error description |
type |
T |
Error type |
Ƭ CloseWalletError: BaseError
<"CloseWalletError"
>
Ƭ CompactCredentialOffered: BaseCredentialOffered
& { profile
: Compact
; type
: string
}
Ƭ CompactCredentialPayload: ImplementsZodType
<z.infer
<typeof CompactCredentialPayloadValidator
>, CwtPayload
& CwtPayloadRecord
>
Ƭ CompactSemanticCredentialOffered: BaseCredentialOffered
& { profile
: CompactSemantic
; types
: string
[] }
Ƭ CompactSemanticCredentialPayload: ImplementsZodType
<z.infer
<typeof CompactSemanticCredentialPayloadValidator
>, { aud?
: string
; exp?
: number
; iat?
: number
; iss
: string
; jti
: string
; nbf
: number
; status?
: CwtStatus
; sub?
: string
; vc
: CompactSemanticCredentialVcPayload
}>
Ƭ CompactSemanticVerifyFailureReasonType: VerifyFailureReasonType
Ƭ CompactVerifyFailureReasonType: VerifyFailureReasonType
Ƭ CreateDidError: BaseError
<"CreateDidError"
>
Ƭ CreateDidResponse: Object
Name | Type | Description |
---|---|---|
did |
string |
The new DID that has been created |
Ƭ CreateProximityPresentationSessionError: MobileCredentialHolderError
<BluetoothPermissionDenied
| BluetoothPermissionRestricted
| ExistingProximityPresentationSession
>
Ƭ CreateProximityPresentationSessionOptions: z.infer
<typeof CreateProximityPresentationSessionOptionsValidator
>
Ƭ CreateWebSemanticPresentationErrorCouldNotFindSubjectSigningKey: BaseError
<"CreatePresentationErrorCouldNotFindSubjectSigningKey"
>
Ƭ CreateWebSemanticPresentationErrorHolderNotADid: BaseError
<"CreatePresentationErrorHolderNotADid"
>
Ƭ CreateWebSemanticPresentationErrorSubjectDidHasNoAuthenticationUrl: BaseError
<"CreatePresentationErrorSubjectDidHasNoAuthenticationUrl"
>
Ƭ CreateWebSemanticPresentationErrorSubjectNotADid: BaseError
<"CreatePresentationErrorSubjectNotADid"
>
Ƭ CreateWebSemanticPresentationErrors: CreateWebSemanticPresentationErrorSubjectNotADid
| CreateWebSemanticPresentationErrorHolderNotADid
| CreateWebSemanticPresentationErrorSubjectDidHasNoAuthenticationUrl
| CreateWebSemanticPresentationErrorCouldNotFindSubjectSigningKey
Ƭ CreateWebSemanticPresentationOptions: Object
Name | Type |
---|---|
challenge |
string |
credentials? |
readonly VerifiableCredential [] |
domain? |
string |
holder? |
string |
Ƭ CredentialIssuer: string
| { [key: string]
: any
; id
: string
}
See
https://www.w3.org/TR/vc-data-model/#issuer
Ƭ CredentialNotFoundInTokenError: BaseError
<"CredentialNotFoundInTokenError"
>
Ƭ CredentialOffered: CompactCredentialOffered
| CompactSemanticCredentialOffered
| WebSemanticCredentialOffered
| DeprecatedWebSemanticCredentialOffered
| MobileCredentialOffered
Ƭ CwtPayload: ImplementsZodType
<z.infer
<typeof CwtPayloadValidator
>, { aud?
: string
; exp?
: number
; iat?
: number
; iss
: string
; jti
: string
; nbf?
: number
; status?
: CwtStatus
; sub?
: string
; type?
: string
}>
Ƭ CwtPayloadRecord: ImplementsZodType
<z.infer
<typeof CwtPayloadRecordValidator
>, { [key: string]
: string
| boolean
| number
| Uint8Array
| CwtStatus
| undefined
; }>
Ƭ DecryptError: BaseError
<"DecryptError"
>
Ƭ DeleteDidError: DidNotFoundError
| DidDeletionError
Ƭ DeleteTrustedIssuerCertificateError: MobileCredentialHolderError
<TrustedIssuerCertificateInUse
>
Ƭ DeprecatedWebSemanticCredentialOffered: Object
Name | Type | Description |
---|---|---|
claims? |
CredentialOfferedClaim [] |
- |
cryptographicBindingMethodsSupported? |
"did" |
- |
cryptographicSuitesSupported? |
"Ed25519Signature2018" |
- |
name? |
string |
- |
profile |
WebSemantic |
- |
scope |
string |
- |
type |
string |
Deprecated use OpenidIssuanceCredentialDefinition instead |
Ƭ DeriveWebSemanticCredentialError: BaseError
<DeriveWebSemanticCredentialErrorType
>
Ƭ DeriveWebSemanticCredentialOptions: Object
Name | Type |
---|---|
credential |
VerifiableCredential |
credentialFrame |
CredentialFrame |
Ƭ DidConfigurationValidateResult: Object
Name | Type |
---|---|
did |
string |
domain |
string |
isValid |
boolean |
Ƭ DidDeletionError: BaseError
<"DidDeletionError"
>
Ƭ DidNotFoundError: BaseError
<"DidNotFoundError"
>
Ƭ DidResolutionError: BaseError
<"DidResolutionError"
>
Ƭ DiscoverResult: Object
Name | Type | Description |
---|---|---|
offer |
OidcCredentialOffer |
An OIDC credential offer |
Ƭ EncryptError: BaseError
<"EncryptError"
>
Ƭ EncryptOptions: Object
Name | Type | Description |
---|---|---|
payload |
string | Record <string , unknown > |
The payload to encrypt |
recipientDids |
readonly string [] |
The DIDs of the message recipients |
senderDid |
string |
The DID of the sender |
Ƭ ExpandWebSemanticCredentialOptions: Object
Name | Type |
---|---|
credential |
VerifiableCredential |
Ƭ FilterWebSemanticCredentialsByQueryError: PresentationRequestError
Ƭ FilterWebSemanticCredentialsByQueryOptions<T
>: Object
Filter credentials by query options
Name | Type | Description |
---|---|---|
T |
extends WebSemanticCredentialData |
Additional data extending WebSemanticCredentialData |
Name | Type | Description |
---|---|---|
checkWithCompactJsonLdDocument? |
boolean |
When true , filter credentials by the compact form of the credentials and request query |
credentials |
readonly T [] |
A list of credential data to query against |
query |
VerifiablePresentationRequestQuery |
A VerifiablePresentationRequestQuery to filter the credentials with |
Ƭ FilterWebSemanticCredentialsByQueryResponse<T
>: FilterCredentialsByExampleResponse
<T
> | FilterCredentialsByFrameResponse
<T
> | FilterCredentialsByDidAuthResponse
<T
>
Filter credentials by query response
Name | Type | Description |
---|---|---|
T |
extends WebSemanticCredentialData |
Additional data extending WebSemanticCredentialData |
Ƭ GenerateAuthorizeResult: Object
Name | Type |
---|---|
codeVerifier |
string |
nonce |
string |
url |
string |
Ƭ GenerateAuthorizeUrlOptions: Object
Name | Type |
---|---|
clientId? |
string |
did |
string |
offer |
OidcCredentialOffer |
redirectUri? |
string |
state? |
string |
Ƭ GenericSdkError: BaseError
<"GenericError"
>
Ƭ GetDidsError: BaseError
<"GetDidsError"
>
Ƭ GetMobileCredentialError: MobileCredentialHolderError
<CredentialNotFound
>
Ƭ HttpCacheError: BaseError
<"HttpCacheError"
>
Ƭ InitialiseOptions: Object
Options to configure when initialise a wallet
Name | Type | Description |
---|---|---|
credential? |
{ compact? : { issuerResolverTtl? : number ; revocationListTtl? : number } ; compactSemantic? : { issuerResolverTtl? : number ; revocationListTtl? : number } } |
Configurations for credential operations |
credential.compact? |
{ issuerResolverTtl? : number ; revocationListTtl? : number } |
Configurations for compact credential operations |
credential.compact.issuerResolverTtl? |
number |
Duration that an issuer is kept in the cache after it is added or re-added |
credential.compact.revocationListTtl? |
number |
Duration that a revocation list is kept in the cache after it is added or re-added |
credential.compactSemantic? |
{ issuerResolverTtl? : number ; revocationListTtl? : number } |
Configurations for compact-semantic credential operations |
credential.compactSemantic.issuerResolverTtl? |
number |
Duration that an issuer is kept in the cache after it is added or re-added |
credential.compactSemantic.revocationListTtl? |
number |
Duration that a revocation list is kept in the cache after it is added or re-added |
extensions? |
readonly MobileCredentialHolder [] |
A list of extension modules to enable additional features. |
httpRequestTimeoutMs? |
number |
The number of milliseconds a request can take before automatically being terminated. The default value is 5000. |
httpResolverBaseUrl? |
string |
Specifies the base URL including path that http resolver will use Default Value ts https://uniresolver-api.mattr.global |
httpResolverPath? |
string |
Specifies the URL path that http resolver will use Default Value ts /1.0/identifiers/ |
walletId? |
string |
Specifies the wallet ID to use |
Ƭ InvalidBase64URLDecodeError: BaseError
<"InvalidBase64URLDecodeError"
>
Ƭ InvalidCborldDecodeError: BaseError
<"InvalidCborldDecodeError"
>
Ƭ InvalidCborldEncodeError: BaseError
<"InvalidCborldEncodeError"
>
Ƭ InvalidDidError: BaseError
<"InvalidDidError"
>
Ƭ InvalidIdTokenError: BaseError
<"InvalidIdTokenError"
>
Ƭ InvalidIssuerUriError: BaseError
<OidcErrorType.InvalidIssuerUriError
>
Ƭ InvalidJSONError: BaseError
<"InvalidJSONError"
>
Ƭ InvalidOpenIdConfigurationError: BaseError
<OidcErrorType.InvalidOpenIdConfigurationError
>
Ƭ MobileCredential: z.output
<typeof MobileCredentialValidator
>
Ƭ OidcCredentialOffer: Object
Name | Type |
---|---|
authorizeEndpoint |
string |
claims |
readonly string [] |
issuer |
string |
name |
string |
requestParameters? |
OidcRequestParameters |
tokenEndpoint |
string |
type |
CredentialOfferType |
Ƭ OpenDidCommError: BaseError
<"OpenDidCommError"
>
Ƭ OpenidIssuanceCredentialDefinition: Object
Name | Type |
---|---|
@context |
z.infer <typeof JsonLdContextValidator > |
type |
string [] |
Ƭ OpenidIssuanceCredentialOffer: Object
Name | Type |
---|---|
authorizeEndpoint |
string |
authorizeRequestParameters? |
AuthorizeRequestParameters |
credentialEndpoint |
string |
credentials |
CredentialOffered [] |
issuer |
string |
mdocIacasUri? |
string |
tokenEndpoint |
string |
Ƭ OpenidIssuanceDiscoverResult: Object
Result for discover
Name | Type |
---|---|
offer |
OpenidIssuanceCredentialOffer |
Ƭ OpenidIssuanceGenerateAuthorizeResult: Object
Result for generate authorize url
Name | Type |
---|---|
codeVerifier |
string |
url |
string |
Ƭ OpenidIssuanceGenerateAuthorizeUrlOptions: Object
Options for generate authorize url
Name | Type |
---|---|
clientId? |
string |
offer |
OpenidIssuanceCredentialOffer |
redirectUri? |
string |
state? |
string |
Ƭ OpenidIssuanceRetrieveCompactCredentialsResult: Object
Name | Type |
---|---|
credential |
string |
profile |
Compact |
Ƭ OpenidIssuanceRetrieveCompactSemanticCredentialsResult: Object
Name | Type |
---|---|
credential |
string |
profile |
CompactSemantic |
Ƭ OpenidIssuanceRetrieveCredential: OpenidIssuanceRetrieveWebSemanticCredentialsResult
| OpenidIssuanceRetrieveCompactCredentialsResult
| OpenidIssuanceRetrieveCompactSemanticCredentialsResult
| OpenidIssuanceRetrieveMobileCredentialsResult
Ƭ OpenidIssuanceRetrieveCredentialFailure: Object
Name | Type |
---|---|
error |
unknown |
offer |
CredentialOffered |
Ƭ OpenidIssuanceRetrieveCredentialSuccess: Object
Name | Type |
---|---|
offer |
CredentialOffered |
result |
OpenidIssuanceRetrieveCredential |
Ƭ OpenidIssuanceRetrieveCredentialsOptions: Object
Options for retrieve credentials
Name | Type | Description |
---|---|---|
accessToken |
string |
- |
autoTrustMobileCredentialIaca? |
boolean |
optional, default false when true and mdocIacasUri is available in the offer, it will automatically download and add all the certificates as trusted issuers certificates for any mobile credentials |
clientId? |
string |
- |
offer |
OpenidIssuanceCredentialOffer |
- |
Ƭ OpenidIssuanceRetrieveCredentialsResult: (OpenidIssuanceRetrieveCredentialSuccess
| OpenidIssuanceRetrieveCredentialFailure
)[]
Ƭ OpenidIssuanceRetrieveTokenOptions: Object
Options for retrieve token
Name | Type |
---|---|
clientId? |
string |
code |
string |
codeVerifier |
string |
offer |
OpenidIssuanceCredentialOffer |
redirectUri? |
string |
Ƭ OpenidIssuanceRetrieveTokenResult: Object
Result for retrieve token
Name | Type | Description |
---|---|---|
accessToken |
string |
- |
expiresIn? |
number |
expires in second |
Ƭ OpenidIssuanceRetrieveWebSemanticCredentialsResult: Object
Result for retrieve credentials
Name | Type |
---|---|
credential |
VerifiableCredential |
did |
string |
profile |
WebSemantic |
Ƭ PresentationRequestError: BaseError$1
<PresentationRequestErrorType
>
Ƭ PresentationRequestJwm: Jwm
& { body
: VerifiablePresentationRequest
; from
: string
; reply_to
: readonly string
[] ; reply_url
: string
; type
: PresentationRequestType
}
Ƭ ProximityPresentationSession: z.infer
<typeof ProximityPresentationSessionValidator
>
Ƭ Result<T
, E
>: Ok
<T
, E
> | Err
<T
, E
>
Name |
---|
T |
E |
Ƭ RetrieveCredentialError: BaseError
<"RetrieveCredentialError"
>
Ƭ RetrieveCredentialOptions: Object
Name | Type |
---|---|
clientId? |
string |
code |
string |
codeVerifier |
string |
nonce |
string |
offer |
OidcCredentialOffer |
redirectUri? |
string |
Ƭ RetrieveCredentialResult: Object
Name | Type | Description |
---|---|---|
credential |
VerifiableCredential |
The retrieved credential |
Ƭ SendProximityPresentationResponseError: MobileCredentialHolderError
<ExistingProximityPresentationSessionNotFound
| ProximityPresentationSessionErrorType.UserAuthentication
| ProximityPresentationSessionErrorType.UserAuthenticationCancelled
| ProximityPresentationSessionErrorType.UserAuthenticationOnDeviceNotSetup
| ProximityPresentationSessionErrorType.InvalidMobileCredentialId
| ProximityPresentationSessionErrorType.MobileCredentialsWithDuplicateDocTypes
| ProximityPresentationSessionErrorType.MobileCredentialRequestNotReceived
| ProximityPresentationSessionErrorType.DataTransportFailed
>
Ƭ SendProximityPresentationSessionOptions: z.infer
<typeof SendProximityPresentationSessionOptionsValidator
>
Ƭ SendWebSemanticPresentationResponseOptions: Object
Name | Type |
---|---|
presentation |
VerifiablePresentation |
presentationRequest |
PresentationRequestJwm |
senderDid? |
string |
Ƭ SignError: BaseError
<"SignError"
>
Ƭ TrustedIssuerCertificate: z.infer
<typeof TrustedIssuerCertificateValidator
>
Ƭ UserAuthenticationCancelledError: BaseError
<"UserAuthenticationCancelledError"
>
Error when user cancel the local authentication
Ƭ UserAuthenticationOnDeviceNotSetupError: BaseError
<"UserAuthenticationOnDeviceNotSetupError"
>
Ƭ VerifiableCredential: Credential
& { id?
: string
; proof
: VerifiableCredentialProof
| readonly VerifiableCredentialProof
[] }
Ƭ VerifiablePresentationRequestQuery: DidAuthQuery
| QueryByExample
| QueryByFrame
Ƭ VerifyCompactCredentialError: BaseError
<VerifyCredentialErrorType$1
>
Ƭ VerifyCompactCredentialOptions: Object
Name | Type |
---|---|
assertExpiry? |
boolean |
assertNotBefore? |
boolean |
checkRevocation? |
boolean |
payload |
string |
trustedIssuers? |
string [] |
Ƭ VerifyCompactCredentialResult: Omit
<VerifyResult
, "payload"
| "reason"
> & { header?
: CwtHeader
; payload?
: CompactCredentialPayload
; reason
: { details?
: VerifyFailedResultReasonDetails
; message
: string
; type
: CompactVerifyFailureReasonType
} ; verified
: false
} | Omit
<VerifyResult
, "payload"
> & { header
: CwtHeader
; payload
: CompactCredentialPayload
; verified
: true
}
Ƭ VerifyCompactSemanticCredentialError: BaseError
<VerifyCredentialErrorType
>
Ƭ VerifyCompactSemanticCredentialOptions: Object
Name | Type |
---|---|
assertExpiry? |
boolean |
assertNotBefore? |
boolean |
checkRevocation? |
boolean |
payload |
string |
trustedIssuers? |
string [] |
Ƭ VerifyCompactSemanticCredentialResult: Omit
<VerifyResult
, "payload"
| "reason"
> & { header?
: CwtHeader
; payload?
: CompactSemanticCredentialPayload
; reason
: { details?
: VerifyFailedResultReasonDetails
; message
: string
; type
: CompactSemanticVerifyFailureReasonType
} ; verified
: false
} | Omit
<VerifyResult
, "payload"
> & { header
: CwtHeader
; payload
: CompactSemanticCredentialPayload
; verified
: true
}
Ƭ VerifyCredentialStatus: CheckStatusResult
| undefined
Ƭ VerifyError: BaseError
<"VerifyError"
>
Ƭ VerifyWebSemanticCredentialError: BaseError
<VerifyWebSemanticCredentialErrorType
>
Ƭ VerifyWebSemanticCredentialOptions: Object
Name | Type | Description |
---|---|---|
credential |
VerifiableCredential |
The credential to verify |
Ƭ VerifyWebSemanticCredentialResult: Object
Name | Type |
---|---|
credentialVerified |
boolean |
expired? |
boolean |
status? |
VerifyCredentialStatus |
Ƭ Wallet: WalletBase
& WalletExtension
An instance of a wallet with React Native specific extensions.
Ƭ WalletBase: Object
An instance of a wallet
Name | Type | Description |
---|---|---|
close |
() => Promise <Result <void , CloseWalletError >> |
Closes the wallet Remarks Wallet instance will not function anymore after close |
credential |
{ compact : { verifyCredential : (options : VerifyCompactCredentialOptions ) => Promise <Result <VerifyCompactCredentialResult , VerifyCompactCredentialError >> } ; compactSemantic : { verifyCredential : (options : VerifyCompactSemanticCredentialOptions ) => Promise <Result <VerifyCompactSemanticCredentialResult , VerifyCompactSemanticCredentialError >> } ; mobile : { addTrustedIssuerCertificates : (certificates : AddTrustedIssuerCertificatesOptions ) => Promise <Result <string [], AddTrustedIssuerCertificatesError >> ; createProximityPresentationSession : (options : CreateProximityPresentationSessionOptions ) => Promise <Result <ProximityPresentationSession , CreateProximityPresentationSessionError >> ; deleteCredential : (credentialId : string ) => Promise <void > ; deleteTrustedIssuerCertificate : (certificateId : string ) => Promise <Result <void , DeleteTrustedIssuerCertificateError >> ; getCredential : (credentialId : string ) => Promise <Result <MobileCredential , GetMobileCredentialError >> ; getCredentials : () => Promise <MobileCredential []> ; getCurrentProximityPresentationSession : () => Promise <ProximityPresentationSession | undefined > ; getTrustedIssuerCertificates : () => Promise <TrustedIssuerCertificate []> ; sendProximityPresentationResponse : (options : SendProximityPresentationSessionOptions ) => Promise <Result <void , SendProximityPresentationResponseError >> ; terminateProximityPresentationSession : () => Promise <void > } ; webSemantic : { createPresentation : (options : CreateWebSemanticPresentationOptions ) => Promise <Result <VerifiablePresentation , CreateWebSemanticPresentationErrors >> ; deriveCredential : (options : DeriveWebSemanticCredentialOptions ) => Promise <Result <VerifiableCredential , DeriveWebSemanticCredentialError >> ; expandCredential : (options : ExpandWebSemanticCredentialOptions ) => Promise <Result <Record <string , unknown >, BaseError <ExpandWebSemanticCredentialErrorType >>> ; filterCredentialsByQuery : <T>(options : FilterWebSemanticCredentialsByQueryOptions <T >) => Promise <Result <FilterWebSemanticCredentialsByQueryResponse <T >, FilterWebSemanticCredentialsByQueryError >> ; isSelectivelyDisclosable : (credential : VerifiableCredential ) => boolean ; sendPresentationResponse : (options : SendWebSemanticPresentationResponseOptions ) => Promise <Result <void , SendWebSemanticPresentationResponseError >> ; verifyCredential : (options : VerifyWebSemanticCredentialOptions ) => Promise <Result <VerifyWebSemanticCredentialResult , VerifyWebSemanticCredentialError >> } } |
Namespace for credential operations |
credential.compact |
{ verifyCredential : (options : VerifyCompactCredentialOptions ) => Promise <Result <VerifyCompactCredentialResult , VerifyCompactCredentialError >> } |
Namespace for compact credential operations |
credential.compact.verifyCredential |
(options : VerifyCompactCredentialOptions ) => Promise <Result <VerifyCompactCredentialResult , VerifyCompactCredentialError >> |
Attempts to verify a Compact credential |
credential.compactSemantic |
{ verifyCredential : (options : VerifyCompactSemanticCredentialOptions ) => Promise <Result <VerifyCompactSemanticCredentialResult , VerifyCompactSemanticCredentialError >> } |
Namespace for compact semantic credential operations |
credential.compactSemantic.verifyCredential |
(options : VerifyCompactSemanticCredentialOptions ) => Promise <Result <VerifyCompactSemanticCredentialResult , VerifyCompactSemanticCredentialError >> |
Attempts to verify a Compact Semantic credential |
credential.mobile |
{ addTrustedIssuerCertificates : (certificates : AddTrustedIssuerCertificatesOptions ) => Promise <Result <string [], AddTrustedIssuerCertificatesError >> ; createProximityPresentationSession : (options : CreateProximityPresentationSessionOptions ) => Promise <Result <ProximityPresentationSession , CreateProximityPresentationSessionError >> ; deleteCredential : (credentialId : string ) => Promise <void > ; deleteTrustedIssuerCertificate : (certificateId : string ) => Promise <Result <void , DeleteTrustedIssuerCertificateError >> ; getCredential : (credentialId : string ) => Promise <Result <MobileCredential , GetMobileCredentialError >> ; getCredentials : () => Promise <MobileCredential []> ; getCurrentProximityPresentationSession : () => Promise <ProximityPresentationSession | undefined > ; getTrustedIssuerCertificates : () => Promise <TrustedIssuerCertificate []> ; sendProximityPresentationResponse : (options : SendProximityPresentationSessionOptions ) => Promise <Result <void , SendProximityPresentationResponseError >> ; terminateProximityPresentationSession : () => Promise <void > } |
Namespace for mobile credential operations |
credential.mobile.addTrustedIssuerCertificates |
(certificates : AddTrustedIssuerCertificatesOptions ) => Promise <Result <string [], AddTrustedIssuerCertificatesError >> |
Add a trusted issuer certificate to storage. Issuer certificates are used to verify mobile credentials when added storage. This function validates the certificate in accordance with the IACA profile defined in 18013-5 with the additional constraint of requiring the certificate to be self signed. The operation is idempotent meaning repeated calls to add the same issuer certificates do not result in duplicates instead the id's of the existing certificates as stored by the SDK are returned. |
credential.mobile.createProximityPresentationSession |
(options : CreateProximityPresentationSessionOptions ) => Promise <Result <ProximityPresentationSession , CreateProximityPresentationSessionError >> |
Create a proximity based presentation session with a mobile credential verifier using ISO 18013-5 based DeviceRetrieval. |
credential.mobile.deleteCredential |
(credentialId : string ) => Promise <void > |
Delete a mobile credential from storage by id |
credential.mobile.deleteTrustedIssuerCertificate |
(certificateId : string ) => Promise <Result <void , DeleteTrustedIssuerCertificateError >> |
Delete a trusted issuer certificate from storage. This operation is idempotent, meaning calls to this function for issuer certificates that do not exist will not return an error. |
credential.mobile.getCredential |
(credentialId : string ) => Promise <Result <MobileCredential , GetMobileCredentialError >> |
Get mobile credential from storage by id |
credential.mobile.getCredentials |
() => Promise <MobileCredential []> |
Get all mobile credentials from storage |
credential.mobile.getCurrentProximityPresentationSession |
() => Promise <ProximityPresentationSession | undefined > |
Get the current proximity presentation session. |
credential.mobile.getTrustedIssuerCertificates |
() => Promise <TrustedIssuerCertificate []> |
Retrieve all trusted issuer certificates from storage. |
credential.mobile.sendProximityPresentationResponse |
(options : SendProximityPresentationSessionOptions ) => Promise <Result <void , SendProximityPresentationResponseError >> |
Use the referenced mobile credentials to construct and send a response to the current request from the verifier. |
credential.mobile.terminateProximityPresentationSession |
() => Promise <void > |
Create a proximity based presentation session with a mobile credential verifier using ISO 18013-5 based DeviceRetrieval. |
credential.webSemantic |
{ createPresentation : (options : CreateWebSemanticPresentationOptions ) => Promise <Result <VerifiablePresentation , CreateWebSemanticPresentationErrors >> ; deriveCredential : (options : DeriveWebSemanticCredentialOptions ) => Promise <Result <VerifiableCredential , DeriveWebSemanticCredentialError >> ; expandCredential : (options : ExpandWebSemanticCredentialOptions ) => Promise <Result <Record <string , unknown >, BaseError <ExpandWebSemanticCredentialErrorType >>> ; filterCredentialsByQuery : <T>(options : FilterWebSemanticCredentialsByQueryOptions <T >) => Promise <Result <FilterWebSemanticCredentialsByQueryResponse <T >, FilterWebSemanticCredentialsByQueryError >> ; isSelectivelyDisclosable : (credential : VerifiableCredential ) => boolean ; sendPresentationResponse : (options : SendWebSemanticPresentationResponseOptions ) => Promise <Result <void , SendWebSemanticPresentationResponseError >> ; verifyCredential : (options : VerifyWebSemanticCredentialOptions ) => Promise <Result <VerifyWebSemanticCredentialResult , VerifyWebSemanticCredentialError >> } |
Namespace for web semantic credential operations |
credential.webSemantic.createPresentation |
(options : CreateWebSemanticPresentationOptions ) => Promise <Result <VerifiablePresentation , CreateWebSemanticPresentationErrors >> |
Create a Web Semantic verifiable presentation |
credential.webSemantic.deriveCredential |
(options : DeriveWebSemanticCredentialOptions ) => Promise <Result <VerifiableCredential , DeriveWebSemanticCredentialError >> |
Derives a Web Semantic credential based on a frame |
credential.webSemantic.expandCredential |
(options : ExpandWebSemanticCredentialOptions ) => Promise <Result <Record <string , unknown >, BaseError <ExpandWebSemanticCredentialErrorType >>> |
Expands a verifiable Web Semantic credential using jsonld |
credential.webSemantic.filterCredentialsByQuery |
<T>(options : FilterWebSemanticCredentialsByQueryOptions <T >) => Promise <Result <FilterWebSemanticCredentialsByQueryResponse <T >, FilterWebSemanticCredentialsByQueryError >> |
Filters a list of Web Semantic credentials based on a query |
credential.webSemantic.isSelectivelyDisclosable |
(credential : VerifiableCredential ) => boolean |
Determines if a Web Semantic credential is capable of selective disclosure |
credential.webSemantic.sendPresentationResponse |
(options : SendWebSemanticPresentationResponseOptions ) => Promise <Result <void , SendWebSemanticPresentationResponseError >> |
Sends a Web Semantic presentation response |
credential.webSemantic.verifyCredential |
(options : VerifyWebSemanticCredentialOptions ) => Promise <Result <VerifyWebSemanticCredentialResult , VerifyWebSemanticCredentialError >> |
Attempts to verify a Web Semantic credential |
did |
{ createDid : () => Promise <Result <CreateDidResponse , CreateDidError >> ; deleteDid : (did : string ) => Promise <Result <void , DeleteDidError >> ; listDids : () => Promise <Result <readonly string [], GetDidsError >> ; messaging : { encrypt : (options : EncryptOptions ) => Promise <Result <JweJsonSerialization , BaseError <EncryptErrorType >>> ; openDidCommMessage : (message : unknown ) => Promise <Result <Jwm , OpenDidCommError | VerifyError | DecryptError >> ; resolveDidCommUri : (didCommUri : string ) => Promise <Result <unknown , BaseError <ResolveDidCommUriErrorType >>> ; sign : (payload : string | Record <string , unknown >, senderDid : string ) => Promise <Result <string , SignError >> } ; resolveDid : (did : string ) => Promise <Result <DidServiceInfoResponse , DidResolutionError >> ; wellKnownDidConfiguration : { validate : (domain : string , did : string ) => Promise <boolean > ; validateMultipleDids : (domain : string , dids : readonly string []) => Promise <ReadonlyArray <DidConfigurationValidateResult >> } } |
Namespace for DID operations |
did.createDid |
() => Promise <Result <CreateDidResponse , CreateDidError >> |
Create a new DID in the wallet |
did.deleteDid |
(did : string ) => Promise <Result <void , DeleteDidError >> |
Delete an existing DID in the wallet |
did.listDids |
() => Promise <Result <readonly string [], GetDidsError >> |
List all DIDs created within the wallet |
did.messaging |
{ encrypt : (options : EncryptOptions ) => Promise <Result <JweJsonSerialization , BaseError <EncryptErrorType >>> ; openDidCommMessage : (message : unknown ) => Promise <Result <Jwm , OpenDidCommError | VerifyError | DecryptError >> ; resolveDidCommUri : (didCommUri : string ) => Promise <Result <unknown , BaseError <ResolveDidCommUriErrorType >>> ; sign : (payload : string | Record <string , unknown >, senderDid : string ) => Promise <Result <string , SignError >> } |
Namespace for messaging operations |
did.messaging.encrypt |
(options : EncryptOptions ) => Promise <Result <JweJsonSerialization , BaseError <EncryptErrorType >>> |
Encrypts a message |
did.messaging.openDidCommMessage |
(message : unknown ) => Promise <Result <Jwm , OpenDidCommError | VerifyError | DecryptError >> |
Opens a DIDComm message |
did.messaging.resolveDidCommUri |
(didCommUri : string ) => Promise <Result <unknown , BaseError <ResolveDidCommUriErrorType >>> |
Resolves a DIDComm URI into an object |
did.messaging.sign |
(payload : string | Record <string , unknown >, senderDid : string ) => Promise <Result <string , SignError >> |
Signs a message |
did.resolveDid |
(did : string ) => Promise <Result <DidServiceInfoResponse , DidResolutionError >> |
Resolves any DID into a DID document and the local metadata |
did.wellKnownDidConfiguration |
{ validate : (domain : string , did : string ) => Promise <boolean > ; validateMultipleDids : (domain : string , dids : readonly string []) => Promise <ReadonlyArray <DidConfigurationValidateResult >> } |
Namespace for wellknown configuration operations |
did.wellKnownDidConfiguration.validate |
(domain : string , did : string ) => Promise <boolean > |
Validates a DID belongs to a domain |
did.wellKnownDidConfiguration.validateMultipleDids |
(domain : string , dids : readonly string []) => Promise <ReadonlyArray <DidConfigurationValidateResult >> |
Validates multiple DIDs belong to a domain |
isOpen |
() => boolean |
Indicates if the wallet is open |
linkedData |
{ cborld : { decode : (byteArray : Uint8Array ) => ResultAsync <unknown , InvalidCborldDecodeError > ; encode : (jsonldDocument : Record <string , unknown >) => ResultAsync <Uint8Array , InvalidCborldEncodeError > } } |
Namespace for linked data operations |
linkedData.cborld |
{ decode : (byteArray : Uint8Array ) => ResultAsync <unknown , InvalidCborldDecodeError > ; encode : (jsonldDocument : Record <string , unknown >) => ResultAsync <Uint8Array , InvalidCborldEncodeError > } |
Namespace for cborld conversion operations |
linkedData.cborld.decode |
(byteArray : Uint8Array ) => ResultAsync <unknown , InvalidCborldDecodeError > |
Decode CBOR-LD bytes intoto JSON-LD document |
linkedData.cborld.encode |
(jsonldDocument : Record <string , unknown >) => ResultAsync <Uint8Array , InvalidCborldEncodeError > |
Encode a JSON-LD document into CBOR-LD bytes |
oidc |
{ discover : (issuerUri : string ) => Promise <Result <DiscoverResult , InvalidIssuerUriError | InvalidOpenIdConfigurationError >> ; generateAuthorizeUrl : (options : GenerateAuthorizeUrlOptions ) => Promise <Result <GenerateAuthorizeResult , InvalidDidError | SignError >> ; retrieveCredential : (options : RetrieveCredentialOptions ) => Promise <Result <RetrieveCredentialResult , RetrieveCredentialError | InvalidIdTokenError | CredentialNotFoundInTokenError >> } |
Namespace for OIDC operations |
oidc.discover |
(issuerUri : string ) => Promise <Result <DiscoverResult , InvalidIssuerUriError | InvalidOpenIdConfigurationError >> |
Discover credential offer from OIDC's wellknown configuration endpoint |
oidc.generateAuthorizeUrl |
(options : GenerateAuthorizeUrlOptions ) => Promise <Result <GenerateAuthorizeResult , InvalidDidError | SignError >> |
Generates an authorization URL |
oidc.retrieveCredential |
(options : RetrieveCredentialOptions ) => Promise <Result <RetrieveCredentialResult , RetrieveCredentialError | InvalidIdTokenError | CredentialNotFoundInTokenError >> |
Retrieves a credential from the OIDC provider |
openid |
{ issuance : { discover : (uri : string ) => Promise <Result <OpenidIssuanceDiscoverResult , BaseError <DiscoverErrorType >>> ; generateAuthorizeUrl : (options : OpenidIssuanceGenerateAuthorizeUrlOptions ) => Promise <Result <OpenidIssuanceGenerateAuthorizeResult , BaseError <GenerateAuthorizeUrlErrorType >>> ; retrieveCredentials : (options : OpenidIssuanceRetrieveCredentialsOptions ) => Promise <OpenidIssuanceRetrieveCredentialsResult > ; retrieveToken : (options : OpenidIssuanceRetrieveTokenOptions ) => Promise <Result <OpenidIssuanceRetrieveTokenResult , BaseError <RetrieveTokenErrorType >>> } } |
Namespace for openid operations |
openid.issuance |
{ discover : (uri : string ) => Promise <Result <OpenidIssuanceDiscoverResult , BaseError <DiscoverErrorType >>> ; generateAuthorizeUrl : (options : OpenidIssuanceGenerateAuthorizeUrlOptions ) => Promise <Result <OpenidIssuanceGenerateAuthorizeResult , BaseError <GenerateAuthorizeUrlErrorType >>> ; retrieveCredentials : (options : OpenidIssuanceRetrieveCredentialsOptions ) => Promise <OpenidIssuanceRetrieveCredentialsResult > ; retrieveToken : (options : OpenidIssuanceRetrieveTokenOptions ) => Promise <Result <OpenidIssuanceRetrieveTokenResult , BaseError <RetrieveTokenErrorType >>> } |
Namespace for openid issuance operations |
openid.issuance.discover |
(uri : string ) => Promise <Result <OpenidIssuanceDiscoverResult , BaseError <DiscoverErrorType >>> |
Discover credential offer |
openid.issuance.generateAuthorizeUrl |
(options : OpenidIssuanceGenerateAuthorizeUrlOptions ) => Promise <Result <OpenidIssuanceGenerateAuthorizeResult , BaseError <GenerateAuthorizeUrlErrorType >>> |
Generates an authorization URL |
openid.issuance.retrieveCredentials |
(options : OpenidIssuanceRetrieveCredentialsOptions ) => Promise <OpenidIssuanceRetrieveCredentialsResult > |
Retrieves credential from the openid issuance provider |
openid.issuance.retrieveToken |
(options : OpenidIssuanceRetrieveTokenOptions ) => Promise <Result <OpenidIssuanceRetrieveTokenResult , BaseError <RetrieveTokenErrorType >>> |
Retrieves token from the openid issuance provider |
Ƭ WalletExtension: Object
React Native specific wallet extensions.
Name | Type | Description |
---|---|---|
httpCache |
{ clear : () => Promise <Result <void , HttpCacheError >> ; getSize : () => Promise <Result <number , HttpCacheError >> } |
Namespace for HTTP request cache |
httpCache.clear |
() => Promise <Result <void , HttpCacheError >> |
Removes all entries from HTTP cache storage directory for the wallet Remarks This is a destructive operation that cannot be undone. |
httpCache.getSize |
() => Promise <Result <number , HttpCacheError >> |
Retrieve the total number of cached contexts in the wallet |
Ƭ WalletNotFoundError: BaseError
<"WalletNotFoundError"
>
Ƭ WebSemanticCredentialData: Object
Name | Type |
---|---|
credential |
Credential |
Ƭ WebSemanticCredentialOffered: BaseCredentialOffered
& { credentialDefinition
: OpenidIssuanceCredentialDefinition
; profile
: WebSemantic
}
• Const
AuthorizeRequestParametersValidator: z.ZodType
<AuthorizeRequestParameters
>
request_parameters, that supported by wallet-sdk
• Const
CompactCredentialOfferedValidator: z.ZodType
<CompactCredentialOffered
>
• Const
CompactSemanticCredentialOfferedValidator: z.ZodType
<CompactSemanticCredentialOffered
>
• Const
CredentialOfferedValidator: z.ZodObject
<{ claims
: z.ZodOptional
<z.ZodArray
<z.ZodObject
<{ name
: z.ZodString
}, "strip"
, z.ZodTypeAny
, { name
: string
}, { name
: string
}>, "many"
>> ; name
: z.ZodOptional
<z.ZodString
> ; scope
: z.ZodString
}, "strip"
, z.ZodTypeAny
, { claims?
: { name
: string
}[] ; name?
: string
; scope
: string
}, { claims?
: { name
: string
}[] ; name?
: string
; scope
: string
}>
• Const
DeprecatedWebSemanticCredentialOfferedValidator: z.ZodType
<DeprecatedWebSemanticCredentialOffered
>
• Const
OpenidIssuanceCredentialOfferValidator: z.ZodType
<OpenidIssuanceCredentialOffer
>
• Const
OpenidIssuanceGenerateAuthorizeUrlOptionsValidator: z.ZodType
<OpenidIssuanceGenerateAuthorizeUrlOptions
>
types for wallet.openid.issuance.generateAuthorizeUrl()
• Const
OpenidIssuanceRetrieveCredentialsOptionsValidator: z.ZodType
<OpenidIssuanceRetrieveCredentialsOptions
>
types for wallet.openid.issuance.retrieveCredentials()
• RNSecureKeyStoreLegacy: any
• Const
WebSemanticCredentialOfferedValidator: z.ZodType
<WebSemanticCredentialOffered
>
▸ assertType<T
, InputData
>(validator
, message
): (data
: InputData
) => void
Asserts data against either internal Validator functions or Zod object schemas Throws CoreTypeError if assertion fails
Name | Type |
---|---|
T |
T |
InputData |
T |
Name | Type |
---|---|
validator |
Validator <T > | ZodType <T , ZodTypeDef , T > |
message |
string |
fn
▸ (data
): void
Name | Type |
---|---|
data |
InputData |
void
▸ assertUnreachable(x
): never
Used for exhaustive if/switch statements Example:
enum Fruit {
orange = "orange",
apple = "apple",
}
const getFruitName = (fruit: Fruit): string => {
if (fruit === Fruit.orange) {
return "Orange";
}
// Should fail TS compilation as Fruit.apple is not being handled in the code above
return assertUnreachable(fruit);
}
Name | Type |
---|---|
x |
never |
never
▸ destroy(walletIdOrOptions?
): Promise
<Result
<void
, WalletNotFoundError
>>
Removes encryption keys and storage directories associated with the wallet
When destroying the current wallet instance, it will also be closed.
Name | Type |
---|---|
walletIdOrOptions? |
string | DestroyOptions |
Promise
<Result
<void
, WalletNotFoundError
>>
A Result containing void on ok and a WalletNotFoundError on error
Remarks
This is a destructive operation that cannot be undone. The wallet will have to be re created from scratch if destroyed.
The same list of extensions used when initialising the wallet instance must be provided so that resources created and managed by extension modules can also be removed properly.
You must also close the wallet instance that is currently initialised before calling this function, otherwise an exception will be thrown.
▸ initialise(options
): Promise
<Result
<Wallet
, UserAuthenticationCancelledError
| UserAuthenticationOnDeviceNotSetupError
>>
Initialise a wallet instance.
Name | Type |
---|---|
options |
InitialiseOptions |
Promise
<Result
<Wallet
, UserAuthenticationCancelledError
| UserAuthenticationOnDeviceNotSetupError
>>
Remarks
It's possible to maintain multiple isolated wallet instances by providing a different walletIds. However, you must close the current one first before initialising a new wallet instance.
Also note that currently UserAuthenticationCancelledError and UserAuthenticationOnDeviceNotSetupError would only occur if the mobile credential extension is provided becuase the initialisation of the mobile credential extension require user local authentication
▸ isPresentationRequestJwm(val
): val is PresentationRequestJwm
Name | Type |
---|---|
val |
unknown |
val is PresentationRequestJwm
▸ isType<T
>(validator
): (value
: unknown
) => value is T
Provide typeguards and boolean result of a zod validator
Name |
---|
T |
Name | Type |
---|---|
validator |
ZodType <T , ZodTypeDef , T > |
fn
▸ (value
): value is T
Name | Type |
---|---|
value |
unknown |
value is T
▸ isVerifiableCredential(val
): val is VerifiableCredential
Name | Type |
---|---|
val |
unknown |
val is VerifiableCredential
▸ unwrap<T
>(result
): T
A utility function to get the value from a Result or throw if there was an error
Name | Type | Description |
---|---|---|
T |
unknown |
the expected value of an ok result |
Name | Type | Description |
---|---|---|
result |
Result <T , unknown > |
The Result to unwrap |
T
Remarks
Allows you to get the value of a result directly or handle an error Result as an exception