@fedify/fedify 2.0.0-pr.412.1559 → 2.0.0-pr.412.1692
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/actor-CrTGiTZd.cjs +42609 -0
- package/dist/{actor-Cc6B76eG.js → actor-D5S46edz.js} +1 -1
- package/dist/actor-D6K058Tb.d.cts +128 -0
- package/dist/{actor-CTAuCsWy.js → actor-G2S5sPEA.js} +6951 -2127
- package/dist/{actor-C22bXuuC.d.ts → actor-T6RyhRgk.d.ts} +1 -1
- package/dist/{authdocloader-BFVqUbyo.js → authdocloader-C5AvdCCi.js} +6 -6
- package/dist/authdocloader-CQMPmpaO.cjs +58 -0
- package/dist/{authdocloader-CLgDGafZ.js → authdocloader-SjwloJUA.js} +3 -3
- package/dist/{builder-BOEBObR8.js → builder-OA47XRft.js} +10 -4
- package/dist/chunk-DqRYRqnO.cjs +34 -0
- package/dist/{client-De-z2UnN.js → client-Bmd-i8x8.js} +3 -22
- package/dist/client-CegPX0Rn.d.cts +222 -0
- package/dist/{client-DF8anIB5.d.ts → client-bgSdkFa2.d.ts} +2 -74
- package/dist/compat/mod.cjs +10 -0
- package/dist/compat/mod.d.cts +13 -0
- package/dist/compat/mod.d.ts +8 -8
- package/dist/compat/mod.js +5 -5
- package/dist/compat/transformers.test.js +19 -19
- package/dist/compat-DmDDELst.cjs +4 -0
- package/dist/compat-nxUqe4Z-.js +4 -0
- package/dist/{context-9gCpIkiz.d.ts → context-ByZprN0S.d.ts} +67 -7
- package/dist/context-C5BsZkDr.d.cts +2315 -0
- package/dist/docloader-7Ey7wNHx.cjs +4861 -0
- package/dist/{docloader-DEhniCVa.js → docloader-CkweNhUH.js} +189 -9
- package/dist/docloader-D-MrRyHl.d.cts +219 -0
- package/dist/{esm-CHdxdkuH.js → esm-CwHz8Y8t.js} +1 -1
- package/dist/federation/builder.test.js +6 -7
- package/dist/federation/collection.test.js +4 -4
- package/dist/federation/handler.test.js +23 -143
- package/dist/federation/idempotency.test.js +202 -0
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +4 -3
- package/dist/federation/middleware.test.js +231 -52
- package/dist/federation/mod.cjs +29 -0
- package/dist/federation/mod.d.cts +13 -0
- package/dist/federation/mod.d.ts +8 -8
- package/dist/federation/mod.js +15 -15
- package/dist/federation/mq.test.js +3 -3
- package/dist/federation/negotiation.test.d.ts +3 -0
- package/dist/federation/negotiation.test.js +28 -0
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +10 -10
- package/dist/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
- package/dist/federation-H2_En3j5.cjs +244 -0
- package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +6 -0
- package/dist/http-BiBofurJ.cjs +826 -0
- package/dist/{http-l0TEupZK.js → http-C5tC93Hn.js} +7 -7
- package/dist/http-D-e6AFwR.d.cts +253 -0
- package/dist/{http-DqSNLFNY.d.ts → http-D6Uj2x2y.d.ts} +1 -1
- package/dist/{http-CcdM1brU.js → http-DGjdMiLc.js} +3 -3
- package/dist/{inbox-B6DZbGNf.js → inbox-BoDY3z8G.js} +24 -7
- package/dist/key-CZR7QraT.cjs +290 -0
- package/dist/key-Cf8MffVe.cjs +10 -0
- package/dist/{key-DxA6xRtZ.js → key-CkxrAIyp.js} +5 -5
- package/dist/key-Dk0j88Jo.js +10 -0
- package/dist/{key-CUZQgVlf.js → key-Epcl5jpz.js} +3 -3
- package/dist/{key-CzLv1phF.js → key-IxRhZpOF.js} +2 -2
- package/dist/{keycache-B8HdZJSt.js → keycache-TEniXNel.js} +1 -1
- package/dist/{keys-zZwiKkfx.js → keys-bZxcrZ9Z.js} +1 -1
- package/dist/kv-63Cil1MD.d.cts +81 -0
- package/dist/{ld-CBcQdZ6N.js → ld-DW7A0uIc.js} +4 -4
- package/dist/{lookup-Bn_HEC_d.js → lookup-DhQCVVja.js} +21 -12
- package/dist/lookup-DiV4LFBg.cjs +137 -0
- package/dist/{lookup-dtdr2ftf.js → lookup-cVRa2QM-.js} +4 -4
- package/dist/middleware-Be1JStOx.js +17 -0
- package/dist/middleware-CDOK7WOb.js +26 -0
- package/dist/{middleware-BRgu1IH8.js → middleware-Cgr3PtaJ.js} +58 -149
- package/dist/{middleware-CxEkcFW0.js → middleware-DvvYAIsd.js} +87 -91
- package/dist/middleware-EjIW2mZB.cjs +17 -0
- package/dist/middleware-TfuVoceY.cjs +4231 -0
- package/dist/mod-8DMWKtQE.d.cts +80 -0
- package/dist/{mod-Drmz72EK.d.ts → mod-BhUKmBJD.d.ts} +2 -2
- package/dist/mod-C2tOeRkN.d.cts +1 -0
- package/dist/{mod-TFoH2Ql8.d.ts → mod-CerN_Sza.d.ts} +1 -1
- package/dist/mod-Cj1tHXBR.d.cts +102 -0
- package/dist/mod-CxkWO3Mg.d.cts +307 -0
- package/dist/{mod-Bqxcp7eN.d.ts → mod-D6hQoxC5.d.ts} +2 -2
- package/dist/mod-Djzcw2ry.d.cts +266 -0
- package/dist/{mod-Cxt4Kpf6.d.ts → mod-DlU8ISoa.d.ts} +19 -1
- package/dist/mod-FZd39qVq.d.cts +1 -0
- package/dist/mod-jQ4OODsl.d.cts +113 -0
- package/dist/mod.cjs +150 -0
- package/dist/mod.d.cts +17 -0
- package/dist/mod.d.ts +11 -11
- package/dist/mod.js +21 -21
- package/dist/mq-B7R1Q-M5.d.cts +140 -0
- package/dist/negotiation-5NPJL6zp.js +71 -0
- package/dist/nodeinfo/client.test.js +27 -106
- package/dist/nodeinfo/handler.test.js +20 -20
- package/dist/nodeinfo/mod.cjs +11 -0
- package/dist/nodeinfo/mod.d.cts +5 -0
- package/dist/nodeinfo/mod.d.ts +2 -2
- package/dist/nodeinfo/mod.js +7 -7
- package/dist/nodeinfo/types.test.js +5 -10
- package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
- package/dist/nodeinfo-DfycQ8Wf.js +4 -0
- package/dist/{owner-VEIjmR8r.js → owner-6Vc3UXXE.js} +2 -2
- package/dist/owner-BN_tO3cY.d.cts +67 -0
- package/dist/{owner-CQPnQVtf.d.ts → owner-hd9lvQcP.d.ts} +2 -2
- package/dist/{proof-DoSQAGkE.js → proof-C1jhbeNv.js} +3 -3
- package/dist/proof-CRJWXFfT.cjs +673 -0
- package/dist/{proof-tgUlT8hw.js → proof-Chi90OXv.js} +9 -9
- package/dist/runtime/authdocloader.test.js +9 -9
- package/dist/runtime/docloader.test.js +4 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/link.test.d.ts +3 -0
- package/dist/runtime/link.test.js +61 -0
- package/dist/runtime/mod.cjs +25 -0
- package/dist/runtime/mod.d.cts +6 -0
- package/dist/runtime/mod.d.ts +3 -3
- package/dist/runtime/mod.js +10 -10
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/runtime-C58AJWSv.cjs +4 -0
- package/dist/runtime-DPYEDf-o.js +4 -0
- package/dist/{send-BzS7w-QF.js → send-DjATl6i3.js} +2 -2
- package/dist/sig/http.test.js +9 -9
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.cjs +30 -0
- package/dist/sig/mod.d.cts +8 -0
- package/dist/sig/mod.d.ts +5 -5
- package/dist/sig/mod.js +10 -10
- package/dist/sig/owner.test.js +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/sig-ByHXzqUi.cjs +4 -0
- package/dist/sig-Cj3tk-ig.js +4 -0
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.d.ts +273 -28
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-Z2omCvKy.js → testing-BnfPB5T-.js} +2 -2
- package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
- package/dist/transformers-CoBS-oFG.cjs +116 -0
- package/dist/{type-SK-d7Tbw.js → type-NEA09tSC.js} +7262 -2258
- package/dist/{types-BIgY6c-l.js → types-BSuWJsOm.js} +1 -3
- package/dist/types-CmmUQisS.cjs +315 -0
- package/dist/{types-DgPvoUWN.js → types-dLXLjVLf.js} +8 -169
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +255 -5
- package/dist/vocab/mod.cjs +87 -0
- package/dist/vocab/mod.d.cts +6 -0
- package/dist/vocab/mod.d.ts +3 -3
- package/dist/vocab/mod.js +7 -7
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +433 -9
- package/dist/{vocab-SOE1ifCr.d.ts → vocab-BI0Ak5lL.d.ts} +290 -0
- package/dist/vocab-C5Y-0fGj.cjs +291 -0
- package/dist/vocab-Dw1-yVGg.d.cts +14922 -0
- package/dist/{vocab-CvD6Vbml.js → vocab-rWbHpc2J.js} +26 -17
- package/dist/webfinger/handler.test.js +19 -19
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.cjs +9 -0
- package/dist/webfinger/mod.d.cts +4 -0
- package/dist/webfinger/mod.js +6 -6
- package/dist/webfinger-BjOEdFPs.cjs +4 -0
- package/dist/webfinger-De_bU0iE.js +4 -0
- package/dist/x/cfworkers.cjs +100 -0
- package/dist/x/cfworkers.d.cts +59 -0
- package/dist/x/cfworkers.js +3 -3
- package/dist/x/cfworkers.test.js +3 -3
- package/dist/x/hono.cjs +61 -0
- package/dist/x/hono.d.cts +54 -0
- package/dist/x/hono.d.ts +7 -7
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.cjs +69 -0
- package/dist/x/sveltekit.d.cts +46 -0
- package/dist/x/sveltekit.d.ts +7 -7
- package/dist/x/sveltekit.js +3 -3
- package/package.json +68 -13
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/key-Deb0_wWL.js +0 -10
- package/dist/middleware-BE_geSiJ.js +0 -17
- package/dist/middleware-BnU6hzVp.js +0 -26
- package/dist/nodeinfo/semver.test.js +0 -143
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/semver-dArNLkR9.js +0 -149
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/webfinger-C3GIyXIg.js +0 -4
- /package/dist/{collection-CSzG2j1P.js → collection-CcnIw1qY.js} +0 -0
- /package/dist/{nodeinfo/semver.test.d.ts → federation/idempotency.test.d.ts} +0 -0
@@ -0,0 +1,266 @@
|
|
1
|
+
import { DocumentLoader } from "./docloader-D-MrRyHl.cjs";
|
2
|
+
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-Dw1-yVGg.cjs";
|
3
|
+
import { KeyCache } from "./http-D-e6AFwR.cjs";
|
4
|
+
import { TracerProvider } from "@opentelemetry/api";
|
5
|
+
|
6
|
+
//#region src/sig/ld.d.ts
|
7
|
+
/**
|
8
|
+
* A signature of a JSON-LD document.
|
9
|
+
* @since 1.0.0
|
10
|
+
*/
|
11
|
+
interface Signature {
|
12
|
+
"@context"?: "https://w3id.org/identity/v1";
|
13
|
+
type: "RsaSignature2017";
|
14
|
+
id?: string;
|
15
|
+
creator: string;
|
16
|
+
created: string;
|
17
|
+
signatureValue: string;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Attaches a LD signature to the given JSON-LD document.
|
21
|
+
* @param jsonLd The JSON-LD document to attach the signature to. It is not
|
22
|
+
* modified.
|
23
|
+
* @param signature The signature to attach.
|
24
|
+
* @returns The JSON-LD document with the attached signature.
|
25
|
+
* @throws {TypeError} If the input document is not a valid JSON-LD document.
|
26
|
+
* @since 1.0.0
|
27
|
+
*/
|
28
|
+
declare function attachSignature(jsonLd: unknown, signature: Signature): {
|
29
|
+
signature: Signature;
|
30
|
+
};
|
31
|
+
/**
|
32
|
+
* Options for creating Linked Data Signatures.
|
33
|
+
* @since 1.0.0
|
34
|
+
*/
|
35
|
+
interface CreateSignatureOptions {
|
36
|
+
/**
|
37
|
+
* The context loader for loading remote JSON-LD contexts.
|
38
|
+
*/
|
39
|
+
contextLoader?: DocumentLoader;
|
40
|
+
/**
|
41
|
+
* The time when the signature was created. If not specified, the current
|
42
|
+
* time will be used.
|
43
|
+
*/
|
44
|
+
created?: Temporal.Instant;
|
45
|
+
}
|
46
|
+
/**
|
47
|
+
* Creates a LD signature for the given JSON-LD document.
|
48
|
+
* @param jsonLd The JSON-LD document to sign.
|
49
|
+
* @param privateKey The private key to sign the document.
|
50
|
+
* @param keyId The ID of the public key that corresponds to the private key.
|
51
|
+
* @param options Additional options for creating the signature.
|
52
|
+
* See also {@link CreateSignatureOptions}.
|
53
|
+
* @return The created signature.
|
54
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
55
|
+
* @since 1.0.0
|
56
|
+
*/
|
57
|
+
declare function createSignature(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, {
|
58
|
+
contextLoader,
|
59
|
+
created
|
60
|
+
}?: CreateSignatureOptions): Promise<Signature>;
|
61
|
+
/**
|
62
|
+
* Options for signing JSON-LD documents.
|
63
|
+
* @since 1.0.0
|
64
|
+
*/
|
65
|
+
interface SignJsonLdOptions extends CreateSignatureOptions {
|
66
|
+
/**
|
67
|
+
* The OpenTelemetry tracer provider for tracing the signing process.
|
68
|
+
* If omitted, the global tracer provider is used.
|
69
|
+
* @since 1.3.0
|
70
|
+
*/
|
71
|
+
tracerProvider?: TracerProvider;
|
72
|
+
}
|
73
|
+
/**
|
74
|
+
* Signs the given JSON-LD document with the private key and returns the signed
|
75
|
+
* JSON-LD document.
|
76
|
+
* @param jsonLd The JSON-LD document to sign.
|
77
|
+
* @param privateKey The private key to sign the document.
|
78
|
+
* @param keyId The key ID to use in the signature. It will be used by the
|
79
|
+
* verifier to fetch the corresponding public key.
|
80
|
+
* @param options Additional options for signing the document.
|
81
|
+
* See also {@link SignJsonLdOptions}.
|
82
|
+
* @returns The signed JSON-LD document.
|
83
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
84
|
+
* @since 1.0.0
|
85
|
+
*/
|
86
|
+
declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKey, keyId: URL, options: SignJsonLdOptions): Promise<{
|
87
|
+
signature: Signature;
|
88
|
+
}>;
|
89
|
+
/**
|
90
|
+
* Detaches Linked Data Signatures from the given JSON-LD document.
|
91
|
+
* @param jsonLd The JSON-LD document to modify.
|
92
|
+
* @returns The modified JSON-LD document. If the input document does not
|
93
|
+
* contain a signature, the original document is returned.
|
94
|
+
* @since 1.0.0
|
95
|
+
*/
|
96
|
+
declare function detachSignature(jsonLd: unknown): unknown;
|
97
|
+
/**
|
98
|
+
* Options for verifying Linked Data Signatures.
|
99
|
+
* @since 1.0.0
|
100
|
+
*/
|
101
|
+
interface VerifySignatureOptions {
|
102
|
+
/**
|
103
|
+
* The document loader to use for fetching the public key.
|
104
|
+
*/
|
105
|
+
documentLoader?: DocumentLoader;
|
106
|
+
/**
|
107
|
+
* The context loader to use for JSON-LD context retrieval.
|
108
|
+
*/
|
109
|
+
contextLoader?: DocumentLoader;
|
110
|
+
/**
|
111
|
+
* The key cache to use for caching public keys.
|
112
|
+
*/
|
113
|
+
keyCache?: KeyCache;
|
114
|
+
/**
|
115
|
+
* The OpenTelemetry tracer provider for tracing the verification process.
|
116
|
+
* If omitted, the global tracer provider is used.
|
117
|
+
* @since 1.3.0
|
118
|
+
*/
|
119
|
+
tracerProvider?: TracerProvider;
|
120
|
+
}
|
121
|
+
/**
|
122
|
+
* Verifies Linked Data Signatures of the given JSON-LD document.
|
123
|
+
* @param jsonLd The JSON-LD document to verify.
|
124
|
+
* @param options Options for verifying the signature.
|
125
|
+
* @returns The public key that signed the document or `null` if the signature
|
126
|
+
* is invalid or the key is not found.
|
127
|
+
* @since 1.0.0
|
128
|
+
*/
|
129
|
+
declare function verifySignature(jsonLd: unknown, options?: VerifySignatureOptions): Promise<CryptographicKey | null>;
|
130
|
+
/**
|
131
|
+
* Options for verifying JSON-LD documents.
|
132
|
+
*/
|
133
|
+
interface VerifyJsonLdOptions extends VerifySignatureOptions {}
|
134
|
+
/**
|
135
|
+
* Verify the authenticity of the given JSON-LD document using Linked Data
|
136
|
+
* Signatures. If the document is signed, this function verifies the signature
|
137
|
+
* and checks if the document is attributed to the owner of the public key.
|
138
|
+
* If the document is not signed, this function returns `false`.
|
139
|
+
* @param jsonLd The JSON-LD document to verify.
|
140
|
+
* @param options Options for verifying the document.
|
141
|
+
* @returns `true` if the document is authentic; `false` otherwise.
|
142
|
+
*/
|
143
|
+
declare function verifyJsonLd(jsonLd: unknown, options?: VerifyJsonLdOptions): Promise<boolean>;
|
144
|
+
//#endregion
|
145
|
+
//#region src/sig/proof.d.ts
|
146
|
+
/**
|
147
|
+
* Options for {@link createProof}.
|
148
|
+
* @since 0.10.0
|
149
|
+
*/
|
150
|
+
interface CreateProofOptions {
|
151
|
+
/**
|
152
|
+
* The context loader for loading remote JSON-LD contexts.
|
153
|
+
*/
|
154
|
+
contextLoader?: DocumentLoader;
|
155
|
+
/**
|
156
|
+
* The JSON-LD context to use for serializing the object to sign.
|
157
|
+
*/
|
158
|
+
context?: string | Record<string, string> | (string | Record<string, string>)[];
|
159
|
+
/**
|
160
|
+
* The time when the proof was created. If not specified, the current time
|
161
|
+
* will be used.
|
162
|
+
*/
|
163
|
+
created?: Temporal.Instant;
|
164
|
+
}
|
165
|
+
/**
|
166
|
+
* Creates a proof for the given object.
|
167
|
+
* @param object The object to create a proof for.
|
168
|
+
* @param privateKey The private key to sign the proof with.
|
169
|
+
* @param keyId The key ID to use in the proof. It will be used by the verifier.
|
170
|
+
* @param options Additional options. See also {@link CreateProofOptions}.
|
171
|
+
* @returns The created proof.
|
172
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
173
|
+
* @since 0.10.0
|
174
|
+
*/
|
175
|
+
declare function createProof(object: Object$1, privateKey: CryptoKey, keyId: URL, {
|
176
|
+
contextLoader,
|
177
|
+
context,
|
178
|
+
created
|
179
|
+
}?: CreateProofOptions): Promise<DataIntegrityProof>;
|
180
|
+
/**
|
181
|
+
* Options for {@link signObject}.
|
182
|
+
* @since 0.10.0
|
183
|
+
*/
|
184
|
+
interface SignObjectOptions extends CreateProofOptions {
|
185
|
+
/**
|
186
|
+
* The document loader for loading remote JSON-LD documents.
|
187
|
+
*/
|
188
|
+
documentLoader?: DocumentLoader;
|
189
|
+
/**
|
190
|
+
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
191
|
+
* is used.
|
192
|
+
* @since 1.3.0
|
193
|
+
*/
|
194
|
+
tracerProvider?: TracerProvider;
|
195
|
+
}
|
196
|
+
/**
|
197
|
+
* Signs the given object with the private key and returns the signed object.
|
198
|
+
* @param object The object to create a proof for.
|
199
|
+
* @param privateKey The private key to sign the proof with.
|
200
|
+
* @param keyId The key ID to use in the proof. It will be used by the verifier.
|
201
|
+
* @param options Additional options. See also {@link SignObjectOptions}.
|
202
|
+
* @returns The signed object.
|
203
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
204
|
+
* @since 0.10.0
|
205
|
+
*/
|
206
|
+
declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKey, keyId: URL, options?: SignObjectOptions): Promise<T>;
|
207
|
+
/**
|
208
|
+
* Options for {@link verifyProof}.
|
209
|
+
* @since 0.10.0
|
210
|
+
*/
|
211
|
+
interface VerifyProofOptions {
|
212
|
+
/**
|
213
|
+
* The context loader for loading remote JSON-LD contexts.
|
214
|
+
*/
|
215
|
+
contextLoader?: DocumentLoader;
|
216
|
+
/**
|
217
|
+
* The document loader for loading remote JSON-LD documents.
|
218
|
+
*/
|
219
|
+
documentLoader?: DocumentLoader;
|
220
|
+
/**
|
221
|
+
* The key cache to use for caching public keys.
|
222
|
+
* @since 0.12.0
|
223
|
+
*/
|
224
|
+
keyCache?: KeyCache;
|
225
|
+
/**
|
226
|
+
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
227
|
+
* is used.
|
228
|
+
* @since 1.3.0
|
229
|
+
*/
|
230
|
+
tracerProvider?: TracerProvider;
|
231
|
+
}
|
232
|
+
/**
|
233
|
+
* Verifies the given proof for the object.
|
234
|
+
* @param jsonLd The JSON-LD object to verify the proof for. If it contains
|
235
|
+
* any proofs, they will be ignored.
|
236
|
+
* @param proof The proof to verify.
|
237
|
+
* @param options Additional options. See also {@link VerifyProofOptions}.
|
238
|
+
* @returns The public key that was used to sign the proof, or `null` if the
|
239
|
+
* proof is invalid.
|
240
|
+
* @since 0.10.0
|
241
|
+
*/
|
242
|
+
declare function verifyProof(jsonLd: unknown, proof: DataIntegrityProof, options?: VerifyProofOptions): Promise<Multikey | null>;
|
243
|
+
/**
|
244
|
+
* Options for {@link verifyObject}.
|
245
|
+
* @since 0.10.0
|
246
|
+
*/
|
247
|
+
interface VerifyObjectOptions extends VerifyProofOptions {}
|
248
|
+
/**
|
249
|
+
* Verifies the given object. It will verify all the proofs in the object,
|
250
|
+
* and succeed only if all the proofs are valid and all attributions and
|
251
|
+
* actors are authenticated by the proofs.
|
252
|
+
* @template T The type of the object to verify.
|
253
|
+
* @param cls The class of the object to verify. It must be a subclass of
|
254
|
+
* the {@link Object}.
|
255
|
+
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|
256
|
+
* is a compacted JSON-LD representation of a `T` with `@context`.
|
257
|
+
* @param options Additional options. See also {@link VerifyObjectOptions}.
|
258
|
+
* @returns The object if it's verified, or `null` if it's not.
|
259
|
+
* @throws {TypeError} If the object is invalid or unsupported.
|
260
|
+
* @since 0.10.0
|
261
|
+
*/
|
262
|
+
declare function verifyObject<T extends Object$1>(cls: (new (...args: any[]) => T) & {
|
263
|
+
fromJsonLd(jsonLd: unknown, options: VerifyObjectOptions): Promise<T>;
|
264
|
+
}, jsonLd: unknown, options?: VerifyObjectOptions): Promise<T | null>;
|
265
|
+
//#endregion
|
266
|
+
export { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
3
|
import { DocumentLoader, GetUserAgentOptions } from "./docloader-CxWcuWqQ.js";
|
4
|
-
import { Collection, Link, Object as Object$1 } from "./vocab-
|
4
|
+
import { Collection, Link, Object as Object$1 } from "./vocab-BI0Ak5lL.js";
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
6
6
|
|
7
7
|
//#region src/vocab/lookup.d.ts
|
@@ -20,6 +20,24 @@ interface LookupObjectOptions {
|
|
20
20
|
* @since 0.8.0
|
21
21
|
*/
|
22
22
|
contextLoader?: DocumentLoader;
|
23
|
+
/**
|
24
|
+
* Whether to allow fetching an object with an `@id` having a different
|
25
|
+
* origin than the object's URL. This is not recommended, as it may
|
26
|
+
* lead to security issues. Only use this option if you know what you
|
27
|
+
* are doing.
|
28
|
+
*
|
29
|
+
* How to handle the case when an object's `@id` has a different origin
|
30
|
+
* than the object's URL:
|
31
|
+
*
|
32
|
+
* - `"ignore"` (default): Do not return the object, and log a warning.
|
33
|
+
* - `"throw"`: Throw an error.
|
34
|
+
* - `"trust"`: Bypass the check and return the object anyway. This
|
35
|
+
* is not recommended, as it may lead to security issues. Only use
|
36
|
+
* this option if you know what you are doing.
|
37
|
+
*
|
38
|
+
* @since 1.9.0
|
39
|
+
*/
|
40
|
+
crossOrigin?: "ignore" | "throw" | "trust";
|
23
41
|
/**
|
24
42
|
* The options for making `User-Agent` header.
|
25
43
|
* If a string is given, it is used as the `User-Agent` header value.
|
@@ -0,0 +1 @@
|
|
1
|
+
export { };
|
@@ -0,0 +1,113 @@
|
|
1
|
+
import { GetUserAgentOptions } from "./docloader-D-MrRyHl.cjs";
|
2
|
+
import { TracerProvider } from "@opentelemetry/api";
|
3
|
+
|
4
|
+
//#region src/webfinger/jrd.d.ts
|
5
|
+
/**
|
6
|
+
* Describes a resource. See also
|
7
|
+
* [RFC 7033 section 4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4).
|
8
|
+
*/
|
9
|
+
interface ResourceDescriptor {
|
10
|
+
/**
|
11
|
+
* A URI that identifies the entity that this descriptor describes.
|
12
|
+
*/
|
13
|
+
subject?: string;
|
14
|
+
/**
|
15
|
+
* URIs that identify the same entity as the `subject`.
|
16
|
+
*/
|
17
|
+
aliases?: string[];
|
18
|
+
/**
|
19
|
+
* Conveys additional information about the `subject` of this descriptor.
|
20
|
+
*/
|
21
|
+
properties?: Record<string, string>;
|
22
|
+
/**
|
23
|
+
* Links to other resources.
|
24
|
+
*/
|
25
|
+
links?: Link[];
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Represents a link. See also
|
29
|
+
* [RFC 7033 section 4.4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4.4).
|
30
|
+
*/
|
31
|
+
interface Link {
|
32
|
+
/**
|
33
|
+
* The link's relation type, which is either a URI or a registered relation
|
34
|
+
* type (see [RFC 5988](https://datatracker.ietf.org/doc/html/rfc5988)).
|
35
|
+
*/
|
36
|
+
rel: string;
|
37
|
+
/**
|
38
|
+
* The media type of the target resource (see
|
39
|
+
* [RFC 6838](https://datatracker.ietf.org/doc/html/rfc6838)).
|
40
|
+
*/
|
41
|
+
type?: string;
|
42
|
+
/**
|
43
|
+
* A URI pointing to the target resource.
|
44
|
+
*/
|
45
|
+
href?: string;
|
46
|
+
/**
|
47
|
+
* Human-readable titles describing the link relation. If the language is
|
48
|
+
* unknown or unspecified, the key is `"und"`.
|
49
|
+
*/
|
50
|
+
titles?: Record<string, string>;
|
51
|
+
/**
|
52
|
+
* Conveys additional information about the link relation.
|
53
|
+
*/
|
54
|
+
properties?: Record<string, string>;
|
55
|
+
/**
|
56
|
+
* A URI Template (RFC 6570) that can be used to construct URIs by
|
57
|
+
* substituting variables. Used primarily for subscription endpoints
|
58
|
+
* where parameters like account URIs need to be dynamically inserted.
|
59
|
+
* @since 1.9.0
|
60
|
+
*/
|
61
|
+
template?: string;
|
62
|
+
}
|
63
|
+
//#endregion
|
64
|
+
//#region src/webfinger/lookup.d.ts
|
65
|
+
/**
|
66
|
+
* Options for {@link lookupWebFinger}.
|
67
|
+
* @since 1.3.0
|
68
|
+
*/
|
69
|
+
interface LookupWebFingerOptions {
|
70
|
+
/**
|
71
|
+
* The options for making `User-Agent` header.
|
72
|
+
* If a string is given, it is used as the `User-Agent` header value.
|
73
|
+
* If an object is given, it is passed to {@link getUserAgent} to generate
|
74
|
+
* the `User-Agent` header value.
|
75
|
+
*/
|
76
|
+
userAgent?: GetUserAgentOptions | string;
|
77
|
+
/**
|
78
|
+
* Whether to allow private IP addresses in the URL.
|
79
|
+
*
|
80
|
+
* Mostly useful for testing purposes. *Do not use this in production.*
|
81
|
+
*
|
82
|
+
* Turned off by default.
|
83
|
+
* @since 1.4.0
|
84
|
+
*/
|
85
|
+
allowPrivateAddress?: boolean;
|
86
|
+
/**
|
87
|
+
* The maximum number of redirections to follow.
|
88
|
+
* @default `5`
|
89
|
+
* @since 1.8.0
|
90
|
+
*/
|
91
|
+
maxRedirection?: number;
|
92
|
+
/**
|
93
|
+
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
94
|
+
* is used.
|
95
|
+
*/
|
96
|
+
tracerProvider?: TracerProvider;
|
97
|
+
/**
|
98
|
+
* AbortSignal for cancelling the request.
|
99
|
+
* @since 1.8.0
|
100
|
+
* @
|
101
|
+
*/
|
102
|
+
signal?: AbortSignal;
|
103
|
+
}
|
104
|
+
/**
|
105
|
+
* Looks up a WebFinger resource.
|
106
|
+
* @param resource The resource URL to look up.
|
107
|
+
* @param options Extra options for looking up the resource.
|
108
|
+
* @returns The resource descriptor, or `null` if not found.
|
109
|
+
* @since 0.2.0
|
110
|
+
*/
|
111
|
+
declare function lookupWebFinger(resource: URL | string, options?: LookupWebFingerOptions): Promise<ResourceDescriptor | null>;
|
112
|
+
//#endregion
|
113
|
+
export { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger };
|
package/dist/mod.cjs
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
4
|
+
|
5
|
+
const require_transformers = require('./transformers-CoBS-oFG.cjs');
|
6
|
+
require('./compat-DmDDELst.cjs');
|
7
|
+
const require_docloader = require('./docloader-7Ey7wNHx.cjs');
|
8
|
+
const require_actor = require('./actor-CrTGiTZd.cjs');
|
9
|
+
const require_middleware = require('./middleware-TfuVoceY.cjs');
|
10
|
+
const require_lookup = require('./lookup-DiV4LFBg.cjs');
|
11
|
+
const require_key = require('./key-CZR7QraT.cjs');
|
12
|
+
const require_http = require('./http-BiBofurJ.cjs');
|
13
|
+
const require_proof = require('./proof-CRJWXFfT.cjs');
|
14
|
+
const require_federation = require('./federation-H2_En3j5.cjs');
|
15
|
+
const require_types = require('./types-CmmUQisS.cjs');
|
16
|
+
const require_authdocloader = require('./authdocloader-CQMPmpaO.cjs');
|
17
|
+
const require_vocab = require('./vocab-C5Y-0fGj.cjs');
|
18
|
+
require('./nodeinfo-Co9lJrWl.cjs');
|
19
|
+
require('./runtime-C58AJWSv.cjs');
|
20
|
+
require('./sig-ByHXzqUi.cjs');
|
21
|
+
require('./webfinger-BjOEdFPs.cjs');
|
22
|
+
|
23
|
+
exports.Accept = require_actor.Accept;
|
24
|
+
exports.Activity = require_actor.Activity;
|
25
|
+
exports.Add = require_actor.Add;
|
26
|
+
exports.Announce = require_actor.Announce;
|
27
|
+
exports.Application = require_actor.Application;
|
28
|
+
exports.Arrive = require_actor.Arrive;
|
29
|
+
exports.Article = require_actor.Article;
|
30
|
+
exports.Audio = require_actor.Audio;
|
31
|
+
exports.Block = require_actor.Block;
|
32
|
+
exports.ChatMessage = require_actor.ChatMessage;
|
33
|
+
exports.Collection = require_actor.Collection;
|
34
|
+
exports.CollectionPage = require_actor.CollectionPage;
|
35
|
+
exports.Create = require_actor.Create;
|
36
|
+
exports.CryptographicKey = require_actor.CryptographicKey;
|
37
|
+
exports.DataIntegrityProof = require_actor.DataIntegrityProof;
|
38
|
+
exports.Delete = require_actor.Delete;
|
39
|
+
exports.DidService = require_actor.DidService;
|
40
|
+
exports.Dislike = require_actor.Dislike;
|
41
|
+
exports.Document = require_actor.Document;
|
42
|
+
exports.Emoji = require_actor.Emoji;
|
43
|
+
exports.EmojiReact = require_actor.EmojiReact;
|
44
|
+
exports.Endpoints = require_actor.Endpoints;
|
45
|
+
exports.Event = require_actor.Event;
|
46
|
+
exports.Export = require_actor.Export;
|
47
|
+
exports.FetchError = require_docloader.FetchError;
|
48
|
+
exports.Flag = require_actor.Flag;
|
49
|
+
exports.Follow = require_actor.Follow;
|
50
|
+
exports.Group = require_actor.Group;
|
51
|
+
exports.Hashtag = require_actor.Hashtag;
|
52
|
+
exports.Ignore = require_actor.Ignore;
|
53
|
+
exports.Image = require_actor.Image;
|
54
|
+
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
55
|
+
exports.IntransitiveActivity = require_actor.IntransitiveActivity;
|
56
|
+
exports.Invite = require_actor.Invite;
|
57
|
+
exports.Join = require_actor.Join;
|
58
|
+
exports.LanguageString = require_actor.LanguageString;
|
59
|
+
exports.Leave = require_actor.Leave;
|
60
|
+
exports.Like = require_actor.Like;
|
61
|
+
exports.Link = require_actor.Link;
|
62
|
+
exports.Listen = require_actor.Listen;
|
63
|
+
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
64
|
+
exports.Mention = require_actor.Mention;
|
65
|
+
exports.Move = require_actor.Move;
|
66
|
+
exports.Multikey = require_actor.Multikey;
|
67
|
+
exports.Note = require_actor.Note;
|
68
|
+
exports.Object = require_actor.Object$1;
|
69
|
+
exports.Offer = require_actor.Offer;
|
70
|
+
exports.OrderedCollection = require_actor.OrderedCollection;
|
71
|
+
exports.OrderedCollectionPage = require_actor.OrderedCollectionPage;
|
72
|
+
exports.Organization = require_actor.Organization;
|
73
|
+
exports.PUBLIC_COLLECTION = require_vocab.PUBLIC_COLLECTION;
|
74
|
+
exports.Page = require_actor.Page;
|
75
|
+
exports.ParallelMessageQueue = require_federation.ParallelMessageQueue;
|
76
|
+
exports.Person = require_actor.Person;
|
77
|
+
exports.Place = require_actor.Place;
|
78
|
+
exports.Profile = require_actor.Profile;
|
79
|
+
exports.PropertyValue = require_actor.PropertyValue;
|
80
|
+
exports.Question = require_actor.Question;
|
81
|
+
exports.Read = require_actor.Read;
|
82
|
+
exports.Reject = require_actor.Reject;
|
83
|
+
exports.Relationship = require_actor.Relationship;
|
84
|
+
exports.Remove = require_actor.Remove;
|
85
|
+
exports.Router = require_middleware.Router;
|
86
|
+
exports.RouterError = require_middleware.RouterError;
|
87
|
+
exports.Service = require_actor.Service;
|
88
|
+
exports.Source = require_actor.Source;
|
89
|
+
exports.TentativeAccept = require_actor.TentativeAccept;
|
90
|
+
exports.TentativeReject = require_actor.TentativeReject;
|
91
|
+
exports.Tombstone = require_actor.Tombstone;
|
92
|
+
exports.Travel = require_actor.Travel;
|
93
|
+
exports.Undo = require_actor.Undo;
|
94
|
+
exports.Update = require_actor.Update;
|
95
|
+
exports.Video = require_actor.Video;
|
96
|
+
exports.View = require_actor.View;
|
97
|
+
exports.actorDehydrator = require_transformers.actorDehydrator;
|
98
|
+
exports.attachSignature = require_proof.attachSignature;
|
99
|
+
exports.autoIdAssigner = require_transformers.autoIdAssigner;
|
100
|
+
exports.buildCollectionSynchronizationHeader = require_middleware.buildCollectionSynchronizationHeader;
|
101
|
+
exports.createExponentialBackoffPolicy = require_middleware.createExponentialBackoffPolicy;
|
102
|
+
exports.createFederation = require_middleware.createFederation;
|
103
|
+
exports.createFederationBuilder = require_middleware.createFederationBuilder;
|
104
|
+
exports.createProof = require_proof.createProof;
|
105
|
+
exports.createSignature = require_proof.createSignature;
|
106
|
+
exports.detachSignature = require_proof.detachSignature;
|
107
|
+
exports.digest = require_middleware.digest;
|
108
|
+
exports.doesActorOwnKey = require_proof.doesActorOwnKey;
|
109
|
+
exports.exportJwk = require_key.exportJwk;
|
110
|
+
exports.exportMultibaseKey = require_actor.exportMultibaseKey;
|
111
|
+
exports.exportSpki = require_actor.exportSpki;
|
112
|
+
exports.fetchDocumentLoader = require_docloader.fetchDocumentLoader;
|
113
|
+
exports.fetchKey = require_key.fetchKey;
|
114
|
+
exports.generateCryptoKeyPair = require_key.generateCryptoKeyPair;
|
115
|
+
exports.getActorClassByTypeName = require_actor.getActorClassByTypeName;
|
116
|
+
exports.getActorHandle = require_actor.getActorHandle;
|
117
|
+
exports.getActorTypeName = require_actor.getActorTypeName;
|
118
|
+
exports.getAuthenticatedDocumentLoader = require_authdocloader.getAuthenticatedDocumentLoader;
|
119
|
+
exports.getDefaultActivityTransformers = require_transformers.getDefaultActivityTransformers;
|
120
|
+
exports.getDocumentLoader = require_docloader.getDocumentLoader;
|
121
|
+
exports.getKeyOwner = require_proof.getKeyOwner;
|
122
|
+
exports.getNodeInfo = require_types.getNodeInfo;
|
123
|
+
exports.getTypeId = require_actor.getTypeId;
|
124
|
+
exports.getUserAgent = require_docloader.getUserAgent;
|
125
|
+
exports.importJwk = require_key.importJwk;
|
126
|
+
exports.importMultibaseKey = require_actor.importMultibaseKey;
|
127
|
+
exports.importPem = require_actor.importPem;
|
128
|
+
exports.importPkcs1 = require_actor.importPkcs1;
|
129
|
+
exports.importSpki = require_actor.importSpki;
|
130
|
+
exports.isActor = require_actor.isActor;
|
131
|
+
exports.isFediverseHandle = require_vocab.isFediverseHandle;
|
132
|
+
exports.kvCache = require_docloader.kvCache;
|
133
|
+
exports.lookupObject = require_vocab.lookupObject;
|
134
|
+
exports.lookupWebFinger = require_lookup.lookupWebFinger;
|
135
|
+
exports.nodeInfoToJson = require_types.nodeInfoToJson;
|
136
|
+
exports.normalizeActorHandle = require_actor.normalizeActorHandle;
|
137
|
+
exports.parseFediverseHandle = require_vocab.parseFediverseHandle;
|
138
|
+
exports.parseNodeInfo = require_types.parseNodeInfo;
|
139
|
+
exports.respondWithObject = require_middleware.respondWithObject;
|
140
|
+
exports.respondWithObjectIfAcceptable = require_middleware.respondWithObjectIfAcceptable;
|
141
|
+
exports.signJsonLd = require_proof.signJsonLd;
|
142
|
+
exports.signObject = require_proof.signObject;
|
143
|
+
exports.signRequest = require_http.signRequest;
|
144
|
+
exports.toAcctUrl = require_vocab.toAcctUrl;
|
145
|
+
exports.traverseCollection = require_vocab.traverseCollection;
|
146
|
+
exports.verifyJsonLd = require_proof.verifyJsonLd;
|
147
|
+
exports.verifyObject = require_proof.verifyObject;
|
148
|
+
exports.verifyProof = require_proof.verifyProof;
|
149
|
+
exports.verifyRequest = require_http.verifyRequest;
|
150
|
+
exports.verifySignature = require_proof.verifySignature;
|
package/dist/mod.d.cts
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-63Cil1MD.cjs";
|
2
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-D-MrRyHl.cjs";
|
3
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-CegPX0Rn.cjs";
|
4
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "./vocab-Dw1-yVGg.cjs";
|
5
|
+
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-D6K058Tb.cjs";
|
6
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-D-e6AFwR.cjs";
|
7
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-BN_tO3cY.cjs";
|
8
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-CxkWO3Mg.cjs";
|
9
|
+
import { ResourceDescriptor, lookupWebFinger } from "./mod-jQ4OODsl.cjs";
|
10
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-C5BsZkDr.cjs";
|
11
|
+
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-B7R1Q-M5.cjs";
|
12
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-8DMWKtQE.cjs";
|
13
|
+
import "./mod-C2tOeRkN.cjs";
|
14
|
+
import "./mod-FZd39qVq.cjs";
|
15
|
+
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-Cj1tHXBR.cjs";
|
16
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-Djzcw2ry.cjs";
|
17
|
+
export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/mod.d.ts
CHANGED
@@ -2,18 +2,18 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
3
|
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-C7sopW2E.js";
|
4
4
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-CxWcuWqQ.js";
|
5
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol,
|
6
|
-
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "./vocab-
|
7
|
-
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-
|
8
|
-
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
9
|
-
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-
|
10
|
-
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-bgSdkFa2.js";
|
6
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View } from "./vocab-BI0Ak5lL.js";
|
7
|
+
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-T6RyhRgk.js";
|
8
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-D6Uj2x2y.js";
|
9
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-hd9lvQcP.js";
|
10
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-DlU8ISoa.js";
|
11
11
|
import { ResourceDescriptor, lookupWebFinger } from "./mod-DBzN0aCM.js";
|
12
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
12
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-ByZprN0S.js";
|
13
13
|
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-CRGm1e_F.js";
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-D6hQoxC5.js";
|
15
15
|
import "./mod-g0xFzAP9.js";
|
16
16
|
import "./mod-1pDWKvUL.js";
|
17
|
-
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-
|
18
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-
|
19
|
-
export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult,
|
17
|
+
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-CerN_Sza.js";
|
18
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-BhUKmBJD.js";
|
19
|
+
export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParamsKeyPath, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|