@docknetwork/wallet-sdk-web 1.7.8 → 1.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/wallet-sdk-web.esm.js +88 -16
- package/dist/wallet-sdk-web.iife.js +88 -16
- package/dist/wallet-sdk-web.iife.min.js +2 -2
- package/package.json +2 -4
- package/src/index.js +17 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docknetwork/wallet-sdk-web",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.9",
|
|
4
4
|
"license": "https://github.com/docknetwork/wallet-sdk/LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,7 +58,5 @@
|
|
|
58
58
|
"webpack": "^5.67.0",
|
|
59
59
|
"webpack-cli": "^4.10.0"
|
|
60
60
|
},
|
|
61
|
-
"dependencies": {
|
|
62
|
-
"@rollup/rollup-darwin-arm64": "^4.60.1"
|
|
63
|
-
}
|
|
61
|
+
"dependencies": {}
|
|
64
62
|
}
|
package/src/index.js
CHANGED
|
@@ -254,6 +254,20 @@ async function initialize({
|
|
|
254
254
|
throw new Error(`Failed to retrieve default DID: ${error.message}`);
|
|
255
255
|
}
|
|
256
256
|
},
|
|
257
|
+
/**
|
|
258
|
+
* Removes a credential from the wallet.
|
|
259
|
+
*
|
|
260
|
+
* @async
|
|
261
|
+
* @param {string} credentialId - The ID of the credential to remove
|
|
262
|
+
* @returns {Promise<void>}
|
|
263
|
+
*/
|
|
264
|
+
removeCredential: async credentialId => {
|
|
265
|
+
if (!credentialId || typeof credentialId !== 'string') {
|
|
266
|
+
throw new Error('Invalid credentialId: Must be a non-empty string');
|
|
267
|
+
}
|
|
268
|
+
return await credentialProvider.removeCredential(credentialId);
|
|
269
|
+
},
|
|
270
|
+
|
|
257
271
|
/**
|
|
258
272
|
* Creates a verifiable presentation for a given proof request.
|
|
259
273
|
*
|
|
@@ -314,7 +328,9 @@ async function initialize({
|
|
|
314
328
|
await blockchainService.ensureBlockchainReady();
|
|
315
329
|
|
|
316
330
|
if (!proofRequest) {
|
|
317
|
-
throw new Error(
|
|
331
|
+
throw new Error(
|
|
332
|
+
'Invalid input: proofRequest is required (URL string or proof request object)',
|
|
333
|
+
);
|
|
318
334
|
}
|
|
319
335
|
|
|
320
336
|
const verificationController = createVerificationController({
|