@interop/wallet-core 0.68.0 → 0.70.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/README.md +31 -41
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +12 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +9 -2
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +10 -0
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +14 -2
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +103 -57
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +254 -335
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +10 -5
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/mend.d.ts +19 -4
- package/dist/clientAnnex/mend.d.ts.map +1 -1
- package/dist/clientAnnex/mend.js +83 -35
- package/dist/clientAnnex/mend.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +3 -15
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +22 -3
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +13 -14
- package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
- package/dist/clientAnnex/rosterDeliveredEpochs.js +12 -12
- package/dist/clientAnnex/rosterDeliveredEpochs.js.map +1 -1
- package/dist/clients/grantState.d.ts +67 -0
- package/dist/clients/grantState.d.ts.map +1 -0
- package/dist/clients/grantState.js +72 -0
- package/dist/clients/grantState.js.map +1 -0
- package/dist/clients/index.d.ts +7 -0
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +6 -0
- package/dist/clients/index.js.map +1 -1
- package/dist/descriptors/index.d.ts +21 -46
- package/dist/descriptors/index.d.ts.map +1 -1
- package/dist/descriptors/index.js +21 -45
- package/dist/descriptors/index.js.map +1 -1
- package/dist/descriptors/logSource.d.ts +45 -56
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +64 -74
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/enrollment/connectCode.d.ts +4 -3
- package/dist/enrollment/connectCode.d.ts.map +1 -1
- package/dist/enrollment/connectCode.js +4 -3
- package/dist/enrollment/connectCode.js.map +1 -1
- package/dist/enrollment/index.d.ts +2 -2
- package/dist/enrollment/index.js +2 -2
- package/dist/enrollment/onboardingInvite.d.ts +1 -1
- package/dist/enrollment/onboardingInvite.js +1 -1
- package/dist/enrollment/onboardingResponse.js +1 -1
- package/dist/genesis/accountGenesis.d.ts +13 -1
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +11 -2
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/identity/index.d.ts +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/index.d.ts +4 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/dist/keyring/kdf.d.ts +33 -19
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +36 -25
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keys/collectionLogStore.d.ts +73 -0
- package/dist/keys/collectionLogStore.d.ts.map +1 -0
- package/dist/keys/collectionLogStore.js +60 -0
- package/dist/keys/collectionLogStore.js.map +1 -0
- package/dist/keys/index.d.ts +18 -6
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +18 -6
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +44 -6
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +51 -238
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/rosterStore.d.ts.map +1 -1
- package/dist/keys/rosterStore.js +2 -1
- package/dist/keys/rosterStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +67 -34
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +80 -30
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyCascade.d.ts +26 -1
- package/dist/keys/userKeyCascade.d.ts.map +1 -1
- package/dist/keys/userKeyCascade.js +29 -2
- package/dist/keys/userKeyCascade.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +5 -0
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +5 -0
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/keys/userKeyRosterCascade.d.ts +54 -16
- package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
- package/dist/keys/userKeyRosterCascade.js +50 -22
- package/dist/keys/userKeyRosterCascade.js.map +1 -1
- package/dist/recovery/continuation.d.ts +5 -4
- package/dist/recovery/continuation.d.ts.map +1 -1
- package/dist/recovery/continuation.js +14 -13
- package/dist/recovery/continuation.js.map +1 -1
- package/dist/resourceLog/controller.d.ts +18 -6
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +5 -3
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/document.d.ts +10 -2
- package/dist/resourceLog/document.d.ts.map +1 -1
- package/dist/resourceLog/document.js +1 -2
- package/dist/resourceLog/document.js.map +1 -1
- package/dist/resourceLog/errors.d.ts +17 -43
- package/dist/resourceLog/errors.d.ts.map +1 -1
- package/dist/resourceLog/errors.js +17 -50
- package/dist/resourceLog/errors.js.map +1 -1
- package/dist/resourceLog/index.d.ts +4 -1
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +4 -1
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/logClass.d.ts +69 -0
- package/dist/resourceLog/logClass.d.ts.map +1 -0
- package/dist/resourceLog/logClass.js +43 -0
- package/dist/resourceLog/logClass.js.map +1 -0
- package/dist/space/collections.d.ts +22 -2
- package/dist/space/collections.d.ts.map +1 -1
- package/dist/space/collections.js +18 -0
- package/dist/space/collections.js.map +1 -1
- package/dist/space/index.d.ts +8 -5
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +8 -5
- package/dist/space/index.js.map +1 -1
- package/dist/space/provisioning.d.ts +16 -6
- package/dist/space/provisioning.d.ts.map +1 -1
- package/dist/space/provisioning.js +11 -7
- package/dist/space/provisioning.js.map +1 -1
- package/dist/space/wasLink.d.ts +13 -2
- package/dist/space/wasLink.d.ts.map +1 -1
- package/dist/space/wasLink.js +28 -2
- package/dist/space/wasLink.js.map +1 -1
- package/dist/sync/engine.d.ts +4 -2
- package/dist/sync/engine.d.ts.map +1 -1
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync/index.d.ts +9 -6
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +8 -5
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/push.d.ts +0 -29
- package/dist/sync/push.d.ts.map +1 -1
- package/dist/sync/push.js +30 -28
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/types.d.ts +39 -21
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/sync/types.js +13 -7
- package/dist/sync/types.js.map +1 -1
- package/dist/unlock/index.d.ts +1 -1
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +8 -1
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +8 -1
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +81 -19
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +170 -30
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/webvh/did.d.ts +2 -4
- package/dist/webvh/did.d.ts.map +1 -1
- package/dist/webvh/did.js +2 -4
- package/dist/webvh/did.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +3 -2
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +2 -1
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +13 -7
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +14 -7
- package/dist/webvh/revokeClient.js.map +1 -1
- package/package.json +4 -19
- package/dist/descriptors/acquire.d.ts +0 -122
- package/dist/descriptors/acquire.d.ts.map +0 -1
- package/dist/descriptors/acquire.js +0 -100
- package/dist/descriptors/acquire.js.map +0 -1
- package/dist/descriptors/cipher.d.ts +0 -71
- package/dist/descriptors/cipher.d.ts.map +0 -1
- package/dist/descriptors/cipher.js +0 -109
- package/dist/descriptors/cipher.js.map +0 -1
- package/dist/descriptors/errors.d.ts +0 -44
- package/dist/descriptors/errors.d.ts.map +0 -1
- package/dist/descriptors/errors.js +0 -46
- package/dist/descriptors/errors.js.map +0 -1
- package/dist/descriptors/refresh.d.ts +0 -62
- package/dist/descriptors/refresh.d.ts.map +0 -1
- package/dist/descriptors/refresh.js +0 -69
- package/dist/descriptors/refresh.js.map +0 -1
- package/dist/request/appKey.d.ts +0 -295
- package/dist/request/appKey.d.ts.map +0 -1
- package/dist/request/appKey.js +0 -516
- package/dist/request/appKey.js.map +0 -1
- package/dist/request/capabilityRequest.d.ts +0 -41
- package/dist/request/capabilityRequest.d.ts.map +0 -1
- package/dist/request/capabilityRequest.js +0 -46
- package/dist/request/capabilityRequest.js.map +0 -1
- package/dist/request/classify.d.ts +0 -226
- package/dist/request/classify.d.ts.map +0 -1
- package/dist/request/classify.js +0 -416
- package/dist/request/classify.js.map +0 -1
- package/dist/request/composeVp.d.ts +0 -52
- package/dist/request/composeVp.d.ts.map +0 -1
- package/dist/request/composeVp.js +0 -176
- package/dist/request/composeVp.js.map +0 -1
- package/dist/request/ephemeralExchange.d.ts +0 -100
- package/dist/request/ephemeralExchange.d.ts.map +0 -1
- package/dist/request/ephemeralExchange.js +0 -230
- package/dist/request/ephemeralExchange.js.map +0 -1
- package/dist/request/exchangeClient.d.ts +0 -142
- package/dist/request/exchangeClient.d.ts.map +0 -1
- package/dist/request/exchangeClient.js +0 -241
- package/dist/request/exchangeClient.js.map +0 -1
- package/dist/request/index.d.ts +0 -59
- package/dist/request/index.d.ts.map +0 -1
- package/dist/request/index.js +0 -59
- package/dist/request/index.js.map +0 -1
- package/dist/request/interactionRequest.d.ts +0 -23
- package/dist/request/interactionRequest.d.ts.map +0 -1
- package/dist/request/interactionRequest.js +0 -46
- package/dist/request/interactionRequest.js.map +0 -1
- package/dist/request/interactionUrl.d.ts +0 -42
- package/dist/request/interactionUrl.d.ts.map +0 -1
- package/dist/request/interactionUrl.js +0 -104
- package/dist/request/interactionUrl.js.map +0 -1
- package/dist/request/matching.d.ts +0 -95
- package/dist/request/matching.d.ts.map +0 -1
- package/dist/request/matching.js +0 -205
- package/dist/request/matching.js.map +0 -1
- package/dist/request/onboarding.d.ts +0 -94
- package/dist/request/onboarding.d.ts.map +0 -1
- package/dist/request/onboarding.js +0 -167
- package/dist/request/onboarding.js.map +0 -1
- package/dist/request/parse.d.ts +0 -63
- package/dist/request/parse.d.ts.map +0 -1
- package/dist/request/parse.js +0 -153
- package/dist/request/parse.js.map +0 -1
- package/dist/request/presentationSuite.d.ts +0 -71
- package/dist/request/presentationSuite.d.ts.map +0 -1
- package/dist/request/presentationSuite.js +0 -143
- package/dist/request/presentationSuite.js.map +0 -1
- package/dist/request/processRequest.d.ts +0 -45
- package/dist/request/processRequest.d.ts.map +0 -1
- package/dist/request/processRequest.js +0 -147
- package/dist/request/processRequest.js.map +0 -1
- package/dist/request/queryPredicates.d.ts +0 -98
- package/dist/request/queryPredicates.d.ts.map +0 -1
- package/dist/request/queryPredicates.js +0 -107
- package/dist/request/queryPredicates.js.map +0 -1
- package/dist/request/types.d.ts +0 -257
- package/dist/request/types.d.ts.map +0 -1
- package/dist/request/types.js +0 -2
- package/dist/request/types.js.map +0 -1
- package/dist/request/walletInput.d.ts +0 -93
- package/dist/request/walletInput.d.ts.map +0 -1
- package/dist/request/walletInput.js +0 -179
- package/dist/request/walletInput.js.map +0 -1
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* The read-side classification of what an injected `DocCipher` throws when it
|
|
6
|
-
* cannot open an envelope.
|
|
7
|
-
*
|
|
8
|
-
* A decrypt has two distinguishable no-key outcomes, and a host that scans
|
|
9
|
-
* rows must tell them apart: an epoch the descriptor this reader holds does
|
|
10
|
-
* not list at all (`UnknownEpochError` -- possibly fresh data behind a stale
|
|
11
|
-
* descriptor, so a re-read may fix it), and an epoch the descriptor does list
|
|
12
|
-
* but this reader holds no key for (`KeyUnwrapError` -- real data, and
|
|
13
|
-
* permanently unreadable here, since re-reading the same descriptor cannot
|
|
14
|
-
* produce a key the reader was not given). Neither is corruption, so neither
|
|
15
|
-
* row may be treated as garbage.
|
|
16
|
-
*
|
|
17
|
-
* Both are matched on `err.name`, never `instanceof`: the cipher is an
|
|
18
|
-
* injected seam, and in a wallet whose `@interop/was-client` resolves to a
|
|
19
|
-
* second copy (a `link:` dev setup, a dedupe miss through a dependency tree)
|
|
20
|
-
* the class the cipher throws is not the class the caller imported. The cost
|
|
21
|
-
* of the miss lands on real data -- a scan that misses `KeyUnwrapError` drops
|
|
22
|
-
* the row into its undecryptable bucket, which a host is entitled to purge.
|
|
23
|
-
* Both classes assign their `name` explicitly, which is what makes the string
|
|
24
|
-
* a contract.
|
|
25
|
-
*
|
|
26
|
-
* The unknown-epoch half of the pair ships from `@interop/was-client/sync`
|
|
27
|
-
* as `isUnknownEpochError`, beside the class that assigns the name. This half
|
|
28
|
-
* stays here on policy rather than on class adjacency: it classifies a
|
|
29
|
-
* roster-membership failure the wallet layer owns, and no sync driver
|
|
30
|
-
* dispatches on it. The file sits beside the cipher that raises the error and
|
|
31
|
-
* stays import-free for the same reason `resourceLog/errors.ts` does.
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* Whether an error is the cipher's not-a-recipient signal (`KeyUnwrapError`):
|
|
35
|
-
* the envelope's epoch IS on the descriptor this reader holds, but the reader
|
|
36
|
-
* has no key for it -- never a recipient of that epoch, or removed and the
|
|
37
|
-
* epoch rotated since. Real data, unreadable by this wallet, and never
|
|
38
|
-
* garbage: a caller skips such a row and leaves it in place.
|
|
39
|
-
*
|
|
40
|
-
* @param err {unknown}
|
|
41
|
-
* @returns {boolean}
|
|
42
|
-
*/
|
|
43
|
-
export function isKeyUnwrapError(err) {
|
|
44
|
-
return err?.name === 'KeyUnwrapError';
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/descriptors/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAQ,GAAiC,EAAE,IAAI,KAAK,gBAAgB,CAAA;AACtE,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* The unknown-epoch refresh policy: an epoch rotation emits no change-feed
|
|
6
|
-
* entry, so a cipher built from a cached descriptor can meet envelopes stamped
|
|
7
|
-
* with an epoch it has never seen. The remedy is one re-read of the
|
|
8
|
-
* Collection Description plus a cipher rebuild and a single retry -- and the
|
|
9
|
-
* policy guards that remedy to ONCE per collection per session, so a
|
|
10
|
-
* genuinely foreign envelope (one no descriptor will ever route) cannot drive
|
|
11
|
-
* a refetch loop, let alone a refetch per resource.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Tracks which collections have already spent their one refresh this session,
|
|
15
|
-
* and runs reads under the refresh-and-retry-once rule. One instance per
|
|
16
|
-
* session (it IS the session scope of the guard); the injected `refresh` does
|
|
17
|
-
* the host's whole swap -- re-acquire the descriptor(s), rebuild the
|
|
18
|
-
* cipher(s), and install them wherever the host keeps them.
|
|
19
|
-
*/
|
|
20
|
-
export declare class DescriptorRefreshPolicy {
|
|
21
|
-
#private;
|
|
22
|
-
constructor({ refresh }: {
|
|
23
|
-
refresh: (options: {
|
|
24
|
-
collectionId: string;
|
|
25
|
-
}) => Promise<void>;
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* Whether a collection still has its one refresh this session.
|
|
29
|
-
*/
|
|
30
|
-
shouldRefresh({ collectionId }: {
|
|
31
|
-
collectionId: string;
|
|
32
|
-
}): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Runs a read that reports whether it skipped unknown-epoch rows; on the
|
|
35
|
-
* first such report for a collection this session, spends the collection's
|
|
36
|
-
* refresh (descriptor re-read + cipher swap, via the injected `refresh`) and
|
|
37
|
-
* re-reads once. A later unknown-epoch report for the same collection
|
|
38
|
-
* returns the read's value as-is.
|
|
39
|
-
*
|
|
40
|
-
* @param options {object}
|
|
41
|
-
* @param options.collectionId {string}
|
|
42
|
-
* @param options.read {function} the read, reporting `unknownEpoch`
|
|
43
|
-
* @returns {Promise<T>} the (possibly re-read) value
|
|
44
|
-
*/
|
|
45
|
-
readWithRefresh<T>({ collectionId, read }: {
|
|
46
|
-
collectionId: string;
|
|
47
|
-
read: () => Promise<{
|
|
48
|
-
value: T;
|
|
49
|
-
unknownEpoch: boolean;
|
|
50
|
-
}>;
|
|
51
|
-
}): Promise<T>;
|
|
52
|
-
/**
|
|
53
|
-
* Re-arms the guard -- for one collection, or (with no argument) for all.
|
|
54
|
-
* Call when a fresh descriptor is installed by some other path (a share,
|
|
55
|
-
* unshare, or recipient rotation this session performed itself), since the
|
|
56
|
-
* next unknown-epoch read is then evidence of a NEW rotation elsewhere.
|
|
57
|
-
*/
|
|
58
|
-
reset(options?: {
|
|
59
|
-
collectionId?: string;
|
|
60
|
-
}): void;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=refresh.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../../src/descriptors/refresh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AAEH;;;;;;GAMG;AACH,qBAAa,uBAAuB;;gBAKtB,EACV,OAAO,EACR,EAAE;QACD,OAAO,EAAE,CAAC,OAAO,EAAE;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KAC9D;IAID;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;IAIlE;;;;;;;;;;;OAWG;IACG,eAAe,CAAC,CAAC,EAAE,EACvB,YAAY,EACZ,IAAI,EACL,EAAE;QACD,YAAY,EAAE,MAAM,CAAA;QACpB,IAAI,EAAE,MAAM,OAAO,CAAC;YAAE,KAAK,EAAE,CAAC,CAAC;YAAC,YAAY,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KACzD,GAAG,OAAO,CAAC,CAAC,CAAC;IAUd;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;CAOjD"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* The unknown-epoch refresh policy: an epoch rotation emits no change-feed
|
|
6
|
-
* entry, so a cipher built from a cached descriptor can meet envelopes stamped
|
|
7
|
-
* with an epoch it has never seen. The remedy is one re-read of the
|
|
8
|
-
* Collection Description plus a cipher rebuild and a single retry -- and the
|
|
9
|
-
* policy guards that remedy to ONCE per collection per session, so a
|
|
10
|
-
* genuinely foreign envelope (one no descriptor will ever route) cannot drive
|
|
11
|
-
* a refetch loop, let alone a refetch per resource.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Tracks which collections have already spent their one refresh this session,
|
|
15
|
-
* and runs reads under the refresh-and-retry-once rule. One instance per
|
|
16
|
-
* session (it IS the session scope of the guard); the injected `refresh` does
|
|
17
|
-
* the host's whole swap -- re-acquire the descriptor(s), rebuild the
|
|
18
|
-
* cipher(s), and install them wherever the host keeps them.
|
|
19
|
-
*/
|
|
20
|
-
export class DescriptorRefreshPolicy {
|
|
21
|
-
#refresh;
|
|
22
|
-
// Collection ids whose one refresh this session is already spent.
|
|
23
|
-
#refreshed = new Set();
|
|
24
|
-
constructor({ refresh }) {
|
|
25
|
-
this.#refresh = refresh;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Whether a collection still has its one refresh this session.
|
|
29
|
-
*/
|
|
30
|
-
shouldRefresh({ collectionId }) {
|
|
31
|
-
return !this.#refreshed.has(collectionId);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Runs a read that reports whether it skipped unknown-epoch rows; on the
|
|
35
|
-
* first such report for a collection this session, spends the collection's
|
|
36
|
-
* refresh (descriptor re-read + cipher swap, via the injected `refresh`) and
|
|
37
|
-
* re-reads once. A later unknown-epoch report for the same collection
|
|
38
|
-
* returns the read's value as-is.
|
|
39
|
-
*
|
|
40
|
-
* @param options {object}
|
|
41
|
-
* @param options.collectionId {string}
|
|
42
|
-
* @param options.read {function} the read, reporting `unknownEpoch`
|
|
43
|
-
* @returns {Promise<T>} the (possibly re-read) value
|
|
44
|
-
*/
|
|
45
|
-
async readWithRefresh({ collectionId, read }) {
|
|
46
|
-
const first = await read();
|
|
47
|
-
if (first.unknownEpoch && this.shouldRefresh({ collectionId })) {
|
|
48
|
-
this.#refreshed.add(collectionId);
|
|
49
|
-
await this.#refresh({ collectionId });
|
|
50
|
-
return (await read()).value;
|
|
51
|
-
}
|
|
52
|
-
return first.value;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Re-arms the guard -- for one collection, or (with no argument) for all.
|
|
56
|
-
* Call when a fresh descriptor is installed by some other path (a share,
|
|
57
|
-
* unshare, or recipient rotation this session performed itself), since the
|
|
58
|
-
* next unknown-epoch read is then evidence of a NEW rotation elsewhere.
|
|
59
|
-
*/
|
|
60
|
-
reset(options) {
|
|
61
|
-
if (options?.collectionId === undefined) {
|
|
62
|
-
this.#refreshed.clear();
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
this.#refreshed.delete(options.collectionId);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=refresh.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refresh.js","sourceRoot":"","sources":["../../src/descriptors/refresh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AAEH;;;;;;GAMG;AACH,MAAM,OAAO,uBAAuB;IACzB,QAAQ,CAAsD;IACvE,kEAAkE;IACzD,UAAU,GAAG,IAAI,GAAG,EAAU,CAAA;IAEvC,YAAY,EACV,OAAO,EAGR;QACC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzB,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,EAA4B;QACtD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IAC3C,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,eAAe,CAAI,EACvB,YAAY,EACZ,IAAI,EAIL;QACC,MAAM,KAAK,GAAG,MAAM,IAAI,EAAE,CAAA;QAC1B,IAAI,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;YAC/D,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;YACjC,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC,CAAA;YACrC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,KAAK,CAAA;QAC7B,CAAC;QACD,OAAO,KAAK,CAAC,KAAK,CAAA;IACpB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAmC;QACvC,IAAI,OAAO,EAAE,YAAY,KAAK,SAAS,EAAE,CAAC;YACxC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;QACzB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;QAC9C,CAAC;IACH,CAAC;CACF"}
|
package/dist/request/appKey.d.ts
DELETED
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import type { IDocumentLoader, IVerifiableCredential } from '@interop/data-integrity-core';
|
|
2
|
-
import { CONTEXT_URL_V1 as APP_CONNECT_CONTEXT_URL } from 'byoe-context';
|
|
3
|
-
import type { IAppConnectApp } from './types.js';
|
|
4
|
-
/**
|
|
5
|
-
* The key name mixed into seed derivation. Unlike the handle this is
|
|
6
|
-
* load-bearing: it is the HMAC message in `CapabilityAgent` derivation, so the
|
|
7
|
-
* exact string is a pinned input of the App Connect key-derivation rule --
|
|
8
|
-
* every existing app-key credential's identity depends on it.
|
|
9
|
-
*/
|
|
10
|
-
export declare const APP_KEY_KEY_NAME = "app-key";
|
|
11
|
-
/**
|
|
12
|
-
* The marker type every app-key credential carries, mapped to one stable IRI
|
|
13
|
-
* for every application. It makes "presents as an app key" a term check rather
|
|
14
|
-
* than a shape heuristic, which is what the store-time refusal
|
|
15
|
-
* ({@link assertStorableAppKey}) and the match path key off.
|
|
16
|
-
*
|
|
17
|
-
* It is a self-declaration, not evidence: the `type` array of a planted
|
|
18
|
-
* credential is attacker-controlled like the rest of it. The seed-to-subject
|
|
19
|
-
* binding ({@link appKeySeedBindsSubject}) authenticates only a credential's
|
|
20
|
-
* internal consistency, never its provenance (a fully attacker-generated
|
|
21
|
-
* credential binds perfectly). That is exactly why external ingest refuses on
|
|
22
|
-
* the marker alone, binding or not ({@link assertStorableAppKey}): app keys
|
|
23
|
-
* are wallet-minted, never imported.
|
|
24
|
-
*/
|
|
25
|
-
export declare const APP_KEY_CREDENTIAL_TYPE = "AppKeyCredential";
|
|
26
|
-
/**
|
|
27
|
-
* The fixed `type` array of every app-key credential: exactly two entries, in
|
|
28
|
-
* this order, identical for every application. Which application a credential
|
|
29
|
-
* belongs to is the `credentialSubject.appUrl` claim, not a type.
|
|
30
|
-
*/
|
|
31
|
-
export declare const APP_KEY_TYPE_ARRAY: readonly string[];
|
|
32
|
-
/**
|
|
33
|
-
* The hosted App Connect context URL every app-key credential carries as the
|
|
34
|
-
* second entry of its `@context` array (after the VC 1.1 context URL). The
|
|
35
|
-
* context document defines the profile's BYOE terms; document loaders resolve
|
|
36
|
-
* it from the bundled `byoe-context` document, so no fetch happens at sign or
|
|
37
|
-
* verification time.
|
|
38
|
-
*/
|
|
39
|
-
export { APP_CONNECT_CONTEXT_URL };
|
|
40
|
-
/**
|
|
41
|
-
* Whether a credential presents as an app key -- that is, carries the
|
|
42
|
-
* {@link APP_KEY_CREDENTIAL_TYPE} marker in its `type` array. Says nothing
|
|
43
|
-
* about whether it IS one; that is the seed-to-subject binding's job.
|
|
44
|
-
*
|
|
45
|
-
* @param credential {IVerifiableCredential}
|
|
46
|
-
* @returns {boolean}
|
|
47
|
-
*/
|
|
48
|
-
export declare function presentsAsAppKey(credential: IVerifiableCredential): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* The refusal a store path raises for a credential that presents as an app key
|
|
51
|
-
* but arrived from outside the wallet's own mint path. A distinct class so the
|
|
52
|
-
* UI can show its own translated wording rather than this message.
|
|
53
|
-
*/
|
|
54
|
-
export declare class AppKeyRefusedError extends Error {
|
|
55
|
-
constructor();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Refuses any credential that presents as an app key, unconditionally --
|
|
59
|
-
* whether or not it binds to its own seed. Called on every path that puts a
|
|
60
|
-
* credential in the store from outside the wallet (a CHAPI store offer, a
|
|
61
|
-
* URL / QR / manual-paste import), so an externally arriving app key never
|
|
62
|
-
* reaches the store, the credential list, or the user's Space.
|
|
63
|
-
*
|
|
64
|
-
* The seed-to-subject binding ({@link appKeySeedBindsSubject}) authenticates
|
|
65
|
-
* only the credential's internal consistency, not its provenance: a fully
|
|
66
|
-
* attacker-generated credential binds perfectly (a fresh seed, the victim
|
|
67
|
-
* app's `origin` and `appUrl`, self-issued), and storing it would make its
|
|
68
|
-
* DID the controller the wallet delegates the user's storage to. So there is
|
|
69
|
-
* no "binds, so it stores" carve-out here: app-key credentials are
|
|
70
|
-
* wallet-minted, never imported, and only the wallet's own mint path may
|
|
71
|
-
* store one.
|
|
72
|
-
*
|
|
73
|
-
* A credential with no marker is left alone, so an ordinary credential that
|
|
74
|
-
* merely happens to carry a `seed` or `origin` claim is never caught.
|
|
75
|
-
*
|
|
76
|
-
* @param credential {IVerifiableCredential}
|
|
77
|
-
* @returns {void} throws the refusal reason
|
|
78
|
-
*/
|
|
79
|
-
export declare function assertStorableAppKey(credential: IVerifiableCredential): void;
|
|
80
|
-
/**
|
|
81
|
-
* Whether an app-key credential's subject DID is the one its own seed derives
|
|
82
|
-
* -- the binding that makes the credential an app key rather than merely a
|
|
83
|
-
* self-issued claim to be one. Self-issuance is a weak signal (anyone can
|
|
84
|
-
* self-issue); this is the strong one, and it is fully local: the credential
|
|
85
|
-
* carries the seed, so re-derive with the same call `mintAppKeyCredential`
|
|
86
|
-
* uses and compare. Fails closed on an absent, non-base64url, or otherwise
|
|
87
|
-
* unusable seed rather than throwing out of the match path.
|
|
88
|
-
*
|
|
89
|
-
* @param credential {IVerifiableCredential}
|
|
90
|
-
* @returns {Promise<boolean>}
|
|
91
|
-
*/
|
|
92
|
-
export declare function appKeySeedBindsSubject(credential: IVerifiableCredential): Promise<boolean>;
|
|
93
|
-
/**
|
|
94
|
-
* Raised by {@link assertMintedAppKey} when a credential offered to the mint
|
|
95
|
-
* path's store door does not carry the mint invariants. Reaching it means a
|
|
96
|
-
* caller tried to route a foreign credential through the wallet's own mint
|
|
97
|
-
* door -- a programming error, not a user-facing refusal, so it is not
|
|
98
|
-
* translated like {@link AppKeyRefusedError}.
|
|
99
|
-
*/
|
|
100
|
-
export declare class AppKeyMintInvariantError extends Error {
|
|
101
|
-
constructor();
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Asserts the mint invariants on a credential the wallet claims to have just
|
|
105
|
-
* minted: it presents as an app key (the marker type) and its subject DID
|
|
106
|
-
* re-derives from the seed it carries. The mirror image of
|
|
107
|
-
* {@link assertStorableAppKey} -- external ingest refuses every marker
|
|
108
|
-
* credential, the mint door stores only credentials that carry the full mint
|
|
109
|
-
* shape -- kept beside it so the two halves of the app-key store policy live
|
|
110
|
-
* in one module.
|
|
111
|
-
*
|
|
112
|
-
* @param credential {IVerifiableCredential}
|
|
113
|
-
* @returns {Promise<void>} throws {@link AppKeyMintInvariantError}
|
|
114
|
-
*/
|
|
115
|
-
export declare function assertMintedAppKey(credential: IVerifiableCredential): Promise<void>;
|
|
116
|
-
/**
|
|
117
|
-
* The app-key candidates for an app + origin, latest-first: everything the
|
|
118
|
-
* cheap, synchronous predicates accept, so only plausible candidates pay for
|
|
119
|
-
* a key derivation. A candidate must carry the marker (required, not merely
|
|
120
|
-
* tolerated: a credential can then only reach the delegation path by carrying
|
|
121
|
-
* it, which is exactly what the store-time refusal screens), name the
|
|
122
|
-
* request's `appUrl` in `credentialSubject.appUrl` (both sides in serialized
|
|
123
|
-
* form -- the wallet mints the claim serialized, so the comparison is an
|
|
124
|
-
* exact string match), be self-issued, and be bound to the attested
|
|
125
|
-
* requesting origin. Sorting here (rather than after the binding check) lets
|
|
126
|
-
* {@link findAppKeyCredential} stop at the newest credential that binds.
|
|
127
|
-
*
|
|
128
|
-
* The legacy path ({@link findLegacyAppKeyCredential}) is the same chain
|
|
129
|
-
* with `appUrl` undefined: it selects the credentials carrying no
|
|
130
|
-
* `credentialSubject.appUrl` claim, so one predicate set and one sort serve
|
|
131
|
-
* both paths and a hardening applied here reaches the legacy path too.
|
|
132
|
-
*
|
|
133
|
-
* @param options {object}
|
|
134
|
-
* @param options.credentials {IVerifiableCredential[]}
|
|
135
|
-
* @param [options.appUrl] {string} - The request's `app.appUrl` in
|
|
136
|
-
* serialized form; undefined selects the legacy credentials that carry no
|
|
137
|
-
* `appUrl` claim.
|
|
138
|
-
* @param options.origin {string} - The attested requesting origin.
|
|
139
|
-
* @returns {IVerifiableCredential[]}
|
|
140
|
-
*/
|
|
141
|
-
export declare function appKeyCandidates({ credentials, appUrl, origin }: {
|
|
142
|
-
credentials: IVerifiableCredential[];
|
|
143
|
-
appUrl: string | undefined;
|
|
144
|
-
origin: string;
|
|
145
|
-
}): IVerifiableCredential[];
|
|
146
|
-
/**
|
|
147
|
-
* The current (latest) app-key credential for an app + origin, or undefined
|
|
148
|
-
* when the user has none -- which signals first run for that (origin,
|
|
149
|
-
* `appUrl`) pair.
|
|
150
|
-
*
|
|
151
|
-
* @param options {object}
|
|
152
|
-
* @param options.credentials {IVerifiableCredential[]}
|
|
153
|
-
* @param options.appUrl {string} - The request's `app.appUrl` in serialized
|
|
154
|
-
* form.
|
|
155
|
-
* @param options.origin {string} - The attested requesting origin.
|
|
156
|
-
* @returns {Promise<IVerifiableCredential | undefined>}
|
|
157
|
-
*/
|
|
158
|
-
export declare function findAppKeyCredential({ credentials, appUrl, origin }: {
|
|
159
|
-
credentials: IVerifiableCredential[];
|
|
160
|
-
appUrl: string;
|
|
161
|
-
origin: string;
|
|
162
|
-
}): Promise<IVerifiableCredential | undefined>;
|
|
163
|
-
/**
|
|
164
|
-
* Assembles and signs an app-key credential for a seed the caller supplies:
|
|
165
|
-
* the fixed two-entry type array, the hosted App Connect context URL, issuer
|
|
166
|
-
* and subject both the seed-derived DID, and the `seed` / `appUrl` / `origin`
|
|
167
|
-
* claims. `vc.issue` auto-fills `issuanceDate` in the canonical UTC form the
|
|
168
|
-
* ranking expects. Shared by the fresh mint and the legacy re-issue, and
|
|
169
|
-
* exported for an application's own self-issue path (dev-grant provisioning,
|
|
170
|
-
* tests), so the credential's shape is maintained in one place.
|
|
171
|
-
*
|
|
172
|
-
* @param options {object}
|
|
173
|
-
* @param options.seedBytes {Uint8Array} - The 32-byte master seed; the
|
|
174
|
-
* derived did:key is both issuer and subject.
|
|
175
|
-
* @param options.appName {string} - Shown on the credential (`name`, and the
|
|
176
|
-
* default `description`).
|
|
177
|
-
* @param options.appUrl {string} - The app's canonical URL, already in
|
|
178
|
-
* serialized form.
|
|
179
|
-
* @param options.origin {string} - The attested requesting origin.
|
|
180
|
-
* @param [options.description] {string} - Overrides the default consent
|
|
181
|
-
* sentence (the legacy re-issue carries the old credential's forward).
|
|
182
|
-
* @param [options.documentLoader] {IDocumentLoader} - JSON-LD loader; defaults
|
|
183
|
-
* to the shared security loader.
|
|
184
|
-
* @returns {Promise<{ credential: IVerifiableCredential; subjectDid: string }>}
|
|
185
|
-
*/
|
|
186
|
-
export declare function issueAppKeyCredential({ seedBytes, appName, appUrl, origin, description, documentLoader: loader }: {
|
|
187
|
-
seedBytes: Uint8Array;
|
|
188
|
-
appName: string;
|
|
189
|
-
appUrl: string;
|
|
190
|
-
origin: string;
|
|
191
|
-
description?: string;
|
|
192
|
-
documentLoader?: IDocumentLoader;
|
|
193
|
-
}): Promise<{
|
|
194
|
-
credential: IVerifiableCredential;
|
|
195
|
-
subjectDid: string;
|
|
196
|
-
}>;
|
|
197
|
-
/**
|
|
198
|
-
* Mints a fresh app-key credential for an app + origin: generates a 32-byte
|
|
199
|
-
* seed, derives the seed's did:key, and self-issues the credential (issuer ==
|
|
200
|
-
* subject == the seed-derived DID) with the `credentialSubject.appUrl` claim
|
|
201
|
-
* set from the validated request value. Does NOT store the result -- the
|
|
202
|
-
* caller stores it before delegating, so a failed delegation is found as
|
|
203
|
-
* "returning" on the next attempt rather than minting a second identity.
|
|
204
|
-
*
|
|
205
|
-
* @param options {object}
|
|
206
|
-
* @param options.app {IAppConnectApp} - The validated app identity; its
|
|
207
|
-
* `appUrl` must already be in serialized form (`appConnectRequestOf`
|
|
208
|
-
* guarantees this).
|
|
209
|
-
* @param options.origin {string} - The attested requesting origin, never a
|
|
210
|
-
* value taken from the request body.
|
|
211
|
-
* @returns {Promise<{ credential: IVerifiableCredential; subjectDid: string }>}
|
|
212
|
-
*/
|
|
213
|
-
export declare function mintAppKeyCredential({ app, origin }: {
|
|
214
|
-
app: IAppConnectApp;
|
|
215
|
-
origin: string;
|
|
216
|
-
}): Promise<{
|
|
217
|
-
credential: IVerifiableCredential;
|
|
218
|
-
subjectDid: string;
|
|
219
|
-
}>;
|
|
220
|
-
/**
|
|
221
|
-
* The latest legacy app-key credential for an origin, or undefined. A legacy
|
|
222
|
-
* credential predates the `appUrl` model: it carries the marker and a
|
|
223
|
-
* per-app third type entry, but no `credentialSubject.appUrl` claim. Its
|
|
224
|
-
* identity was scoped to (origin, `credentialType`), and the request no
|
|
225
|
-
* longer carries a `credentialType` to select on, so the mapping is
|
|
226
|
-
* recoverable only when it is unambiguous: when the binding legacy candidates
|
|
227
|
-
* for the origin all name one subject DID. Two distinct legacy identities on
|
|
228
|
-
* one origin yield undefined rather than a guess -- re-issuing the wrong one
|
|
229
|
-
* would hand one application another's identity, which is worse than the
|
|
230
|
-
* caller treating the connect as a first run.
|
|
231
|
-
*
|
|
232
|
-
* @param options {object}
|
|
233
|
-
* @param options.credentials {IVerifiableCredential[]}
|
|
234
|
-
* @param options.origin {string} - The attested requesting origin.
|
|
235
|
-
* @returns {Promise<IVerifiableCredential | undefined>}
|
|
236
|
-
*/
|
|
237
|
-
export declare function findLegacyAppKeyCredential({ credentials, origin }: {
|
|
238
|
-
credentials: IVerifiableCredential[];
|
|
239
|
-
origin: string;
|
|
240
|
-
}): Promise<IVerifiableCredential | undefined>;
|
|
241
|
-
/**
|
|
242
|
-
* Re-issues a legacy app-key credential in place under the `appUrl` model:
|
|
243
|
-
* the same seed (so the same derived DID -- the app's identity and its
|
|
244
|
-
* encrypted-data access are preserved), the fixed two-entry type array, the
|
|
245
|
-
* hosted App Connect context URL, and the `credentialSubject.appUrl` claim set
|
|
246
|
-
* from the validated request value. A fresh mint would roll the seed and orphan
|
|
247
|
-
* the identity, and must never be the migration path. The fresh
|
|
248
|
-
* `issuanceDate` ranks the re-issued credential ahead of the legacy one, so
|
|
249
|
-
* subsequent connects match it directly.
|
|
250
|
-
*
|
|
251
|
-
* Does NOT store the result; the caller stores it through the mint door
|
|
252
|
-
* (it satisfies {@link assertMintedAppKey}) and may retire the legacy record.
|
|
253
|
-
*
|
|
254
|
-
* @param options {object}
|
|
255
|
-
* @param options.credential {IVerifiableCredential} - The legacy credential;
|
|
256
|
-
* it must bind per {@link appKeySeedBindsSubject} and be bound to `origin`,
|
|
257
|
-
* else this throws {@link AppKeyMintInvariantError}.
|
|
258
|
-
* @param options.app {IAppConnectApp} - The validated app identity; its
|
|
259
|
-
* `appUrl` must already be in serialized form.
|
|
260
|
-
* @param options.origin {string} - The attested requesting origin.
|
|
261
|
-
* @returns {Promise<{ credential: IVerifiableCredential; subjectDid: string }>}
|
|
262
|
-
*/
|
|
263
|
-
export declare function reissueAppKeyCredential({ credential, app, origin }: {
|
|
264
|
-
credential: IVerifiableCredential;
|
|
265
|
-
app: IAppConnectApp;
|
|
266
|
-
origin: string;
|
|
267
|
-
}): Promise<{
|
|
268
|
-
credential: IVerifiableCredential;
|
|
269
|
-
subjectDid: string;
|
|
270
|
-
}>;
|
|
271
|
-
/**
|
|
272
|
-
* The subject DID (`credentialSubject.id`) of an app-key credential, or
|
|
273
|
-
* undefined. For a valid app-key credential this equals the issuer.
|
|
274
|
-
*
|
|
275
|
-
* @param credential {IVerifiableCredential}
|
|
276
|
-
* @returns {string | undefined}
|
|
277
|
-
*/
|
|
278
|
-
export declare function appKeySubjectDid(credential: IVerifiableCredential): string | undefined;
|
|
279
|
-
/**
|
|
280
|
-
* The origin (`credentialSubject.origin`) an app-key credential is bound to,
|
|
281
|
-
* when present.
|
|
282
|
-
*
|
|
283
|
-
* @param credential {IVerifiableCredential}
|
|
284
|
-
* @returns {string | undefined}
|
|
285
|
-
*/
|
|
286
|
-
export declare function appKeyOrigin(credential: IVerifiableCredential): string | undefined;
|
|
287
|
-
/**
|
|
288
|
-
* The application URL (`credentialSubject.appUrl`) an app-key credential is
|
|
289
|
-
* scoped to, when present. Absent on a legacy (pre-`appUrl`) credential.
|
|
290
|
-
*
|
|
291
|
-
* @param credential {IVerifiableCredential}
|
|
292
|
-
* @returns {string | undefined}
|
|
293
|
-
*/
|
|
294
|
-
export declare function appKeyAppUrl(credential: IVerifiableCredential): string | undefined;
|
|
295
|
-
//# sourceMappingURL=appKey.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appKey.d.ts","sourceRoot":"","sources":["../../src/request/appKey.ts"],"names":[],"mappings":"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"}
|