@docknetwork/wallet-sdk-wasm 1.7.6 → 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 +6 -7
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/credential/service.ts"],"names":[],"mappings":"AAiDA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,KAAA,OAS7C;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,KAAA,OAK1C;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,KAAA,OAEhD;AAED;;;;;GAKG;AACH,cAAM,iBAAiB;IACrB;;;OAGG;;IAIH,UAAU,2BAaR;IAGF,uBAAuB,CAAC,MAAM,KAAA;IAK9B;;;;;;;;;OASG;IACH,kBAAkB,CAAC,MAAM,KAAK;IAkB9B;;;;;;;;;;;;OAYG;IACG,cAAc,CAAC,MAAM,KAAA;IAe3B;;;;;;;;;;;;;;;;;OAiBG;IACG,kBAAkB,CAAC,MAAM,KAAA;IAmC/B;;;;;;;;;;;OAWG;IACG,kBAAkB,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,GAAG;IAIvD;;;;;;;;;;;;;;;;;OAiBG;IACG,gBAAgB,CAAC,MAAM,KAAA;IAoC7B;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,MAAM,KAAA;IAWxB;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,MAAM,KAAA;IAU3B;;;;;OAKG;IACH,mBAAmB,CAAC,MAAM,KAAA;IAK1B;;;;;OAKG;IACH,gBAAgB,CAAC,MAAM,KAAA;IAKvB;;;;;;;;;OASG;IACH,iBAAiB,CAAC,MAAM,KAAA;IAKxB;;;;;;;;;;;;;;;;;OAiBG;IACG,eAAe,CAAC,MAAM,KAAA;IAK5B;;;;;;;;;;;;;;OAcG;IACG,oBAAoB,CAAC,EACzB,GAAG,EACH,iBAAiB,EACjB,iBAAiB,GAClB,EAAE;QACD,GAAG,EAAE,MAAM,CAAC;QACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,iBAAiB,EAAE,GAAG,CAAC;KACxB,GAAG,OAAO,CAAC,GAAG,CAAC;IAmEhB;;;;;;;;;;;;;;;OAeG;IACG,qBAAqB,CAAC,MAAM,KAAA;IAgBlC;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAC,UAAU,EAAC;;KAAA;IAS7B;;;;;;OAMG;IACG,kBAAkB,CAAC,EAAC,UAAU,EAAC;;KAAA;IAcrC;;;;;;;;;;OAUG;IACG,uBAAuB,CAAC,EAAC,UAAU,EAAE,qBAAqB,EAAC;;;KAAA;IAkDjE;;;;;;;;;;;;;;;;;;OAkBG;IACG,wBAAwB,CAAC,MAAM,KAAA;IAoFrC;;;;OAIG;IACG,cAAc;CAGrB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/services/credential/utils.js"],"names":[],"mappings":"AAcA,2DA8CC;AAaD,4DAOC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const serviceName = "didManager";
|
|
2
|
-
export declare const validation: {
|
|
3
|
-
keypairToDIDKeyDocument: ({ keypairDoc }: KeypairToDIDKeyDocumentParams) => void;
|
|
4
|
-
getDIDResolution: ({ didDocument }: GetDIDResolutionParams) => void;
|
|
5
|
-
generateKeyDoc: ({ derivePath, type }: GenerateKeyDocParams) => void;
|
|
6
|
-
deriveKeyDoc: ({ pair, type }: DeriveKeyDocParams) => void;
|
|
7
|
-
};
|
|
8
|
-
export type KeypairToDIDKeyDocumentParams = {
|
|
9
|
-
keypairDoc: any;
|
|
10
|
-
};
|
|
11
|
-
export type GetDIDResolutionParams = {
|
|
12
|
-
didDocument: any;
|
|
13
|
-
didDocumentCustomProp: any;
|
|
14
|
-
};
|
|
15
|
-
export type GenerateKeyDocParams = {
|
|
16
|
-
type: string;
|
|
17
|
-
derivePath: string;
|
|
18
|
-
keyPairJSON: any;
|
|
19
|
-
};
|
|
20
|
-
export type DeriveKeyDocParams = {
|
|
21
|
-
pair: any;
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/services/dids/config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,eAAe,CAAC;AACxC,eAAO,MAAM,UAAU;8CACmB,6BAA6B;wCASnC,sBAAsB;2CAInB,oBAAoB;mCAS1B,kBAAkB;CASlD,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,EAAE,GAAG,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,GAAG,CAAC;IACjB,qBAAqB,EAAE,GAAG,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export function getKeyPairType(key: any): any;
|
|
2
|
-
export function encodeMbKey(header: any, key: any): string;
|
|
3
|
-
export function keypairToKeydoc(key: any, controller: any, id?: any): {
|
|
4
|
-
controller: any;
|
|
5
|
-
type: any;
|
|
6
|
-
id: any;
|
|
7
|
-
publicKeyMultibase: string;
|
|
8
|
-
privateKeyMultibase: string;
|
|
9
|
-
privateKeyBase58: any;
|
|
10
|
-
publicKeyBase58: any;
|
|
11
|
-
};
|
|
12
|
-
export const MULTIBASE_BASE58BTC_HEADER: "z";
|
|
13
|
-
export const MULTICODEC_ED25519_PUB_HEADER: Uint8Array<ArrayBuffer>;
|
|
14
|
-
export const MULTICODEC_ED25519_PRIV_HEADER: Uint8Array<ArrayBuffer>;
|
|
15
|
-
//# sourceMappingURL=keypair-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keypair-utils.d.ts","sourceRoot":"","sources":["../../../../src/services/dids/keypair-utils.js"],"names":[],"mappings":"AASA,8CAWC;AAMD,2DAKC;AAeD;;;;;;;;EAgEC;AAxFD,yCAA0C,GAAG,CAAC;AAC9C,oEAA0E;AAC1E,qEAA2E"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RpcService } from '../rpc-service-client';
|
|
2
|
-
import { KeypairToDIDKeyDocumentParams, GetDIDResolutionParams } from './config';
|
|
3
|
-
export declare class DIDServiceRPC extends RpcService {
|
|
4
|
-
constructor();
|
|
5
|
-
keypairToDIDKeyDocument(params: KeypairToDIDKeyDocumentParams): Promise<any>;
|
|
6
|
-
getDIDResolution(params: GetDIDResolutionParams): Promise<any>;
|
|
7
|
-
generateKeyDoc(params: any): Promise<any>;
|
|
8
|
-
deriveKeyDoc(params: any): Promise<any>;
|
|
9
|
-
createSignedJWT(params: any): Promise<any>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=service-rpc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service-rpc.d.ts","sourceRoot":"","sources":["../../../../src/services/dids/service-rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAEL,6BAA6B,EAC7B,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,qBAAa,aAAc,SAAQ,UAAU;;IAI3C,uBAAuB,CAAC,MAAM,EAAE,6BAA6B;IAG7D,gBAAgB,CAAC,MAAM,EAAE,sBAAsB;IAG/C,cAAc,CAAC,MAAM,KAAA;IAGrB,YAAY,CAAC,MAAM,KAAA;IAGnB,eAAe,CAAC,MAAM,KAAA;CAGvB"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { KeypairToDIDKeyDocumentParams, GetDIDResolutionParams } from './config';
|
|
2
|
-
declare class DIDService {
|
|
3
|
-
name: string;
|
|
4
|
-
constructor();
|
|
5
|
-
rpcMethods: (((params: KeypairToDIDKeyDocumentParams) => Promise<{
|
|
6
|
-
didDocument: any;
|
|
7
|
-
keyDoc: any;
|
|
8
|
-
}>) | ((params: GetDIDResolutionParams) => {
|
|
9
|
-
'@context': string[];
|
|
10
|
-
id: string;
|
|
11
|
-
type: string;
|
|
12
|
-
correlation: any[];
|
|
13
|
-
created: string;
|
|
14
|
-
expires: string;
|
|
15
|
-
name: any;
|
|
16
|
-
didDocument: any;
|
|
17
|
-
}) | ((params: any) => Promise<{
|
|
18
|
-
controller: any;
|
|
19
|
-
type: any;
|
|
20
|
-
id: any;
|
|
21
|
-
publicKeyMultibase: string;
|
|
22
|
-
privateKeyMultibase: string;
|
|
23
|
-
privateKeyBase58: any;
|
|
24
|
-
publicKeyBase58: any;
|
|
25
|
-
}>) | (({ payload, privateKeyDoc, headerInput }: {
|
|
26
|
-
payload: any;
|
|
27
|
-
privateKeyDoc: any;
|
|
28
|
-
headerInput: any;
|
|
29
|
-
}) => Promise<string>))[];
|
|
30
|
-
keypairToDIDKeyDocument(params: KeypairToDIDKeyDocumentParams): Promise<{
|
|
31
|
-
didDocument: any;
|
|
32
|
-
keyDoc: any;
|
|
33
|
-
}>;
|
|
34
|
-
getDIDResolution(params: GetDIDResolutionParams): {
|
|
35
|
-
'@context': string[];
|
|
36
|
-
id: string;
|
|
37
|
-
type: string;
|
|
38
|
-
correlation: any[];
|
|
39
|
-
created: string;
|
|
40
|
-
expires: string;
|
|
41
|
-
name: any;
|
|
42
|
-
didDocument: any;
|
|
43
|
-
};
|
|
44
|
-
generateKeyDoc(params: any): Promise<{
|
|
45
|
-
controller: any;
|
|
46
|
-
type: any;
|
|
47
|
-
id: any;
|
|
48
|
-
publicKeyMultibase: string;
|
|
49
|
-
privateKeyMultibase: string;
|
|
50
|
-
privateKeyBase58: any;
|
|
51
|
-
publicKeyBase58: any;
|
|
52
|
-
}>;
|
|
53
|
-
deriveKeyDoc(params: any): Promise<{
|
|
54
|
-
controller: any;
|
|
55
|
-
type: any;
|
|
56
|
-
id: any;
|
|
57
|
-
publicKeyMultibase: string;
|
|
58
|
-
privateKeyMultibase: string;
|
|
59
|
-
privateKeyBase58: any;
|
|
60
|
-
publicKeyBase58: any;
|
|
61
|
-
}>;
|
|
62
|
-
createSignedJWT({ payload, privateKeyDoc, headerInput }: {
|
|
63
|
-
payload: any;
|
|
64
|
-
privateKeyDoc: any;
|
|
65
|
-
headerInput: any;
|
|
66
|
-
}): Promise<string>;
|
|
67
|
-
}
|
|
68
|
-
export declare const didService: DIDService;
|
|
69
|
-
export {};
|
|
70
|
-
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/dids/service.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,6BAA6B,EAC7B,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAkDlB,cAAM,UAAU;IACd,IAAI,EAAE,MAAM,CAAC;;IAKb,UAAU,aAOsB,6BAA6B;;;oBAMpC,sBAAsB;;;;;;;;;;;;;;;;;;;;;8BAP7C;IACF,uBAAuB,CAAC,MAAM,EAAE,6BAA6B;;;;IAM7D,gBAAgB,CAAC,MAAM,EAAE,sBAAsB;;;;;;;;;;IAMzC,cAAc,CAAC,MAAM,KAAA;;;;;;;;;IAOrB,YAAY,CAAC,MAAM,KAAA;;;;;;;;;IAOnB,eAAe,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAC;;;;KAAA;CAmB5D;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const validation: {
|
|
2
|
-
initialize(params: InitializeEDVParams): void;
|
|
3
|
-
};
|
|
4
|
-
export declare const serviceName = "edv";
|
|
5
|
-
export type InitializeEDVParams = {
|
|
6
|
-
agreementKey: any;
|
|
7
|
-
hmacKey: any;
|
|
8
|
-
verificationKey: any;
|
|
9
|
-
edvUrl: string;
|
|
10
|
-
authKey: string;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=configs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/services/edv/configs.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;uBACF,mBAAmB;CAQvC,CAAC;AAEF,eAAO,MAAM,WAAW,QAAQ,CAAC;AAEjC,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,GAAG,CAAC;IAClB,OAAO,EAAE,GAAG,CAAC;IACb,eAAe,EAAE,GAAG,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default class HMAC {
|
|
2
|
-
key: CryptoKey;
|
|
3
|
-
id: string;
|
|
4
|
-
type: string;
|
|
5
|
-
algorithm: string;
|
|
6
|
-
constructor({ id, type, algorithm, key, }: {
|
|
7
|
-
id: string;
|
|
8
|
-
type: string;
|
|
9
|
-
algorithm: string;
|
|
10
|
-
key: CryptoKey;
|
|
11
|
-
});
|
|
12
|
-
static generateKey(): Promise<any>;
|
|
13
|
-
static deriveKey(baseKey: Uint8Array): Promise<any>;
|
|
14
|
-
static exportKey(key: CryptoKey): Promise<any>;
|
|
15
|
-
static importKey(encodedKey: string): Promise<any>;
|
|
16
|
-
m: any;
|
|
17
|
-
static create({ id, key, }: {
|
|
18
|
-
id?: string;
|
|
19
|
-
key: CryptoKey | string;
|
|
20
|
-
}): Promise<HMAC>;
|
|
21
|
-
sign({ data }: {
|
|
22
|
-
data: Uint8Array | ArrayBuffer;
|
|
23
|
-
}): Promise<any>;
|
|
24
|
-
verify({ data, signature, }: {
|
|
25
|
-
data: Uint8Array | ArrayBuffer;
|
|
26
|
-
signature: string;
|
|
27
|
-
}): Promise<any>;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=hmac.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hmac.d.ts","sourceRoot":"","sources":["../../../../src/services/edv/hmac.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,GAAG,EAAE,SAAS,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;gBAEN,EACV,EAAE,EACF,IAAI,EACJ,SAAS,EACT,GAAG,GACJ,EAAE;QACD,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,GAAG,EAAE,SAAS,CAAC;KAChB;WAOY,WAAW;WAaX,SAAS,CAAC,OAAO,EAAE,UAAU;WAY7B,SAAS,CAAC,GAAG,EAAE,SAAS;WAKxB,SAAS,CAAC,UAAU,EAAE,MAAM;IAazC,CAAC,MAAC;WAEW,MAAM,CAAC,EAClB,EAA4B,EAC5B,GAAG,GACJ,EAAE;QACD,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,SAAS,GAAG,MAAM,CAAC;KACzB;IAmBK,IAAI,CAAC,EAAC,IAAI,EAAC,EAAE;QAAC,IAAI,EAAE,UAAU,GAAG,WAAW,CAAA;KAAC;IAM7C,MAAM,CAAC,EACX,IAAI,EACJ,SAAS,GACV,EAAE;QACD,IAAI,EAAE,UAAU,GAAG,WAAW,CAAC;QAC/B,SAAS,EAAE,MAAM,CAAC;KACnB;CAIF"}
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module edv-service
|
|
3
|
-
* @description Encrypted Data Vault (EDV) service for the Wallet SDK.
|
|
4
|
-
* This module provides secure, encrypted storage functionality using EDV protocol,
|
|
5
|
-
* enabling privacy-preserving data storage with client-side encryption.
|
|
6
|
-
*/
|
|
7
|
-
import { InitializeEDVParams } from './configs';
|
|
8
|
-
import EDVHTTPStorageInterface from '@docknetwork/universal-wallet/storage/edv-http-storage';
|
|
9
|
-
export declare const HKDF_LENGTH = 32;
|
|
10
|
-
export declare const HKDF_HASH = "SHA-256";
|
|
11
|
-
/**
|
|
12
|
-
* Service class for managing Encrypted Data Vaults
|
|
13
|
-
* @class
|
|
14
|
-
* @description Provides methods for creating, managing, and interacting with
|
|
15
|
-
* encrypted data vaults for secure storage of sensitive wallet data
|
|
16
|
-
*/
|
|
17
|
-
export declare class EDVService {
|
|
18
|
-
storageInterface: EDVHTTPStorageInterface;
|
|
19
|
-
private insertQueue;
|
|
20
|
-
controller: string;
|
|
21
|
-
rpcMethods: (((params: any) => any) | ((biometricData: Buffer, identifier: string) => Buffer) | ((biometricData: Buffer, identifier: string) => Promise<{
|
|
22
|
-
key: Buffer;
|
|
23
|
-
iv: Buffer;
|
|
24
|
-
}>) | ((masterKey: Uint8Array, encryptionKey: Buffer, iv: Buffer) => Promise<Uint8Array>))[];
|
|
25
|
-
/**
|
|
26
|
-
* Creates a new EDVService instance
|
|
27
|
-
* @constructor
|
|
28
|
-
*/
|
|
29
|
-
constructor();
|
|
30
|
-
/**
|
|
31
|
-
* Initializes the EDV service with encryption keys and connection parameters
|
|
32
|
-
* @param {InitializeEDVParams} params - Initialization parameters
|
|
33
|
-
* @param {Object} params.hmacKey - HMAC key for document indexing
|
|
34
|
-
* @param {Object} params.agreementKey - Key agreement key for encryption
|
|
35
|
-
* @param {Object} params.verificationKey - Verification key for authentication
|
|
36
|
-
* @param {string} params.edvUrl - URL of the EDV server
|
|
37
|
-
* @param {string} params.authKey - Authentication key for the EDV server
|
|
38
|
-
* @returns {Promise<void>}
|
|
39
|
-
* @throws {Error} If unable to create or connect to EDV
|
|
40
|
-
* @example
|
|
41
|
-
* await edvService.initialize({
|
|
42
|
-
* hmacKey: hmacKeyData,
|
|
43
|
-
* agreementKey: agreementKeyData,
|
|
44
|
-
* verificationKey: verificationKeyData,
|
|
45
|
-
* edvUrl: 'https://edv.example.com',
|
|
46
|
-
* authKey: 'auth-token-123'
|
|
47
|
-
* });
|
|
48
|
-
*/
|
|
49
|
-
initialize({ hmacKey, agreementKey, verificationKey, edvUrl, authKey, }: InitializeEDVParams): Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Generates new cryptographic keys for EDV operations
|
|
52
|
-
* @returns {Promise<Object>} Generated keys
|
|
53
|
-
* @returns {Object} returns.verificationKey - Ed25519 verification key for authentication
|
|
54
|
-
* @returns {Object} returns.agreementKey - X25519 key agreement key for encryption
|
|
55
|
-
* @returns {Object} returns.hmacKey - HMAC key for indexing
|
|
56
|
-
* @example
|
|
57
|
-
* const keys = await edvService.generateKeys();
|
|
58
|
-
* // Use keys for EDV initialization
|
|
59
|
-
* await edvService.initialize({
|
|
60
|
-
* ...keys,
|
|
61
|
-
* edvUrl: 'https://edv.example.com',
|
|
62
|
-
* authKey: 'auth-token'
|
|
63
|
-
* });
|
|
64
|
-
*/
|
|
65
|
-
generateKeys(): Promise<{
|
|
66
|
-
verificationKey: any;
|
|
67
|
-
agreementKey: any;
|
|
68
|
-
hmacKey: any;
|
|
69
|
-
}>;
|
|
70
|
-
/**
|
|
71
|
-
* Derives cryptographic keys from a master key
|
|
72
|
-
* @param {Uint8Array} masterKey - Master key for derivation
|
|
73
|
-
* @returns {Promise<Object>} Derived keys
|
|
74
|
-
* @returns {Object} returns.verificationKey - Derived Ed25519 verification key
|
|
75
|
-
* @returns {Object} returns.agreementKey - Derived X25519 key agreement key
|
|
76
|
-
* @returns {Object} returns.hmacKey - Derived HMAC key
|
|
77
|
-
* @example
|
|
78
|
-
* const masterKey = new Uint8Array(32); // Your master key
|
|
79
|
-
* const keys = await edvService.deriveKeys(masterKey);
|
|
80
|
-
*/
|
|
81
|
-
deriveKeys(masterKey: Uint8Array): Promise<{
|
|
82
|
-
verificationKey: any;
|
|
83
|
-
agreementKey: any;
|
|
84
|
-
hmacKey: any;
|
|
85
|
-
}>;
|
|
86
|
-
/**
|
|
87
|
-
* Gets the controller identifier for the current EDV
|
|
88
|
-
* @returns {Promise<string>} The controller DID or identifier
|
|
89
|
-
* @example
|
|
90
|
-
* const controller = await edvService.getController();
|
|
91
|
-
* console.log('EDV Controller:', controller);
|
|
92
|
-
*/
|
|
93
|
-
getController(): Promise<string>;
|
|
94
|
-
/**
|
|
95
|
-
* Finds documents in the EDV based on query parameters
|
|
96
|
-
* @param {Object} params - Query parameters
|
|
97
|
-
* @param {Object} [params.equals] - Equality-based query conditions
|
|
98
|
-
* @param {boolean} [params.has] - Existence-based query conditions
|
|
99
|
-
* @param {number} [params.limit] - Maximum number of results
|
|
100
|
-
* @returns {Promise<Array>} Array of matching documents
|
|
101
|
-
* @example
|
|
102
|
-
* const documents = await edvService.find({
|
|
103
|
-
* equals: { 'content.type': 'VerifiableCredential' },
|
|
104
|
-
* limit: 10
|
|
105
|
-
* });
|
|
106
|
-
*/
|
|
107
|
-
find(params: any): any;
|
|
108
|
-
/**
|
|
109
|
-
* Updates a document in the EDV
|
|
110
|
-
* @param {Object} params - Update parameters
|
|
111
|
-
* @param {string} params.id - Document ID to update
|
|
112
|
-
* @param {Object} params.content - New document content
|
|
113
|
-
* @returns {Promise<Object>} Updated document
|
|
114
|
-
* @example
|
|
115
|
-
* const updated = await edvService.update({
|
|
116
|
-
* id: 'doc-123',
|
|
117
|
-
* content: { ...existingContent, updated: true }
|
|
118
|
-
* });
|
|
119
|
-
*/
|
|
120
|
-
update(params: any): any;
|
|
121
|
-
/**
|
|
122
|
-
* Inserts a new document into the EDV
|
|
123
|
-
* @param {Object} params - Insert parameters
|
|
124
|
-
* @param {string} params.id - Document ID
|
|
125
|
-
* @param {Object} params.content - Document content to store
|
|
126
|
-
* @returns {Promise<Object>} The inserted document
|
|
127
|
-
* @throws {Error} If insertion fails
|
|
128
|
-
* @example
|
|
129
|
-
* const document = await edvService.insert({
|
|
130
|
-
* id: 'doc-456',
|
|
131
|
-
* content: {
|
|
132
|
-
* type: 'VerifiableCredential',
|
|
133
|
-
* data: credentialData
|
|
134
|
-
* }
|
|
135
|
-
* });
|
|
136
|
-
*/
|
|
137
|
-
insert(params: any): Promise<any>;
|
|
138
|
-
/**
|
|
139
|
-
* Deletes a document from the EDV
|
|
140
|
-
* @param {Object} params - Deletion parameters
|
|
141
|
-
* @param {string} params.id - Document ID to delete
|
|
142
|
-
* @returns {Promise<boolean>} True if deletion successful
|
|
143
|
-
* @example
|
|
144
|
-
* const deleted = await edvService.delete({
|
|
145
|
-
* id: 'doc-123'
|
|
146
|
-
* });
|
|
147
|
-
*/
|
|
148
|
-
delete(params: any): any;
|
|
149
|
-
/**
|
|
150
|
-
* Derives a key from biometric data using HKDF
|
|
151
|
-
* @param {Buffer} biometricData - Biometric data from provider
|
|
152
|
-
* @param {string} identifier - User's identifier as salt (email, phone number, etc.)
|
|
153
|
-
* @returns {Buffer} Derived key
|
|
154
|
-
* @example
|
|
155
|
-
* const key = edvService.deriveBiometricKey(biometricData, 'user@example.com');
|
|
156
|
-
*/
|
|
157
|
-
deriveBiometricKey(biometricData: Buffer, identifier: string): Buffer;
|
|
158
|
-
/**
|
|
159
|
-
* Generates a key for encrypting/decrypting the master key
|
|
160
|
-
* @param {Buffer} biometricData - Biometric data from provider
|
|
161
|
-
* @param {string} identifier - User's identifier as salt (email, phone number, etc.)
|
|
162
|
-
* @returns {Promise<Object>} Encryption key and IV for AES encryption
|
|
163
|
-
* @returns {Buffer} returns.key - Encryption key
|
|
164
|
-
* @returns {Buffer} returns.iv - Initialization vector
|
|
165
|
-
* @example
|
|
166
|
-
* const { key, iv } = await edvService.deriveBiometricEncryptionKey(biometricData, 'user@example.com');
|
|
167
|
-
*/
|
|
168
|
-
deriveBiometricEncryptionKey(biometricData: Buffer, identifier: string): Promise<{
|
|
169
|
-
key: Buffer;
|
|
170
|
-
iv: Buffer;
|
|
171
|
-
}>;
|
|
172
|
-
/**
|
|
173
|
-
* Encrypts the master key using a key derived from biometric data
|
|
174
|
-
* @param {Uint8Array} masterKey - The CloudWalletVault master key to encrypt
|
|
175
|
-
* @param {Buffer} encryptionKey - Key derived from biometric data
|
|
176
|
-
* @param {Buffer} iv - Initialization vector
|
|
177
|
-
* @returns {Promise<Uint8Array>} Encrypted master key
|
|
178
|
-
* @example
|
|
179
|
-
* const encrypted = await edvService.encryptMasterKey(masterKey, encryptionKey, iv);
|
|
180
|
-
*/
|
|
181
|
-
encryptMasterKey(masterKey: Uint8Array, encryptionKey: Buffer, iv: Buffer): Promise<Uint8Array>;
|
|
182
|
-
/**
|
|
183
|
-
* Decrypts the master key using biometric-derived key
|
|
184
|
-
* @param {Uint8Array} encryptedKey - The encrypted master key
|
|
185
|
-
* @param {Buffer} decryptionKey - Key derived from biometric data
|
|
186
|
-
* @param {Buffer} iv - Initialization vector
|
|
187
|
-
* @returns {Promise<Uint8Array>} The decrypted master key
|
|
188
|
-
* @throws {Error} If decryption fails
|
|
189
|
-
* @example
|
|
190
|
-
* const masterKey = await edvService.decryptMasterKey(encryptedKey, decryptionKey, iv);
|
|
191
|
-
*/
|
|
192
|
-
decryptMasterKey(encryptedKey: Uint8Array, decryptionKey: Buffer, iv: Buffer): Promise<Uint8Array>;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Singleton instance of the EDV service
|
|
196
|
-
* @type {EDVService}
|
|
197
|
-
* @example
|
|
198
|
-
* import { edvService } from '@docknetwork/wallet-sdk-wasm/services/edv';
|
|
199
|
-
*
|
|
200
|
-
* // Generate keys and initialize
|
|
201
|
-
* const keys = await edvService.generateKeys();
|
|
202
|
-
* await edvService.initialize({
|
|
203
|
-
* ...keys,
|
|
204
|
-
* edvUrl: 'https://edv.example.com',
|
|
205
|
-
* authKey: 'auth-token'
|
|
206
|
-
* });
|
|
207
|
-
*
|
|
208
|
-
* // Store encrypted data
|
|
209
|
-
* await edvService.insert({
|
|
210
|
-
* id: 'credential-1',
|
|
211
|
-
* content: {
|
|
212
|
-
* type: 'VerifiableCredential',
|
|
213
|
-
* data: credentialData
|
|
214
|
-
* }
|
|
215
|
-
* });
|
|
216
|
-
*
|
|
217
|
-
* // Query encrypted data
|
|
218
|
-
* const credentials = await edvService.find({
|
|
219
|
-
* equals: { 'content.type': 'VerifiableCredential' }
|
|
220
|
-
* });
|
|
221
|
-
*
|
|
222
|
-
* // Update encrypted data
|
|
223
|
-
* await edvService.update({
|
|
224
|
-
* id: 'credential-1',
|
|
225
|
-
* content: updatedData
|
|
226
|
-
* });
|
|
227
|
-
*/
|
|
228
|
-
export declare const edvService: EDVService;
|
|
229
|
-
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/edv/service.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAAC,mBAAmB,EAAc,MAAM,WAAW,CAAC;AAC3D,OAAO,uBAAuB,MAAM,wDAAwD,CAAC;AAY7F,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,SAAS,YAAY,CAAC;AAEnC;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,gBAAgB,EAAE,uBAAuB,CAAC;IAE1C,OAAO,CAAC,WAAW,CAAmC;IAC/C,UAAU,EAAE,MAAM,CAAC;IAE1B,UAAU,aAwLG,GAAG,6BAoEkB,MAAM,cAAc,MAAM,KAAG,MAAM,qBAgBpD,MAAM,cACT,MAAM,KACjB,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,iBAqB1B,UAAU,iBACN,MAAM,MACjB,MAAM,KACT,OAAO,CAAC,UAAU,CAAC,KAzRpB;IAEF;;;OAGG;;IAKH;;;;;;;;;;;;;;;;;;OAkBG;IACG,UAAU,CAAC,EACf,OAAO,EACP,YAAY,EACZ,eAAe,EACf,MAAM,EACN,OAAO,GACR,EAAE,mBAAmB;IAuDtB;;;;;;;;;;;;;;OAcG;IACG,YAAY;;;;;IAgBlB;;;;;;;;;;OAUG;IACG,UAAU,CAAC,SAAS,EAAE,UAAU;;;;;IAetC;;;;;;OAMG;IACG,aAAa;IAInB;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,MAAM,EAAE,GAAG;IAIhB;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,MAAM,EAAE,GAAG;IAIlB;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,MAAM,EAAE,GAAG;IAUlB;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,GAAG;IAIlB;;;;;;;OAOG;IACH,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAKrE;;;;;;;;;OASG;IACG,4BAA4B,CAChC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAWvC;;;;;;;;OAQG;IACG,gBAAgB,CACpB,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,MAAM,EACrB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,UAAU,CAAC;IAqBtB;;;;;;;;;OASG;IACG,gBAAgB,CACpB,YAAY,EAAE,UAAU,EACxB,aAAa,EAAE,MAAM,EACrB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,UAAU,CAAC;CAwBvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,UAAU,EAAE,UAA6B,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const serviceName = "pex";
|
|
2
|
-
export declare const validation: {
|
|
3
|
-
filterCredentials: (params: FilterCredentialsParams) => void;
|
|
4
|
-
evaluateCredentials: (params: EvaluateCredentialsParams) => void;
|
|
5
|
-
evaluatePresentation: (params: EvaluatePresentationParams) => void;
|
|
6
|
-
};
|
|
7
|
-
export type FilterCredentialsParams = {
|
|
8
|
-
credentials: any[];
|
|
9
|
-
presentationDefinition: any;
|
|
10
|
-
holderDIDs: string[];
|
|
11
|
-
};
|
|
12
|
-
export type CreatePresentationParams = {
|
|
13
|
-
credentials: any[];
|
|
14
|
-
presentationDefinition: any;
|
|
15
|
-
holderDID: string;
|
|
16
|
-
};
|
|
17
|
-
export type EvaluatePresentationParams = {
|
|
18
|
-
presentation: any;
|
|
19
|
-
presentationDefinition: any;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/services/pex/config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,QAAQ,CAAC;AACjC,eAAO,MAAM,UAAU;gCACO,uBAAuB;kCAIrB,yBAAyB;mCAIxB,0BAA0B;CAI1D,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,sBAAsB,EAAE,GAAG,CAAC;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,sBAAsB,EAAE,GAAG,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,YAAY,EAAE,GAAG,CAAC;IAClB,sBAAsB,EAAE,GAAG,CAAC;CAC7B,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { EvaluatePresentationParams, FilterCredentialsParams, CreatePresentationParams } from './config';
|
|
2
|
-
/**
|
|
3
|
-
* @sphereon/pex is not able to handle optional attributes in the presentation definition
|
|
4
|
-
* https://github.com/Sphereon-Opensource/PEX/issues/150
|
|
5
|
-
* Any optional attribute in the presentation definition will cause the library to throw an error
|
|
6
|
-
* This function removes the optional attribute from the presentation definition
|
|
7
|
-
* This is a temporary workaround until the issue is fixed in the @sphereon/pex library
|
|
8
|
-
**/
|
|
9
|
-
export declare function removeOptionalAttribute(presentationDefinition: any): any;
|
|
10
|
-
declare class PEXService {
|
|
11
|
-
name: string;
|
|
12
|
-
constructor();
|
|
13
|
-
rpcMethods: (((params: FilterCredentialsParams) => import("@sphereon/pex").SelectResults) | ((params: EvaluatePresentationParams) => import("@sphereon/pex").EvaluationResults) | ((params: CreatePresentationParams) => IPresentation))[];
|
|
14
|
-
filterCredentials(params: FilterCredentialsParams): import("@sphereon/pex").SelectResults;
|
|
15
|
-
isCredentialSelectionValid(params: EvaluateCredentialsParams): boolean;
|
|
16
|
-
evaluatePresentation(params: EvaluatePresentationParams): import("@sphereon/pex").EvaluationResults;
|
|
17
|
-
presentationFrom(params: CreatePresentationParams): IPresentation;
|
|
18
|
-
}
|
|
19
|
-
export declare const pexService: PEXService;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/services/pex/service.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAKlB;;;;;;IAMI;AACJ,wBAAgB,uBAAuB,CAAC,sBAAsB,KAAA,OAgD7D;AAED,cAAM,UAAU;IACd,IAAI,EAAE,MAAM,CAAC;;IAMb,UAAU,aAOgB,uBAAuB,wDAwBpB,0BAA0B,4DAW9B,wBAAwB,uBArC/C;IAEF,iBAAiB,CAAC,MAAM,EAAE,uBAAuB;IAYjD,0BAA0B,CAAC,MAAM,EAAE,yBAAyB;IAY5D,oBAAoB,CAAC,MAAM,EAAE,0BAA0B;IAWvD,gBAAgB,CAAC,MAAM,EAAE,wBAAwB;CAgBlD;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const validation: {
|
|
2
|
-
sendMessage({ keyPairDoc, recipientDid, message }: SendMessageParams): void;
|
|
3
|
-
getMessages({ keyPairDocs, limit }: GetMessagesParams): void;
|
|
4
|
-
resolveDidcommMessage({ message, keyPairDocs }: ResolveDidcommMessageParams): void;
|
|
5
|
-
ackMessages({ did, messageIds }: AckMessagesParams): void;
|
|
6
|
-
registerDIDPushNotification({ keyPairDocs, token, }: RegisterDIDPushNotificationParams): void;
|
|
7
|
-
signJwt({ message, keyPairDocs }: ResolveDidcommMessageParams): void;
|
|
8
|
-
};
|
|
9
|
-
export declare const serviceName = "relayService";
|
|
10
|
-
export type GetMessagesParams = {
|
|
11
|
-
keyPairDocs: any;
|
|
12
|
-
limit: number;
|
|
13
|
-
};
|
|
14
|
-
export type SendMessageParams = {
|
|
15
|
-
keyPairDoc: any;
|
|
16
|
-
recipientDid: string;
|
|
17
|
-
message: string;
|
|
18
|
-
};
|
|
19
|
-
export type AckMessagesParams = {
|
|
20
|
-
did: string;
|
|
21
|
-
messageIds: string[];
|
|
22
|
-
};
|
|
23
|
-
export type ResolveDidcommMessageParams = {
|
|
24
|
-
message: any;
|
|
25
|
-
keyPairDocs: any[];
|
|
26
|
-
};
|
|
27
|
-
export type SignJwtParams = {
|
|
28
|
-
message: any;
|
|
29
|
-
keyPairDocs: any[];
|
|
30
|
-
};
|
|
31
|
-
export type RegisterDIDPushNotificationParams = {
|
|
32
|
-
keyPairDocs: any;
|
|
33
|
-
token: string;
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=configs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/services/relay-service/configs.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;uDAC4B,iBAAiB;wCAMhC,iBAAiB;oDAOL,2BAA2B;qCAI1C,iBAAiB;yDAO7C,iCAAiC;sCAIJ,2BAA2B;CAI5D,CAAC;AAEF,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAE1C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,GAAG,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,GAAG,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,GAAG,CAAC;IACb,WAAW,EAAE,GAAG,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,GAAG,CAAC;IACb,WAAW,EAAE,GAAG,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,WAAW,EAAE,GAAG,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RpcService } from '../rpc-service-client';
|
|
2
|
-
import { GetMessagesParams, SendMessageParams, ResolveDidcommMessageParams, RegisterDIDPushNotificationParams, AckMessagesParams } from './configs';
|
|
3
|
-
export declare class RelayServiceRpc extends RpcService {
|
|
4
|
-
constructor();
|
|
5
|
-
sendMessage(params: SendMessageParams): Promise<any>;
|
|
6
|
-
getMessages(params: GetMessagesParams): Promise<any>;
|
|
7
|
-
registerDIDPushNotification(params: RegisterDIDPushNotificationParams): Promise<any>;
|
|
8
|
-
resolveDidcommMessage(params: ResolveDidcommMessageParams): Promise<any>;
|
|
9
|
-
signJwt(params: ResolveDidcommMessageParams): Promise<any>;
|
|
10
|
-
ackMessages(params: AckMessagesParams): Promise<any>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=service-rpc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service-rpc.d.ts","sourceRoot":"","sources":["../../../../src/services/relay-service/service-rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,2BAA2B,EAC3B,iCAAiC,EAGjC,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,qBAAa,eAAgB,SAAQ,UAAU;;IAK7C,WAAW,CAAC,MAAM,EAAE,iBAAiB;IAKrC,WAAW,CAAC,MAAM,EAAE,iBAAiB;IAKrC,2BAA2B,CAAC,MAAM,EAAE,iCAAiC;IAKrE,qBAAqB,CAAC,MAAM,EAAE,2BAA2B;IAKzD,OAAO,CAAC,MAAM,EAAE,2BAA2B;IAK3C,WAAW,CAAC,MAAM,EAAE,iBAAiB;CAGtC"}
|