@fedify/fedify 2.1.0-dev.405 → 2.1.0-dev.408
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/dist/{builder-BWjjqZUb.js → builder-DqJQtxW4.js} +3 -3
- package/dist/client-BxMZiQaD.d.ts +224 -0
- package/dist/client-C97KOq3x.d.cts +222 -0
- package/dist/compat/mod.d.cts +6 -6
- package/dist/compat/mod.d.ts +6 -6
- package/dist/compat/transformers.test.js +11 -11
- package/dist/context-Dy5ro7zD.d.ts +2515 -0
- package/dist/context-o4OhjMHe.d.cts +2513 -0
- package/dist/{deno-CPzYQsYM.js → deno-D_VnPW-Y.js} +1 -1
- package/dist/{docloader-Cd_GiG4f.js → docloader-D7xSU1xb.js} +2 -2
- package/dist/federation/builder.test.js +3 -3
- package/dist/federation/handler.test.js +11 -11
- package/dist/federation/idempotency.test.js +11 -11
- package/dist/federation/inbox.test.js +2 -2
- package/dist/federation/middleware.test.js +11 -11
- package/dist/federation/mod.cjs +4 -4
- package/dist/federation/mod.d.cts +6 -6
- package/dist/federation/mod.d.ts +6 -6
- package/dist/federation/mod.js +4 -4
- package/dist/federation/send.test.js +5 -5
- package/dist/federation/webfinger.test.js +11 -11
- package/dist/{http-CEU_3RKK.cjs → http-B-epypwc.cjs} +1 -1
- package/dist/{http-CQ_YeeLl.js → http-C3oMHumD.js} +1 -1
- package/dist/{http-Du61KL0a.js → http-CFILUWFj.js} +2 -2
- package/dist/http-Cz3MlXAZ.d.cts +244 -0
- package/dist/http-DkHdFfrc.d.ts +246 -0
- package/dist/{inbox-DtFkWTEQ.js → inbox-FsU-ifET.js} +1 -1
- package/dist/{key-BzVQ8XYL.js → key-Cw2GXzkv.js} +1 -1
- package/dist/kv-BL4nlICN.d.cts +110 -0
- package/dist/kv-DXEUEP6z.d.ts +113 -0
- package/dist/{kv-cache-C8OMhVH8.js → kv-cache-K6GW8-uS.js} +1 -1
- package/dist/{kv-cache-DBmcvmxf.cjs → kv-cache-YG3yAJRb.cjs} +1 -1
- package/dist/{ld-CwNrP01q.js → ld-D4-RbyP8.js} +2 -2
- package/dist/{middleware-CRWZ3XGF.js → middleware-ByN4qQt0.js} +4 -4
- package/dist/{middleware-HEyCssxh.js → middleware-CVGms5AS.js} +11 -11
- package/dist/{middleware-Cw6aAfgI.js → middleware-Co3x1vLV.js} +10 -10
- package/dist/{middleware-C6hCNOnW.cjs → middleware-CzNcdhiV.cjs} +4 -4
- package/dist/middleware-DWhDjC7Z.cjs +12 -0
- package/dist/{middleware-BcNc3Cp1.js → middleware-D_wNj9p6.js} +4 -4
- package/dist/mod-Bm_GwNTL.d.cts +80 -0
- package/dist/mod-CIR7gJW8.d.ts +64 -0
- package/dist/mod-CwZXZJ9d.d.ts +91 -0
- package/dist/mod-DPkRU3EK.d.cts +266 -0
- package/dist/mod-DQWhp0xs.d.ts +82 -0
- package/dist/mod-DUWcVv49.d.ts +268 -0
- package/dist/mod-DXsQakeS.d.cts +89 -0
- package/dist/mod-DwqZ5l67.d.cts +62 -0
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +9 -9
- package/dist/mod.d.ts +9 -9
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.js +11 -11
- package/dist/nodeinfo/mod.d.cts +1 -1
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/otel/mod.d.cts +145 -145
- package/dist/otel/mod.d.ts +145 -145
- package/dist/owner-1AbPBOOZ.d.cts +66 -0
- package/dist/{owner-BuJ3B1oy.js → owner-BJOuHY_S.js} +1 -1
- package/dist/owner-gd0Q9FuU.d.ts +68 -0
- package/dist/{proof-B0VK41oO.js → proof-BNcJ_Sa_.js} +1 -1
- package/dist/{proof-B_ndUlKU.cjs → proof-BmYdRz_f.cjs} +1 -1
- package/dist/{proof-BjgSTnKs.js → proof-VvmjtuyP.js} +2 -2
- package/dist/{send-CsYzNMCy.js → send-DYC2LvJZ.js} +2 -2
- package/dist/sig/http.test.js +3 -3
- package/dist/sig/key.test.js +2 -2
- package/dist/sig/ld.test.js +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.js +3 -3
- package/dist/sig/proof.test.js +3 -3
- package/dist/utils/docloader.test.js +4 -4
- package/dist/utils/mod.cjs +2 -2
- package/dist/utils/mod.d.cts +3 -3
- package/dist/utils/mod.d.ts +3 -3
- package/dist/utils/mod.js +2 -2
- package/package.json +5 -5
- package/dist/client-CwkOPN13.d.cts +0 -222
- package/dist/client-a7NwzhA2.d.ts +0 -224
- package/dist/context-BdNW_8a3.d.cts +0 -2554
- package/dist/context-C-GVKcJR.d.ts +0 -2556
- package/dist/http-CCEu-x1_.d.cts +0 -253
- package/dist/http-CODSJcKx.d.ts +0 -255
- package/dist/kv-g9jFc34-.d.cts +0 -110
- package/dist/kv-jg_8SMc1.d.ts +0 -113
- package/dist/middleware-DAtmZEMk.cjs +0 -12
- package/dist/mod-5PNty1K9.d.cts +0 -80
- package/dist/mod-BcpEGTWV.d.cts +0 -62
- package/dist/mod-COO7VMcm.d.cts +0 -266
- package/dist/mod-CevNbUol.d.ts +0 -91
- package/dist/mod-CtO31FCx.d.ts +0 -64
- package/dist/mod-Da9fNDyC.d.ts +0 -82
- package/dist/mod-ErTjUJs9.d.cts +0 -89
- package/dist/mod-q2IR8UiH.d.ts +0 -268
- package/dist/owner-9yZ5Ibsb.d.cts +0 -66
- package/dist/owner-DQYAbVmX.d.ts +0 -68
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
+
import { KeyCache } from "./http-DkHdFfrc.js";
|
|
4
|
+
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
5
|
+
import { TracerProvider } from "@opentelemetry/api";
|
|
6
|
+
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/sig/ld.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* A signature of a JSON-LD document.
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
*/
|
|
13
|
+
interface Signature {
|
|
14
|
+
"@context"?: "https://w3id.org/identity/v1";
|
|
15
|
+
type: "RsaSignature2017";
|
|
16
|
+
id?: string;
|
|
17
|
+
creator: string;
|
|
18
|
+
created: string;
|
|
19
|
+
signatureValue: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Attaches a LD signature to the given JSON-LD document.
|
|
23
|
+
* @param jsonLd The JSON-LD document to attach the signature to. It is not
|
|
24
|
+
* modified.
|
|
25
|
+
* @param signature The signature to attach.
|
|
26
|
+
* @returns The JSON-LD document with the attached signature.
|
|
27
|
+
* @throws {TypeError} If the input document is not a valid JSON-LD document.
|
|
28
|
+
* @since 1.0.0
|
|
29
|
+
*/
|
|
30
|
+
declare function attachSignature(jsonLd: unknown, signature: Signature): {
|
|
31
|
+
signature: Signature;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Options for creating Linked Data Signatures.
|
|
35
|
+
* @since 1.0.0
|
|
36
|
+
*/
|
|
37
|
+
interface CreateSignatureOptions {
|
|
38
|
+
/**
|
|
39
|
+
* The context loader for loading remote JSON-LD contexts.
|
|
40
|
+
*/
|
|
41
|
+
contextLoader?: DocumentLoader;
|
|
42
|
+
/**
|
|
43
|
+
* The time when the signature was created. If not specified, the current
|
|
44
|
+
* time will be used.
|
|
45
|
+
*/
|
|
46
|
+
created?: Temporal.Instant;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates a LD signature for the given JSON-LD document.
|
|
50
|
+
* @param jsonLd The JSON-LD document to sign.
|
|
51
|
+
* @param privateKey The private key to sign the document.
|
|
52
|
+
* @param keyId The ID of the public key that corresponds to the private key.
|
|
53
|
+
* @param options Additional options for creating the signature.
|
|
54
|
+
* See also {@link CreateSignatureOptions}.
|
|
55
|
+
* @return The created signature.
|
|
56
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
57
|
+
* @since 1.0.0
|
|
58
|
+
*/
|
|
59
|
+
declare function createSignature(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, {
|
|
60
|
+
contextLoader,
|
|
61
|
+
created
|
|
62
|
+
}?: CreateSignatureOptions): Promise<Signature>;
|
|
63
|
+
/**
|
|
64
|
+
* Options for signing JSON-LD documents.
|
|
65
|
+
* @since 1.0.0
|
|
66
|
+
*/
|
|
67
|
+
interface SignJsonLdOptions extends CreateSignatureOptions {
|
|
68
|
+
/**
|
|
69
|
+
* The OpenTelemetry tracer provider for tracing the signing process.
|
|
70
|
+
* If omitted, the global tracer provider is used.
|
|
71
|
+
* @since 1.3.0
|
|
72
|
+
*/
|
|
73
|
+
tracerProvider?: TracerProvider;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Signs the given JSON-LD document with the private key and returns the signed
|
|
77
|
+
* JSON-LD document.
|
|
78
|
+
* @param jsonLd The JSON-LD document to sign.
|
|
79
|
+
* @param privateKey The private key to sign the document.
|
|
80
|
+
* @param keyId The key ID to use in the signature. It will be used by the
|
|
81
|
+
* verifier to fetch the corresponding public key.
|
|
82
|
+
* @param options Additional options for signing the document.
|
|
83
|
+
* See also {@link SignJsonLdOptions}.
|
|
84
|
+
* @returns The signed JSON-LD document.
|
|
85
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
86
|
+
* @since 1.0.0
|
|
87
|
+
*/
|
|
88
|
+
declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, options: SignJsonLdOptions): Promise<{
|
|
89
|
+
signature: Signature;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Detaches Linked Data Signatures from the given JSON-LD document.
|
|
93
|
+
* @param jsonLd The JSON-LD document to modify.
|
|
94
|
+
* @returns The modified JSON-LD document. If the input document does not
|
|
95
|
+
* contain a signature, the original document is returned.
|
|
96
|
+
* @since 1.0.0
|
|
97
|
+
*/
|
|
98
|
+
declare function detachSignature(jsonLd: unknown): unknown;
|
|
99
|
+
/**
|
|
100
|
+
* Options for verifying Linked Data Signatures.
|
|
101
|
+
* @since 1.0.0
|
|
102
|
+
*/
|
|
103
|
+
interface VerifySignatureOptions {
|
|
104
|
+
/**
|
|
105
|
+
* The document loader to use for fetching the public key.
|
|
106
|
+
*/
|
|
107
|
+
documentLoader?: DocumentLoader;
|
|
108
|
+
/**
|
|
109
|
+
* The context loader to use for JSON-LD context retrieval.
|
|
110
|
+
*/
|
|
111
|
+
contextLoader?: DocumentLoader;
|
|
112
|
+
/**
|
|
113
|
+
* The key cache to use for caching public keys.
|
|
114
|
+
*/
|
|
115
|
+
keyCache?: KeyCache;
|
|
116
|
+
/**
|
|
117
|
+
* The OpenTelemetry tracer provider for tracing the verification process.
|
|
118
|
+
* If omitted, the global tracer provider is used.
|
|
119
|
+
* @since 1.3.0
|
|
120
|
+
*/
|
|
121
|
+
tracerProvider?: TracerProvider;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Verifies Linked Data Signatures of the given JSON-LD document.
|
|
125
|
+
* @param jsonLd The JSON-LD document to verify.
|
|
126
|
+
* @param options Options for verifying the signature.
|
|
127
|
+
* @returns The public key that signed the document or `null` if the signature
|
|
128
|
+
* is invalid or the key is not found.
|
|
129
|
+
* @since 1.0.0
|
|
130
|
+
*/
|
|
131
|
+
declare function verifySignature(jsonLd: unknown, options?: VerifySignatureOptions): Promise<CryptographicKey | null>;
|
|
132
|
+
/**
|
|
133
|
+
* Options for verifying JSON-LD documents.
|
|
134
|
+
*/
|
|
135
|
+
interface VerifyJsonLdOptions extends VerifySignatureOptions {}
|
|
136
|
+
/**
|
|
137
|
+
* Verify the authenticity of the given JSON-LD document using Linked Data
|
|
138
|
+
* Signatures. If the document is signed, this function verifies the signature
|
|
139
|
+
* and checks if the document is attributed to the owner of the public key.
|
|
140
|
+
* If the document is not signed, this function returns `false`.
|
|
141
|
+
* @param jsonLd The JSON-LD document to verify.
|
|
142
|
+
* @param options Options for verifying the document.
|
|
143
|
+
* @returns `true` if the document is authentic; `false` otherwise.
|
|
144
|
+
*/
|
|
145
|
+
declare function verifyJsonLd(jsonLd: unknown, options?: VerifyJsonLdOptions): Promise<boolean>;
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/sig/proof.d.ts
|
|
148
|
+
/**
|
|
149
|
+
* Options for {@link createProof}.
|
|
150
|
+
* @since 0.10.0
|
|
151
|
+
*/
|
|
152
|
+
interface CreateProofOptions {
|
|
153
|
+
/**
|
|
154
|
+
* The context loader for loading remote JSON-LD contexts.
|
|
155
|
+
*/
|
|
156
|
+
contextLoader?: DocumentLoader;
|
|
157
|
+
/**
|
|
158
|
+
* The JSON-LD context to use for serializing the object to sign.
|
|
159
|
+
*/
|
|
160
|
+
context?: string | Record<string, string> | (string | Record<string, string>)[];
|
|
161
|
+
/**
|
|
162
|
+
* The time when the proof was created. If not specified, the current time
|
|
163
|
+
* will be used.
|
|
164
|
+
*/
|
|
165
|
+
created?: Temporal.Instant;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Creates a proof for the given object.
|
|
169
|
+
* @param object The object to create a proof for.
|
|
170
|
+
* @param privateKey The private key to sign the proof with.
|
|
171
|
+
* @param keyId The key ID to use in the proof. It will be used by the verifier.
|
|
172
|
+
* @param options Additional options. See also {@link CreateProofOptions}.
|
|
173
|
+
* @returns The created proof.
|
|
174
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
175
|
+
* @since 0.10.0
|
|
176
|
+
*/
|
|
177
|
+
declare function createProof(object: Object$1, privateKey: CryptoKey, keyId: URL, {
|
|
178
|
+
contextLoader,
|
|
179
|
+
context,
|
|
180
|
+
created
|
|
181
|
+
}?: CreateProofOptions): Promise<DataIntegrityProof>;
|
|
182
|
+
/**
|
|
183
|
+
* Options for {@link signObject}.
|
|
184
|
+
* @since 0.10.0
|
|
185
|
+
*/
|
|
186
|
+
interface SignObjectOptions extends CreateProofOptions {
|
|
187
|
+
/**
|
|
188
|
+
* The document loader for loading remote JSON-LD documents.
|
|
189
|
+
*/
|
|
190
|
+
documentLoader?: DocumentLoader;
|
|
191
|
+
/**
|
|
192
|
+
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
|
193
|
+
* is used.
|
|
194
|
+
* @since 1.3.0
|
|
195
|
+
*/
|
|
196
|
+
tracerProvider?: TracerProvider;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Signs the given object with the private key and returns the signed object.
|
|
200
|
+
* @param object The object to create a proof for.
|
|
201
|
+
* @param privateKey The private key to sign the proof with.
|
|
202
|
+
* @param keyId The key ID to use in the proof. It will be used by the verifier.
|
|
203
|
+
* @param options Additional options. See also {@link SignObjectOptions}.
|
|
204
|
+
* @returns The signed object.
|
|
205
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
206
|
+
* @since 0.10.0
|
|
207
|
+
*/
|
|
208
|
+
declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKey, keyId: URL, options?: SignObjectOptions): Promise<T>;
|
|
209
|
+
/**
|
|
210
|
+
* Options for {@link verifyProof}.
|
|
211
|
+
* @since 0.10.0
|
|
212
|
+
*/
|
|
213
|
+
interface VerifyProofOptions {
|
|
214
|
+
/**
|
|
215
|
+
* The context loader for loading remote JSON-LD contexts.
|
|
216
|
+
*/
|
|
217
|
+
contextLoader?: DocumentLoader;
|
|
218
|
+
/**
|
|
219
|
+
* The document loader for loading remote JSON-LD documents.
|
|
220
|
+
*/
|
|
221
|
+
documentLoader?: DocumentLoader;
|
|
222
|
+
/**
|
|
223
|
+
* The key cache to use for caching public keys.
|
|
224
|
+
* @since 0.12.0
|
|
225
|
+
*/
|
|
226
|
+
keyCache?: KeyCache;
|
|
227
|
+
/**
|
|
228
|
+
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
|
229
|
+
* is used.
|
|
230
|
+
* @since 1.3.0
|
|
231
|
+
*/
|
|
232
|
+
tracerProvider?: TracerProvider;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Verifies the given proof for the object.
|
|
236
|
+
* @param jsonLd The JSON-LD object to verify the proof for. If it contains
|
|
237
|
+
* any proofs, they will be ignored.
|
|
238
|
+
* @param proof The proof to verify.
|
|
239
|
+
* @param options Additional options. See also {@link VerifyProofOptions}.
|
|
240
|
+
* @returns The public key that was used to sign the proof, or `null` if the
|
|
241
|
+
* proof is invalid.
|
|
242
|
+
* @since 0.10.0
|
|
243
|
+
*/
|
|
244
|
+
declare function verifyProof(jsonLd: unknown, proof: DataIntegrityProof, options?: VerifyProofOptions): Promise<Multikey | null>;
|
|
245
|
+
/**
|
|
246
|
+
* Options for {@link verifyObject}.
|
|
247
|
+
* @since 0.10.0
|
|
248
|
+
*/
|
|
249
|
+
interface VerifyObjectOptions extends VerifyProofOptions {}
|
|
250
|
+
/**
|
|
251
|
+
* Verifies the given object. It will verify all the proofs in the object,
|
|
252
|
+
* and succeed only if all the proofs are valid and all attributions and
|
|
253
|
+
* actors are authenticated by the proofs.
|
|
254
|
+
* @template T The type of the object to verify.
|
|
255
|
+
* @param cls The class of the object to verify. It must be a subclass of
|
|
256
|
+
* the {@link Object}.
|
|
257
|
+
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|
|
258
|
+
* is a compacted JSON-LD representation of a `T` with `@context`.
|
|
259
|
+
* @param options Additional options. See also {@link VerifyObjectOptions}.
|
|
260
|
+
* @returns The object if it's verified, or `null` if it's not.
|
|
261
|
+
* @throws {TypeError} If the object is invalid or unsupported.
|
|
262
|
+
* @since 0.10.0
|
|
263
|
+
*/
|
|
264
|
+
declare function verifyObject<T extends Object$1>(cls: (new (...args: any[]) => T) & {
|
|
265
|
+
fromJsonLd(jsonLd: unknown, options: VerifyObjectOptions): Promise<T>;
|
|
266
|
+
}, jsonLd: unknown, options?: VerifyObjectOptions): Promise<T | null>;
|
|
267
|
+
//#endregion
|
|
268
|
+
export { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { HttpMessageSignaturesSpecDeterminer } from "./http-Cz3MlXAZ.cjs";
|
|
2
|
+
import { KvKey, KvStore } from "./kv-BL4nlICN.cjs";
|
|
3
|
+
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
4
|
+
import { TracerProvider } from "@opentelemetry/api";
|
|
5
|
+
|
|
6
|
+
//#region src/utils/docloader.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Options for {@link getAuthenticatedDocumentLoader}.
|
|
9
|
+
* @see {@link getAuthenticatedDocumentLoader}
|
|
10
|
+
* @since 1.3.0
|
|
11
|
+
*/
|
|
12
|
+
interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
13
|
+
/**
|
|
14
|
+
* An optional spec determiner for HTTP Message Signatures.
|
|
15
|
+
* It determines the spec to use for signing requests.
|
|
16
|
+
* It is used for double-knocking
|
|
17
|
+
* (see <https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions>).
|
|
18
|
+
* @since 1.6.0
|
|
19
|
+
*/
|
|
20
|
+
specDeterminer?: HttpMessageSignaturesSpecDeterminer;
|
|
21
|
+
/**
|
|
22
|
+
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
|
23
|
+
* is used.
|
|
24
|
+
* @since 1.6.0
|
|
25
|
+
*/
|
|
26
|
+
tracerProvider?: TracerProvider;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Gets an authenticated {@link DocumentLoader} for the given identity.
|
|
30
|
+
* Note that an authenticated document loader intentionally does not cache
|
|
31
|
+
* the fetched documents.
|
|
32
|
+
* @param identity The identity to get the document loader for.
|
|
33
|
+
* The actor's key pair.
|
|
34
|
+
* @param options The options for the document loader.
|
|
35
|
+
* @returns The authenticated document loader.
|
|
36
|
+
* @throws {TypeError} If the key is invalid or unsupported.
|
|
37
|
+
* @since 0.4.0
|
|
38
|
+
*/
|
|
39
|
+
declare function getAuthenticatedDocumentLoader(identity: {
|
|
40
|
+
keyId: URL;
|
|
41
|
+
privateKey: CryptoKey;
|
|
42
|
+
}, {
|
|
43
|
+
allowPrivateAddress,
|
|
44
|
+
userAgent,
|
|
45
|
+
specDeterminer,
|
|
46
|
+
tracerProvider
|
|
47
|
+
}?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/utils/kv-cache.d.ts
|
|
50
|
+
/**
|
|
51
|
+
* The parameters for {@link kvCache} function.
|
|
52
|
+
*/
|
|
53
|
+
interface KvCacheParameters {
|
|
54
|
+
/**
|
|
55
|
+
* The document loader to decorate with a cache.
|
|
56
|
+
*/
|
|
57
|
+
readonly loader: DocumentLoader;
|
|
58
|
+
/**
|
|
59
|
+
* The key–value store to use for backing the cache.
|
|
60
|
+
*/
|
|
61
|
+
readonly kv: KvStore;
|
|
62
|
+
/**
|
|
63
|
+
* The key prefix to use for namespacing the cache.
|
|
64
|
+
* `["_fedify", "remoteDocument"]` by default.
|
|
65
|
+
*/
|
|
66
|
+
readonly prefix?: KvKey;
|
|
67
|
+
/**
|
|
68
|
+
* The per-URL cache rules in the array of `[urlPattern, duration]` pairs
|
|
69
|
+
* where `urlPattern` is either a string, a {@link URL}, or
|
|
70
|
+
* a {@link URLPattern} and `duration` is a {@link Temporal.DurationLike}.
|
|
71
|
+
* The `duration` is allowed to be at most 30 days.
|
|
72
|
+
*
|
|
73
|
+
* By default, 5 minutes for all URLs.
|
|
74
|
+
*/
|
|
75
|
+
readonly rules?: readonly [string | URL | URLPattern, Temporal.Duration | Temporal.DurationLike][];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Decorates a {@link DocumentLoader} with a cache backed by a {@link KvStore}.
|
|
79
|
+
* @param parameters The parameters for the cache.
|
|
80
|
+
* @returns The decorated document loader which is cache-enabled.
|
|
81
|
+
*/
|
|
82
|
+
declare function kvCache({
|
|
83
|
+
loader,
|
|
84
|
+
kv,
|
|
85
|
+
prefix,
|
|
86
|
+
rules
|
|
87
|
+
}: KvCacheParameters): DocumentLoader;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { getAuthenticatedDocumentLoader, kvCache };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-o4OhjMHe.cjs";
|
|
2
|
+
import { Span, Tracer } from "@opentelemetry/api";
|
|
3
|
+
|
|
4
|
+
//#region src/federation/webfinger.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for {@link handleWebFinger}.
|
|
7
|
+
*/
|
|
8
|
+
interface WebFingerHandlerParameters<TContextData> {
|
|
9
|
+
/**
|
|
10
|
+
* The request context.
|
|
11
|
+
*/
|
|
12
|
+
context: RequestContext<TContextData>;
|
|
13
|
+
/**
|
|
14
|
+
* The canonical hostname of the server, if it's explicitly configured.
|
|
15
|
+
* @since 1.5.0
|
|
16
|
+
*/
|
|
17
|
+
host?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The callback for dispatching the actor.
|
|
20
|
+
*/
|
|
21
|
+
actorDispatcher?: ActorDispatcher<TContextData>;
|
|
22
|
+
/**
|
|
23
|
+
* The callback for mapping a WebFinger username to the corresponding actor's
|
|
24
|
+
* internal identifier, or `null` if the username is not found.
|
|
25
|
+
* @since 0.15.0
|
|
26
|
+
*/
|
|
27
|
+
actorHandleMapper?: ActorHandleMapper<TContextData>;
|
|
28
|
+
/**
|
|
29
|
+
* The callback for mapping a WebFinger query to the corresponding actor's
|
|
30
|
+
* internal identifier or username, or `null` if the query is not found.
|
|
31
|
+
* @since 1.4.0
|
|
32
|
+
*/
|
|
33
|
+
actorAliasMapper?: ActorAliasMapper<TContextData>;
|
|
34
|
+
/**
|
|
35
|
+
* The callback for dispatching the Links of webFinger.
|
|
36
|
+
*/
|
|
37
|
+
webFingerLinksDispatcher?: WebFingerLinksDispatcher<TContextData>;
|
|
38
|
+
/**
|
|
39
|
+
* The function to call when the actor is not found.
|
|
40
|
+
*/
|
|
41
|
+
onNotFound(request: Request): Response | Promise<Response>;
|
|
42
|
+
/**
|
|
43
|
+
* The OpenTelemetry tracer.
|
|
44
|
+
* @since 1.3.0
|
|
45
|
+
*/
|
|
46
|
+
tracer?: Tracer;
|
|
47
|
+
/**
|
|
48
|
+
* The span for the request.
|
|
49
|
+
* @since 1.3.0
|
|
50
|
+
*/
|
|
51
|
+
span?: Span;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Handles a WebFinger request. You would not typically call this function
|
|
55
|
+
* directly, but instead use {@link Federation.fetch} method.
|
|
56
|
+
* @param request The WebFinger request to handle.
|
|
57
|
+
* @param parameters The parameters for handling the request.
|
|
58
|
+
* @returns The response to the request.
|
|
59
|
+
*/
|
|
60
|
+
declare function handleWebFinger<TContextData>(request: Request, options: WebFingerHandlerParameters<TContextData>): Promise<Response>;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { WebFingerHandlerParameters, handleWebFinger };
|
package/dist/mod.cjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
6
|
const require_transformers = require('./transformers-3g8GZwkZ.cjs');
|
|
7
7
|
require('./compat-DmDDELst.cjs');
|
|
8
|
-
const require_http = require('./http-
|
|
9
|
-
const require_middleware = require('./middleware-
|
|
10
|
-
const require_proof = require('./proof-
|
|
8
|
+
const require_http = require('./http-B-epypwc.cjs');
|
|
9
|
+
const require_middleware = require('./middleware-CzNcdhiV.cjs');
|
|
10
|
+
const require_proof = require('./proof-BmYdRz_f.cjs');
|
|
11
11
|
const require_federation = require('./federation-Bp3HI26G.cjs');
|
|
12
12
|
const require_types = require('./types-Cd_hszr_.cjs');
|
|
13
|
-
const require_kv_cache = require('./kv-cache-
|
|
13
|
+
const require_kv_cache = require('./kv-cache-YG3yAJRb.cjs');
|
|
14
14
|
require('./nodeinfo-DuMYTpbZ.cjs');
|
|
15
15
|
const require_runtime = require('./runtime-c2Njxsry.cjs');
|
|
16
16
|
require('./sig-vX39WyWI.cjs');
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __export, __reExport, mod_d_exports } from "./mod-Bh8mqlYw.cjs";
|
|
2
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-
|
|
3
|
-
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
4
|
-
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-
|
|
5
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
6
|
-
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-
|
|
7
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
8
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-
|
|
2
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-C97KOq3x.cjs";
|
|
3
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-Cz3MlXAZ.cjs";
|
|
4
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-1AbPBOOZ.cjs";
|
|
5
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-o4OhjMHe.cjs";
|
|
6
|
+
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-BL4nlICN.cjs";
|
|
7
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-Bm_GwNTL.cjs";
|
|
8
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-DwqZ5l67.cjs";
|
|
9
9
|
import "./mod-gq_Xfdz8.cjs";
|
|
10
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-
|
|
11
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-
|
|
10
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-DPkRU3EK.cjs";
|
|
11
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-DXsQakeS.cjs";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
|
14
14
|
declare namespace mod_d_exports$1 {
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { __export, __reExport } from "./chunk-DJNbSFdH.js";
|
|
4
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-
|
|
5
|
-
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
6
|
-
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-
|
|
7
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
8
|
-
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-
|
|
9
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
10
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-
|
|
4
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-BxMZiQaD.js";
|
|
5
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-DkHdFfrc.js";
|
|
6
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-gd0Q9FuU.js";
|
|
7
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-Dy5ro7zD.js";
|
|
8
|
+
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-DXEUEP6z.js";
|
|
9
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-DQWhp0xs.js";
|
|
10
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-CIR7gJW8.js";
|
|
11
11
|
import "./mod-AGjRfPjT.js";
|
|
12
12
|
import { mod_d_exports } from "./mod-D6HodEq7.js";
|
|
13
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-
|
|
14
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-
|
|
13
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-DUWcVv49.js";
|
|
14
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-CwZXZJ9d.js";
|
|
15
15
|
|
|
16
16
|
//#region src/mod.d.ts
|
|
17
17
|
declare namespace mod_d_exports$1 {
|
package/dist/mod.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { __export, __reExport } from "./chunk-DJNbSFdH.js";
|
|
6
6
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-C3FLHUd6.js";
|
|
7
7
|
import "./compat-Bb4NuTUO.js";
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
9
|
-
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
|
10
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-C3oMHumD.js";
|
|
9
|
+
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-ByN4qQt0.js";
|
|
10
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-BNcJ_Sa_.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-DaMfqRm4.js";
|
|
12
12
|
import { getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./types-C93Ob9cU.js";
|
|
13
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
13
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-K6GW8-uS.js";
|
|
14
14
|
import "./nodeinfo-DoESQxq5.js";
|
|
15
15
|
import { runtime_exports } from "./runtime-poamPCMb.js";
|
|
16
16
|
import "./sig-BNhspNOf.js";
|
|
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
11
|
-
import "../deno-
|
|
12
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
|
11
|
+
import "../deno-D_VnPW-Y.js";
|
|
12
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-Co3x1vLV.js";
|
|
13
13
|
import "../client-Dg7OfUDA.js";
|
|
14
14
|
import "../router-D9eI0s4b.js";
|
|
15
15
|
import "../types-CPz01LGH.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-Cw2GXzkv.js";
|
|
17
|
+
import "../http-CFILUWFj.js";
|
|
18
|
+
import "../ld-D4-RbyP8.js";
|
|
19
|
+
import "../owner-BJOuHY_S.js";
|
|
20
|
+
import "../proof-VvmjtuyP.js";
|
|
21
|
+
import "../docloader-D7xSU1xb.js";
|
|
22
22
|
import "../kv-cache-B__dHl7g.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-FsU-ifET.js";
|
|
24
|
+
import "../builder-DqJQtxW4.js";
|
|
25
25
|
import "../collection-CcnIw1qY.js";
|
|
26
26
|
import "../keycache-DRxpZ5r9.js";
|
|
27
27
|
import "../negotiation-5NPJL6zp.js";
|
|
28
28
|
import "../retry-D4GJ670a.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-DYC2LvJZ.js";
|
|
30
30
|
import "../std__assert-DWivtrGR.js";
|
|
31
31
|
import "../assert_rejects-Ce45JcFg.js";
|
|
32
32
|
import "../assert_throws-BNXdRGWP.js";
|
package/dist/nodeinfo/mod.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "../client-
|
|
1
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "../client-C97KOq3x.cjs";
|
|
2
2
|
import "../mod-gq_Xfdz8.cjs";
|
|
3
3
|
export { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo };
|
package/dist/nodeinfo/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "../client-
|
|
3
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "../client-BxMZiQaD.js";
|
|
4
4
|
import "../mod-AGjRfPjT.js";
|
|
5
5
|
export { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo };
|