@docknetwork/wallet-sdk-wasm 1.7.7-alpha.0 → 1.9.0
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/package.json +7 -20
- package/rollup.config.mjs +1 -0
- package/src/globals.d.ts +4 -1
- package/src/services/blockchain/cached-did-resolver.ts +4 -3
- package/src/services/blockchain/normalize-did-document.ts +73 -0
- package/src/services/blockchain/service.ts +0 -2
- package/src/services/credential/bbs-revocation.test.js +147 -0
- package/src/services/credential/bbs-revocation.ts +65 -18
- package/src/services/credential/config.ts +7 -0
- package/src/services/credential/index.test.js +261 -17
- package/src/services/credential/oid4vci.js +44 -0
- package/src/services/credential/oid4vci.test.js +162 -0
- package/src/services/credential/pex-helpers.js +77 -31
- package/src/services/credential/pex-helpers.test.js +4 -4
- package/src/services/credential/sd-jwt.ts +41 -5
- package/src/services/credential/service-rpc.js +6 -0
- package/src/services/credential/service.ts +171 -16
- package/src/services/credential/utils.js +3 -5
- package/src/services/delegation/index.android.js +3 -0
- package/src/services/delegation/index.ios.js +3 -0
- package/src/services/delegation/index.ts +1 -0
- package/src/services/delegation/service-rpc.ts +21 -0
- package/src/services/delegation/service.ts +59 -0
- package/src/services/edv/service-rpc.js +18 -2
- package/src/services/edv/service.test.js +327 -0
- package/src/services/edv/service.ts +103 -13
- package/src/services/index.js +2 -0
- package/src/wallet/rpc-storage-interface.js +9 -4
- package/lib/core/crypto.js +0 -45
- package/lib/core/crypto.mjs +0 -33
- package/lib/core/format-utils.js +0 -51
- package/lib/core/format-utils.mjs +0 -42
- package/lib/core/keychain.js +0 -61
- package/lib/core/keychain.mjs +0 -37
- package/lib/core/logger.js +0 -13
- package/lib/core/logger.mjs +0 -9
- package/lib/core/storage.js +0 -14
- package/lib/core/storage.mjs +0 -9
- package/lib/core/validation.js +0 -29
- package/lib/core/validation.mjs +0 -16
- package/lib/core/webview-logger.js +0 -49
- package/lib/core/webview-logger.mjs +0 -41
- package/lib/errors.js +0 -17
- package/lib/errors.mjs +0 -12
- package/lib/events.js +0 -18
- package/lib/events.mjs +0 -13
- package/lib/index.js +0 -146
- package/lib/index.mjs +0 -144
- package/lib/logger.js +0 -22
- package/lib/logger.mjs +0 -17
- package/lib/modules/event-manager.js +0 -46
- package/lib/modules/event-manager.mjs +0 -37
- package/lib/modules/network-manager.js +0 -80
- package/lib/modules/network-manager.mjs +0 -71
- package/lib/mrklt.js +0 -2
- package/lib/mrklt.mjs +0 -1
- package/lib/rpc-client.js +0 -83
- package/lib/rpc-client.mjs +0 -73
- package/lib/rpc-server.js +0 -97
- package/lib/rpc-server.mjs +0 -95
- package/lib/rpc-util.js +0 -113
- package/lib/rpc-util.mjs +0 -103
- package/lib/sandbox-rpc-server.js +0 -28
- package/lib/sandbox-rpc-server.mjs +0 -26
- package/lib/sandbox.js +0 -102
- package/lib/sandbox.mjs +0 -100
- package/lib/services/blockchain/cached-did-resolver.js +0 -113
- package/lib/services/blockchain/cached-did-resolver.mjs +0 -109
- package/lib/services/blockchain/configs.js +0 -7
- package/lib/services/blockchain/configs.mjs +0 -3
- package/lib/services/blockchain/index.android.js +0 -18
- package/lib/services/blockchain/index.android.mjs +0 -14
- package/lib/services/blockchain/index.ios.js +0 -18
- package/lib/services/blockchain/index.ios.mjs +0 -14
- package/lib/services/blockchain/index.js +0 -36
- package/lib/services/blockchain/index.mjs +0 -28
- package/lib/services/blockchain/service-rpc.js +0 -72
- package/lib/services/blockchain/service-rpc.mjs +0 -68
- package/lib/services/blockchain/service.js +0 -312
- package/lib/services/blockchain/service.mjs +0 -306
- package/lib/services/credential/bbs-revocation.js +0 -92
- package/lib/services/credential/bbs-revocation.mjs +0 -87
- package/lib/services/credential/bound-check.js +0 -77
- package/lib/services/credential/bound-check.mjs +0 -64
- package/lib/services/credential/config.js +0 -56
- package/lib/services/credential/config.mjs +0 -47
- package/lib/services/credential/delegatable-credentials.js +0 -300
- package/lib/services/credential/delegatable-credentials.mjs +0 -263
- package/lib/services/credential/index.android.js +0 -19
- package/lib/services/credential/index.android.mjs +0 -15
- package/lib/services/credential/index.ios.js +0 -19
- package/lib/services/credential/index.ios.mjs +0 -15
- package/lib/services/credential/index.js +0 -106
- package/lib/services/credential/index.mjs +0 -67
- package/lib/services/credential/pex-helpers.js +0 -333
- package/lib/services/credential/pex-helpers.mjs +0 -319
- package/lib/services/credential/range-proofs-example.js +0 -107
- package/lib/services/credential/range-proofs-example.mjs +0 -103
- package/lib/services/credential/sd-jwt.js +0 -214
- package/lib/services/credential/sd-jwt.mjs +0 -200
- package/lib/services/credential/service-rpc.js +0 -61
- package/lib/services/credential/service-rpc.mjs +0 -57
- package/lib/services/credential/service.js +0 -683
- package/lib/services/credential/service.mjs +0 -672
- package/lib/services/credential/utils.js +0 -103
- package/lib/services/credential/utils.mjs +0 -78
- package/lib/services/dids/config.js +0 -40
- package/lib/services/dids/config.mjs +0 -31
- package/lib/services/dids/index.android.js +0 -19
- package/lib/services/dids/index.android.mjs +0 -15
- package/lib/services/dids/index.ios.js +0 -19
- package/lib/services/dids/index.ios.mjs +0 -15
- package/lib/services/dids/index.js +0 -23
- package/lib/services/dids/index.mjs +0 -19
- package/lib/services/dids/keypair-utils.js +0 -142
- package/lib/services/dids/keypair-utils.mjs +0 -113
- package/lib/services/dids/service-rpc.js +0 -37
- package/lib/services/dids/service-rpc.mjs +0 -33
- package/lib/services/dids/service.js +0 -100
- package/lib/services/dids/service.mjs +0 -92
- package/lib/services/edv/configs.js +0 -25
- package/lib/services/edv/configs.mjs +0 -16
- package/lib/services/edv/hmac.js +0 -88
- package/lib/services/edv/hmac.mjs +0 -63
- package/lib/services/edv/index.android.js +0 -19
- package/lib/services/edv/index.android.mjs +0 -15
- package/lib/services/edv/index.ios.js +0 -19
- package/lib/services/edv/index.ios.mjs +0 -15
- package/lib/services/edv/index.js +0 -32
- package/lib/services/edv/index.mjs +0 -24
- package/lib/services/edv/service-rpc.js +0 -78
- package/lib/services/edv/service-rpc.mjs +0 -74
- package/lib/services/edv/service.js +0 -370
- package/lib/services/edv/service.mjs +0 -357
- package/lib/services/index.js +0 -94
- package/lib/services/index.mjs +0 -92
- package/lib/services/pex/config.js +0 -29
- package/lib/services/pex/config.mjs +0 -20
- package/lib/services/pex/index.android.js +0 -19
- package/lib/services/pex/index.android.mjs +0 -15
- package/lib/services/pex/index.ios.js +0 -19
- package/lib/services/pex/index.ios.mjs +0 -15
- package/lib/services/pex/index.js +0 -12
- package/lib/services/pex/index.mjs +0 -4
- package/lib/services/pex/service-rpc.js +0 -39
- package/lib/services/pex/service-rpc.mjs +0 -35
- package/lib/services/pex/service.js +0 -91
- package/lib/services/pex/service.mjs +0 -86
- package/lib/services/pex/tests/jest.config.js +0 -25
- package/lib/services/pex/tests/jest.config.mjs +0 -23
- package/lib/services/relay-service/configs.js +0 -45
- package/lib/services/relay-service/configs.mjs +0 -36
- package/lib/services/relay-service/index.android.js +0 -21
- package/lib/services/relay-service/index.android.mjs +0 -17
- package/lib/services/relay-service/index.ios.js +0 -21
- package/lib/services/relay-service/index.ios.mjs +0 -17
- package/lib/services/relay-service/index.js +0 -14
- package/lib/services/relay-service/index.mjs +0 -6
- package/lib/services/relay-service/service-rpc.js +0 -47
- package/lib/services/relay-service/service-rpc.mjs +0 -43
- package/lib/services/relay-service/service.js +0 -181
- package/lib/services/relay-service/service.mjs +0 -173
- package/lib/services/rpc-service-client.js +0 -36
- package/lib/services/rpc-service-client.mjs +0 -28
- package/lib/services/sandbox.js +0 -10
- package/lib/services/sandbox.mjs +0 -8
- package/lib/services/storage/configs.js +0 -7
- package/lib/services/storage/configs.mjs +0 -3
- package/lib/services/storage/index.android.js +0 -18
- package/lib/services/storage/index.android.mjs +0 -14
- package/lib/services/storage/index.ios.js +0 -18
- package/lib/services/storage/index.ios.mjs +0 -14
- package/lib/services/storage/index.js +0 -26
- package/lib/services/storage/index.mjs +0 -24
- package/lib/services/storage/service-rpc.js +0 -37
- package/lib/services/storage/service-rpc.mjs +0 -33
- package/lib/services/storage/service.js +0 -32
- package/lib/services/storage/service.mjs +0 -27
- package/lib/services/test-utils.js +0 -98
- package/lib/services/test-utils.mjs +0 -84
- package/lib/services/util-crypto/configs.js +0 -23
- package/lib/services/util-crypto/configs.mjs +0 -15
- package/lib/services/util-crypto/index.android.js +0 -19
- package/lib/services/util-crypto/index.android.mjs +0 -15
- package/lib/services/util-crypto/index.ios.js +0 -19
- package/lib/services/util-crypto/index.ios.mjs +0 -15
- package/lib/services/util-crypto/index.js +0 -14
- package/lib/services/util-crypto/index.mjs +0 -6
- package/lib/services/util-crypto/service-rpc.js +0 -42
- package/lib/services/util-crypto/service-rpc.mjs +0 -38
- package/lib/services/util-crypto/service.js +0 -108
- package/lib/services/util-crypto/service.mjs +0 -83
- package/lib/services/wallet/configs.js +0 -32
- package/lib/services/wallet/configs.mjs +0 -23
- package/lib/services/wallet/index.android.js +0 -21
- package/lib/services/wallet/index.android.mjs +0 -17
- package/lib/services/wallet/index.ios.js +0 -21
- package/lib/services/wallet/index.ios.mjs +0 -17
- package/lib/services/wallet/index.js +0 -17
- package/lib/services/wallet/index.mjs +0 -9
- package/lib/services/wallet/service-rpc.js +0 -33
- package/lib/services/wallet/service-rpc.mjs +0 -29
- package/lib/services/wallet/service.js +0 -62
- package/lib/services/wallet/service.mjs +0 -57
- package/lib/setup-nodejs.js +0 -93
- package/lib/setup-nodejs.mjs +0 -91
- package/lib/setup-tests.js +0 -92
- package/lib/setup-tests.mjs +0 -90
- package/lib/src/core/crypto.d.ts +0 -8
- package/lib/src/core/crypto.d.ts.map +0 -1
- package/lib/src/core/format-utils.d.ts +0 -26
- package/lib/src/core/format-utils.d.ts.map +0 -1
- package/lib/src/core/logger.d.ts +0 -3
- package/lib/src/core/logger.d.ts.map +0 -1
- package/lib/src/core/storage.d.ts +0 -8
- package/lib/src/core/storage.d.ts.map +0 -1
- package/lib/src/core/validation.d.ts +0 -6
- package/lib/src/core/validation.d.ts.map +0 -1
- package/lib/src/errors.d.ts +0 -7
- package/lib/src/errors.d.ts.map +0 -1
- package/lib/src/logger.d.ts +0 -5
- package/lib/src/logger.d.ts.map +0 -1
- package/lib/src/modules/event-manager.d.ts +0 -12
- package/lib/src/modules/event-manager.d.ts.map +0 -1
- package/lib/src/modules/network-manager.d.ts +0 -32
- package/lib/src/modules/network-manager.d.ts.map +0 -1
- package/lib/src/rpc-client.d.ts +0 -4
- package/lib/src/rpc-client.d.ts.map +0 -1
- package/lib/src/rpc-util.d.ts +0 -11
- package/lib/src/rpc-util.d.ts.map +0 -1
- package/lib/src/services/blockchain/cached-did-resolver.d.ts +0 -28
- package/lib/src/services/blockchain/cached-did-resolver.d.ts.map +0 -1
- package/lib/src/services/blockchain/cached-did-resolver.test.d.ts +0 -2
- package/lib/src/services/blockchain/cached-did-resolver.test.d.ts.map +0 -1
- package/lib/src/services/blockchain/configs.d.ts +0 -7
- package/lib/src/services/blockchain/configs.d.ts.map +0 -1
- package/lib/src/services/blockchain/service.d.ts +0 -155
- package/lib/src/services/blockchain/service.d.ts.map +0 -1
- package/lib/src/services/credential/bbs-revocation.d.ts +0 -10
- package/lib/src/services/credential/bbs-revocation.d.ts.map +0 -1
- package/lib/src/services/credential/bound-check.d.ts +0 -61
- package/lib/src/services/credential/bound-check.d.ts.map +0 -1
- package/lib/src/services/credential/bound-check.test.d.ts +0 -2
- package/lib/src/services/credential/bound-check.test.d.ts.map +0 -1
- package/lib/src/services/credential/config.d.ts +0 -10
- package/lib/src/services/credential/config.d.ts.map +0 -1
- package/lib/src/services/credential/delegatable-credentials.d.ts +0 -272
- package/lib/src/services/credential/delegatable-credentials.d.ts.map +0 -1
- package/lib/src/services/credential/index.d.ts +0 -35
- package/lib/src/services/credential/index.d.ts.map +0 -1
- package/lib/src/services/credential/pex-helpers.d.ts +0 -23
- package/lib/src/services/credential/pex-helpers.d.ts.map +0 -1
- package/lib/src/services/credential/range-proofs-example.d.ts +0 -2
- package/lib/src/services/credential/range-proofs-example.d.ts.map +0 -1
- package/lib/src/services/credential/sd-jwt.test.d.ts +0 -2
- package/lib/src/services/credential/sd-jwt.test.d.ts.map +0 -1
- package/lib/src/services/credential/service.d.ts +0 -313
- package/lib/src/services/credential/service.d.ts.map +0 -1
- package/lib/src/services/credential/utils.d.ts +0 -3
- package/lib/src/services/credential/utils.d.ts.map +0 -1
- package/lib/src/services/dids/config.d.ts +0 -24
- package/lib/src/services/dids/config.d.ts.map +0 -1
- package/lib/src/services/dids/keypair-utils.d.ts +0 -15
- package/lib/src/services/dids/keypair-utils.d.ts.map +0 -1
- package/lib/src/services/dids/service-rpc.d.ts +0 -11
- package/lib/src/services/dids/service-rpc.d.ts.map +0 -1
- package/lib/src/services/dids/service.d.ts +0 -70
- package/lib/src/services/dids/service.d.ts.map +0 -1
- package/lib/src/services/edv/configs.d.ts +0 -12
- package/lib/src/services/edv/configs.d.ts.map +0 -1
- package/lib/src/services/edv/hmac.d.ts +0 -29
- package/lib/src/services/edv/hmac.d.ts.map +0 -1
- package/lib/src/services/edv/service.d.ts +0 -229
- package/lib/src/services/edv/service.d.ts.map +0 -1
- package/lib/src/services/pex/config.d.ts +0 -21
- package/lib/src/services/pex/config.d.ts.map +0 -1
- package/lib/src/services/pex/service.d.ts +0 -21
- package/lib/src/services/pex/service.d.ts.map +0 -1
- package/lib/src/services/relay-service/configs.d.ts +0 -35
- package/lib/src/services/relay-service/configs.d.ts.map +0 -1
- package/lib/src/services/relay-service/service-rpc.d.ts +0 -12
- package/lib/src/services/relay-service/service-rpc.d.ts.map +0 -1
- package/lib/src/services/relay-service/service.d.ts +0 -159
- package/lib/src/services/relay-service/service.d.ts.map +0 -1
- package/lib/src/services/rpc-service-client.d.ts +0 -7
- package/lib/src/services/rpc-service-client.d.ts.map +0 -1
- package/lib/src/services/storage/configs.d.ts +0 -2
- package/lib/src/services/storage/configs.d.ts.map +0 -1
- package/lib/src/services/storage/index.d.ts +0 -2
- package/lib/src/services/storage/index.d.ts.map +0 -1
- package/lib/src/services/storage/service-rpc.d.ts +0 -9
- package/lib/src/services/storage/service-rpc.d.ts.map +0 -1
- package/lib/src/services/storage/service.d.ts +0 -10
- package/lib/src/services/storage/service.d.ts.map +0 -1
- package/lib/src/services/util-crypto/configs.d.ts +0 -5
- package/lib/src/services/util-crypto/configs.d.ts.map +0 -1
- package/lib/src/services/util-crypto/index.d.ts +0 -2
- package/lib/src/services/util-crypto/index.d.ts.map +0 -1
- package/lib/src/services/util-crypto/service.d.ts +0 -10
- package/lib/src/services/util-crypto/service.d.ts.map +0 -1
- package/lib/src/services/wallet/configs.d.ts +0 -13
- package/lib/src/services/wallet/configs.d.ts.map +0 -1
- package/lib/src/services/wallet/service.d.ts +0 -13
- package/lib/src/services/wallet/service.d.ts.map +0 -1
- package/lib/src/types.d.ts +0 -12
- package/lib/src/types.d.ts.map +0 -1
- package/lib/src/wallet/memory-storage-interface.d.ts +0 -31
- package/lib/src/wallet/memory-storage-interface.d.ts.map +0 -1
- package/lib/src/wallet/memory-storage-wallet.d.ts +0 -6
- package/lib/src/wallet/memory-storage-wallet.d.ts.map +0 -1
- package/lib/src/wallet/rpc-storage-interface.d.ts +0 -32
- package/lib/src/wallet/rpc-storage-interface.d.ts.map +0 -1
- package/lib/src/wallet/rpc-storage-wallet.d.ts +0 -6
- package/lib/src/wallet/rpc-storage-wallet.d.ts.map +0 -1
- package/lib/test-utils.js +0 -46
- package/lib/test-utils.mjs +0 -38
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types.js +0 -7
- package/lib/types.mjs +0 -3
- package/lib/wallet/memory-storage-interface.js +0 -101
- package/lib/wallet/memory-storage-interface.mjs +0 -95
- package/lib/wallet/memory-storage-wallet.js +0 -30
- package/lib/wallet/memory-storage-wallet.mjs +0 -24
- package/lib/wallet/rpc-storage-interface.js +0 -134
- package/lib/wallet/rpc-storage-interface.mjs +0 -128
- package/lib/wallet/rpc-storage-wallet.js +0 -46
- package/lib/wallet/rpc-storage-wallet.mjs +0 -40
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var sdJwtVc = require('@sd-jwt/sd-jwt-vc');
|
|
6
|
-
var cryptoNodejs = require('@sd-jwt/crypto-nodejs');
|
|
7
|
-
var base64url = require('base64url');
|
|
8
|
-
|
|
9
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
-
|
|
11
|
-
var base64url__default = /*#__PURE__*/_interopDefaultLegacy(base64url);
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Checks if a JWT string is an SD-JWT credential
|
|
15
|
-
*/
|
|
16
|
-
function isSDJWTCredential(jwt) {
|
|
17
|
-
const jwtHeader = jwt.split('.')[0];
|
|
18
|
-
const decodedHeader = JSON.parse(base64url__default["default"].decode(jwtHeader));
|
|
19
|
-
return decodedHeader.typ === 'dc+sd-jwt' || decodedHeader.typ === 'vc+sd-jwt';
|
|
20
|
-
}
|
|
21
|
-
async function createSDJWTPresentation({ attributesToReveal, credential, }) {
|
|
22
|
-
const sdjwt = new sdJwtVc.SDJwtVcInstance({
|
|
23
|
-
signAlg: 'EdDSA',
|
|
24
|
-
hasher: cryptoNodejs.digest,
|
|
25
|
-
hashAlg: 'sha-256',
|
|
26
|
-
saltGenerator: cryptoNodejs.generateSalt,
|
|
27
|
-
});
|
|
28
|
-
// Holder defines the presentation frame to specify which claims should be presented
|
|
29
|
-
// The list of presented claims must be a subset of the disclosed claims
|
|
30
|
-
const presentationFrame = {};
|
|
31
|
-
attributesToReveal.forEach(attribute => {
|
|
32
|
-
presentationFrame[attribute.replace('credentialSubject.', '')] = true;
|
|
33
|
-
});
|
|
34
|
-
// Holder creates a presentation using the issued credential and the presentation frame
|
|
35
|
-
// returns an encoded SD JWT.
|
|
36
|
-
const presentation = await sdjwt.present(credential, presentationFrame);
|
|
37
|
-
return presentation;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Decodes an SD-JWT string into its structured format
|
|
41
|
-
* @param {string} sdJwtString - The SD-JWT string to decode
|
|
42
|
-
* @returns {Promise<Object>} Decoded SD-JWT structure with jwt and disclosures
|
|
43
|
-
*/
|
|
44
|
-
async function decodeSDJWT(sdJwtString) {
|
|
45
|
-
// Create SD-JWT instance with minimal configuration (no verification needed for decoding)
|
|
46
|
-
const sdjwt = new sdJwtVc.SDJwtVcInstance({
|
|
47
|
-
signAlg: 'EdDSA',
|
|
48
|
-
hasher: cryptoNodejs.digest,
|
|
49
|
-
hashAlg: 'sha-256',
|
|
50
|
-
saltGenerator: cryptoNodejs.generateSalt,
|
|
51
|
-
});
|
|
52
|
-
// Decode the SD-JWT
|
|
53
|
-
return await sdjwt.decode(sdJwtString);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Verifies an SD-JWT credential
|
|
57
|
-
* @param {string} jwt - The SD-JWT string to verify
|
|
58
|
-
* @returns {Promise<Object>} Verification result with verified status and optional error
|
|
59
|
-
* @returns {boolean} returns.verified - Whether the credential is valid
|
|
60
|
-
* @returns {string} [returns.error] - Error message if verification failed
|
|
61
|
-
*/
|
|
62
|
-
async function verifySDJWT(jwt) {
|
|
63
|
-
try {
|
|
64
|
-
// Decode the SD-JWT
|
|
65
|
-
const decoded = await decodeSDJWT(jwt);
|
|
66
|
-
// Extract payload for validation
|
|
67
|
-
const payload = decoded.jwt.payload;
|
|
68
|
-
// Check expiration date if present
|
|
69
|
-
if (payload.exp) {
|
|
70
|
-
const now = Math.floor(Date.now() / 1000);
|
|
71
|
-
const exp = Number(payload.exp);
|
|
72
|
-
if (now > exp) {
|
|
73
|
-
return {
|
|
74
|
-
verified: false,
|
|
75
|
-
error: 'SD-JWT credential has expired',
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
// Check not-before date if present
|
|
80
|
-
if (payload.nbf) {
|
|
81
|
-
const now = Math.floor(Date.now() / 1000);
|
|
82
|
-
const nbf = Number(payload.nbf);
|
|
83
|
-
if (now < nbf) {
|
|
84
|
-
return {
|
|
85
|
-
verified: false,
|
|
86
|
-
error: 'SD-JWT credential is not yet valid',
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// If we successfully decoded and passed date checks, consider it verified
|
|
91
|
-
return {
|
|
92
|
-
verified: true,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
catch (error) {
|
|
96
|
-
return {
|
|
97
|
-
verified: false,
|
|
98
|
-
error: error.message || 'Failed to verify SD-JWT credential',
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Converts a decoded SD-JWT into W3C Verifiable Credential format
|
|
104
|
-
* @param {Object} decodedSDJWT - The decoded SD-JWT object from SDJwtVcInstance.decode()
|
|
105
|
-
* @param {string} [encodedSDJWT] - Optional raw encoded SD-JWT string
|
|
106
|
-
* @returns {Object} W3C Verifiable Credential format with SD-JWT metadata
|
|
107
|
-
*/
|
|
108
|
-
function sdJwtToW3C(decodedSDJWT, encodedSDJWT) {
|
|
109
|
-
const { jwt, disclosures } = decodedSDJWT;
|
|
110
|
-
// The jwt object already has header and payload parsed
|
|
111
|
-
jwt.header;
|
|
112
|
-
const payload = jwt.payload;
|
|
113
|
-
// Build credential subject from disclosed claims
|
|
114
|
-
const credentialSubject = {};
|
|
115
|
-
// Process disclosures to build the credential subject
|
|
116
|
-
if (disclosures && Array.isArray(disclosures)) {
|
|
117
|
-
disclosures.forEach(disclosure => {
|
|
118
|
-
if (disclosure && disclosure.key && disclosure.value !== undefined) {
|
|
119
|
-
credentialSubject[disclosure.key] = disclosure.value;
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
// Extract issuer from payload
|
|
124
|
-
const issuer = payload.iss || payload.issuer;
|
|
125
|
-
// Extract subject ID if present in disclosures
|
|
126
|
-
const subjectId = credentialSubject.id;
|
|
127
|
-
// Build final credential subject with id if available
|
|
128
|
-
const finalCredentialSubject = subjectId
|
|
129
|
-
? { id: subjectId, ...credentialSubject }
|
|
130
|
-
: credentialSubject;
|
|
131
|
-
// Extract credential type from vct (verifiable credential type) field
|
|
132
|
-
// vct is the SD-JWT VC type claim
|
|
133
|
-
const credentialType = payload.vct || 'UnknownCredential';
|
|
134
|
-
// Build the W3C credential
|
|
135
|
-
const w3cCredential = {
|
|
136
|
-
'@context': ['https://www.w3.org/2018/credentials/v1'],
|
|
137
|
-
type: ['VerifiableCredential', credentialType],
|
|
138
|
-
issuer: issuer,
|
|
139
|
-
credentialSubject: finalCredentialSubject,
|
|
140
|
-
};
|
|
141
|
-
// Add issuance date if available
|
|
142
|
-
if (payload.iat) {
|
|
143
|
-
w3cCredential.issuanceDate = new Date(payload.iat * 1000).toISOString();
|
|
144
|
-
}
|
|
145
|
-
// Add expiration date if available
|
|
146
|
-
if (payload.exp) {
|
|
147
|
-
w3cCredential.expirationDate = new Date(payload.exp * 1000).toISOString();
|
|
148
|
-
}
|
|
149
|
-
// Add credential ID if available
|
|
150
|
-
if (payload.jti) {
|
|
151
|
-
w3cCredential.id = payload.jti;
|
|
152
|
-
}
|
|
153
|
-
// Store SD-JWT metadata for unwrapping during presentation flow
|
|
154
|
-
// This allows converting back to SD-JWT format when needed
|
|
155
|
-
w3cCredential._sd_jwt = {
|
|
156
|
-
// Raw encoded SD-JWT string
|
|
157
|
-
encoded: encodedSDJWT,
|
|
158
|
-
};
|
|
159
|
-
return w3cCredential;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Decodes an SD-JWT string and converts it to W3C credential format
|
|
163
|
-
* @param {string} sdJwtString - The SD-JWT string
|
|
164
|
-
* @returns {Promise<Object>} W3C Verifiable Credential format with SD-JWT metadata
|
|
165
|
-
*/
|
|
166
|
-
async function decodeSDJWTToW3C(sdJwtString) {
|
|
167
|
-
// Decode the SD-JWT using the reusable decode function
|
|
168
|
-
const decoded = await decodeSDJWT(sdJwtString);
|
|
169
|
-
// Convert to W3C format, passing both decoded data and raw string
|
|
170
|
-
return sdJwtToW3C(decoded, sdJwtString);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Converts a credential to W3C format
|
|
174
|
-
* Handles both SD-JWT credentials (needs decoding) and regular W3C credentials (returns as-is)
|
|
175
|
-
* @param {string|Object} credential - Either an SD-JWT string or a credential object
|
|
176
|
-
* @returns {Promise<Object>} W3C Verifiable Credential format
|
|
177
|
-
*/
|
|
178
|
-
async function credentialToW3C(credential) {
|
|
179
|
-
// If it's already an object with a type field, assume it's already W3C format
|
|
180
|
-
if (typeof credential === 'object' && credential.type) {
|
|
181
|
-
return credential;
|
|
182
|
-
}
|
|
183
|
-
// If it's a string, check if it's an SD-JWT
|
|
184
|
-
if (typeof credential === 'string') {
|
|
185
|
-
// First try to parse as JSON
|
|
186
|
-
try {
|
|
187
|
-
const parsed = JSON.parse(credential);
|
|
188
|
-
if (parsed.type) {
|
|
189
|
-
return parsed;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
catch (e) {
|
|
193
|
-
// Not a JSON string, might be a JWT
|
|
194
|
-
}
|
|
195
|
-
// Check if it's an SD-JWT
|
|
196
|
-
try {
|
|
197
|
-
if (isSDJWTCredential(credential)) {
|
|
198
|
-
return await decodeSDJWTToW3C(credential);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
catch (e) {
|
|
202
|
-
// Not a valid SD-JWT
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
throw new Error('Unable to convert credential to W3C format');
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
exports.createSDJWTPresentation = createSDJWTPresentation;
|
|
209
|
-
exports.credentialToW3C = credentialToW3C;
|
|
210
|
-
exports.decodeSDJWT = decodeSDJWT;
|
|
211
|
-
exports.decodeSDJWTToW3C = decodeSDJWTToW3C;
|
|
212
|
-
exports.isSDJWTCredential = isSDJWTCredential;
|
|
213
|
-
exports.sdJwtToW3C = sdJwtToW3C;
|
|
214
|
-
exports.verifySDJWT = verifySDJWT;
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { SDJwtVcInstance } from '@sd-jwt/sd-jwt-vc';
|
|
2
|
-
import { digest, generateSalt } from '@sd-jwt/crypto-nodejs';
|
|
3
|
-
import base64url from 'base64url';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Checks if a JWT string is an SD-JWT credential
|
|
7
|
-
*/
|
|
8
|
-
function isSDJWTCredential(jwt) {
|
|
9
|
-
const jwtHeader = jwt.split('.')[0];
|
|
10
|
-
const decodedHeader = JSON.parse(base64url.decode(jwtHeader));
|
|
11
|
-
return decodedHeader.typ === 'dc+sd-jwt' || decodedHeader.typ === 'vc+sd-jwt';
|
|
12
|
-
}
|
|
13
|
-
async function createSDJWTPresentation({ attributesToReveal, credential, }) {
|
|
14
|
-
const sdjwt = new SDJwtVcInstance({
|
|
15
|
-
signAlg: 'EdDSA',
|
|
16
|
-
hasher: digest,
|
|
17
|
-
hashAlg: 'sha-256',
|
|
18
|
-
saltGenerator: generateSalt,
|
|
19
|
-
});
|
|
20
|
-
// Holder defines the presentation frame to specify which claims should be presented
|
|
21
|
-
// The list of presented claims must be a subset of the disclosed claims
|
|
22
|
-
const presentationFrame = {};
|
|
23
|
-
attributesToReveal.forEach(attribute => {
|
|
24
|
-
presentationFrame[attribute.replace('credentialSubject.', '')] = true;
|
|
25
|
-
});
|
|
26
|
-
// Holder creates a presentation using the issued credential and the presentation frame
|
|
27
|
-
// returns an encoded SD JWT.
|
|
28
|
-
const presentation = await sdjwt.present(credential, presentationFrame);
|
|
29
|
-
return presentation;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Decodes an SD-JWT string into its structured format
|
|
33
|
-
* @param {string} sdJwtString - The SD-JWT string to decode
|
|
34
|
-
* @returns {Promise<Object>} Decoded SD-JWT structure with jwt and disclosures
|
|
35
|
-
*/
|
|
36
|
-
async function decodeSDJWT(sdJwtString) {
|
|
37
|
-
// Create SD-JWT instance with minimal configuration (no verification needed for decoding)
|
|
38
|
-
const sdjwt = new SDJwtVcInstance({
|
|
39
|
-
signAlg: 'EdDSA',
|
|
40
|
-
hasher: digest,
|
|
41
|
-
hashAlg: 'sha-256',
|
|
42
|
-
saltGenerator: generateSalt,
|
|
43
|
-
});
|
|
44
|
-
// Decode the SD-JWT
|
|
45
|
-
return await sdjwt.decode(sdJwtString);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Verifies an SD-JWT credential
|
|
49
|
-
* @param {string} jwt - The SD-JWT string to verify
|
|
50
|
-
* @returns {Promise<Object>} Verification result with verified status and optional error
|
|
51
|
-
* @returns {boolean} returns.verified - Whether the credential is valid
|
|
52
|
-
* @returns {string} [returns.error] - Error message if verification failed
|
|
53
|
-
*/
|
|
54
|
-
async function verifySDJWT(jwt) {
|
|
55
|
-
try {
|
|
56
|
-
// Decode the SD-JWT
|
|
57
|
-
const decoded = await decodeSDJWT(jwt);
|
|
58
|
-
// Extract payload for validation
|
|
59
|
-
const payload = decoded.jwt.payload;
|
|
60
|
-
// Check expiration date if present
|
|
61
|
-
if (payload.exp) {
|
|
62
|
-
const now = Math.floor(Date.now() / 1000);
|
|
63
|
-
const exp = Number(payload.exp);
|
|
64
|
-
if (now > exp) {
|
|
65
|
-
return {
|
|
66
|
-
verified: false,
|
|
67
|
-
error: 'SD-JWT credential has expired',
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
// Check not-before date if present
|
|
72
|
-
if (payload.nbf) {
|
|
73
|
-
const now = Math.floor(Date.now() / 1000);
|
|
74
|
-
const nbf = Number(payload.nbf);
|
|
75
|
-
if (now < nbf) {
|
|
76
|
-
return {
|
|
77
|
-
verified: false,
|
|
78
|
-
error: 'SD-JWT credential is not yet valid',
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
// If we successfully decoded and passed date checks, consider it verified
|
|
83
|
-
return {
|
|
84
|
-
verified: true,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
catch (error) {
|
|
88
|
-
return {
|
|
89
|
-
verified: false,
|
|
90
|
-
error: error.message || 'Failed to verify SD-JWT credential',
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Converts a decoded SD-JWT into W3C Verifiable Credential format
|
|
96
|
-
* @param {Object} decodedSDJWT - The decoded SD-JWT object from SDJwtVcInstance.decode()
|
|
97
|
-
* @param {string} [encodedSDJWT] - Optional raw encoded SD-JWT string
|
|
98
|
-
* @returns {Object} W3C Verifiable Credential format with SD-JWT metadata
|
|
99
|
-
*/
|
|
100
|
-
function sdJwtToW3C(decodedSDJWT, encodedSDJWT) {
|
|
101
|
-
const { jwt, disclosures } = decodedSDJWT;
|
|
102
|
-
// The jwt object already has header and payload parsed
|
|
103
|
-
jwt.header;
|
|
104
|
-
const payload = jwt.payload;
|
|
105
|
-
// Build credential subject from disclosed claims
|
|
106
|
-
const credentialSubject = {};
|
|
107
|
-
// Process disclosures to build the credential subject
|
|
108
|
-
if (disclosures && Array.isArray(disclosures)) {
|
|
109
|
-
disclosures.forEach(disclosure => {
|
|
110
|
-
if (disclosure && disclosure.key && disclosure.value !== undefined) {
|
|
111
|
-
credentialSubject[disclosure.key] = disclosure.value;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
// Extract issuer from payload
|
|
116
|
-
const issuer = payload.iss || payload.issuer;
|
|
117
|
-
// Extract subject ID if present in disclosures
|
|
118
|
-
const subjectId = credentialSubject.id;
|
|
119
|
-
// Build final credential subject with id if available
|
|
120
|
-
const finalCredentialSubject = subjectId
|
|
121
|
-
? { id: subjectId, ...credentialSubject }
|
|
122
|
-
: credentialSubject;
|
|
123
|
-
// Extract credential type from vct (verifiable credential type) field
|
|
124
|
-
// vct is the SD-JWT VC type claim
|
|
125
|
-
const credentialType = payload.vct || 'UnknownCredential';
|
|
126
|
-
// Build the W3C credential
|
|
127
|
-
const w3cCredential = {
|
|
128
|
-
'@context': ['https://www.w3.org/2018/credentials/v1'],
|
|
129
|
-
type: ['VerifiableCredential', credentialType],
|
|
130
|
-
issuer: issuer,
|
|
131
|
-
credentialSubject: finalCredentialSubject,
|
|
132
|
-
};
|
|
133
|
-
// Add issuance date if available
|
|
134
|
-
if (payload.iat) {
|
|
135
|
-
w3cCredential.issuanceDate = new Date(payload.iat * 1000).toISOString();
|
|
136
|
-
}
|
|
137
|
-
// Add expiration date if available
|
|
138
|
-
if (payload.exp) {
|
|
139
|
-
w3cCredential.expirationDate = new Date(payload.exp * 1000).toISOString();
|
|
140
|
-
}
|
|
141
|
-
// Add credential ID if available
|
|
142
|
-
if (payload.jti) {
|
|
143
|
-
w3cCredential.id = payload.jti;
|
|
144
|
-
}
|
|
145
|
-
// Store SD-JWT metadata for unwrapping during presentation flow
|
|
146
|
-
// This allows converting back to SD-JWT format when needed
|
|
147
|
-
w3cCredential._sd_jwt = {
|
|
148
|
-
// Raw encoded SD-JWT string
|
|
149
|
-
encoded: encodedSDJWT,
|
|
150
|
-
};
|
|
151
|
-
return w3cCredential;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Decodes an SD-JWT string and converts it to W3C credential format
|
|
155
|
-
* @param {string} sdJwtString - The SD-JWT string
|
|
156
|
-
* @returns {Promise<Object>} W3C Verifiable Credential format with SD-JWT metadata
|
|
157
|
-
*/
|
|
158
|
-
async function decodeSDJWTToW3C(sdJwtString) {
|
|
159
|
-
// Decode the SD-JWT using the reusable decode function
|
|
160
|
-
const decoded = await decodeSDJWT(sdJwtString);
|
|
161
|
-
// Convert to W3C format, passing both decoded data and raw string
|
|
162
|
-
return sdJwtToW3C(decoded, sdJwtString);
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Converts a credential to W3C format
|
|
166
|
-
* Handles both SD-JWT credentials (needs decoding) and regular W3C credentials (returns as-is)
|
|
167
|
-
* @param {string|Object} credential - Either an SD-JWT string or a credential object
|
|
168
|
-
* @returns {Promise<Object>} W3C Verifiable Credential format
|
|
169
|
-
*/
|
|
170
|
-
async function credentialToW3C(credential) {
|
|
171
|
-
// If it's already an object with a type field, assume it's already W3C format
|
|
172
|
-
if (typeof credential === 'object' && credential.type) {
|
|
173
|
-
return credential;
|
|
174
|
-
}
|
|
175
|
-
// If it's a string, check if it's an SD-JWT
|
|
176
|
-
if (typeof credential === 'string') {
|
|
177
|
-
// First try to parse as JSON
|
|
178
|
-
try {
|
|
179
|
-
const parsed = JSON.parse(credential);
|
|
180
|
-
if (parsed.type) {
|
|
181
|
-
return parsed;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
catch (e) {
|
|
185
|
-
// Not a JSON string, might be a JWT
|
|
186
|
-
}
|
|
187
|
-
// Check if it's an SD-JWT
|
|
188
|
-
try {
|
|
189
|
-
if (isSDJWTCredential(credential)) {
|
|
190
|
-
return await decodeSDJWTToW3C(credential);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
catch (e) {
|
|
194
|
-
// Not a valid SD-JWT
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
throw new Error('Unable to convert credential to W3C format');
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export { createSDJWTPresentation, credentialToW3C, decodeSDJWT, decodeSDJWTToW3C, isSDJWTCredential, sdJwtToW3C, verifySDJWT };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var services_rpcServiceClient = require('../rpc-service-client.js');
|
|
6
|
-
var services_credential_config = require('./config.js');
|
|
7
|
-
require('assert');
|
|
8
|
-
require('../../rpc-client.js');
|
|
9
|
-
require('json-rpc-2.0');
|
|
10
|
-
require('../../core/crypto.js');
|
|
11
|
-
require('crypto');
|
|
12
|
-
require('../../core/logger.js');
|
|
13
|
-
require('../../logger.js');
|
|
14
|
-
require('../../rpc-util.js');
|
|
15
|
-
|
|
16
|
-
class CredentialServiceRPC extends services_rpcServiceClient.RpcService {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(services_credential_config.serviceName);
|
|
19
|
-
}
|
|
20
|
-
generateCredential(params) {
|
|
21
|
-
return this.call('generateCredential', params);
|
|
22
|
-
}
|
|
23
|
-
async signCredential(params) {
|
|
24
|
-
return this.call('signCredential', params);
|
|
25
|
-
}
|
|
26
|
-
async createPresentation(params) {
|
|
27
|
-
return this.call('createPresentation', params);
|
|
28
|
-
}
|
|
29
|
-
async verifyCredential(params) {
|
|
30
|
-
return this.call('verifyCredential', params);
|
|
31
|
-
}
|
|
32
|
-
async createBBSPresentation(params) {
|
|
33
|
-
return this.call('createBBSPresentation', params);
|
|
34
|
-
}
|
|
35
|
-
async deriveVCFromPresentation(params) {
|
|
36
|
-
return this.call('deriveVCFromPresentation', params);
|
|
37
|
-
}
|
|
38
|
-
async isBBSPlusCredential(params) {
|
|
39
|
-
return this.call('isBBSPlusCredential', params);
|
|
40
|
-
}
|
|
41
|
-
async isKvacCredential(params) {
|
|
42
|
-
return this.call('isKvacCredential', params);
|
|
43
|
-
}
|
|
44
|
-
async isSDJWTCredential(params) {
|
|
45
|
-
return this.call('isSDJWTCredential', params);
|
|
46
|
-
}
|
|
47
|
-
async credentialToW3C(params) {
|
|
48
|
-
return this.call('credentialToW3C', params);
|
|
49
|
-
}
|
|
50
|
-
async createSDJWTPresentation(params) {
|
|
51
|
-
return this.call('createSDJWTPresentation', params);
|
|
52
|
-
}
|
|
53
|
-
async getAccumulatorId(params) {
|
|
54
|
-
return this.call('getAccumulatorId', params);
|
|
55
|
-
}
|
|
56
|
-
async acquireOIDCredential(params) {
|
|
57
|
-
return this.call('acquireOIDCredential', params);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
exports.CredentialServiceRPC = CredentialServiceRPC;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { RpcService } from '../rpc-service-client.mjs';
|
|
2
|
-
import { serviceName } from './config.mjs';
|
|
3
|
-
import 'assert';
|
|
4
|
-
import '../../rpc-client.mjs';
|
|
5
|
-
import 'json-rpc-2.0';
|
|
6
|
-
import '../../core/crypto.mjs';
|
|
7
|
-
import 'crypto';
|
|
8
|
-
import '../../core/logger.mjs';
|
|
9
|
-
import '../../logger.mjs';
|
|
10
|
-
import '../../rpc-util.mjs';
|
|
11
|
-
|
|
12
|
-
class CredentialServiceRPC extends RpcService {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(serviceName);
|
|
15
|
-
}
|
|
16
|
-
generateCredential(params) {
|
|
17
|
-
return this.call('generateCredential', params);
|
|
18
|
-
}
|
|
19
|
-
async signCredential(params) {
|
|
20
|
-
return this.call('signCredential', params);
|
|
21
|
-
}
|
|
22
|
-
async createPresentation(params) {
|
|
23
|
-
return this.call('createPresentation', params);
|
|
24
|
-
}
|
|
25
|
-
async verifyCredential(params) {
|
|
26
|
-
return this.call('verifyCredential', params);
|
|
27
|
-
}
|
|
28
|
-
async createBBSPresentation(params) {
|
|
29
|
-
return this.call('createBBSPresentation', params);
|
|
30
|
-
}
|
|
31
|
-
async deriveVCFromPresentation(params) {
|
|
32
|
-
return this.call('deriveVCFromPresentation', params);
|
|
33
|
-
}
|
|
34
|
-
async isBBSPlusCredential(params) {
|
|
35
|
-
return this.call('isBBSPlusCredential', params);
|
|
36
|
-
}
|
|
37
|
-
async isKvacCredential(params) {
|
|
38
|
-
return this.call('isKvacCredential', params);
|
|
39
|
-
}
|
|
40
|
-
async isSDJWTCredential(params) {
|
|
41
|
-
return this.call('isSDJWTCredential', params);
|
|
42
|
-
}
|
|
43
|
-
async credentialToW3C(params) {
|
|
44
|
-
return this.call('credentialToW3C', params);
|
|
45
|
-
}
|
|
46
|
-
async createSDJWTPresentation(params) {
|
|
47
|
-
return this.call('createSDJWTPresentation', params);
|
|
48
|
-
}
|
|
49
|
-
async getAccumulatorId(params) {
|
|
50
|
-
return this.call('getAccumulatorId', params);
|
|
51
|
-
}
|
|
52
|
-
async acquireOIDCredential(params) {
|
|
53
|
-
return this.call('acquireOIDCredential', params);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { CredentialServiceRPC };
|