@hovi/cloudwallet-sdk
v0.1.4
Published
TypeScript SDK for Hovi Cloud Wallet
Downloads
125
Readme
Hovi Cloud Wallet SDK
Manage decentralized cloud wallets and verifiable credentials with ease
Hovi Cloud Wallet SDK is a TypeScript library for creating and managing cloud-based decentralized wallets, handling verifiable credentials, processing proof requests, establishing connections, and integrating webhooks. With TypeScript support and a focus on privacy-preserving workflows, it enables secure identity solutions for applications like KYC verification, access control, and real-time event handling in decentralized ecosystems.
Table of Contents
Installation
# Using npm
npm install @hovi/cloudwallet-sdk
# Using Yarn
yarn add @hovi/cloudwallet-sdkHow to Get an API Key
To use the Cloud Wallet SDK, you’ll need an API key.
You can generate one from the Hovi Dashboard
Quick Start
import { CloudWallet } from "@hovi/cloudwallet-sdk";
const wallet = new CloudWallet({
apiKey: "your-cloud-wallet-ecosystem-api-key",
});Usage
Wallet Management
Create and configure a cloud wallet for storing and managing verifiable credentials.
// Set wallet access token (required after creating or recovering a wallet)
await wallet.setWalletAccessToken("your-wallet-access-token");
// Create a wallet
const walletResponse = await wallet.createWallet({
label: "your-wallet-name",
secret: "secure-secret-123",
});Connections
Accept an out-of-band invitation to establish a secure wallet connection
// Accept connection invitation
const connectionResponse = await wallet.acceptConnectionInvitation({
protocol: "didcomm",
invitation:
"https://example.com/invitation/123e4567-e89b-12d3-a456-426614174000",
label: "your-connection-label",
});
// Get all connections
const connections = await wallet.getConnections();Credential Management
Manage credential offers by accepting or declining them (DIDComm/OpenID)
// Preview credential offer
const previewCredential = await wallet.previewCredentialOffer({
protocol: "<didcomm | openid>",
});
// Accept credential offer
const acceptResponse = await wallet.acceptCredentialOffer({
protocol: "<didcomm | openid>",
credentialOfferUri:
"https://example.com/offer/123e4567-e89b-12d3-a456-426614174000",
credentialId: "your-credential-id",
});
// Get all stored credentials
const allStoredCredentials = await wallet.getStoredCredentials();Verifiable Presentation
Handle proof requests by previewing and submitting presentations (DIDComm/OpenID).
// Verifiable Presentation
const previewResponse = await wallet.previewProof({
protocol: "<didcomm | openid>",
proofRequestUri:
"https://example.com/proof/123e4567-e89b-12d3-a456-426614174000",
proofRecordId: "your-proof-record-id",
});
// Submit presentation
const submitResponse = await wallet.submitPresentation({
protocol: "<didcomm | openid>",
proofRequestUri:
"https://example.com/proof/123e4567-e89b-12d3-a456-426614174000",
proofRecordId: "your-proof-record-id",
});SDK Documentation
Detailed docs are available at Documentation.
