Mobile SDK

React-Native Mobile SDK to build SSI powered identity apps & edge wallets

npm

Installing

npm install @credebl/ssi-mobile

# or

yarn add @credebl/ssi-mobile

# or

pnpm add @credebl/ssi-mobile

Peer Dependencies

  • We also need to add the peer dependencies of this package to app.

Usage

API

Agent

  • initializeAgent - Initialize the agent with the given Config and Agent Modules . This includes all the config related to the wallet details and label.

  • getAgentModules - Get the default agent modules which requires mediatorURL and indyLedgers

  • AdeyaAgent - The agent instance type which helps in typing our agent object.

Wallet

  • isWalletPinCorrect - Check if the wallet pin is correct.

  • exportWallet - Export the wallet and pass export config which includes backupKey and path where we want to export our wallet.

  • importWalletWithAgent - Import the wallet and start the agent with importConfig which includes key and path from where wallet can be imported

Connections

  • createLegacyInvitation - Create a legacy invitation which use the connection v1 protocol.

  • createLegacyConnectionlessInvitation - Create a legacy connectionless invitation.

  • createInvitation - Create an Out-of-band invitation.

  • acceptInvitation - Accept an invitation.

  • parseInvitationFromUrl - Parse an invitation from a url.

  • acceptInvitationFromUrl - Accept an invitation from a url.

  • getAllConnections - Get all connections.

  • getConnectionById - Get a connection by id.

  • findConnectionById - Find a connection by id.

  • findOutOfBandRecordById - Find an out of band record by id.

  • findByReceivedInvitationId - Find an out of band record by invitation id.

  • deleteConnectionRecordById - Delete a connection record by id.

  • deleteOobRecordById - Delete a out-of-band record by id.

Credentials

  • getAllCredentialExchangeRecords - Get all credential exchange records.

  • getFormattedCredentialData - Retrieves the formatted data for a given credential record ID.

  • acceptCredentialOffer - Accept a credential offer.

  • updateCredentialExchangeRecord - Update a credential exchange record. This can be used to add or update the metadata of credential exchange record.

  • declineCredentialOffer - Decline a credential offer.

  • deleteCredentialExchangeRecordById - Delete a credential exchange record by id.

  • sendCredentialProblemReport - Send a credential problem report.

  • getW3cCredentialRecordById - Get a W3C credential record by id.

  • getAllW3cCredentialRecords - Get all W3C credential records.

Proofs

  • getProofFormatData - Get proof format data.

  • getCredentialsForProofRequest - Get credentials for a proof request.

  • selectCredentialsForProofRequest - Select credentials for a proof request.

  • getProofRequestAgentMessage - Get a proof request agent message.

  • createProofRequest - Create a proof request.

  • requestProof - Request a proof.

  • updateProofRecord - Update a proof record.

  • acceptProofRequest - Accept a proof request.

  • declineProofRequest - Decline a proof request.

  • sendProofProblemReport - Send a proof problem report.

BasicMessages

  • sendBasicMessage - Send a basic message.

PushNotifications

  • setPushNotificationDeviceInfo - Set the push notification device info.

Hooks

  • useAdeyaAgent - React hooks to get the agent instance.

Last updated