@fedify/fedify 1.6.1-dev.869 → 1.6.1-dev.873
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/{vocab/actor.js → actor-DhyIYEBl.js} +5 -4
- package/dist/{vocab/actor.d.ts → actor-lFlm8FYo.d.ts} +2 -2
- package/dist/actor-trV1ExpS.js +36173 -0
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js → assert-Dv75vaGI.js} +2 -1
- package/dist/assert_equals-ClvzlhZu.js +1020 -0
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js → assert_instance_of--9UCVKsi.js} +2 -1
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js → assert_is_error-D162gXcM.js} +2 -2
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js → assert_not_equals-Cyf5m9Ke.js} +2 -2
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_rejects.js → assert_rejects-FOHCtlD2.js} +23 -3
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_throws.js → assert_throws-CRfQJvVx.js} +3 -2
- package/dist/authdocloader-4i4HAp9R.js +51 -0
- package/dist/{runtime/authdocloader.js → authdocloader-BXgFJugo.js} +5 -4
- package/dist/{federation/builder.js → builder-Bh56oIkr.js} +6 -5
- package/dist/{_virtual/rolldown_runtime.js → chunk-HsBuZ-b2.js} +1 -0
- package/dist/{nodeinfo/client.js → client-BoT1mhNh.js} +3 -2
- package/dist/client-Dw1pCSIt.d.ts +299 -0
- package/dist/{federation/collection.js → collection-QaGK9TVn.js} +1 -0
- package/dist/compat/mod.d.ts +12 -2
- package/dist/compat/mod.js +2 -1
- package/dist/compat/transformers.test.d.ts +2 -1
- package/dist/compat/transformers.test.js +32 -8
- package/dist/{testing/context.js → context-B2499YhO.js} +5 -4
- package/dist/context-CzJXjNR8.d.ts +2034 -0
- package/dist/{x/denokv.js → denokv-iB_ggPGm.js} +3 -1
- package/dist/{testing/docloader.js → docloader-09nVWLAZ.js} +1 -0
- package/dist/{runtime/contexts.js → docloader-CMlE_DQr.js} +420 -1
- package/dist/{runtime/docloader.d.ts → docloader-DTRsVZPo.d.ts} +1 -1
- package/dist/docloader-lJiW6zUk.js +4594 -0
- package/dist/esm-BxIKwi-M.js +1221 -0
- package/dist/federation/builder.test.d.ts +2 -1
- package/dist/federation/builder.test.js +21 -7
- package/dist/federation/collection.test.d.ts +2 -1
- package/dist/federation/collection.test.js +11 -3
- package/dist/federation/handler.test.d.ts +2 -1
- package/dist/federation/handler.test.js +40 -12
- package/dist/federation/inbox.test.d.ts +2 -1
- package/dist/federation/inbox.test.js +12 -5
- package/dist/federation/keycache.test.d.ts +2 -1
- package/dist/federation/keycache.test.js +12 -7
- package/dist/federation/kv.test.d.ts +2 -1
- package/dist/federation/kv.test.js +11 -3
- package/dist/federation/middleware.test.d.ts +2 -1
- package/dist/federation/middleware.test.js +107 -26
- package/dist/federation/mod.d.ts +13 -13
- package/dist/federation/mod.js +12 -8
- package/dist/federation/mq.test.d.ts +2 -1
- package/dist/federation/mq.test.js +153 -6
- package/dist/federation/retry.test.d.ts +2 -1
- package/dist/federation/retry.test.js +5 -5
- package/dist/federation/router.test.d.ts +2 -1
- package/dist/federation/router.test.js +11 -6
- package/dist/federation/send.test.d.ts +2 -1
- package/dist/federation/send.test.js +25 -13
- package/dist/{federation/mq.js → federation-Bmj7soSg.js} +47 -1
- package/dist/{node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/router.js → hongminhee__deno-mock-fetch-DJKLj_H-.js} +96 -1
- package/dist/http-BImJcLfv.d.ts +258 -0
- package/dist/{sig/http.js → http-CFQSpmJT.js} +5 -4
- package/dist/http-DtHTiemN.js +720 -0
- package/dist/{federation/inbox.js → inbox-DkHjiHqX.js} +4 -3
- package/dist/key-B5Eb05gk.js +16 -0
- package/dist/key-BYBj-UD-.js +10 -0
- package/dist/key-CkoTQfVN.js +262 -0
- package/dist/{sig/key.js → key-a7_2L5_Z.js} +2 -4
- package/dist/{federation/keycache.js → keycache-D8j8RFWf.js} +2 -1
- package/dist/{testing/keys.js → keys-DxEMe-K1.js} +2 -2
- package/dist/{federation/kv.js → kv-DohFOP2C.js} +1 -0
- package/dist/{runtime/langstr.js → langstr-DbWheeIS.js} +1 -0
- package/dist/{sig/ld.js → ld-I1s-XiQ5.js} +6 -6
- package/dist/{vocab/lookup.js → lookup--9t_F8FE.js} +5 -5
- package/dist/lookup-BDLFt_tc.js +131 -0
- package/dist/{webfinger/lookup.js → lookup-BUFWWv5q.js} +1 -3
- package/dist/{webfinger/jrd.d.ts → lookup-DAfStZtI.d.ts} +41 -1
- package/dist/middleware-BPXHlM9G.js +17 -0
- package/dist/middleware-ByU_X6O9.js +33 -0
- package/dist/middleware-CNVKIPYL.js +3525 -0
- package/dist/{federation/middleware.js → middleware-ewowwb4s.js} +957 -105
- package/dist/mod-1pDWKvUL.d.ts +2 -0
- package/dist/{runtime/key.d.ts → mod-BxwG4X3V.d.ts} +52 -7
- package/dist/{compat/transformers.d.ts → mod-CeLnlsqE.d.ts} +3 -4
- package/dist/{vocab/lookup.d.ts → mod-DysVoXOu.d.ts} +98 -3
- package/dist/mod-GIh5OYxW.d.ts +2 -0
- package/dist/{sig/ld.d.ts → mod-XT0mRthe.d.ts} +126 -4
- package/dist/mod-g0xFzAP9.d.ts +2 -0
- package/dist/mod.d.ts +18 -34
- package/dist/mod.js +17 -27
- package/dist/multibase-DeCHcK8L.js +316 -0
- package/dist/nodeinfo/client.test.d.ts +2 -1
- package/dist/nodeinfo/client.test.js +15 -4
- package/dist/nodeinfo/handler.test.d.ts +2 -1
- package/dist/nodeinfo/handler.test.js +39 -7
- package/dist/nodeinfo/mod.d.ts +4 -3
- package/dist/nodeinfo/mod.js +3 -3
- package/dist/nodeinfo/semver.test.d.ts +2 -1
- package/dist/nodeinfo/semver.test.js +11 -4
- package/dist/nodeinfo/types.test.d.ts +2 -1
- package/dist/nodeinfo/types.test.js +12 -4
- package/dist/{sig/owner.js → owner-2Gouxs6Y.js} +4 -4
- package/dist/{sig/owner.d.ts → owner-BjpObx-L.d.ts} +4 -6
- package/dist/proof-BcNfBguh.js +595 -0
- package/dist/{sig/proof.js → proof-CJ291J94.js} +5 -4
- package/dist/{federation/retry.js → retry-BiIhZWgD.js} +1 -0
- package/dist/{federation/router.js → router-D_aVZZUc.js} +1 -0
- package/dist/runtime/authdocloader.test.d.ts +2 -1
- package/dist/runtime/authdocloader.test.js +24 -9
- package/dist/runtime/docloader.test.d.ts +2 -1
- package/dist/runtime/docloader.test.js +15 -11
- package/dist/runtime/key.test.d.ts +2 -1
- package/dist/runtime/key.test.js +19 -4
- package/dist/runtime/langstr.test.d.ts +2 -1
- package/dist/runtime/langstr.test.js +11 -3
- package/dist/runtime/mod.d.ts +5 -4
- package/dist/runtime/mod.js +7 -4
- package/dist/runtime/multibase/multibase.test.d.ts +2 -1
- package/dist/runtime/multibase/multibase.test.js +11 -5
- package/dist/runtime/url.test.d.ts +2 -1
- package/dist/runtime/url.test.js +7 -6
- package/dist/{nodeinfo/semver.js → semver-CbbIgUsa.js} +1 -0
- package/dist/{federation/send.js → send-BFMnzlj7.js} +3 -2
- package/dist/sig/http.test.d.ts +2 -1
- package/dist/sig/http.test.js +23 -12
- package/dist/sig/key.test.d.ts +2 -1
- package/dist/sig/key.test.js +21 -8
- package/dist/sig/ld.test.d.ts +2 -1
- package/dist/sig/ld.test.js +19 -11
- package/dist/sig/mod.d.ts +7 -5
- package/dist/sig/mod.js +7 -5
- package/dist/sig/owner.test.d.ts +2 -1
- package/dist/sig/owner.test.js +23 -9
- package/dist/sig/proof.test.d.ts +2 -1
- package/dist/sig/proof.test.js +22 -10
- package/dist/std__assert-CaBUULmX.js +151 -0
- package/dist/testing/docloader.test.d.ts +2 -1
- package/dist/testing/docloader.test.js +11 -3
- package/dist/testing/mod.d.ts +1 -0
- package/dist/testing/mod.js +2 -136
- package/dist/testing-jcGLO9Lp.js +143 -0
- package/dist/{compat/transformers.js → transformers-jxj-4o2K.js} +1 -1
- package/dist/{vocab/type.js → type-D2s5lmbZ.js} +1 -0
- package/dist/{nodeinfo/types.js → types-CqoqWDkp.js} +2 -1
- package/dist/types-Cx0IUMu0.js +457 -0
- package/dist/{runtime/url.js → url-kTAI6_KP.js} +1 -0
- package/dist/vocab/actor.test.d.ts +2 -1
- package/dist/vocab/actor.test.js +5853 -14
- package/dist/vocab/lookup.test.d.ts +2 -1
- package/dist/vocab/lookup.test.js +20 -7
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -5
- package/dist/vocab/type.test.d.ts +2 -1
- package/dist/vocab/type.test.js +9 -4
- package/dist/vocab/vocab.test.d.ts +2 -1
- package/dist/vocab/vocab.test.js +2440 -15
- package/dist/{vocab/vocab.d.ts → vocab-CLWdoo7y.d.ts} +21 -9
- package/dist/{vocab/vocab.js → vocab-Dwop3xOF.js} +331 -182
- package/dist/vocab-uQObf7P6.js +172 -0
- package/dist/webfinger/handler.test.d.ts +2 -1
- package/dist/webfinger/handler.test.js +39 -7
- package/dist/webfinger/lookup.test.d.ts +2 -1
- package/dist/webfinger/lookup.test.js +14 -4
- package/dist/webfinger/mod.d.ts +4 -2
- package/dist/webfinger/mod.js +3 -1
- package/dist/x/cfworkers.d.ts +49 -0
- package/dist/x/cfworkers.js +73 -0
- package/dist/x/cfworkers.test.d.ts +3 -0
- package/dist/x/cfworkers.test.js +153 -0
- package/dist/x/hono.d.ts +11 -2
- package/dist/x/sveltekit.d.ts +11 -2
- package/package.json +6 -1
- package/dist/codegen/fs.js +0 -23
- package/dist/codegen/schema.js +0 -88
- package/dist/codegen/type.js +0 -392
- package/dist/compat/types.d.ts +0 -18
- package/dist/deno.js +0 -137
- package/dist/federation/builder.d.ts +0 -19
- package/dist/federation/callback.d.ts +0 -211
- package/dist/federation/collection.d.ts +0 -36
- package/dist/federation/context.d.ts +0 -757
- package/dist/federation/federation.d.ts +0 -689
- package/dist/federation/handler.d.ts +0 -44
- package/dist/federation/handler.js +0 -543
- package/dist/federation/middleware.d.ts +0 -101
- package/dist/federation/negotiation.js +0 -63
- package/dist/federation/retry.d.ts +0 -71
- package/dist/federation/router.d.ts +0 -92
- package/dist/federation/send.d.ts +0 -29
- package/dist/node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/mod.js +0 -101
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_equals.js +0 -49
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_exists.js +0 -32
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js +0 -26
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_greater.js +0 -34
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_greater_or_equal.js +0 -34
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_strict_equals.js +0 -53
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_string_includes.js +0 -32
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assertion_error.js +0 -33
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/equal.js +0 -79
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/mod.js +0 -19
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/assertion_state.js +0 -177
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/build_message.js +0 -101
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/diff.js +0 -274
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/diff_str.js +0 -148
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/format.js +0 -37
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/mod.js +0 -10
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/styles.js +0 -172
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/assert_path.js +0 -11
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/constants.js +0 -10
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/dirname.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/from_file_url.js +0 -13
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize_string.js +0 -60
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/strip_trailing_separators.js +0 -15
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_os.js +0 -9
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/extname.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/format.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/from_file_url.js +0 -34
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/glob_to_regexp.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/is_absolute.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/join.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/join_globs.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/mod.js +0 -5
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/normalize.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/normalize_glob.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/parse.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/_util.js +0 -13
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/dirname.js +0 -54
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/from_file_url.js +0 -27
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/join.js +0 -47
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/normalize.js +0 -59
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/relative.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/resolve.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/to_file_url.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/to_namespaced_path.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/windows/from_file_url.js +0 -31
- package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/_strip.js +0 -17
- package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/dirname.js +0 -38
- package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/join.js +0 -36
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_chars.js +0 -47
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_dumper_state.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_loader_state.js +0 -884
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_schema.js +0 -120
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/binary.js +0 -92
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/bool.js +0 -41
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/float.js +0 -58
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/int.js +0 -118
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/map.js +0 -18
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/merge.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/nil.js +0 -23
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/omap.js +0 -31
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/pairs.js +0 -22
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/regexp.js +0 -29
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/seq.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/set.js +0 -17
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/str.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/timestamp.js +0 -57
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/undefined.js +0 -24
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_utils.js +0 -17
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/mod.js +0 -5
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/parse.js +0 -54
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/stringify.js +0 -4
- package/dist/node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.js +0 -68
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/AlwaysShrinkableArbitrary.js +0 -30
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayArbitrary.js +0 -203
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayInt64Arbitrary.js +0 -122
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/BigIntArbitrary.js +0 -63
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ConstantArbitrary.js +0 -58
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/FrequencyArbitrary.js +0 -136
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/IntegerArbitrary.js +0 -64
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/LazyArbitrary.js +0 -29
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/StringUnitArbitrary.js +0 -45
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/TupleArbitrary.js +0 -74
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/WithShrinkFromOtherArbitrary.js +0 -40
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/AnyArbitraryBuilder.js +0 -97
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/BoxedArbitraryBuilder.js +0 -13
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/CharacterArbitraryBuilder.js +0 -17
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/RestrictedIntegerArbitraryBuilder.js +0 -23
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.js +0 -32
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/data/GraphemeRanges.js +0 -990
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ArrayInt64.js +0 -98
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BiasNumericRange.js +0 -53
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BuildSlicedGenerator.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/CustomEqualSet.js +0 -27
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DepthContext.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleHelpers.js +0 -96
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleOnlyHelpers.js +0 -25
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatHelpers.js +0 -57
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatOnlyHelpers.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatingOnlyHelpers.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/GraphemeRangesHelpers.js +0 -58
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/MaxLengthFromMinLength.js +0 -72
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/NoUndefinedAsContext.js +0 -16
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/QualifiedObjectConstraints.js +0 -58
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueSet.js +0 -41
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueZeroSet.js +0 -33
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkBigInt.js +0 -37
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkInteger.js +0 -41
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SlicesForStringBuilder.js +0 -74
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/StrictlyEqualSet.js +0 -38
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/TokenizeString.js +0 -47
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/NoopSlicedGenerator.js +0 -21
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/SlicedBasedGenerator.js +0 -53
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToMap.js +0 -16
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToSet.js +0 -16
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/CodePointsToString.js +0 -17
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToCharString.js +0 -20
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToMappedConstant.js +0 -69
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToPrintableIndex.js +0 -18
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/KeyValuePairsToObject.js +0 -42
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/PatternsToString.js +0 -32
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/TimeToDate.js +0 -30
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/UnboxedToBoxed.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/anything.js +0 -14
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/array.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/bigInt.js +0 -38
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/boolean.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/constant.js +0 -13
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/constantFrom.js +0 -14
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/date.js +0 -30
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/dictionary.js +0 -27
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/double.js +0 -54
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float.js +0 -60
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float32Array.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float64Array.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/fullUnicode.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/fullUnicodeString.js +0 -20
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int16Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int32Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int8Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/integer.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/letrec.js +0 -28
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/mapToConstant.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/maxSafeInteger.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/nat.js +0 -17
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/noBias.js +0 -11
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/oneof.js +0 -31
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/sparseArray.js +0 -68
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/string.js +0 -32
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/tuple.js +0 -13
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint16Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint32Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint8Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint8ClampedArray.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uniqueArray.js +0 -47
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Arbitrary.js +0 -184
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Value.js +0 -31
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js +0 -19
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IRawProperty.js +0 -12
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IgnoreEqualValuesProperty.js +0 -52
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.generic.js +0 -77
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/SkipAfterProperty.js +0 -61
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/TimeoutProperty.js +0 -52
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/UnbiasedProperty.js +0 -29
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/DecorateProperty.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/Runner.js +0 -61
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/RunnerIterator.js +0 -47
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/SourceValuesIterator.js +0 -35
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/Tosser.js +0 -33
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/GlobalParameters.js +0 -12
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/QualifiedParameters.js +0 -121
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/VerbosityLevel.js +0 -14
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/reporter/ExecutionStatus.js +0 -14
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/reporter/RunExecution.js +0 -116
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/utils/PathWalker.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/utils/RunDetailsFormatter.js +0 -135
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/symbols.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/random/generator/Random.js +0 -48
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/LazyIterableIterator.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/Stream.js +0 -84
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/StreamHelpers.js +0 -50
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/apply.js +0 -28
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/globals.js +0 -309
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/stringify.js +0 -217
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/CallHistory.js +0 -94
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/FetchMock.js +0 -143
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/IsSubsetOf.js +0 -103
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Matchers.js +0 -195
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/RequestUtils.js +0 -83
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Route.js +0 -137
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Router.js +0 -181
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/StatusTextMap.js +0 -73
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/TypeDescriptor.js +0 -97
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/index.js +0 -11
- package/dist/node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js +0 -87
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js +0 -20
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js +0 -20
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js +0 -20
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js +0 -20
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js +0 -32
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js +0 -43
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js +0 -139
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js +0 -26
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js +0 -14
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/LinearCongruential.js +0 -53
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/MersenneTwister.js +0 -114
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/RandomGenerator.js +0 -26
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XorShift.js +0 -83
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XoroShiro.js +0 -83
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand-default.js +0 -44
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand.js +0 -22
- package/dist/node_modules/.pnpm/regexparam@3.0.0/node_modules/regexparam/dist/index.js +0 -37
- package/dist/nodeinfo/client.d.ts +0 -96
- package/dist/nodeinfo/handler.js +0 -46
- package/dist/nodeinfo/semver.d.ts +0 -78
- package/dist/nodeinfo/types.d.ts +0 -140
- package/dist/runtime/authdocloader.d.ts +0 -56
- package/dist/runtime/docloader.js +0 -291
- package/dist/runtime/key.js +0 -156
- package/dist/runtime/langstr.d.ts +0 -24
- package/dist/runtime/multibase/base.js +0 -32
- package/dist/runtime/multibase/constants.js +0 -172
- package/dist/runtime/multibase/index.js +0 -57
- package/dist/runtime/multibase/rfc4648.js +0 -61
- package/dist/runtime/multibase/util.js +0 -21
- package/dist/sig/http.d.ts +0 -143
- package/dist/sig/key.d.ts +0 -125
- package/dist/sig/proof.d.ts +0 -134
- package/dist/testing/fixtures/example.com/person.js +0 -29
- package/dist/testing/fixtures/example.com/person2.js +0 -48
- package/dist/vocab/constants.d.ts +0 -24
- package/dist/vocab/constants.js +0 -17
- package/dist/vocab/type.d.ts +0 -107
- package/dist/webfinger/handler.js +0 -140
- package/dist/webfinger/lookup.d.ts +0 -47
- /package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_object_match.js → compat-Bb5myD13.js} +0 -0
- /package/dist/{testing/fixtures → fixtures}/activitypub.academy/users/brauca_darradiul.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/announce.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/collection.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/create.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/cross-origin-actor.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/hong-gildong.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/invite.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/key.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/key2.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/object.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/orderedcollectionpage.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/paged/a.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/paged/b.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/paged-collection.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/person.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/person2.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/test.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/users/handle.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/wrong-type.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/remote.domain/users/bob.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/server.example/users/alice.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/w3id.org/identity/v1.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/w3id.org/security/data-integrity/v1.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/w3id.org/security/multikey/v1.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/w3id.org/security/v1.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/wizard.casa/users/hongminhee.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/www.w3.org/ns/activitystreams.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/www.w3.org/ns/did/v1.json +0 -0
- /package/dist/{federation/kv.d.ts → kv-BmsWxOQ2.d.ts} +0 -0
- /package/dist/{federation/mq.d.ts → mq-Bue016Tz.d.ts} +0 -0
- /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/basename.js → nodeinfo-CyEbLjHs.js} +0 -0
- /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/common.js → runtime-BSkOVUWM.js} +0 -0
- /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/constants.js → sig-BXJO--F9.js} +0 -0
- /package/dist/{codegen → vocab}/schema.yaml +0 -0
- /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/dirname.js → webfinger-C3GIyXIg.js} +0 -0
@@ -0,0 +1,595 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-lJiW6zUk.js";
|
6
|
+
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId$1 as getTypeId, isActor } from "./actor-trV1ExpS.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-a7_2L5_Z.js";
|
8
|
+
import { getLogger } from "@logtape/logtape";
|
9
|
+
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
|
+
import jsonld from "jsonld";
|
11
|
+
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
12
|
+
import { encodeHex } from "byte-encodings/hex";
|
13
|
+
import serialize from "json-canon";
|
14
|
+
|
15
|
+
//#region sig/ld.ts
|
16
|
+
const logger$1 = getLogger([
|
17
|
+
"fedify",
|
18
|
+
"sig",
|
19
|
+
"ld"
|
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
|
+
function attachSignature(jsonLd, signature) {
|
31
|
+
if (typeof jsonLd !== "object" || jsonLd == null) throw new TypeError("Failed to attach signature; invalid JSON-LD document.");
|
32
|
+
return {
|
33
|
+
...jsonLd,
|
34
|
+
signature
|
35
|
+
};
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* Creates a LD signature for the given JSON-LD document.
|
39
|
+
* @param jsonLd The JSON-LD document to sign.
|
40
|
+
* @param privateKey The private key to sign the document.
|
41
|
+
* @param keyId The ID of the public key that corresponds to the private key.
|
42
|
+
* @param options Additional options for creating the signature.
|
43
|
+
* See also {@link CreateSignatureOptions}.
|
44
|
+
* @return The created signature.
|
45
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
46
|
+
* @since 1.0.0
|
47
|
+
*/
|
48
|
+
async function createSignature(jsonLd, privateKey, keyId, { contextLoader, created } = {}) {
|
49
|
+
validateCryptoKey(privateKey, "private");
|
50
|
+
if (privateKey.algorithm.name !== "RSASSA-PKCS1-v1_5") throw new TypeError("Unsupported algorithm: " + privateKey.algorithm.name);
|
51
|
+
const options = {
|
52
|
+
"@context": "https://w3id.org/identity/v1",
|
53
|
+
creator: keyId.href,
|
54
|
+
created: created?.toString() ?? new Date().toISOString()
|
55
|
+
};
|
56
|
+
const optionsHash = await hashJsonLd(options, contextLoader);
|
57
|
+
const docHash = await hashJsonLd(jsonLd, contextLoader);
|
58
|
+
const message = optionsHash + docHash;
|
59
|
+
const encoder = new TextEncoder();
|
60
|
+
const messageBytes = encoder.encode(message);
|
61
|
+
const signature = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, messageBytes);
|
62
|
+
return {
|
63
|
+
...options,
|
64
|
+
type: "RsaSignature2017",
|
65
|
+
signatureValue: encodeBase64(signature)
|
66
|
+
};
|
67
|
+
}
|
68
|
+
/**
|
69
|
+
* Signs the given JSON-LD document with the private key and returns the signed
|
70
|
+
* JSON-LD document.
|
71
|
+
* @param jsonLd The JSON-LD document to sign.
|
72
|
+
* @param privateKey The private key to sign the document.
|
73
|
+
* @param keyId The key ID to use in the signature. It will be used by the
|
74
|
+
* verifier to fetch the corresponding public key.
|
75
|
+
* @param options Additional options for signing the document.
|
76
|
+
* See also {@link SignJsonLdOptions}.
|
77
|
+
* @returns The signed JSON-LD document.
|
78
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
79
|
+
* @since 1.0.0
|
80
|
+
*/
|
81
|
+
async function signJsonLd(jsonLd, privateKey, keyId, options) {
|
82
|
+
const tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
|
83
|
+
const tracer = tracerProvider.getTracer(deno_default.name, deno_default.version);
|
84
|
+
return await tracer.startActiveSpan("ld_signatures.sign", { attributes: { "ld_signatures.key_id": keyId.href } }, async (span) => {
|
85
|
+
try {
|
86
|
+
const signature = await createSignature(jsonLd, privateKey, keyId, options);
|
87
|
+
if (span.isRecording()) {
|
88
|
+
span.setAttribute("ld_signatures.type", signature.type);
|
89
|
+
span.setAttribute("ld_signatures.signature", encodeHex(decodeBase64(signature.signatureValue)));
|
90
|
+
}
|
91
|
+
return attachSignature(jsonLd, signature);
|
92
|
+
} catch (error) {
|
93
|
+
span.setStatus({
|
94
|
+
code: SpanStatusCode.ERROR,
|
95
|
+
message: String(error)
|
96
|
+
});
|
97
|
+
throw error;
|
98
|
+
} finally {
|
99
|
+
span.end();
|
100
|
+
}
|
101
|
+
});
|
102
|
+
}
|
103
|
+
/**
|
104
|
+
* Checks if the given JSON-LD document has a Linked Data Signature.
|
105
|
+
* @param jsonLd The JSON-LD document to check.
|
106
|
+
* @returns `true` if the document has a signature; `false` otherwise.
|
107
|
+
* @since 1.0.0
|
108
|
+
*/
|
109
|
+
function hasSignature(jsonLd) {
|
110
|
+
if (typeof jsonLd !== "object" || jsonLd == null) return false;
|
111
|
+
if ("signature" in jsonLd) {
|
112
|
+
const signature = jsonLd.signature;
|
113
|
+
if (typeof signature !== "object" || signature == null) return false;
|
114
|
+
return "type" in signature && signature.type === "RsaSignature2017" && "creator" in signature && typeof signature.creator === "string" && "created" in signature && typeof signature.created === "string" && "signatureValue" in signature && typeof signature.signatureValue === "string";
|
115
|
+
}
|
116
|
+
return false;
|
117
|
+
}
|
118
|
+
/**
|
119
|
+
* Detaches Linked Data Signatures from the given JSON-LD document.
|
120
|
+
* @param jsonLd The JSON-LD document to modify.
|
121
|
+
* @returns The modified JSON-LD document. If the input document does not
|
122
|
+
* contain a signature, the original document is returned.
|
123
|
+
* @since 1.0.0
|
124
|
+
*/
|
125
|
+
function detachSignature(jsonLd) {
|
126
|
+
if (typeof jsonLd !== "object" || jsonLd == null) return jsonLd;
|
127
|
+
const doc = { ...jsonLd };
|
128
|
+
delete doc.signature;
|
129
|
+
return doc;
|
130
|
+
}
|
131
|
+
/**
|
132
|
+
* Verifies Linked Data Signatures of the given JSON-LD document.
|
133
|
+
* @param jsonLd The JSON-LD document to verify.
|
134
|
+
* @param options Options for verifying the signature.
|
135
|
+
* @returns The public key that signed the document or `null` if the signature
|
136
|
+
* is invalid or the key is not found.
|
137
|
+
* @since 1.0.0
|
138
|
+
*/
|
139
|
+
async function verifySignature(jsonLd, options = {}) {
|
140
|
+
if (!hasSignature(jsonLd)) return null;
|
141
|
+
const sig = jsonLd.signature;
|
142
|
+
let signature;
|
143
|
+
try {
|
144
|
+
signature = decodeBase64(sig.signatureValue);
|
145
|
+
} catch (error) {
|
146
|
+
logger$1.debug("Failed to verify; invalid base64 signatureValue: {signatureValue}", {
|
147
|
+
...sig,
|
148
|
+
error
|
149
|
+
});
|
150
|
+
return null;
|
151
|
+
}
|
152
|
+
const { key, cached } = await fetchKey(new URL(sig.creator), CryptographicKey, options);
|
153
|
+
if (key == null) return null;
|
154
|
+
const sigOpts = {
|
155
|
+
...sig,
|
156
|
+
"@context": "https://w3id.org/identity/v1"
|
157
|
+
};
|
158
|
+
delete sigOpts.type;
|
159
|
+
delete sigOpts.id;
|
160
|
+
delete sigOpts.signatureValue;
|
161
|
+
let sigOptsHash;
|
162
|
+
try {
|
163
|
+
sigOptsHash = await hashJsonLd(sigOpts, options.contextLoader);
|
164
|
+
} catch (error) {
|
165
|
+
logger$1.warn("Failed to verify; failed to hash the signature options: {signatureOptions}\n{error}", {
|
166
|
+
signatureOptions: sigOpts,
|
167
|
+
error
|
168
|
+
});
|
169
|
+
return null;
|
170
|
+
}
|
171
|
+
const document = { ...jsonLd };
|
172
|
+
delete document.signature;
|
173
|
+
let docHash;
|
174
|
+
try {
|
175
|
+
docHash = await hashJsonLd(document, options.contextLoader);
|
176
|
+
} catch (error) {
|
177
|
+
logger$1.warn("Failed to verify; failed to hash the document: {document}\n{error}", {
|
178
|
+
document,
|
179
|
+
error
|
180
|
+
});
|
181
|
+
return null;
|
182
|
+
}
|
183
|
+
const encoder = new TextEncoder();
|
184
|
+
const message = sigOptsHash + docHash;
|
185
|
+
const messageBytes = encoder.encode(message);
|
186
|
+
const verified = await crypto.subtle.verify("RSASSA-PKCS1-v1_5", key.publicKey, signature, messageBytes);
|
187
|
+
if (verified) return key;
|
188
|
+
if (cached) {
|
189
|
+
logger$1.debug("Failed to verify with the cached key {keyId}; signature {signatureValue} is invalid. Retrying with the freshly fetched key...", {
|
190
|
+
keyId: sig.creator,
|
191
|
+
...sig
|
192
|
+
});
|
193
|
+
const { key: key$1 } = await fetchKey(new URL(sig.creator), CryptographicKey, {
|
194
|
+
...options,
|
195
|
+
keyCache: {
|
196
|
+
get: () => Promise.resolve(void 0),
|
197
|
+
set: async (keyId, key$2) => await options.keyCache?.set(keyId, key$2)
|
198
|
+
}
|
199
|
+
});
|
200
|
+
if (key$1 == null) return null;
|
201
|
+
const verified$1 = await crypto.subtle.verify("RSASSA-PKCS1-v1_5", key$1.publicKey, signature, messageBytes);
|
202
|
+
return verified$1 ? key$1 : null;
|
203
|
+
}
|
204
|
+
logger$1.debug("Failed to verify with the fetched key {keyId}; signature {signatureValue} is invalid. Check if the key is correct or if the signed message is correct. The message to sign is:\n{message}", {
|
205
|
+
keyId: sig.creator,
|
206
|
+
...sig,
|
207
|
+
message
|
208
|
+
});
|
209
|
+
return null;
|
210
|
+
}
|
211
|
+
/**
|
212
|
+
* Verify the authenticity of the given JSON-LD document using Linked Data
|
213
|
+
* Signatures. If the document is signed, this function verifies the signature
|
214
|
+
* and checks if the document is attributed to the owner of the public key.
|
215
|
+
* If the document is not signed, this function returns `false`.
|
216
|
+
* @param jsonLd The JSON-LD document to verify.
|
217
|
+
* @param options Options for verifying the document.
|
218
|
+
* @returns `true` if the document is authentic; `false` otherwise.
|
219
|
+
*/
|
220
|
+
async function verifyJsonLd(jsonLd, options = {}) {
|
221
|
+
const tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
|
222
|
+
const tracer = tracerProvider.getTracer(deno_default.name, deno_default.version);
|
223
|
+
return await tracer.startActiveSpan("ld_signatures.verify", async (span) => {
|
224
|
+
try {
|
225
|
+
const object = await Object$1.fromJsonLd(jsonLd, options);
|
226
|
+
if (object.id != null) span.setAttribute("activitypub.object.id", object.id.href);
|
227
|
+
span.setAttribute("activitypub.object.type", getTypeId(object).href);
|
228
|
+
if (typeof jsonLd === "object" && jsonLd != null && "signature" in jsonLd && typeof jsonLd.signature === "object" && jsonLd.signature != null) {
|
229
|
+
if ("creator" in jsonLd.signature && typeof jsonLd.signature.creator === "string") span.setAttribute("ld_signatures.key_id", jsonLd.signature.creator);
|
230
|
+
if ("signatureValue" in jsonLd.signature && typeof jsonLd.signature.signatureValue === "string") span.setAttribute("ld_signatures.signature", jsonLd.signature.signatureValue);
|
231
|
+
if ("type" in jsonLd.signature && typeof jsonLd.signature.type === "string") span.setAttribute("ld_signatures.type", jsonLd.signature.type);
|
232
|
+
}
|
233
|
+
const attributions = new Set(object.attributionIds.map((uri) => uri.href));
|
234
|
+
if (object instanceof Activity) for (const uri of object.actorIds) attributions.add(uri.href);
|
235
|
+
const key = await verifySignature(jsonLd, options);
|
236
|
+
if (key == null) return false;
|
237
|
+
if (key.ownerId == null) {
|
238
|
+
logger$1.debug("Key {keyId} has no owner.", { keyId: key.id?.href });
|
239
|
+
return false;
|
240
|
+
}
|
241
|
+
attributions.delete(key.ownerId.href);
|
242
|
+
if (attributions.size > 0) {
|
243
|
+
logger$1.debug("Some attributions are not authenticated by the Linked Data Signatures: {attributions}.", { attributions: [...attributions] });
|
244
|
+
return false;
|
245
|
+
}
|
246
|
+
return true;
|
247
|
+
} catch (error) {
|
248
|
+
span.setStatus({
|
249
|
+
code: SpanStatusCode.ERROR,
|
250
|
+
message: String(error)
|
251
|
+
});
|
252
|
+
throw error;
|
253
|
+
} finally {
|
254
|
+
span.end();
|
255
|
+
}
|
256
|
+
});
|
257
|
+
}
|
258
|
+
async function hashJsonLd(jsonLd, contextLoader) {
|
259
|
+
const canon = await jsonld.canonize(jsonLd, {
|
260
|
+
format: "application/n-quads",
|
261
|
+
documentLoader: contextLoader ?? getDocumentLoader()
|
262
|
+
});
|
263
|
+
const encoder = new TextEncoder();
|
264
|
+
const hash = await crypto.subtle.digest("SHA-256", encoder.encode(canon));
|
265
|
+
return encodeHex(hash);
|
266
|
+
}
|
267
|
+
|
268
|
+
//#endregion
|
269
|
+
//#region sig/owner.ts
|
270
|
+
/**
|
271
|
+
* Checks if the actor of the given activity owns the specified key.
|
272
|
+
* @param activity The activity to check.
|
273
|
+
* @param key The public key to check.
|
274
|
+
* @param options Options for checking the key ownership.
|
275
|
+
* @returns Whether the actor is the owner of the key.
|
276
|
+
*/
|
277
|
+
async function doesActorOwnKey(activity, key, options) {
|
278
|
+
if (key.ownerId != null) return key.ownerId.href === activity.actorId?.href;
|
279
|
+
const actor = await activity.getActor(options);
|
280
|
+
if (actor == null || !isActor(actor)) return false;
|
281
|
+
for (const publicKeyId of actor.publicKeyIds) if (key.id != null && publicKeyId.href === key.id.href) return true;
|
282
|
+
return false;
|
283
|
+
}
|
284
|
+
/**
|
285
|
+
* Gets the actor that owns the specified key. Returns `null` if the key has no
|
286
|
+
* known owner.
|
287
|
+
*
|
288
|
+
* @param keyId The ID of the key to check, or the key itself.
|
289
|
+
* @param options Options for getting the key owner.
|
290
|
+
* @returns The actor that owns the key, or `null` if the key has no known
|
291
|
+
* owner.
|
292
|
+
* @since 0.7.0
|
293
|
+
*/
|
294
|
+
async function getKeyOwner(keyId, options) {
|
295
|
+
const tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
|
296
|
+
const documentLoader = options.documentLoader ?? getDocumentLoader();
|
297
|
+
const contextLoader = options.contextLoader ?? getDocumentLoader();
|
298
|
+
let object;
|
299
|
+
if (keyId instanceof CryptographicKey) {
|
300
|
+
object = keyId;
|
301
|
+
if (object.id == null) return null;
|
302
|
+
keyId = object.id;
|
303
|
+
} else {
|
304
|
+
let keyDoc;
|
305
|
+
try {
|
306
|
+
const { document } = await documentLoader(keyId.href);
|
307
|
+
keyDoc = document;
|
308
|
+
} catch (_) {
|
309
|
+
return null;
|
310
|
+
}
|
311
|
+
try {
|
312
|
+
object = await Object$1.fromJsonLd(keyDoc, {
|
313
|
+
documentLoader,
|
314
|
+
contextLoader,
|
315
|
+
tracerProvider
|
316
|
+
});
|
317
|
+
} catch (e) {
|
318
|
+
if (!(e instanceof TypeError)) throw e;
|
319
|
+
try {
|
320
|
+
object = await CryptographicKey.fromJsonLd(keyDoc, {
|
321
|
+
documentLoader,
|
322
|
+
contextLoader,
|
323
|
+
tracerProvider
|
324
|
+
});
|
325
|
+
} catch (e$1) {
|
326
|
+
if (e$1 instanceof TypeError) return null;
|
327
|
+
throw e$1;
|
328
|
+
}
|
329
|
+
}
|
330
|
+
}
|
331
|
+
let owner = null;
|
332
|
+
if (object instanceof CryptographicKey) {
|
333
|
+
if (object.ownerId == null) return null;
|
334
|
+
owner = await object.getOwner({
|
335
|
+
documentLoader,
|
336
|
+
contextLoader,
|
337
|
+
tracerProvider
|
338
|
+
});
|
339
|
+
} else if (isActor(object)) owner = object;
|
340
|
+
else return null;
|
341
|
+
if (owner == null) return null;
|
342
|
+
for (const kid of owner.publicKeyIds) if (kid.href === keyId.href) return owner;
|
343
|
+
return null;
|
344
|
+
}
|
345
|
+
|
346
|
+
//#endregion
|
347
|
+
//#region sig/proof.ts
|
348
|
+
const logger = getLogger([
|
349
|
+
"fedify",
|
350
|
+
"sig",
|
351
|
+
"proof"
|
352
|
+
]);
|
353
|
+
/**
|
354
|
+
* Creates a proof for the given object.
|
355
|
+
* @param object The object to create a proof for.
|
356
|
+
* @param privateKey The private key to sign the proof with.
|
357
|
+
* @param keyId The key ID to use in the proof. It will be used by the verifier.
|
358
|
+
* @param options Additional options. See also {@link CreateProofOptions}.
|
359
|
+
* @returns The created proof.
|
360
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
361
|
+
* @since 0.10.0
|
362
|
+
*/
|
363
|
+
async function createProof(object, privateKey, keyId, { contextLoader, context: context$1, created } = {}) {
|
364
|
+
validateCryptoKey(privateKey, "private");
|
365
|
+
if (privateKey.algorithm.name !== "Ed25519") throw new TypeError("Unsupported algorithm: " + privateKey.algorithm.name);
|
366
|
+
const objectWithoutProofs = object.clone({ proofs: [] });
|
367
|
+
const compactMsg = await objectWithoutProofs.toJsonLd({
|
368
|
+
format: "compact",
|
369
|
+
contextLoader,
|
370
|
+
context: context$1
|
371
|
+
});
|
372
|
+
const msgCanon = serialize(compactMsg);
|
373
|
+
const encoder = new TextEncoder();
|
374
|
+
const msgBytes = encoder.encode(msgCanon);
|
375
|
+
const msgDigest = await crypto.subtle.digest("SHA-256", msgBytes);
|
376
|
+
created ??= Temporal.Now.instant();
|
377
|
+
const proofConfig = {
|
378
|
+
"@context": compactMsg["@context"],
|
379
|
+
type: "DataIntegrityProof",
|
380
|
+
cryptosuite: "eddsa-jcs-2022",
|
381
|
+
verificationMethod: keyId.href,
|
382
|
+
proofPurpose: "assertionMethod",
|
383
|
+
created: created.toString()
|
384
|
+
};
|
385
|
+
const proofCanon = serialize(proofConfig);
|
386
|
+
const proofBytes = encoder.encode(proofCanon);
|
387
|
+
const proofDigest = await crypto.subtle.digest("SHA-256", proofBytes);
|
388
|
+
const digest = new Uint8Array(proofDigest.byteLength + msgDigest.byteLength);
|
389
|
+
digest.set(new Uint8Array(proofDigest), 0);
|
390
|
+
digest.set(new Uint8Array(msgDigest), proofDigest.byteLength);
|
391
|
+
const sig = await crypto.subtle.sign("Ed25519", privateKey, digest);
|
392
|
+
return new DataIntegrityProof({
|
393
|
+
cryptosuite: "eddsa-jcs-2022",
|
394
|
+
verificationMethod: keyId,
|
395
|
+
proofPurpose: "assertionMethod",
|
396
|
+
created: created ?? Temporal.Now.instant(),
|
397
|
+
proofValue: new Uint8Array(sig)
|
398
|
+
});
|
399
|
+
}
|
400
|
+
/**
|
401
|
+
* Signs the given object with the private key and returns the signed object.
|
402
|
+
* @param object The object to create a proof for.
|
403
|
+
* @param privateKey The private key to sign the proof with.
|
404
|
+
* @param keyId The key ID to use in the proof. It will be used by the verifier.
|
405
|
+
* @param options Additional options. See also {@link SignObjectOptions}.
|
406
|
+
* @returns The signed object.
|
407
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
408
|
+
* @since 0.10.0
|
409
|
+
*/
|
410
|
+
async function signObject(object, privateKey, keyId, options = {}) {
|
411
|
+
const tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
|
412
|
+
const tracer = tracerProvider.getTracer(deno_default.name, deno_default.version);
|
413
|
+
return await tracer.startActiveSpan("object_integrity_proofs.sign", { attributes: { "activitypub.object.type": getTypeId(object).href } }, async (span) => {
|
414
|
+
try {
|
415
|
+
if (object.id != null) span.setAttribute("activitypub.object.id", object.id.href);
|
416
|
+
const existingProofs = [];
|
417
|
+
for await (const proof$1 of object.getProofs(options)) existingProofs.push(proof$1);
|
418
|
+
const proof = await createProof(object, privateKey, keyId, options);
|
419
|
+
if (span.isRecording()) {
|
420
|
+
if (proof.cryptosuite != null) span.setAttribute("object_integrity_proofs.cryptosuite", proof.cryptosuite);
|
421
|
+
if (proof.verificationMethodId != null) span.setAttribute("object_integrity_proofs.key_id", proof.verificationMethodId.href);
|
422
|
+
if (proof.proofValue != null) span.setAttribute("object_integrity_proofs.signature", encodeHex(proof.proofValue));
|
423
|
+
}
|
424
|
+
return object.clone({ proofs: [...existingProofs, proof] });
|
425
|
+
} catch (error) {
|
426
|
+
span.setStatus({
|
427
|
+
code: SpanStatusCode.ERROR,
|
428
|
+
message: String(error)
|
429
|
+
});
|
430
|
+
throw error;
|
431
|
+
} finally {
|
432
|
+
span.end();
|
433
|
+
}
|
434
|
+
});
|
435
|
+
}
|
436
|
+
/**
|
437
|
+
* Verifies the given proof for the object.
|
438
|
+
* @param jsonLd The JSON-LD object to verify the proof for. If it contains
|
439
|
+
* any proofs, they will be ignored.
|
440
|
+
* @param proof The proof to verify.
|
441
|
+
* @param options Additional options. See also {@link VerifyProofOptions}.
|
442
|
+
* @returns The public key that was used to sign the proof, or `null` if the
|
443
|
+
* proof is invalid.
|
444
|
+
* @since 0.10.0
|
445
|
+
*/
|
446
|
+
async function verifyProof(jsonLd, proof, options = {}) {
|
447
|
+
const tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
|
448
|
+
const tracer = tracerProvider.getTracer(deno_default.name, deno_default.version);
|
449
|
+
return await tracer.startActiveSpan("object_integrity_proofs.verify", async (span) => {
|
450
|
+
if (span.isRecording()) {
|
451
|
+
if (proof.cryptosuite != null) span.setAttribute("object_integrity_proofs.cryptosuite", proof.cryptosuite);
|
452
|
+
if (proof.verificationMethodId != null) span.setAttribute("object_integrity_proofs.key_id", proof.verificationMethodId.href);
|
453
|
+
if (proof.proofValue != null) span.setAttribute("object_integrity_proofs.signature", encodeHex(proof.proofValue));
|
454
|
+
}
|
455
|
+
try {
|
456
|
+
const key = await verifyProofInternal(jsonLd, proof, options);
|
457
|
+
if (key == null) span.setStatus({ code: SpanStatusCode.ERROR });
|
458
|
+
return key;
|
459
|
+
} catch (error) {
|
460
|
+
span.setStatus({
|
461
|
+
code: SpanStatusCode.ERROR,
|
462
|
+
message: String(error)
|
463
|
+
});
|
464
|
+
throw error;
|
465
|
+
} finally {
|
466
|
+
span.end();
|
467
|
+
}
|
468
|
+
});
|
469
|
+
}
|
470
|
+
async function verifyProofInternal(jsonLd, proof, options) {
|
471
|
+
if (typeof jsonLd !== "object" || proof.cryptosuite !== "eddsa-jcs-2022" || proof.verificationMethodId == null || proof.proofPurpose !== "assertionMethod" || proof.proofValue == null || proof.created == null) return null;
|
472
|
+
const publicKeyPromise = fetchKey(proof.verificationMethodId, Multikey, options);
|
473
|
+
const proofConfig = {
|
474
|
+
"@context": jsonLd["@context"],
|
475
|
+
type: "DataIntegrityProof",
|
476
|
+
cryptosuite: proof.cryptosuite,
|
477
|
+
verificationMethod: proof.verificationMethodId.href,
|
478
|
+
proofPurpose: proof.proofPurpose,
|
479
|
+
created: proof.created.toString()
|
480
|
+
};
|
481
|
+
const proofCanon = serialize(proofConfig);
|
482
|
+
const encoder = new TextEncoder();
|
483
|
+
const proofBytes = encoder.encode(proofCanon);
|
484
|
+
const proofDigest = await crypto.subtle.digest("SHA-256", proofBytes);
|
485
|
+
const msg = { ...jsonLd };
|
486
|
+
if ("proof" in msg) delete msg.proof;
|
487
|
+
const msgCanon = serialize(msg);
|
488
|
+
const msgBytes = encoder.encode(msgCanon);
|
489
|
+
const msgDigest = await crypto.subtle.digest("SHA-256", msgBytes);
|
490
|
+
const digest = new Uint8Array(proofDigest.byteLength + msgDigest.byteLength);
|
491
|
+
digest.set(new Uint8Array(proofDigest), 0);
|
492
|
+
digest.set(new Uint8Array(msgDigest), proofDigest.byteLength);
|
493
|
+
let fetchedKey;
|
494
|
+
try {
|
495
|
+
fetchedKey = await publicKeyPromise;
|
496
|
+
} catch (error) {
|
497
|
+
logger.debug("Failed to get the key (verificationMethod) for the proof:\n{proof}", {
|
498
|
+
proof,
|
499
|
+
keyId: proof.verificationMethodId.href,
|
500
|
+
error
|
501
|
+
});
|
502
|
+
return null;
|
503
|
+
}
|
504
|
+
const publicKey = fetchedKey.key;
|
505
|
+
if (publicKey == null) {
|
506
|
+
logger.debug("Failed to get the key (verificationMethod) for the proof:\n{proof}", {
|
507
|
+
proof,
|
508
|
+
keyId: proof.verificationMethodId.href
|
509
|
+
});
|
510
|
+
return null;
|
511
|
+
}
|
512
|
+
if (publicKey.publicKey.algorithm.name !== "Ed25519") {
|
513
|
+
if (fetchedKey.cached) {
|
514
|
+
logger.debug("The cached key (verificationMethod) for the proof is not a valid Ed25519 key:\n{keyId}; retrying with the freshly fetched key...", {
|
515
|
+
proof,
|
516
|
+
keyId: proof.verificationMethodId.href
|
517
|
+
});
|
518
|
+
return await verifyProof(jsonLd, proof, {
|
519
|
+
...options,
|
520
|
+
keyCache: {
|
521
|
+
get: () => Promise.resolve(null),
|
522
|
+
set: async (keyId, key) => await options.keyCache?.set(keyId, key)
|
523
|
+
}
|
524
|
+
});
|
525
|
+
}
|
526
|
+
logger.debug("The fetched key (verificationMethod) for the proof is not a valid Ed25519 key:\n{keyId}", {
|
527
|
+
proof,
|
528
|
+
keyId: proof.verificationMethodId.href
|
529
|
+
});
|
530
|
+
return null;
|
531
|
+
}
|
532
|
+
const verified = await crypto.subtle.verify("Ed25519", publicKey.publicKey, proof.proofValue, digest);
|
533
|
+
if (!verified) {
|
534
|
+
if (fetchedKey.cached) {
|
535
|
+
logger.debug("Failed to verify the proof with the cached key {keyId}; retrying with the freshly fetched key...", {
|
536
|
+
keyId: proof.verificationMethodId.href,
|
537
|
+
proof
|
538
|
+
});
|
539
|
+
return await verifyProof(jsonLd, proof, {
|
540
|
+
...options,
|
541
|
+
keyCache: {
|
542
|
+
get: () => Promise.resolve(void 0),
|
543
|
+
set: async (keyId, key) => await options.keyCache?.set(keyId, key)
|
544
|
+
}
|
545
|
+
});
|
546
|
+
}
|
547
|
+
logger.debug("Failed to verify the proof with the fetched key {keyId}:\n{proof}", {
|
548
|
+
keyId: proof.verificationMethodId.href,
|
549
|
+
proof
|
550
|
+
});
|
551
|
+
return null;
|
552
|
+
}
|
553
|
+
return publicKey;
|
554
|
+
}
|
555
|
+
/**
|
556
|
+
* Verifies the given object. It will verify all the proofs in the object,
|
557
|
+
* and succeed only if all the proofs are valid and all attributions and
|
558
|
+
* actors are authenticated by the proofs.
|
559
|
+
* @typeParam T The type of the object to verify.
|
560
|
+
* @param cls The class of the object to verify. It must be a subclass of
|
561
|
+
* the {@link Object}.
|
562
|
+
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|
563
|
+
* is a compacted JSON-LD representation of a `T` with `@context`.
|
564
|
+
* @param options Additional options. See also {@link VerifyObjectOptions}.
|
565
|
+
* @returns The object if it's verified, or `null` if it's not.
|
566
|
+
* @throws {TypeError} If the object is invalid or unsupported.
|
567
|
+
* @since 0.10.0
|
568
|
+
*/
|
569
|
+
async function verifyObject(cls, jsonLd, options = {}) {
|
570
|
+
const logger$2 = getLogger([
|
571
|
+
"fedify",
|
572
|
+
"sig",
|
573
|
+
"proof"
|
574
|
+
]);
|
575
|
+
const object = await cls.fromJsonLd(jsonLd, options);
|
576
|
+
const attributions = new Set(object.attributionIds.map((uri) => uri.href));
|
577
|
+
if (object instanceof Activity) for (const uri of object.actorIds) attributions.add(uri.href);
|
578
|
+
for await (const proof of object.getProofs(options)) {
|
579
|
+
const key = await verifyProof(jsonLd, proof, options);
|
580
|
+
if (key === null) return null;
|
581
|
+
if (key.controllerId == null) {
|
582
|
+
logger$2.debug("Key {keyId} does not have a controller.", { keyId: key.id?.href });
|
583
|
+
continue;
|
584
|
+
}
|
585
|
+
attributions.delete(key.controllerId.href);
|
586
|
+
}
|
587
|
+
if (attributions.size > 0) {
|
588
|
+
logger$2.debug("Some attributions are not authenticated by the proofs: {attributions}.", { attributions: [...attributions] });
|
589
|
+
return null;
|
590
|
+
}
|
591
|
+
return object;
|
592
|
+
}
|
593
|
+
|
594
|
+
//#endregion
|
595
|
+
export { attachSignature as attachSignature$1, createProof as createProof$1, createSignature as createSignature$1, detachSignature as detachSignature$1, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd as signJsonLd$1, signObject as signObject$1, verifyJsonLd as verifyJsonLd$1, verifyObject as verifyObject$1, verifyProof as verifyProof$1, verifySignature as verifySignature$1 };
|
@@ -1,11 +1,12 @@
|
|
1
1
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
globalThis.addEventListener = () => {};
|
4
5
|
|
5
|
-
import { deno_default } from "
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import { fetchKey, validateCryptoKey } from "./key.js";
|
6
|
+
import { deno_default } from "./docloader-CMlE_DQr.js";
|
7
|
+
import { Activity, DataIntegrityProof, Multikey } from "./vocab-Dwop3xOF.js";
|
8
|
+
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
|
+
import { fetchKey, validateCryptoKey } from "./key-CkoTQfVN.js";
|
9
10
|
import { getLogger } from "@logtape/logtape";
|
10
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
11
12
|
import { encodeHex } from "byte-encodings/hex";
|
@@ -1,16 +1,31 @@
|
|
1
1
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
globalThis.addEventListener = () => {};
|
4
5
|
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import {
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
6
|
+
import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
7
|
+
import "../assert-Dv75vaGI.js";
|
8
|
+
import "../assert_instance_of--9UCVKsi.js";
|
9
|
+
import "../docloader-CMlE_DQr.js";
|
10
|
+
import { UrlError } from "../url-kTAI6_KP.js";
|
11
|
+
import "../multibase-DeCHcK8L.js";
|
12
|
+
import "../vocab-Dwop3xOF.js";
|
13
|
+
import "../langstr-DbWheeIS.js";
|
14
|
+
import "../lookup-BDLFt_tc.js";
|
15
|
+
import "../type-D2s5lmbZ.js";
|
16
|
+
import "../actor-DhyIYEBl.js";
|
17
|
+
import "../key-CkoTQfVN.js";
|
18
|
+
import { verifyRequest } from "../http-CFQSpmJT.js";
|
19
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-BXgFJugo.js";
|
20
|
+
import { test } from "../testing-jcGLO9Lp.js";
|
21
|
+
import "../std__assert-CaBUULmX.js";
|
22
|
+
import { assertRejects } from "../assert_rejects-FOHCtlD2.js";
|
23
|
+
import "../assert_is_error-D162gXcM.js";
|
24
|
+
import "../assert_not_equals-Cyf5m9Ke.js";
|
25
|
+
import "../assert_throws-CRfQJvVx.js";
|
26
|
+
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
27
|
+
import { rsaPrivateKey2 } from "../keys-DxEMe-K1.js";
|
28
|
+
import { esm_default } from "../esm-BxIKwi-M.js";
|
14
29
|
|
15
30
|
//#region runtime/authdocloader.test.ts
|
16
31
|
test("getAuthenticatedDocumentLoader()", async (t) => {
|