Wallet
Wallets in the Cloud Wallet SDK are used to manage digital identities, credentials, and interactions with other entities. This section covers methods to create, retrieve, delete, and recover wallets.
Create Wallet
Creates a new digital wallet.
import { CloudWallet } from '@hovi/cloudwallet-sdk';
const wallet = new CloudWallet({
  apiKey: 'your-ecosystem-api-key',
});
const result = await wallet.createWallet({
  label: 'MyWallet',
  secret: 'secure-secret',
});
Params
| Parameter | Type | Description | 
|---|---|---|
| label | string (Required) | A human-readable label for the wallet. | 
| secret | string (Required) | A secret key for securing the wallet. | 
note
- The 
secretshould be securely stored and never exposed. - Ensure the 
labelis unique for easy identification. 
Get Wallet
Retrieves details of an existing wallet.
import { CloudWallet } from '@hovi/cloudwallet-sdk';
const wallet = new CloudWallet({
  apiKey: 'your-ecosystem-api-key',
});
const result = await wallet.getWallet({});
Params
| Parameter | Type | Description | 
|---|---|---|
| apiKey? | string (Optional) | The API key for authentication. | 
note
- Use this method to fetch wallet details, such as stored credentials or configuration.
 
Delete Wallet
Deletes an existing wallet.
import { CloudWallet } from '@hovi/cloudwallet-sdk';
const wallet = new CloudWallet({
  apiKey: 'your-ecosystem-api-key',
});
const result = await wallet.deleteWallet();
note
- This action is irreversible and removes all associated data, including credentials.
 - Ensure no active operations rely on the wallet before deletion.
 
Recover Wallet
Recovers a wallet using its secret.
import { CloudWallet } from '@hovi/cloudwallet-sdk';
const wallet = new CloudWallet({
  apiKey: 'your-ecosystem-api-key',
});
const result = await wallet.recoverWallet();
note
- Use this method to recover access to a wallet if the access token is lost.
 - Requires the original 
secretused during wallet creation.