@fedify/fedify 0.5.0-dev.88
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.
Potentially problematic release.
This version of @fedify/fedify might be problematic. Click here for more details.
- package/CHANGES.md +239 -0
- package/LICENSE +661 -0
- package/README.md +96 -0
- package/esm/_dnt.shims.d.ts +11 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +67 -0
- package/esm/_dnt.test_polyfills.d.ts.map +1 -0
- package/esm/_dnt.test_shims.d.ts.map +1 -0
- package/esm/codegen/fs.d.ts.map +1 -0
- package/esm/codegen/schema.d.ts.map +1 -0
- package/esm/codegen/schema.yaml +194 -0
- package/esm/codegen/type.d.ts.map +1 -0
- package/esm/deps/crux.land/api/get/2KNRVU.d.ts.map +1 -0
- package/esm/deps/deno.land/x/mock_fetch@0.3.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@david/which-runtime/0.2.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/collections.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/concat.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/drop.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/filter.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/fold.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/infinite.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/map.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/take.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/tee.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/testing.d.ts.map +1 -0
- package/esm/deps/jsr.io/@hongminhee/aitertools/0.6.0/src/unique.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/_constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/_diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/_format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_almost_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_array_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_greater.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_greater_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_less.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_less_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_not_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_not_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_not_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_object_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_rejects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_string_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assert_throws.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/fail.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/unimplemented.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/0.220.1/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/concat.d.ts +14 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/concat.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/concat.js +27 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/copy.d.ts +28 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/copy.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/copy.js +37 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/ends_with.d.ts +14 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/ends_with.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/ends_with.js +23 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/equals.d.ts +6 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/equals.js +44 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/includes_needle.d.ts +17 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/includes_needle.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/includes_needle.js +21 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.d.ts +18 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/index_of_needle.js +45 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.d.ts +18 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/last_index_of_needle.js +45 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/mod.d.ts +24 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/mod.js +25 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/repeat.d.ts +15 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/repeat.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/repeat.js +33 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/starts_with.d.ts +14 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/starts_with.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/bytes/0.220.1/starts_with.js +21 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/_util.d.ts +2 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/_util.js +26 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/base64.d.ts +27 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/base64.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/encoding/0.220.1/base64.js +141 -0
- package/esm/deps/jsr.io/@std/fmt/0.220.1/colors.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/0.220.1/_get_file_info_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/0.220.1/_to_path_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/0.220.1/ensure_dir.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/0.220.1/ensure_file.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/common.d.ts +38 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/common.js +40 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/encoding.d.ts +34 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/encoding.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/encoding.js +121 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/language.d.ts +31 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/language.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/language.js +113 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/media_type.d.ts +31 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/media_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/_negotiation/media_type.js +140 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/negotiation.d.ts +128 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/negotiation.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/http/0.220.1/negotiation.js +37 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/assert_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/glob_to_reg_exp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/normalize_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/strip_trailing_separators.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_common/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_interface.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/_os.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/is_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/is_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/posix/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/common.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/from_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/glob_to_regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/is_absolute.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/is_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/join_globs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/normalize_glob.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/relative.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/resolve.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/to_file_url.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/path/0.220.1/windows/to_namespaced_path.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_constants.d.ts +2 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_constants.js +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_shared.d.ts +44 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_shared.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/_shared.js +161 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/can_parse.d.ts +2 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/can_parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/can_parse.js +14 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/compare.d.ts +11 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/compare.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/compare.js +18 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/constants.d.ts +43 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/constants.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/constants.js +73 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/difference.d.ts +6 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/difference.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/difference.js +16 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/equals.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/equals.js +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format.d.ts +13 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format.js +36 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format_range.d.ts +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/format_range.js +16 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_or_equal.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_or_equal.js +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_than.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_than.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/greater_than.js +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/increment.d.ts +29 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/increment.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/increment.js +160 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_range.d.ts +13 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_range.js +28 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_semver.d.ts +18 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_semver.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/is_semver.js +38 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_or_equal.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_or_equal.js +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_than.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_than.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/less_than.js +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/max_satisfying.d.ts +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/max_satisfying.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/max_satisfying.js +18 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/min_satisfying.d.ts +10 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/min_satisfying.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/min_satisfying.js +18 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/mod.d.ts +291 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/mod.js +293 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/not_equals.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/not_equals.js +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse.d.ts +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse.js +34 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse_range.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/parse_range.js +336 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_intersects.d.ts +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_intersects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_intersects.js +72 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_max.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_max.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_max.js +58 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_min.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_min.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/range_min.js +49 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/test_range.d.ts +9 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/test_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/test_range.js +69 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse.js +17 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse_range.d.ts +8 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse_range.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/try_parse_range.js +17 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/types.d.ts +38 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/semver/0.220.1/types.js +2 -0
- package/esm/deps/jsr.io/@std/testing/0.220.1/snapshot.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/_util.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/case.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/closest_string.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/compare_similarity.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/levenshtein_distance.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/text/0.220.1/word_similarity_sort.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/_strip.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/basename.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/dirname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/extname.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/join.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/url/0.220.1/normalize.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_dumper/dumper.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_dumper/dumper_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_loader/loader.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_loader/loader_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_mark.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/binary.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/bool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/float.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/function.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/int.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/map.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/merge.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/nil.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/omap.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/pairs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/seq.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/set.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/timestamp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_type/undefined.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/core.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/default.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/extended.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/failsafe.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/json.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/schema.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/stringify.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/0.220.1/type.d.ts.map +1 -0
- package/esm/federation/callback.d.ts +56 -0
- package/esm/federation/callback.d.ts.map +1 -0
- package/esm/federation/callback.js +1 -0
- package/esm/federation/collection.d.ts +9 -0
- package/esm/federation/collection.d.ts.map +1 -0
- package/esm/federation/collection.js +1 -0
- package/esm/federation/context.d.ts +148 -0
- package/esm/federation/context.d.ts.map +1 -0
- package/esm/federation/context.js +1 -0
- package/esm/federation/handler.d.ts +83 -0
- package/esm/federation/handler.d.ts.map +1 -0
- package/esm/federation/handler.js +266 -0
- package/esm/federation/handler.test.d.ts.map +1 -0
- package/esm/federation/kv.d.ts +58 -0
- package/esm/federation/kv.d.ts.map +1 -0
- package/esm/federation/kv.js +45 -0
- package/esm/federation/middleware.d.ts +309 -0
- package/esm/federation/middleware.d.ts.map +1 -0
- package/esm/federation/middleware.js +626 -0
- package/esm/federation/middleware.test.d.ts.map +1 -0
- package/esm/federation/mod.d.ts +14 -0
- package/esm/federation/mod.d.ts.map +1 -0
- package/esm/federation/mod.js +13 -0
- package/esm/federation/mq.d.ts +42 -0
- package/esm/federation/mq.d.ts.map +1 -0
- package/esm/federation/mq.js +26 -0
- package/esm/federation/queue.d.ts +10 -0
- package/esm/federation/queue.d.ts.map +1 -0
- package/esm/federation/queue.js +1 -0
- package/esm/federation/router.d.ts +52 -0
- package/esm/federation/router.d.ts.map +1 -0
- package/esm/federation/router.js +80 -0
- package/esm/federation/router.test.d.ts.map +1 -0
- package/esm/federation/send.d.ts +60 -0
- package/esm/federation/send.d.ts.map +1 -0
- package/esm/federation/send.js +45 -0
- package/esm/federation/send.test.d.ts.map +1 -0
- package/esm/httpsig/key.d.ts +32 -0
- package/esm/httpsig/key.d.ts.map +1 -0
- package/esm/httpsig/key.js +62 -0
- package/esm/httpsig/key.test.d.ts.map +1 -0
- package/esm/httpsig/mod.d.ts +47 -0
- package/esm/httpsig/mod.d.ts.map +1 -0
- package/esm/httpsig/mod.js +193 -0
- package/esm/httpsig/mod.test.d.ts.map +1 -0
- package/esm/mod.d.ts +51 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +50 -0
- package/esm/nodeinfo/handler.d.ts +33 -0
- package/esm/nodeinfo/handler.d.ts.map +1 -0
- package/esm/nodeinfo/handler.js +49 -0
- package/esm/nodeinfo/handler.test.d.ts.map +1 -0
- package/esm/nodeinfo/mod.d.ts +8 -0
- package/esm/nodeinfo/mod.d.ts.map +1 -0
- package/esm/nodeinfo/mod.js +7 -0
- package/esm/nodeinfo/types.d.ts +133 -0
- package/esm/nodeinfo/types.d.ts.map +1 -0
- package/esm/nodeinfo/types.js +60 -0
- package/esm/nodeinfo/types.test.d.ts.map +1 -0
- package/esm/package.json +3 -0
- package/esm/runtime/docloader.d.ts +104 -0
- package/esm/runtime/docloader.d.ts.map +1 -0
- package/esm/runtime/docloader.js +124 -0
- package/esm/runtime/docloader.test.d.ts.map +1 -0
- package/esm/runtime/key.d.ts +14 -0
- package/esm/runtime/key.d.ts.map +1 -0
- package/esm/runtime/key.js +24 -0
- package/esm/runtime/key.test.d.ts.map +1 -0
- package/esm/runtime/langstr.d.ts +15 -0
- package/esm/runtime/langstr.d.ts.map +1 -0
- package/esm/runtime/langstr.js +25 -0
- package/esm/runtime/langstr.test.d.ts.map +1 -0
- package/esm/runtime/mod.d.ts +10 -0
- package/esm/runtime/mod.d.ts.map +1 -0
- package/esm/runtime/mod.js +9 -0
- package/esm/shim/event.d.ts.map +1 -0
- package/esm/testing/context.d.ts.map +1 -0
- package/esm/testing/docloader.d.ts.map +1 -0
- package/esm/testing/fixtures/example.com/hong-gildong +11 -0
- package/esm/testing/fixtures/example.com/key +7 -0
- package/esm/testing/fixtures/example.com/key2 +6 -0
- package/esm/testing/fixtures/example.com/object +6 -0
- package/esm/testing/fixtures/example.com/person +22 -0
- package/esm/testing/fixtures/example.com/test +5 -0
- package/esm/testing/fixtures/example.com/users/handle +16 -0
- package/esm/testing/fixtures/example.com/wrong-type +3 -0
- package/esm/testing/fixtures/w3id.org/security/v1 +50 -0
- package/esm/testing/fixtures/www.w3.org/ns/activitystreams +379 -0
- package/esm/testing/keys.d.ts.map +1 -0
- package/esm/vocab/accept.yaml +11 -0
- package/esm/vocab/activity.yaml +42 -0
- package/esm/vocab/actor.d.ts +52 -0
- package/esm/vocab/actor.d.ts.map +1 -0
- package/esm/vocab/actor.js +94 -0
- package/esm/vocab/actor.test.d.ts.map +1 -0
- package/esm/vocab/add.yaml +12 -0
- package/esm/vocab/announce.yaml +11 -0
- package/esm/vocab/application.yaml +179 -0
- package/esm/vocab/article.yaml +8 -0
- package/esm/vocab/audio.yaml +8 -0
- package/esm/vocab/block.yaml +12 -0
- package/esm/vocab/collection.yaml +63 -0
- package/esm/vocab/collectionpage.yaml +38 -0
- package/esm/vocab/create.yaml +8 -0
- package/esm/vocab/delete.yaml +10 -0
- package/esm/vocab/dislike.yaml +8 -0
- package/esm/vocab/document.yaml +8 -0
- package/esm/vocab/endpoints.yaml +78 -0
- package/esm/vocab/event.yaml +8 -0
- package/esm/vocab/flag.yaml +11 -0
- package/esm/vocab/follow.yaml +12 -0
- package/esm/vocab/group.yaml +179 -0
- package/esm/vocab/ignore.yaml +10 -0
- package/esm/vocab/image.yaml +8 -0
- package/esm/vocab/intransitiveactivity.yaml +11 -0
- package/esm/vocab/key.yaml +25 -0
- package/esm/vocab/like.yaml +10 -0
- package/esm/vocab/link.yaml +92 -0
- package/esm/vocab/lookup.d.ts +42 -0
- package/esm/vocab/lookup.d.ts.map +1 -0
- package/esm/vocab/lookup.js +82 -0
- package/esm/vocab/lookup.test.d.ts.map +1 -0
- package/esm/vocab/mention.yaml +8 -0
- package/esm/vocab/mod.d.ts +55 -0
- package/esm/vocab/mod.d.ts.map +1 -0
- package/esm/vocab/mod.js +54 -0
- package/esm/vocab/note.yaml +10 -0
- package/esm/vocab/object.yaml +301 -0
- package/esm/vocab/orderedcollection.yaml +11 -0
- package/esm/vocab/orderedcollectionpage.yaml +20 -0
- package/esm/vocab/organization.yaml +179 -0
- package/esm/vocab/page.yaml +8 -0
- package/esm/vocab/person.yaml +179 -0
- package/esm/vocab/place.yaml +66 -0
- package/esm/vocab/profile.yaml +22 -0
- package/esm/vocab/reject.yaml +10 -0
- package/esm/vocab/relationship.yaml +46 -0
- package/esm/vocab/remove.yaml +10 -0
- package/esm/vocab/service.yaml +179 -0
- package/esm/vocab/undo.yaml +15 -0
- package/esm/vocab/update.yaml +13 -0
- package/esm/vocab/video.yaml +8 -0
- package/esm/vocab/vocab.d.ts +7191 -0
- package/esm/vocab/vocab.d.ts.map +1 -0
- package/esm/vocab/vocab.js +14279 -0
- package/esm/vocab/vocab.test.d.ts.map +1 -0
- package/esm/webfinger/handler.d.ts +29 -0
- package/esm/webfinger/handler.d.ts.map +1 -0
- package/esm/webfinger/handler.js +76 -0
- package/esm/webfinger/handler.test.d.ts.map +1 -0
- package/esm/webfinger/jrd.d.ts +52 -0
- package/esm/webfinger/jrd.d.ts.map +1 -0
- package/esm/webfinger/jrd.js +1 -0
- package/esm/webfinger/lookup.d.ts +9 -0
- package/esm/webfinger/lookup.d.ts.map +1 -0
- package/esm/webfinger/lookup.js +44 -0
- package/esm/webfinger/lookup.test.d.ts.map +1 -0
- package/esm/webfinger/mod.d.ts +8 -0
- package/esm/webfinger/mod.d.ts.map +1 -0
- package/esm/webfinger/mod.js +7 -0
- package/esm/x/fresh.d.ts +58 -0
- package/esm/x/fresh.d.ts.map +1 -0
- package/esm/x/fresh.js +77 -0
- package/logo.svg +187 -0
- package/package.json +60 -0
@@ -0,0 +1,104 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import * as dntShim from "../_dnt.shims.js";
|
3
|
+
import { Temporal } from "@js-temporal/polyfill";
|
4
|
+
import type { KvKey, KvStore } from "../federation/kv.js";
|
5
|
+
/**
|
6
|
+
* A remote JSON-LD document and its context fetched by
|
7
|
+
* a {@link DocumentLoader}.
|
8
|
+
*/
|
9
|
+
export interface RemoteDocument {
|
10
|
+
contextUrl: string | null;
|
11
|
+
document: unknown;
|
12
|
+
documentUrl: string;
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* A JSON-LD document loader that fetches documents from the Web.
|
16
|
+
* @param url The URL of the document to load.
|
17
|
+
* @returns The loaded remote document.
|
18
|
+
*/
|
19
|
+
export type DocumentLoader = (url: string) => Promise<RemoteDocument>;
|
20
|
+
/**
|
21
|
+
* A factory function that creates an authenticated {@link DocumentLoader} for
|
22
|
+
* a given identity. This is used for fetching documents that require
|
23
|
+
* authentication.
|
24
|
+
* @param identity The identity to create the document loader for.
|
25
|
+
* The actor's key pair.
|
26
|
+
* @returns The authenticated document loader.
|
27
|
+
*/
|
28
|
+
export type AuthenticatedDocumentLoaderFactory = (identity: {
|
29
|
+
keyId: URL;
|
30
|
+
privateKey: dntShim.CryptoKey;
|
31
|
+
}) => DocumentLoader;
|
32
|
+
/**
|
33
|
+
* Error thrown when fetching a JSON-LD document failed.
|
34
|
+
*/
|
35
|
+
export declare class FetchError extends Error {
|
36
|
+
/**
|
37
|
+
* The URL that failed to fetch.
|
38
|
+
*/
|
39
|
+
url: URL;
|
40
|
+
/**
|
41
|
+
* Constructs a new `FetchError`.
|
42
|
+
*
|
43
|
+
* @param url The URL that failed to fetch.
|
44
|
+
* @param message Error message.
|
45
|
+
*/
|
46
|
+
constructor(url: URL | string, message?: string);
|
47
|
+
}
|
48
|
+
/**
|
49
|
+
* A JSON-LD document loader that utilizes the browser's `fetch` API.
|
50
|
+
* @param url The URL of the document to load.
|
51
|
+
* @returns The remote document.
|
52
|
+
*/
|
53
|
+
export declare function fetchDocumentLoader(url: string): Promise<RemoteDocument>;
|
54
|
+
/**
|
55
|
+
* Gets an authenticated {@link DocumentLoader} for the given identity.
|
56
|
+
* Note that an authenticated document loader intentionally does not cache
|
57
|
+
* the fetched documents.
|
58
|
+
* @param identity The identity to get the document loader for.
|
59
|
+
* The actor's key pair.
|
60
|
+
* @returns The authenticated document loader.
|
61
|
+
* @throws {TypeError} If the key is invalid or unsupported.
|
62
|
+
*/
|
63
|
+
export declare function getAuthenticatedDocumentLoader(identity: {
|
64
|
+
keyId: URL;
|
65
|
+
privateKey: dntShim.CryptoKey;
|
66
|
+
}): DocumentLoader;
|
67
|
+
/**
|
68
|
+
* The parameters for {@link kvCache} function.
|
69
|
+
*/
|
70
|
+
export interface KvCacheParameters {
|
71
|
+
/**
|
72
|
+
* The document loader to decorate with a cache.
|
73
|
+
*/
|
74
|
+
loader: DocumentLoader;
|
75
|
+
/**
|
76
|
+
* The key-value store to use for backing the cache.
|
77
|
+
*/
|
78
|
+
kv: KvStore;
|
79
|
+
/**
|
80
|
+
* The key prefix to use for namespacing the cache.
|
81
|
+
* `["_fedify", "remoteDocument"]` by default.
|
82
|
+
*/
|
83
|
+
prefix?: KvKey;
|
84
|
+
/**
|
85
|
+
* The per-URL cache rules in the array of `[urlPattern, duration]` pairs
|
86
|
+
* where `urlPattern` is either a string, a {@link URL}, or
|
87
|
+
* a {@link URLPattern} and `duration` is a {@link Temporal.Duration}.
|
88
|
+
* The `duration` is allowed to be at most 30 days.
|
89
|
+
*
|
90
|
+
* The default rules are:
|
91
|
+
*
|
92
|
+
* - `https://www.w3.org/ns/activitystreams` for 30 days
|
93
|
+
* - `https://w3id.org/security/v1` for 30 days
|
94
|
+
* - Everything else for 5 minutes
|
95
|
+
*/
|
96
|
+
rules?: [string | URL | dntShim.URLPattern, Temporal.Duration][];
|
97
|
+
}
|
98
|
+
/**
|
99
|
+
* Decorates a {@link DocumentLoader} with a cache backed by a {@link Deno.Kv}.
|
100
|
+
* @param parameters The parameters for the cache.
|
101
|
+
* @returns The decorated document loader which is cache-enabled.
|
102
|
+
*/
|
103
|
+
export declare function kvCache({ loader, kv, prefix, rules }: KvCacheParameters): DocumentLoader;
|
104
|
+
//# sourceMappingURL=docloader.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"docloader.d.ts","sourceRoot":"","sources":["../../src/runtime/docloader.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI1D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,MAAM,kCAAkC,GAAG,CAC/C,QAAQ,EAAE;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,SAAS,CAAA;CAAE,KACpD,cAAc,CAAC;AAEpB;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC;;OAEG;IACH,GAAG,EAAE,GAAG,CAAC;IAET;;;;;OAKG;gBACS,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAKhD;AA6BD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,cAAc,CAAC,CAGzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,SAAS,CAAA;CAAE,GACtD,cAAc,CAQhB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;IAEZ;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;IAEf;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;CAClE;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAC/C,cAAc,CAgDhB"}
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import * as dntShim from "../_dnt.shims.js";
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { validateCryptoKey } from "../httpsig/key.js";
|
4
|
+
import { sign } from "../httpsig/mod.js";
|
5
|
+
/**
|
6
|
+
* Error thrown when fetching a JSON-LD document failed.
|
7
|
+
*/
|
8
|
+
export class FetchError extends Error {
|
9
|
+
/**
|
10
|
+
* The URL that failed to fetch.
|
11
|
+
*/
|
12
|
+
url;
|
13
|
+
/**
|
14
|
+
* Constructs a new `FetchError`.
|
15
|
+
*
|
16
|
+
* @param url The URL that failed to fetch.
|
17
|
+
* @param message Error message.
|
18
|
+
*/
|
19
|
+
constructor(url, message) {
|
20
|
+
super(message == null ? url.toString() : `${url}: ${message}`);
|
21
|
+
this.name = "FetchError";
|
22
|
+
this.url = typeof url === "string" ? new URL(url) : url;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
function createRequest(url) {
|
26
|
+
return new Request(url, {
|
27
|
+
headers: {
|
28
|
+
Accept: "application/activity+json, application/ld+json",
|
29
|
+
},
|
30
|
+
redirect: "follow",
|
31
|
+
});
|
32
|
+
}
|
33
|
+
async function getRemoteDocument(url, response) {
|
34
|
+
const documentUrl = response.url === "" ? url : response.url;
|
35
|
+
if (!response.ok) {
|
36
|
+
throw new FetchError(documentUrl, `HTTP ${response.status}: ${documentUrl}`);
|
37
|
+
}
|
38
|
+
return {
|
39
|
+
contextUrl: null,
|
40
|
+
document: await response.json(),
|
41
|
+
documentUrl,
|
42
|
+
};
|
43
|
+
}
|
44
|
+
/**
|
45
|
+
* A JSON-LD document loader that utilizes the browser's `fetch` API.
|
46
|
+
* @param url The URL of the document to load.
|
47
|
+
* @returns The remote document.
|
48
|
+
*/
|
49
|
+
export async function fetchDocumentLoader(url) {
|
50
|
+
const response = await fetch(createRequest(url));
|
51
|
+
return getRemoteDocument(url, response);
|
52
|
+
}
|
53
|
+
/**
|
54
|
+
* Gets an authenticated {@link DocumentLoader} for the given identity.
|
55
|
+
* Note that an authenticated document loader intentionally does not cache
|
56
|
+
* the fetched documents.
|
57
|
+
* @param identity The identity to get the document loader for.
|
58
|
+
* The actor's key pair.
|
59
|
+
* @returns The authenticated document loader.
|
60
|
+
* @throws {TypeError} If the key is invalid or unsupported.
|
61
|
+
*/
|
62
|
+
export function getAuthenticatedDocumentLoader(identity) {
|
63
|
+
validateCryptoKey(identity.privateKey);
|
64
|
+
return async (url) => {
|
65
|
+
let request = createRequest(url);
|
66
|
+
request = await sign(request, identity.privateKey, identity.keyId);
|
67
|
+
const response = await fetch(request);
|
68
|
+
return getRemoteDocument(url, response);
|
69
|
+
};
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* Decorates a {@link DocumentLoader} with a cache backed by a {@link Deno.Kv}.
|
73
|
+
* @param parameters The parameters for the cache.
|
74
|
+
* @returns The decorated document loader which is cache-enabled.
|
75
|
+
*/
|
76
|
+
export function kvCache({ loader, kv, prefix, rules }) {
|
77
|
+
const keyPrefix = prefix ?? ["_fedify", "remoteDocument"];
|
78
|
+
rules ??= [
|
79
|
+
[
|
80
|
+
"https://www.w3.org/ns/activitystreams",
|
81
|
+
Temporal.Duration.from({ days: 30 }),
|
82
|
+
],
|
83
|
+
["https://w3id.org/security/v1", Temporal.Duration.from({ days: 30 })],
|
84
|
+
[new dntShim.URLPattern({}), Temporal.Duration.from({ minutes: 5 })],
|
85
|
+
];
|
86
|
+
for (const [p, duration] of rules) {
|
87
|
+
if (Temporal.Duration.compare(duration, { days: 30 }) > 0) {
|
88
|
+
throw new TypeError("The maximum cache duration is 30 days: " +
|
89
|
+
(p instanceof dntShim.URLPattern
|
90
|
+
? `${p.protocol}://${p.username}:${p.password}@${p.hostname}:${p.port}/${p.pathname}?${p.search}#${p.hash}`
|
91
|
+
: p.toString()));
|
92
|
+
}
|
93
|
+
}
|
94
|
+
function matchRule(url) {
|
95
|
+
for (const [pattern, duration] of rules) {
|
96
|
+
if (typeof pattern === "string") {
|
97
|
+
if (url === pattern)
|
98
|
+
return duration;
|
99
|
+
continue;
|
100
|
+
}
|
101
|
+
if (pattern instanceof URL) {
|
102
|
+
if (pattern.href == url)
|
103
|
+
return duration;
|
104
|
+
continue;
|
105
|
+
}
|
106
|
+
if (pattern.test(url))
|
107
|
+
return duration;
|
108
|
+
}
|
109
|
+
return null;
|
110
|
+
}
|
111
|
+
return async (url) => {
|
112
|
+
const match = matchRule(url);
|
113
|
+
if (match == null)
|
114
|
+
return await loader(url);
|
115
|
+
const key = [...keyPrefix, url];
|
116
|
+
const cache = await kv.get(key);
|
117
|
+
if (cache == null) {
|
118
|
+
const remoteDoc = await loader(url);
|
119
|
+
await kv.set(key, remoteDoc, { ttl: match });
|
120
|
+
return remoteDoc;
|
121
|
+
}
|
122
|
+
return cache;
|
123
|
+
};
|
124
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"docloader.test.d.ts","sourceRoot":"","sources":["../../src/runtime/docloader.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import * as dntShim from "../_dnt.shims.js";
|
2
|
+
/**
|
3
|
+
* Imports a PEM-SPKI formatted public key.
|
4
|
+
* @param pem The PEM-SPKI formatted public key.
|
5
|
+
* @returns The imported public key.
|
6
|
+
*/
|
7
|
+
export declare function importSpki(pem: string): Promise<dntShim.CryptoKey>;
|
8
|
+
/**
|
9
|
+
* Exports a public key in PEM-SPKI format.
|
10
|
+
* @param key The public key to export.
|
11
|
+
* @returns The exported public key in PEM-SPKI format.
|
12
|
+
*/
|
13
|
+
export declare function exportSpki(key: dntShim.CryptoKey): Promise<string>;
|
14
|
+
//# sourceMappingURL=key.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../src/runtime/key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAG5C;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAWxE;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAKxE"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import * as dntShim from "../_dnt.shims.js";
|
2
|
+
import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.220.1/base64.js";
|
3
|
+
/**
|
4
|
+
* Imports a PEM-SPKI formatted public key.
|
5
|
+
* @param pem The PEM-SPKI formatted public key.
|
6
|
+
* @returns The imported public key.
|
7
|
+
*/
|
8
|
+
export async function importSpki(pem) {
|
9
|
+
pem = pem.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "");
|
10
|
+
const spki = decodeBase64(pem);
|
11
|
+
// TODO: support other than RSASSA-PKCS1-v1_5:
|
12
|
+
return await dntShim.crypto.subtle.importKey("spki", spki, { name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, true, ["verify"]);
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Exports a public key in PEM-SPKI format.
|
16
|
+
* @param key The public key to export.
|
17
|
+
* @returns The exported public key in PEM-SPKI format.
|
18
|
+
*/
|
19
|
+
export async function exportSpki(key) {
|
20
|
+
const spki = await dntShim.crypto.subtle.exportKey("spki", key);
|
21
|
+
let pem = encodeBase64(spki);
|
22
|
+
pem = (pem.match(/.{1,64}/g) || []).join("\n");
|
23
|
+
return `-----BEGIN PUBLIC KEY-----\n${pem}\n-----END PUBLIC KEY-----\n`;
|
24
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"key.test.d.ts","sourceRoot":"","sources":["../../src/runtime/key.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { type LanguageTag } from "@phensley/language-tag";
|
2
|
+
/**
|
3
|
+
* A language-tagged string which corresponds to the `rdf:langString` type.
|
4
|
+
*/
|
5
|
+
export declare class LanguageString extends String {
|
6
|
+
readonly language: LanguageTag;
|
7
|
+
/**
|
8
|
+
* Constructs a new `LanguageString`.
|
9
|
+
* @param value A string value written in the given language.
|
10
|
+
* @param language The language of the string. If a string is given, it will
|
11
|
+
* be parsed as a `LanguageTag`.
|
12
|
+
*/
|
13
|
+
constructor(value: string, language: LanguageTag | string);
|
14
|
+
}
|
15
|
+
//# sourceMappingURL=langstr.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"langstr.d.ts","sourceRoot":"","sources":["../../src/runtime/langstr.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,wBAAwB,CAAC;AAE5E;;GAEG;AACH,qBAAa,cAAe,SAAQ,MAAM;IACxC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAE/B;;;;;OAKG;gBACS,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,MAAM;CAqB1D"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { parseLanguageTag } from "@phensley/language-tag";
|
2
|
+
/**
|
3
|
+
* A language-tagged string which corresponds to the `rdf:langString` type.
|
4
|
+
*/
|
5
|
+
export class LanguageString extends String {
|
6
|
+
language;
|
7
|
+
/**
|
8
|
+
* Constructs a new `LanguageString`.
|
9
|
+
* @param value A string value written in the given language.
|
10
|
+
* @param language The language of the string. If a string is given, it will
|
11
|
+
* be parsed as a `LanguageTag`.
|
12
|
+
*/
|
13
|
+
constructor(value, language) {
|
14
|
+
super(value);
|
15
|
+
this.language = typeof language === "string"
|
16
|
+
? parseLanguageTag(language)
|
17
|
+
: language;
|
18
|
+
}
|
19
|
+
[Symbol.for("Deno.customInspect")](inspect, options) {
|
20
|
+
return `<${this.language.compact()}> ${inspect(this.toString(), options)}`;
|
21
|
+
}
|
22
|
+
[Symbol.for("nodejs.util.inspect.custom")](_depth, options, inspect) {
|
23
|
+
return `<${this.language.compact()}> ${inspect(this.toString(), options)}`;
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"langstr.test.d.ts","sourceRoot":"","sources":["../../src/runtime/langstr.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This module contains the runtime facilities for working with Activity
|
3
|
+
* Vocabulary objects, which are auto-generated from the IDL.
|
4
|
+
*
|
5
|
+
* @module
|
6
|
+
*/
|
7
|
+
export * from "./docloader.js";
|
8
|
+
export * from "./key.js";
|
9
|
+
export * from "./langstr.js";
|
10
|
+
//# sourceMappingURL=mod.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/runtime/mod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/shim/event.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAK5E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/testing/context.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAIxE,wBAAgB,aAAa,CAAC,YAAY,EACxC,EACE,IAAI,EACJ,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,WAAW,EACX,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,YAAY,GACb,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACzD,OAAO,CAAC,YAAY,CAAC,CA0BvB;AAED,wBAAgB,oBAAoB,CAAC,YAAY,EAC/C,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,GAAG;IAC5C,GAAG,EAAE,GAAG,CAAC;IACT,IAAI,EAAE,YAAY,CAAC;CACpB,GACA,cAAc,CAAC,YAAY,CAAC,CAM9B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"docloader.d.ts","sourceRoot":"","sources":["../../src/testing/docloader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,cAAc,CAAC,CAgBzB"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"@context": "https://w3id.org/security/v1",
|
3
|
+
"id": "https://example.com/key",
|
4
|
+
"type": "CryptographicKey",
|
5
|
+
"owner": "https://example.com/person",
|
6
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyIB9rotX8G6r6/6toT+x\n24BUiQ/HaPH1Em9dOt4c94s+OPFoEdH7DY7Iym9A8LlH4JaGF8KD38bLHWe1S4x0\njV3gHJKhK7veJfGZCKUENcQecBZ+YWUs5HWvUIX1vVB//0luHrg6BQKGOrSOE+WI\nAxyr0qsWCFfZzQrvSnUD2yvg1arJX2xhms14uxoRd5Kg9efKSCmmQaNEapicARUm\nFWrIEpGFa/nUUnqimssAGw1eZFqf3wA4TjhsuARBhGaJtv/3KEa016eMZxy3kDlO\njZnXZTaTgWkXdodwUvy8563fes3Al6BlcS2iJ9qbtha8rSm0FHqoUKH73JsLPKQI\nwQIDAQAB\n-----END PUBLIC KEY-----"
|
7
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{
|
2
|
+
"@context": "https://w3id.org/security/v1",
|
3
|
+
"id": "https://example.com/key2",
|
4
|
+
"type": "CryptographicKey",
|
5
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoRmBtnxbdFutoRd1GLGw\nwGTrsqlRRWUe11hHQaoRLGf5LwQ0tIc6I9q+dynliw+2kxYsLn9SH2je6HcTYOol\ngW7F/cOWXZQN04b+OiYcU1ConAhLjmn4k1uKawJ614y0ScPNd8PQ+CljsnlPxbq9\nofaCMe2BV3B6y09aCuGFJ0nxn1/ubjmIBIWWFTAznoz1J9BhJDGyt3IO3ABy3f9z\nDVlR32L/n5VIkXnxkjUKdzMAOzYb62kuKOp1iznRTPrV71SNtivJMwSh/LVgBrmZ\njtIn/oim+KyX/fdLU3tQ7VClyqmJzyAjccOH6Qj6nFTPh+vX07gqN8IlLT2uye4w\nawIDAQAB\n-----END PUBLIC KEY-----"
|
6
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"@context": [
|
3
|
+
"https://www.w3.org/ns/activitystreams",
|
4
|
+
"https://w3id.org/security/v1"
|
5
|
+
],
|
6
|
+
"id": "https://example.com/person",
|
7
|
+
"type": "Person",
|
8
|
+
"name": "John Doe",
|
9
|
+
"publicKey": [
|
10
|
+
{
|
11
|
+
"id": "https://example.com/key",
|
12
|
+
"owner": "https://example.com/person",
|
13
|
+
"type": "CryptographicKey",
|
14
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyIB9rotX8G6r6/6toT+x\n24BUiQ/HaPH1Em9dOt4c94s+OPFoEdH7DY7Iym9A8LlH4JaGF8KD38bLHWe1S4x0\njV3gHJKhK7veJfGZCKUENcQecBZ+YWUs5HWvUIX1vVB//0luHrg6BQKGOrSOE+WI\nAxyr0qsWCFfZzQrvSnUD2yvg1arJX2xhms14uxoRd5Kg9efKSCmmQaNEapicARUm\nFWrIEpGFa/nUUnqimssAGw1eZFqf3wA4TjhsuARBhGaJtv/3KEa016eMZxy3kDlO\njZnXZTaTgWkXdodwUvy8563fes3Al6BlcS2iJ9qbtha8rSm0FHqoUKH73JsLPKQI\nwQIDAQAB\n-----END PUBLIC KEY-----"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"id": "https://example.com/key2",
|
18
|
+
"type": "CryptographicKey",
|
19
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoRmBtnxbdFutoRd1GLGw\nwGTrsqlRRWUe11hHQaoRLGf5LwQ0tIc6I9q+dynliw+2kxYsLn9SH2je6HcTYOol\ngW7F/cOWXZQN04b+OiYcU1ConAhLjmn4k1uKawJ614y0ScPNd8PQ+CljsnlPxbq9\nofaCMe2BV3B6y09aCuGFJ0nxn1/ubjmIBIWWFTAznoz1J9BhJDGyt3IO3ABy3f9z\nDVlR32L/n5VIkXnxkjUKdzMAOzYb62kuKOp1iznRTPrV71SNtivJMwSh/LVgBrmZ\njtIn/oim+KyX/fdLU3tQ7VClyqmJzyAjccOH6Qj6nFTPh+vX07gqN8IlLT2uye4w\nawIDAQAB\n-----END PUBLIC KEY-----"
|
20
|
+
}
|
21
|
+
]
|
22
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"@context": [
|
3
|
+
"https://www.w3.org/ns/activitystreams",
|
4
|
+
"https://w3id.org/security/v1"
|
5
|
+
],
|
6
|
+
"id": "https://example.com/users/handle",
|
7
|
+
"type": "Person",
|
8
|
+
"name": "John Doe",
|
9
|
+
"publicKey": [
|
10
|
+
{
|
11
|
+
"id": "https://example.com/users/handle#main-key",
|
12
|
+
"type": "CryptographicKey",
|
13
|
+
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoRmBtnxbdFutoRd1GLGw\nwGTrsqlRRWUe11hHQaoRLGf5LwQ0tIc6I9q+dynliw+2kxYsLn9SH2je6HcTYOol\ngW7F/cOWXZQN04b+OiYcU1ConAhLjmn4k1uKawJ614y0ScPNd8PQ+CljsnlPxbq9\nofaCMe2BV3B6y09aCuGFJ0nxn1/ubjmIBIWWFTAznoz1J9BhJDGyt3IO3ABy3f9z\nDVlR32L/n5VIkXnxkjUKdzMAOzYb62kuKOp1iznRTPrV71SNtivJMwSh/LVgBrmZ\njtIn/oim+KyX/fdLU3tQ7VClyqmJzyAjccOH6Qj6nFTPh+vX07gqN8IlLT2uye4w\nawIDAQAB\n-----END PUBLIC KEY-----"
|
14
|
+
}
|
15
|
+
]
|
16
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"@context": {
|
3
|
+
"id": "@id",
|
4
|
+
"type": "@type",
|
5
|
+
|
6
|
+
"dc": "http://purl.org/dc/terms/",
|
7
|
+
"sec": "https://w3id.org/security#",
|
8
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
9
|
+
|
10
|
+
"EcdsaKoblitzSignature2016": "sec:EcdsaKoblitzSignature2016",
|
11
|
+
"Ed25519Signature2018": "sec:Ed25519Signature2018",
|
12
|
+
"EncryptedMessage": "sec:EncryptedMessage",
|
13
|
+
"GraphSignature2012": "sec:GraphSignature2012",
|
14
|
+
"LinkedDataSignature2015": "sec:LinkedDataSignature2015",
|
15
|
+
"LinkedDataSignature2016": "sec:LinkedDataSignature2016",
|
16
|
+
"CryptographicKey": "sec:Key",
|
17
|
+
|
18
|
+
"authenticationTag": "sec:authenticationTag",
|
19
|
+
"canonicalizationAlgorithm": "sec:canonicalizationAlgorithm",
|
20
|
+
"cipherAlgorithm": "sec:cipherAlgorithm",
|
21
|
+
"cipherData": "sec:cipherData",
|
22
|
+
"cipherKey": "sec:cipherKey",
|
23
|
+
"created": {"@id": "dc:created", "@type": "xsd:dateTime"},
|
24
|
+
"creator": {"@id": "dc:creator", "@type": "@id"},
|
25
|
+
"digestAlgorithm": "sec:digestAlgorithm",
|
26
|
+
"digestValue": "sec:digestValue",
|
27
|
+
"domain": "sec:domain",
|
28
|
+
"encryptionKey": "sec:encryptionKey",
|
29
|
+
"expiration": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
|
30
|
+
"expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
|
31
|
+
"initializationVector": "sec:initializationVector",
|
32
|
+
"iterationCount": "sec:iterationCount",
|
33
|
+
"nonce": "sec:nonce",
|
34
|
+
"normalizationAlgorithm": "sec:normalizationAlgorithm",
|
35
|
+
"owner": {"@id": "sec:owner", "@type": "@id"},
|
36
|
+
"password": "sec:password",
|
37
|
+
"privateKey": {"@id": "sec:privateKey", "@type": "@id"},
|
38
|
+
"privateKeyPem": "sec:privateKeyPem",
|
39
|
+
"publicKey": {"@id": "sec:publicKey", "@type": "@id"},
|
40
|
+
"publicKeyBase58": "sec:publicKeyBase58",
|
41
|
+
"publicKeyPem": "sec:publicKeyPem",
|
42
|
+
"publicKeyWif": "sec:publicKeyWif",
|
43
|
+
"publicKeyService": {"@id": "sec:publicKeyService", "@type": "@id"},
|
44
|
+
"revoked": {"@id": "sec:revoked", "@type": "xsd:dateTime"},
|
45
|
+
"salt": "sec:salt",
|
46
|
+
"signature": "sec:signature",
|
47
|
+
"signatureAlgorithm": "sec:signingAlgorithm",
|
48
|
+
"signatureValue": "sec:signatureValue"
|
49
|
+
}
|
50
|
+
}
|