Accept credential
Accepts an offered credential. Once accepted, the credential is stored in the user's wallet and can be used to submit proofs to verifiers.
Function
- React Native
- iOS
- Android
holderAcceptCredential(
interactionId: InvitationResultCredentialIssuance["interactionId"],
identifierId: string,
keyId: string | undefined
txCode: string | undefined
): Promise<void>;
func holderAcceptCredential(interactionId: String, identifierId: String, keyId: String?, txCode: String?) throws
fun `holderAcceptCredential`(`interactionId`: String, `identifierId`: String, `keyId`: String?, `txCode`: kotlin.String?)
Parameters
-
interactionId
- The ID identifying the particular issuance; value from handle invitation function. -
identifierId
- Value from the create identifier function. The identifier will be listed as the subject of the issued credential.Choosing an identifier
Check the following capabilities for a report of which identifiers and associated key algorithms can be used with the format of the credential you want to accept:
holderIdentifierTypes
holderKeyAlgorithms
holderDidMethods
-
keyId
- If you choose a DID and the DID supports multiple keys for authentication, specify which key to use. If no key is specified the first suitable key listed will be used. -
txCode
- If a pre-authorized code is issued with a transaction code object, the wallet user must input a transaction code to receive the offered credential. This code is typically sent through a separate channel such as SMS or email.
didId
- The chosen DID will be listed as the subject of the issued credential.
Return value
A successful acceptance returns no value.