gdc-common-utils-ts 2.0.5 → 2.0.6
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.
|
@@ -67,7 +67,7 @@ export interface BuildDidcommPlaintextTransportMetadataInput {
|
|
|
67
67
|
* Optional explicit content type copied into the mirrored technical JWS
|
|
68
68
|
* header.
|
|
69
69
|
*
|
|
70
|
-
* Defaults to `application/didcomm-
|
|
70
|
+
* Defaults to `application/didcomm-plain+json`.
|
|
71
71
|
*/
|
|
72
72
|
contentType?: string;
|
|
73
73
|
}
|
|
@@ -103,7 +103,7 @@ export declare function buildOrganizationBindingInput(input: BuildOrganizationBi
|
|
|
103
103
|
* Transport rule:
|
|
104
104
|
* - in secure JOSE transport, these values belong in the protected JWS/JWE
|
|
105
105
|
* headers of the real envelope
|
|
106
|
-
* - in `application/didcomm-
|
|
106
|
+
* - in `application/didcomm-plain+json`, there is no signed outer
|
|
107
107
|
* envelope on the wire, so high-level SDK/BFF helpers may mirror the same
|
|
108
108
|
* technical key identifiers and public JWKs into `meta.jws.protected` and
|
|
109
109
|
* `meta.jwe.header`
|
|
@@ -122,7 +122,7 @@ export declare function buildDidcommPlaintextTransportMetadata(input: BuildDidco
|
|
|
122
122
|
* Transport note:
|
|
123
123
|
* - secure JOSE submission should place technical signing/encryption metadata
|
|
124
124
|
* in the protected headers of the real JWS/JWE envelope
|
|
125
|
-
* - demo `application/didcomm-
|
|
125
|
+
* - demo `application/didcomm-plain+json` flows may mirror those same
|
|
126
126
|
* values into plaintext `meta.jws.protected` / `meta.jwe.header` as a
|
|
127
127
|
* technical fallback expected by GW-compatible backends
|
|
128
128
|
* - that plaintext transport metadata must not replace the canonical
|
|
@@ -77,7 +77,7 @@ export function buildOrganizationBindingInput(input) {
|
|
|
77
77
|
* Transport rule:
|
|
78
78
|
* - in secure JOSE transport, these values belong in the protected JWS/JWE
|
|
79
79
|
* headers of the real envelope
|
|
80
|
-
* - in `application/didcomm-
|
|
80
|
+
* - in `application/didcomm-plain+json`, there is no signed outer
|
|
81
81
|
* envelope on the wire, so high-level SDK/BFF helpers may mirror the same
|
|
82
82
|
* technical key identifiers and public JWKs into `meta.jws.protected` and
|
|
83
83
|
* `meta.jwe.header`
|
|
@@ -98,7 +98,7 @@ export function buildDidcommPlaintextTransportMetadata(input) {
|
|
|
98
98
|
protected: {
|
|
99
99
|
alg: String(signingKey.alg || '').trim() || 'none',
|
|
100
100
|
kid: String(signingKey.kid || '').trim() || 'none',
|
|
101
|
-
cty: String(input.contentType || '').trim() || 'application/didcomm-
|
|
101
|
+
cty: String(input.contentType || '').trim() || 'application/didcomm-plain+json',
|
|
102
102
|
jwk: signingKey,
|
|
103
103
|
},
|
|
104
104
|
},
|
|
@@ -128,7 +128,7 @@ export function buildDidcommPlaintextTransportMetadata(input) {
|
|
|
128
128
|
* Transport note:
|
|
129
129
|
* - secure JOSE submission should place technical signing/encryption metadata
|
|
130
130
|
* in the protected headers of the real JWS/JWE envelope
|
|
131
|
-
* - demo `application/didcomm-
|
|
131
|
+
* - demo `application/didcomm-plain+json` flows may mirror those same
|
|
132
132
|
* values into plaintext `meta.jws.protected` / `meta.jwe.header` as a
|
|
133
133
|
* technical fallback expected by GW-compatible backends
|
|
134
134
|
* - that plaintext transport metadata must not replace the canonical
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CommunicationMode, type DidcommSubmitKind } from './didcomm-submit-policy';
|
|
2
|
-
export declare const DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE: "application/didcomm-
|
|
2
|
+
export declare const DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE: "application/didcomm-plain+json";
|
|
3
3
|
export declare const DIDCOMM_ENCRYPTED_JSON_MEDIA_TYPE: "application/didcomm-encrypted+json";
|
|
4
|
-
export declare const DIDCOMM_DEFAULT_ACCEPT_HEADER: "application/json, application/didcomm-
|
|
4
|
+
export declare const DIDCOMM_DEFAULT_ACCEPT_HEADER: "application/json, application/didcomm-plain+json, */*";
|
|
5
5
|
export declare const DIDCOMM_CONTENT_TYPE_BY_SUBMIT_KIND: Readonly<{
|
|
6
|
-
readonly plain: "application/didcomm-
|
|
6
|
+
readonly plain: "application/didcomm-plain+json";
|
|
7
7
|
readonly encrypted: "application/didcomm-encrypted+json";
|
|
8
8
|
}>;
|
|
9
9
|
export type DidcommFetchInit = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DIDCOMM_SUBMIT_KINDS, resolveDidcommSubmissionPlan, } from './didcomm-submit-policy.js';
|
|
2
|
-
export const DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE = 'application/didcomm-
|
|
2
|
+
export const DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE = 'application/didcomm-plain+json';
|
|
3
3
|
export const DIDCOMM_ENCRYPTED_JSON_MEDIA_TYPE = 'application/didcomm-encrypted+json';
|
|
4
4
|
export const DIDCOMM_DEFAULT_ACCEPT_HEADER = `application/json, ${DIDCOMM_PLAINTEXT_JSON_MEDIA_TYPE}, */*`;
|
|
5
5
|
export const DIDCOMM_CONTENT_TYPE_BY_SUBMIT_KIND = Object.freeze({
|