keri-ts 0.4.0 → 0.6.0
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/README.md +7 -70
- package/esm/cesr/src/adapters/async-iterable.js +8 -0
- package/esm/cesr/src/adapters/effection.js +6 -0
- package/esm/cesr/src/annotate/annotator.js +12 -0
- package/esm/cesr/src/annotate/comments.js +5 -1
- package/esm/cesr/src/annotate/denot.js +6 -0
- package/esm/cesr/src/annotate/render.js +15 -3
- package/esm/cesr/src/core/bytes.js +9 -0
- package/esm/cesr/src/core/errors.js +3 -0
- package/esm/cesr/src/core/parser-engine.js +1 -1
- package/esm/cesr/src/core/parser-frame-parser.js +22 -18
- package/esm/cesr/src/core/vocabulary.js +47 -0
- package/esm/cesr/src/index.js +5 -0
- package/esm/cesr/src/parser/attachment-parser.js +4 -0
- package/esm/cesr/src/parser/cold-start.js +6 -0
- package/esm/cesr/src/parser/group-dispatch.js +2 -2
- package/esm/cesr/src/primitives/aggor.js +374 -30
- package/esm/cesr/src/primitives/bexter.js +2 -3
- package/esm/cesr/src/primitives/blinder.js +6 -0
- package/esm/cesr/src/primitives/byte-like.js +19 -0
- package/esm/cesr/src/primitives/cigar.js +17 -3
- package/esm/cesr/src/primitives/cipher.js +91 -6
- package/esm/cesr/src/primitives/codex.js +39 -6
- package/esm/cesr/src/primitives/compactor.js +307 -3
- package/esm/cesr/src/primitives/counter.js +6 -2
- package/esm/cesr/src/primitives/dater.js +1 -2
- package/esm/cesr/src/primitives/decimer.js +3 -5
- package/esm/cesr/src/primitives/decrypter.js +123 -7
- package/esm/cesr/src/primitives/diger.js +57 -3
- package/esm/cesr/src/primitives/disclosure.js +300 -0
- package/esm/cesr/src/primitives/encrypter.js +130 -7
- package/esm/cesr/src/primitives/hydrate.js +49 -0
- package/esm/cesr/src/primitives/ilker.js +2 -3
- package/esm/cesr/src/primitives/indexer.js +21 -4
- package/esm/cesr/src/primitives/labeler.js +1 -2
- package/esm/cesr/src/primitives/mapper.js +612 -35
- package/esm/cesr/src/primitives/matter.js +133 -3
- package/esm/cesr/src/primitives/mediar.js +6 -0
- package/esm/cesr/src/primitives/noncer.js +2 -3
- package/esm/cesr/src/primitives/number.js +1 -2
- package/esm/cesr/src/primitives/pather.js +102 -5
- package/esm/cesr/src/primitives/prefixer.js +1 -2
- package/esm/cesr/src/primitives/primitive.js +14 -0
- package/esm/cesr/src/primitives/registry.js +2 -0
- package/esm/cesr/src/primitives/saider.js +80 -3
- package/esm/cesr/src/primitives/salter.js +96 -2
- package/esm/cesr/src/primitives/sealed-box.js +41 -0
- package/esm/cesr/src/primitives/seqner.js +1 -2
- package/esm/cesr/src/primitives/siger.js +58 -3
- package/esm/cesr/src/primitives/signer.js +243 -9
- package/esm/cesr/src/primitives/streamer.js +28 -0
- package/esm/cesr/src/primitives/structing.js +727 -0
- package/esm/cesr/src/primitives/structor.js +20 -0
- package/esm/cesr/src/primitives/tagger.js +1 -2
- package/esm/cesr/src/primitives/texter.js +1 -2
- package/esm/cesr/src/primitives/tholder.js +552 -10
- package/esm/cesr/src/primitives/traitor.js +2 -3
- package/esm/cesr/src/primitives/verfer.js +50 -6
- package/esm/cesr/src/primitives/verser.js +16 -6
- package/esm/cesr/src/router/router-stub.js +1 -0
- package/esm/cesr/src/serder/native.js +1326 -0
- package/esm/cesr/src/serder/serder.js +1558 -59
- package/esm/cesr/src/serder/serdery.js +92 -7
- package/esm/cesr/src/serder/smell.js +26 -1
- package/esm/cesr/src/tables/codex-utils.js +2 -0
- package/esm/cesr/src/tables/counter-codex.js +2 -0
- package/esm/cesr/src/tables/counter-groups.js +6 -0
- package/esm/cesr/src/tables/versions.js +4 -0
- package/esm/cesr/src/version.js +5 -2
- package/esm/deps/jsr.io/@std/internal/1.0.14/_os.js +14 -0
- package/esm/deps/jsr.io/@std/internal/{1.0.12 → 1.0.14}/os.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/assert_path.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/basename.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/common.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/constants.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/dirname.js +1 -1
- package/esm/deps/jsr.io/@std/path/1.1.5/_common/env.js +11 -0
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/format.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/from_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/glob_to_reg_exp.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/normalize_string.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/relative.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/strip_trailing_separators.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/to_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/basename.js +6 -3
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/common.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/constants.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/dirname.js +6 -3
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/extname.js +6 -3
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/format.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/from_file_url.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/glob_to_regexp.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/is_absolute.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/is_glob.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/join.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/join_globs.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/mod.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/normalize.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/normalize_glob.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/parse.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/_util.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/basename.js +6 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/constants.js +2 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/dirname.js +6 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/extname.js +6 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/format.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/from_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/glob_to_regexp.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/is_absolute.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/join.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/join_globs.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/normalize_glob.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/parse.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/relative.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/resolve.js +4 -9
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/to_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/to_namespaced_path.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/relative.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/resolve.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/to_file_url.js +2 -2
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/to_namespaced_path.js +2 -2
- package/esm/deps/jsr.io/@std/path/1.1.5/types.js +3 -0
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/_util.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/basename.js +2 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/constants.js +2 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/dirname.js +2 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/extname.js +2 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/format.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/from_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/glob_to_regexp.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/is_absolute.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/join.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/join_globs.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/normalize.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/normalize_glob.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/parse.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/relative.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/resolve.js +5 -14
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/to_file_url.js +1 -1
- package/esm/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/to_namespaced_path.js +1 -1
- package/esm/keri/src/app/agent-runtime.js +380 -0
- package/esm/keri/src/app/authenticating.js +120 -0
- package/esm/keri/src/app/cesr-http.js +273 -0
- package/esm/keri/src/app/challenging.js +163 -0
- package/esm/keri/src/app/cli/annotate.js +6 -0
- package/esm/keri/src/app/cli/challenge.js +179 -0
- package/esm/keri/src/app/cli/common/displaying.js +43 -0
- package/esm/keri/src/app/cli/common/existing.js +93 -1
- package/esm/keri/src/app/cli/common/parsing.js +182 -1
- package/esm/keri/src/app/cli/db-dump.js +266 -44
- package/esm/keri/src/app/cli/delegate.js +232 -0
- package/esm/keri/src/app/cli/ends.js +63 -0
- package/esm/keri/src/app/cli/exchange.js +77 -0
- package/esm/keri/src/app/cli/export.js +14 -0
- package/esm/keri/src/app/cli/incept.js +79 -8
- package/esm/keri/src/app/cli/index.js +19 -2
- package/esm/keri/src/app/cli/init.js +39 -0
- package/esm/keri/src/app/cli/interact.js +116 -0
- package/esm/keri/src/app/cli/loc.js +73 -0
- package/esm/keri/src/app/cli/notifications.js +106 -0
- package/esm/keri/src/app/cli/oobi.js +222 -0
- package/esm/keri/src/app/cli/query.js +156 -0
- package/esm/keri/src/app/cli/rotate.js +221 -0
- package/esm/keri/src/app/cli/sign.js +67 -0
- package/esm/keri/src/app/cli/verify.js +83 -0
- package/esm/keri/src/app/configing.js +2 -1
- package/esm/keri/src/app/cue-runtime.js +70 -0
- package/esm/keri/src/app/delegating.js +625 -0
- package/esm/keri/src/app/exchanging.js +448 -0
- package/esm/keri/src/app/forwarding.js +895 -0
- package/esm/keri/src/app/habbing.js +1315 -168
- package/esm/keri/src/app/httping.js +83 -0
- package/esm/keri/src/app/keeping.js +999 -167
- package/esm/keri/src/app/mailbox-director.js +346 -0
- package/esm/keri/src/app/mailbox-sse.js +115 -0
- package/esm/keri/src/app/mailboxing.js +344 -0
- package/esm/keri/src/app/notifying.js +125 -0
- package/esm/keri/src/app/oobiery.js +552 -0
- package/esm/keri/src/app/organizing.js +108 -0
- package/esm/keri/src/app/parsering.js +363 -0
- package/esm/keri/src/app/query-transport.js +118 -0
- package/esm/keri/src/app/querying.js +683 -0
- package/esm/keri/src/app/reactor.js +176 -0
- package/esm/keri/src/app/respondant.js +132 -0
- package/esm/keri/src/app/runtime-turn.js +14 -0
- package/esm/keri/src/app/signaling.js +168 -0
- package/esm/keri/src/app/version.js +5 -2
- package/esm/keri/src/app/witnessing.js +779 -0
- package/esm/keri/src/core/cues.js +1 -0
- package/esm/keri/src/core/deck.js +86 -0
- package/esm/keri/src/core/dispatch.js +361 -0
- package/esm/keri/src/core/eventing.js +2411 -0
- package/esm/keri/src/core/kever-decisions.js +63 -0
- package/esm/keri/src/core/kever.js +1784 -0
- package/esm/keri/src/core/logger.js +5 -0
- package/esm/keri/src/core/mailbox-topics.js +30 -0
- package/esm/keri/src/core/protocol-eventing.js +450 -0
- package/esm/keri/src/core/protocol-exchanging.js +124 -0
- package/esm/keri/src/core/protocol-serialization.js +215 -0
- package/esm/keri/src/core/records.js +371 -1
- package/esm/keri/src/core/roles.js +29 -0
- package/esm/keri/src/core/routing.js +814 -0
- package/esm/keri/src/core/schemes.js +10 -0
- package/esm/keri/src/core/witnesses.js +65 -0
- package/esm/keri/src/db/basing.js +410 -87
- package/esm/keri/src/db/core/keys.js +12 -3
- package/esm/keri/src/db/core/lmdber.js +87 -38
- package/esm/keri/src/db/core/path-manager.js +1 -1
- package/esm/keri/src/db/escrowing.js +358 -0
- package/esm/keri/src/db/index.js +4 -0
- package/esm/keri/src/db/keeping.js +137 -23
- package/esm/keri/src/db/koming.js +148 -34
- package/esm/keri/src/db/mailboxing.js +178 -0
- package/esm/keri/src/db/noting.js +274 -0
- package/esm/keri/src/db/outboxing.js +322 -0
- package/esm/keri/src/db/subing.js +437 -124
- package/esm/keri/src/library/index.js +13 -0
- package/esm/keri/src/npm/cli.js +3 -0
- package/esm/keri/src/npm/db.js +3 -0
- package/esm/keri/src/npm/index.js +5 -5
- package/esm/keri/src/npm/runtime.js +3 -0
- package/esm/keri/src/runtime/index.js +43 -0
- package/esm/keri/src/time/mod.js +31 -0
- package/package.json +20 -15
- package/types/_dnt.shims.d.ts +1 -2
- package/types/_dnt.shims.d.ts.map +1 -1
- package/types/cesr/src/adapters/async-iterable.d.ts +8 -0
- package/types/cesr/src/adapters/async-iterable.d.ts.map +1 -1
- package/types/cesr/src/adapters/effection.d.ts +7 -0
- package/types/cesr/src/adapters/effection.d.ts.map +1 -1
- package/types/cesr/src/annotate/annotator.d.ts +12 -0
- package/types/cesr/src/annotate/annotator.d.ts.map +1 -1
- package/types/cesr/src/annotate/comments.d.ts +4 -0
- package/types/cesr/src/annotate/comments.d.ts.map +1 -1
- package/types/cesr/src/annotate/denot.d.ts +6 -0
- package/types/cesr/src/annotate/denot.d.ts.map +1 -1
- package/types/cesr/src/annotate/render.d.ts.map +1 -1
- package/types/cesr/src/annotate/types.d.ts +2 -0
- package/types/cesr/src/annotate/types.d.ts.map +1 -1
- package/types/cesr/src/bench/parser-benchmark.d.ts +3 -0
- package/types/cesr/src/bench/parser-benchmark.d.ts.map +1 -1
- package/types/cesr/src/core/bytes.d.ts +9 -0
- package/types/cesr/src/core/bytes.d.ts.map +1 -1
- package/types/cesr/src/core/errors.d.ts +3 -0
- package/types/cesr/src/core/errors.d.ts.map +1 -1
- package/types/cesr/src/core/parser-engine.d.ts +4 -0
- package/types/cesr/src/core/parser-engine.d.ts.map +1 -1
- package/types/cesr/src/core/parser-frame-parser.d.ts.map +1 -1
- package/types/cesr/src/core/types.d.ts +2 -0
- package/types/cesr/src/core/types.d.ts.map +1 -1
- package/types/cesr/src/core/vocabulary.d.ts +48 -0
- package/types/cesr/src/core/vocabulary.d.ts.map +1 -0
- package/types/cesr/src/index.d.ts +5 -0
- package/types/cesr/src/index.d.ts.map +1 -1
- package/types/cesr/src/parser/attachment-parser.d.ts +4 -0
- package/types/cesr/src/parser/attachment-parser.d.ts.map +1 -1
- package/types/cesr/src/parser/cold-start.d.ts +6 -0
- package/types/cesr/src/parser/cold-start.d.ts.map +1 -1
- package/types/cesr/src/parser/group-dispatch.d.ts.map +1 -1
- package/types/cesr/src/primitives/aggor.d.ts +100 -13
- package/types/cesr/src/primitives/aggor.d.ts.map +1 -1
- package/types/cesr/src/primitives/bexter.d.ts.map +1 -1
- package/types/cesr/src/primitives/blinder.d.ts +6 -0
- package/types/cesr/src/primitives/blinder.d.ts.map +1 -1
- package/types/cesr/src/primitives/byte-like.d.ts +7 -0
- package/types/cesr/src/primitives/byte-like.d.ts.map +1 -0
- package/types/cesr/src/primitives/cigar.d.ts +11 -1
- package/types/cesr/src/primitives/cigar.d.ts.map +1 -1
- package/types/cesr/src/primitives/cipher.d.ts +73 -2
- package/types/cesr/src/primitives/cipher.d.ts.map +1 -1
- package/types/cesr/src/primitives/codex.d.ts +34 -4
- package/types/cesr/src/primitives/codex.d.ts.map +1 -1
- package/types/cesr/src/primitives/compactor.d.ts +94 -2
- package/types/cesr/src/primitives/compactor.d.ts.map +1 -1
- package/types/cesr/src/primitives/counter.d.ts.map +1 -1
- package/types/cesr/src/primitives/dater.d.ts.map +1 -1
- package/types/cesr/src/primitives/decimer.d.ts.map +1 -1
- package/types/cesr/src/primitives/decrypter.d.ts +64 -3
- package/types/cesr/src/primitives/decrypter.d.ts.map +1 -1
- package/types/cesr/src/primitives/diger.d.ts +16 -0
- package/types/cesr/src/primitives/diger.d.ts.map +1 -1
- package/types/cesr/src/primitives/disclosure.d.ts +201 -0
- package/types/cesr/src/primitives/disclosure.d.ts.map +1 -0
- package/types/cesr/src/primitives/encrypter.d.ts +66 -4
- package/types/cesr/src/primitives/encrypter.d.ts.map +1 -1
- package/types/cesr/src/primitives/hydrate.d.ts +20 -0
- package/types/cesr/src/primitives/hydrate.d.ts.map +1 -0
- package/types/cesr/src/primitives/ilker.d.ts.map +1 -1
- package/types/cesr/src/primitives/indexer.d.ts.map +1 -1
- package/types/cesr/src/primitives/labeler.d.ts.map +1 -1
- package/types/cesr/src/primitives/mapper.d.ts +132 -11
- package/types/cesr/src/primitives/mapper.d.ts.map +1 -1
- package/types/cesr/src/primitives/matter.d.ts +33 -1
- package/types/cesr/src/primitives/matter.d.ts.map +1 -1
- package/types/cesr/src/primitives/mediar.d.ts +6 -0
- package/types/cesr/src/primitives/mediar.d.ts.map +1 -1
- package/types/cesr/src/primitives/noncer.d.ts.map +1 -1
- package/types/cesr/src/primitives/number.d.ts.map +1 -1
- package/types/cesr/src/primitives/pather.d.ts +21 -0
- package/types/cesr/src/primitives/pather.d.ts.map +1 -1
- package/types/cesr/src/primitives/prefixer.d.ts.map +1 -1
- package/types/cesr/src/primitives/primitive.d.ts +26 -0
- package/types/cesr/src/primitives/primitive.d.ts.map +1 -1
- package/types/cesr/src/primitives/registry.d.ts +3 -0
- package/types/cesr/src/primitives/registry.d.ts.map +1 -1
- package/types/cesr/src/primitives/saider.d.ts +41 -0
- package/types/cesr/src/primitives/saider.d.ts.map +1 -1
- package/types/cesr/src/primitives/salter.d.ts +56 -1
- package/types/cesr/src/primitives/salter.d.ts.map +1 -1
- package/types/cesr/src/primitives/sealed-box.d.ts +29 -0
- package/types/cesr/src/primitives/sealed-box.d.ts.map +1 -0
- package/types/cesr/src/primitives/seqner.d.ts.map +1 -1
- package/types/cesr/src/primitives/siger.d.ts +14 -0
- package/types/cesr/src/primitives/siger.d.ts.map +1 -1
- package/types/cesr/src/primitives/signer.d.ts +80 -4
- package/types/cesr/src/primitives/signer.d.ts.map +1 -1
- package/types/cesr/src/primitives/streamer.d.ts +31 -0
- package/types/cesr/src/primitives/streamer.d.ts.map +1 -0
- package/types/cesr/src/primitives/structing.d.ts +4114 -0
- package/types/cesr/src/primitives/structing.d.ts.map +1 -0
- package/types/cesr/src/primitives/structor.d.ts +6 -0
- package/types/cesr/src/primitives/structor.d.ts.map +1 -1
- package/types/cesr/src/primitives/tagger.d.ts.map +1 -1
- package/types/cesr/src/primitives/texter.d.ts.map +1 -1
- package/types/cesr/src/primitives/tholder.d.ts +150 -5
- package/types/cesr/src/primitives/tholder.d.ts.map +1 -1
- package/types/cesr/src/primitives/traitor.d.ts.map +1 -1
- package/types/cesr/src/primitives/unknown.d.ts +1 -0
- package/types/cesr/src/primitives/unknown.d.ts.map +1 -1
- package/types/cesr/src/primitives/verfer.d.ts +12 -0
- package/types/cesr/src/primitives/verfer.d.ts.map +1 -1
- package/types/cesr/src/primitives/verser.d.ts +14 -3
- package/types/cesr/src/primitives/verser.d.ts.map +1 -1
- package/types/cesr/src/router/router-stub.d.ts +3 -0
- package/types/cesr/src/router/router-stub.d.ts.map +1 -1
- package/types/cesr/src/serder/native.d.ts +115 -0
- package/types/cesr/src/serder/native.d.ts.map +1 -0
- package/types/cesr/src/serder/serder.d.ts +187 -9
- package/types/cesr/src/serder/serder.d.ts.map +1 -1
- package/types/cesr/src/serder/serdery.d.ts +42 -0
- package/types/cesr/src/serder/serdery.d.ts.map +1 -1
- package/types/cesr/src/serder/smell.d.ts +22 -0
- package/types/cesr/src/serder/smell.d.ts.map +1 -1
- package/types/cesr/src/tables/codex-utils.d.ts +3 -0
- package/types/cesr/src/tables/codex-utils.d.ts.map +1 -1
- package/types/cesr/src/tables/counter-codex.d.ts +4 -0
- package/types/cesr/src/tables/counter-codex.d.ts.map +1 -1
- package/types/cesr/src/tables/counter-groups.d.ts +6 -0
- package/types/cesr/src/tables/counter-groups.d.ts.map +1 -1
- package/types/cesr/src/tables/counter.tables.generated.d.ts.map +1 -1
- package/types/cesr/src/tables/indexer.codex.generated.d.ts.map +1 -1
- package/types/cesr/src/tables/matter.codex.generated.d.ts.map +1 -1
- package/types/cesr/src/tables/table-types.d.ts +6 -0
- package/types/cesr/src/tables/table-types.d.ts.map +1 -1
- package/types/cesr/src/tables/versions.d.ts +6 -0
- package/types/cesr/src/tables/versions.d.ts.map +1 -1
- package/types/cesr/src/version.d.ts +5 -2
- package/types/cesr/src/version.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/{1.0.12 → 1.0.14}/os.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/assert_path.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/basename.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/common.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/constants.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/dirname.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/1.1.5/_common/env.d.ts +2 -0
- package/types/deps/jsr.io/@std/path/1.1.5/_common/env.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/format.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/from_file_url.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/glob_to_reg_exp.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/normalize.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/normalize_string.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/relative.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/strip_trailing_separators.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/to_file_url.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/basename.d.ts +4 -1
- package/types/deps/jsr.io/@std/path/1.1.5/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/common.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/constants.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/dirname.d.ts +4 -1
- package/types/deps/jsr.io/@std/path/1.1.5/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/extname.d.ts +4 -1
- package/types/deps/jsr.io/@std/path/1.1.5/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/format.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/from_file_url.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/glob_to_regexp.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/is_absolute.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/is_glob.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/join.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/join_globs.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/normalize.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/normalize_glob.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/parse.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/_util.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/basename.d.ts +5 -0
- package/types/deps/jsr.io/@std/path/1.1.5/posix/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/constants.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/dirname.d.ts +5 -0
- package/types/deps/jsr.io/@std/path/1.1.5/posix/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/extname.d.ts +5 -0
- package/types/deps/jsr.io/@std/path/1.1.5/posix/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/format.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/from_file_url.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/glob_to_regexp.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/is_absolute.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/join.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/join_globs.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/normalize.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/normalize_glob.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/parse.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/relative.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/1.1.5/posix/resolve.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/to_file_url.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/to_namespaced_path.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/relative.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/resolve.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/to_file_url.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/to_namespaced_path.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/types.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/_util.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/basename.d.ts +1 -0
- package/types/deps/jsr.io/@std/path/1.1.5/windows/basename.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/constants.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/dirname.d.ts +1 -0
- package/types/deps/jsr.io/@std/path/1.1.5/windows/dirname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/extname.d.ts +1 -0
- package/types/deps/jsr.io/@std/path/1.1.5/windows/extname.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/format.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/from_file_url.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/glob_to_regexp.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/is_absolute.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/join.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/join_globs.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/normalize.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/normalize_glob.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/parse.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/relative.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/1.1.5/windows/resolve.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/to_file_url.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/to_namespaced_path.d.ts.map +1 -1
- package/types/keri/src/app/agent-runtime.d.ts +240 -0
- package/types/keri/src/app/agent-runtime.d.ts.map +1 -0
- package/types/keri/src/app/authenticating.d.ts +30 -0
- package/types/keri/src/app/authenticating.d.ts.map +1 -0
- package/types/keri/src/app/cesr-http.d.ts +117 -0
- package/types/keri/src/app/cesr-http.d.ts.map +1 -0
- package/types/keri/src/app/challenging.d.ts +56 -0
- package/types/keri/src/app/challenging.d.ts.map +1 -0
- package/types/keri/src/app/cli/annotate.d.ts +6 -0
- package/types/keri/src/app/cli/annotate.d.ts.map +1 -1
- package/types/keri/src/app/cli/challenge.d.ts +8 -0
- package/types/keri/src/app/cli/challenge.d.ts.map +1 -0
- package/types/keri/src/app/cli/common/displaying.d.ts +12 -0
- package/types/keri/src/app/cli/common/displaying.d.ts.map +1 -0
- package/types/keri/src/app/cli/common/existing.d.ts +27 -2
- package/types/keri/src/app/cli/common/existing.d.ts.map +1 -1
- package/types/keri/src/app/cli/common/parsing.d.ts +73 -2
- package/types/keri/src/app/cli/common/parsing.d.ts.map +1 -1
- package/types/keri/src/app/cli/db-dump.d.ts +16 -4
- package/types/keri/src/app/cli/db-dump.d.ts.map +1 -1
- package/types/keri/src/app/cli/delegate.d.ts +3 -0
- package/types/keri/src/app/cli/delegate.d.ts.map +1 -0
- package/types/keri/src/app/cli/ends.d.ts +15 -0
- package/types/keri/src/app/cli/ends.d.ts.map +1 -0
- package/types/keri/src/app/cli/exchange.d.ts +12 -0
- package/types/keri/src/app/cli/exchange.d.ts.map +1 -0
- package/types/keri/src/app/cli/export.d.ts.map +1 -1
- package/types/keri/src/app/cli/incept.d.ts.map +1 -1
- package/types/keri/src/app/cli/index.d.ts +19 -2
- package/types/keri/src/app/cli/index.d.ts.map +1 -1
- package/types/keri/src/app/cli/init.d.ts.map +1 -1
- package/types/keri/src/app/cli/interact.d.ts +20 -0
- package/types/keri/src/app/cli/interact.d.ts.map +1 -0
- package/types/keri/src/app/cli/loc.d.ts +12 -0
- package/types/keri/src/app/cli/loc.d.ts.map +1 -0
- package/types/keri/src/app/cli/notifications.d.ts +5 -0
- package/types/keri/src/app/cli/notifications.d.ts.map +1 -0
- package/types/keri/src/app/cli/oobi.d.ts +29 -0
- package/types/keri/src/app/cli/oobi.d.ts.map +1 -0
- package/types/keri/src/app/cli/query.d.ts +12 -0
- package/types/keri/src/app/cli/query.d.ts.map +1 -0
- package/types/keri/src/app/cli/rotate.d.ts +23 -0
- package/types/keri/src/app/cli/rotate.d.ts.map +1 -0
- package/types/keri/src/app/cli/sign.d.ts +24 -0
- package/types/keri/src/app/cli/sign.d.ts.map +1 -0
- package/types/keri/src/app/cli/verify.d.ts +24 -0
- package/types/keri/src/app/cli/verify.d.ts.map +1 -0
- package/types/keri/src/app/configing.d.ts +2 -0
- package/types/keri/src/app/configing.d.ts.map +1 -1
- package/types/keri/src/app/cue-runtime.d.ts +38 -0
- package/types/keri/src/app/cue-runtime.d.ts.map +1 -0
- package/types/keri/src/app/delegating.d.ts +140 -0
- package/types/keri/src/app/delegating.d.ts.map +1 -0
- package/types/keri/src/app/exchanging.d.ts +115 -0
- package/types/keri/src/app/exchanging.d.ts.map +1 -0
- package/types/keri/src/app/forwarding.d.ts +304 -0
- package/types/keri/src/app/forwarding.d.ts.map +1 -0
- package/types/keri/src/app/habbing.d.ts +407 -39
- package/types/keri/src/app/habbing.d.ts.map +1 -1
- package/types/keri/src/app/httping.d.ts +34 -0
- package/types/keri/src/app/httping.d.ts.map +1 -0
- package/types/keri/src/app/keeping.d.ts +376 -28
- package/types/keri/src/app/keeping.d.ts.map +1 -1
- package/types/keri/src/app/mailbox-director.d.ts +146 -0
- package/types/keri/src/app/mailbox-director.d.ts.map +1 -0
- package/types/keri/src/app/mailbox-sse.d.ts +21 -0
- package/types/keri/src/app/mailbox-sse.d.ts.map +1 -0
- package/types/keri/src/app/mailboxing.d.ts +208 -0
- package/types/keri/src/app/mailboxing.d.ts.map +1 -0
- package/types/keri/src/app/notifying.d.ts +32 -0
- package/types/keri/src/app/notifying.d.ts.map +1 -0
- package/types/keri/src/app/oobiery.d.ts +167 -0
- package/types/keri/src/app/oobiery.d.ts.map +1 -0
- package/types/keri/src/app/organizing.d.ts +36 -0
- package/types/keri/src/app/organizing.d.ts.map +1 -0
- package/types/keri/src/app/parsering.d.ts +29 -0
- package/types/keri/src/app/parsering.d.ts.map +1 -0
- package/types/keri/src/app/protocol-host-policy.d.ts +27 -0
- package/types/keri/src/app/protocol-host-policy.d.ts.map +1 -0
- package/types/keri/src/app/query-transport.d.ts +13 -0
- package/types/keri/src/app/query-transport.d.ts.map +1 -0
- package/types/keri/src/app/querying.d.ts +230 -0
- package/types/keri/src/app/querying.d.ts.map +1 -0
- package/types/keri/src/app/reactor.d.ts +86 -0
- package/types/keri/src/app/reactor.d.ts.map +1 -0
- package/types/keri/src/app/respondant.d.ts +43 -0
- package/types/keri/src/app/respondant.d.ts.map +1 -0
- package/types/keri/src/app/runtime-turn.d.ts +10 -0
- package/types/keri/src/app/runtime-turn.d.ts.map +1 -0
- package/types/keri/src/app/signaling.d.ts +64 -0
- package/types/keri/src/app/signaling.d.ts.map +1 -0
- package/types/keri/src/app/version.d.ts +5 -2
- package/types/keri/src/app/version.d.ts.map +1 -1
- package/types/keri/src/app/witnessing.d.ts +148 -0
- package/types/keri/src/app/witnessing.d.ts.map +1 -0
- package/types/keri/src/core/cues.d.ts +162 -0
- package/types/keri/src/core/cues.d.ts.map +1 -0
- package/types/keri/src/core/deck.d.ts +42 -0
- package/types/keri/src/core/deck.d.ts.map +1 -0
- package/types/keri/src/core/dispatch.d.ts +140 -0
- package/types/keri/src/core/dispatch.d.ts.map +1 -0
- package/types/keri/src/core/eventing.d.ts +754 -0
- package/types/keri/src/core/eventing.d.ts.map +1 -0
- package/types/keri/src/core/kever-decisions.d.ts +243 -0
- package/types/keri/src/core/kever-decisions.d.ts.map +1 -0
- package/types/keri/src/core/kever.d.ts +419 -0
- package/types/keri/src/core/kever.d.ts.map +1 -0
- package/types/keri/src/core/logger.d.ts +7 -0
- package/types/keri/src/core/logger.d.ts.map +1 -1
- package/types/keri/src/core/mailbox-topics.d.ts +45 -0
- package/types/keri/src/core/mailbox-topics.d.ts.map +1 -0
- package/types/keri/src/core/protocol-eventing.d.ts +118 -0
- package/types/keri/src/core/protocol-eventing.d.ts.map +1 -0
- package/types/keri/src/core/protocol-exchanging.d.ts +36 -0
- package/types/keri/src/core/protocol-exchanging.d.ts.map +1 -0
- package/types/keri/src/core/protocol-serialization.d.ts +29 -0
- package/types/keri/src/core/protocol-serialization.d.ts.map +1 -0
- package/types/keri/src/core/records.d.ts +311 -37
- package/types/keri/src/core/records.d.ts.map +1 -1
- package/types/keri/src/core/roles.d.ts +30 -0
- package/types/keri/src/core/roles.d.ts.map +1 -0
- package/types/keri/src/core/routing.d.ts +350 -0
- package/types/keri/src/core/routing.d.ts.map +1 -0
- package/types/keri/src/core/schemes.d.ts +11 -0
- package/types/keri/src/core/schemes.d.ts.map +1 -0
- package/types/keri/src/core/witnesses.d.ts +36 -0
- package/types/keri/src/core/witnesses.d.ts.map +1 -0
- package/types/keri/src/db/basing.d.ts +114 -17
- package/types/keri/src/db/basing.d.ts.map +1 -1
- package/types/keri/src/db/core/keys.d.ts +12 -0
- package/types/keri/src/db/core/keys.d.ts.map +1 -1
- package/types/keri/src/db/core/lmdber.d.ts +30 -11
- package/types/keri/src/db/core/lmdber.d.ts.map +1 -1
- package/types/keri/src/db/escrowing.d.ts +135 -0
- package/types/keri/src/db/escrowing.d.ts.map +1 -0
- package/types/keri/src/db/index.d.ts +4 -0
- package/types/keri/src/db/index.d.ts.map +1 -1
- package/types/keri/src/db/keeping.d.ts +126 -23
- package/types/keri/src/db/keeping.d.ts.map +1 -1
- package/types/keri/src/db/koming.d.ts +91 -39
- package/types/keri/src/db/koming.d.ts.map +1 -1
- package/types/keri/src/db/mailboxing.d.ts +111 -0
- package/types/keri/src/db/mailboxing.d.ts.map +1 -0
- package/types/keri/src/db/noting.d.ts +106 -0
- package/types/keri/src/db/noting.d.ts.map +1 -0
- package/types/keri/src/db/outboxing.d.ts +160 -0
- package/types/keri/src/db/outboxing.d.ts.map +1 -0
- package/types/keri/src/db/subing.d.ts +258 -50
- package/types/keri/src/db/subing.d.ts.map +1 -1
- package/types/keri/src/library/index.d.ts +14 -0
- package/types/keri/src/library/index.d.ts.map +1 -0
- package/types/keri/src/npm/cli.d.ts +4 -0
- package/types/keri/src/npm/cli.d.ts.map +1 -0
- package/types/keri/src/npm/db.d.ts +4 -0
- package/types/keri/src/npm/db.d.ts.map +1 -0
- package/types/keri/src/npm/index.d.ts +5 -5
- package/types/keri/src/npm/index.d.ts.map +1 -1
- package/types/keri/src/npm/runtime.d.ts +4 -0
- package/types/keri/src/npm/runtime.d.ts.map +1 -0
- package/types/keri/src/runtime/index.d.ts +44 -0
- package/types/keri/src/runtime/index.d.ts.map +1 -0
- package/types/keri/src/time/mod.d.ts +20 -0
- package/types/keri/src/time/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.12/_os.js +0 -12
- package/esm/deps/jsr.io/@std/path/1.1.4/types.js +0 -3
- package/esm/keri/src/app/cli/agent.js +0 -19
- package/esm/keri/src/app/cli/cli-node.js +0 -9
- package/esm/keri/src/app/cli/cli.js +0 -83
- package/esm/keri/src/app/cli/command-definitions.js +0 -453
- package/esm/keri/src/app/index.js +0 -10
- package/esm/keri/src/app/server.js +0 -57
- package/esm/keri/src/core/index.js +0 -9
- package/types/deps/jsr.io/@std/internal/1.0.12/_os.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/basename.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/dirname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/extname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/posix/basename.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/posix/dirname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/posix/extname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/posix/resolve.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/windows/basename.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/windows/dirname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/windows/extname.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/path/1.1.4/windows/resolve.d.ts.map +0 -1
- package/types/keri/src/app/cli/agent.d.ts +0 -9
- package/types/keri/src/app/cli/agent.d.ts.map +0 -1
- package/types/keri/src/app/cli/cli-node.d.ts +0 -2
- package/types/keri/src/app/cli/cli-node.d.ts.map +0 -1
- package/types/keri/src/app/cli/cli.d.ts +0 -7
- package/types/keri/src/app/cli/cli.d.ts.map +0 -1
- package/types/keri/src/app/cli/command-definitions.d.ts +0 -8
- package/types/keri/src/app/cli/command-definitions.d.ts.map +0 -1
- package/types/keri/src/app/cli/command-types.d.ts +0 -21
- package/types/keri/src/app/cli/command-types.d.ts.map +0 -1
- package/types/keri/src/app/index.d.ts +0 -11
- package/types/keri/src/app/index.d.ts.map +0 -1
- package/types/keri/src/app/server.d.ts +0 -9
- package/types/keri/src/app/server.d.ts.map +0 -1
- package/types/keri/src/core/index.d.ts +0 -10
- package/types/keri/src/core/index.d.ts.map +0 -1
- /package/esm/keri/src/app/{cli/command-types.js → protocol-host-policy.js} +0 -0
- /package/types/deps/jsr.io/@std/internal/{1.0.12 → 1.0.14}/_os.d.ts +0 -0
- /package/types/deps/jsr.io/@std/internal/{1.0.12 → 1.0.14}/os.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/assert_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/basename.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/common.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/dirname.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/format.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/from_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/glob_to_reg_exp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/normalize.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/normalize_string.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/relative.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/strip_trailing_separators.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/_common/to_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/common.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/format.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/from_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/glob_to_regexp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/is_absolute.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/is_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/join.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/join_globs.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/mod.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/normalize.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/normalize_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/parse.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/_util.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/format.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/from_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/glob_to_regexp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/is_absolute.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/join.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/join_globs.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/normalize.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/normalize_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/parse.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/relative.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/resolve.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/to_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/posix/to_namespaced_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/relative.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/resolve.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/to_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/to_namespaced_path.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/types.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/_util.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/format.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/from_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/glob_to_regexp.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/is_absolute.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/join.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/join_globs.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/normalize.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/normalize_glob.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/parse.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/relative.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/resolve.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/to_file_url.d.ts +0 -0
- /package/types/deps/jsr.io/@std/path/{1.1.4 → 1.1.5}/windows/to_namespaced_path.d.ts +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Supported logger severity names in ascending verbosity order. */
|
|
1
2
|
export const LOG_LEVELS = ["debug", "info", "warn", "error"];
|
|
2
3
|
const LEVEL_PRIORITY = {
|
|
3
4
|
debug: 10,
|
|
@@ -9,12 +10,15 @@ let currentLogLevel = "warn";
|
|
|
9
10
|
function shouldLog(level) {
|
|
10
11
|
return LEVEL_PRIORITY[level] >= LEVEL_PRIORITY[currentLogLevel];
|
|
11
12
|
}
|
|
13
|
+
/** Set the process-local minimum log level for the built-in console logger. */
|
|
12
14
|
export function setLogLevel(level) {
|
|
13
15
|
currentLogLevel = level;
|
|
14
16
|
}
|
|
17
|
+
/** Read the current process-local minimum log level. */
|
|
15
18
|
export function getLogLevel() {
|
|
16
19
|
return currentLogLevel;
|
|
17
20
|
}
|
|
21
|
+
/** Default logger that forwards to `console.*` with level gating. */
|
|
18
22
|
export const consoleLogger = {
|
|
19
23
|
debug: (message, ...meta) => {
|
|
20
24
|
if (shouldLog("debug")) {
|
|
@@ -37,6 +41,7 @@ export const consoleLogger = {
|
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
};
|
|
44
|
+
/** Logger implementation that discards all messages. */
|
|
40
45
|
export const noopLogger = {
|
|
41
46
|
debug: () => { },
|
|
42
47
|
info: () => { },
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared mailbox topic and cursor types.
|
|
3
|
+
*
|
|
4
|
+
* These types keep the mailbox query and streaming contract explicit:
|
|
5
|
+
* configured topics are human-facing lists, while runtime work uses cursor maps
|
|
6
|
+
* keyed by topic name and storing the next wanted mailbox index.
|
|
7
|
+
*/
|
|
8
|
+
/** Raw delegated event mailbox topic used for delegation approval flows. */
|
|
9
|
+
export const DELEGATE_MAILBOX_TOPIC = "/delegate";
|
|
10
|
+
/** Peer OOBI request mailbox topic used by KERIpy `/oobis` EXNs. */
|
|
11
|
+
export const OOBI_MAILBOX_TOPIC = "/oobi";
|
|
12
|
+
/** Core receipt mailbox topic used for witness/controller correspondence. */
|
|
13
|
+
export const RECEIPT_MAILBOX_TOPIC = "/receipt";
|
|
14
|
+
/** Core replay mailbox topic used for witness-backed query/log replay. */
|
|
15
|
+
export const REPLAY_MAILBOX_TOPIC = "/replay";
|
|
16
|
+
/** Core reply mailbox topic used for query reply correspondence such as `/ksn`. */
|
|
17
|
+
export const REPLY_MAILBOX_TOPIC = "/reply";
|
|
18
|
+
export function normalizeMbxTopicCursor(value) {
|
|
19
|
+
if (Array.isArray(value)) {
|
|
20
|
+
return Object.fromEntries(value
|
|
21
|
+
.filter((topic) => typeof topic === "string")
|
|
22
|
+
.map((topic) => [topic, 0]));
|
|
23
|
+
}
|
|
24
|
+
if (typeof value !== "object" || value === null) {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
return Object.fromEntries(Object.entries(value)
|
|
28
|
+
.filter(([topic]) => typeof topic === "string")
|
|
29
|
+
.map(([topic, idx]) => [topic, typeof idx === "number" ? idx : Number(idx) || 0]));
|
|
30
|
+
}
|
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
import { DigDex, DIGEST_CODES, Ilks, Kinds, NonceDex, Noncer, parseMatter, PREFIX_CODES, SerderKERI, Tholder, Vrsn_1_0, Vrsn_2_0, } from "../../../cesr/mod.js";
|
|
2
|
+
import { makeNowIso8601 } from "../time/mod.js";
|
|
3
|
+
import { ValidationError } from "./errors.js";
|
|
4
|
+
import { KeyStateRecord, StateEERecord } from "./records.js";
|
|
5
|
+
import { deriveRotatedWitnessSet, hasUniqueWitnesses } from "./witnesses.js";
|
|
6
|
+
const MAX_INTIVE_THRESHOLD = 0xffff;
|
|
7
|
+
function resolveVersionOptions(options, fallback = Vrsn_1_0) {
|
|
8
|
+
const pvrsn = options?.pvrsn ?? options?.version ?? fallback;
|
|
9
|
+
return {
|
|
10
|
+
pvrsn,
|
|
11
|
+
gvrsn: options?.gvrsn ?? (pvrsn.major >= 2 ? Vrsn_2_0 : null),
|
|
12
|
+
kind: options?.kind ?? Kinds.json,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function defaultThreshold(count, min) {
|
|
16
|
+
return Math.max(min, Math.ceil(count / 2)).toString(16);
|
|
17
|
+
}
|
|
18
|
+
function ample(count, faults, weak = true) {
|
|
19
|
+
const n = Math.max(0, count);
|
|
20
|
+
if (faults === undefined) {
|
|
21
|
+
const f1 = Math.max(1, Math.floor(Math.max(0, n - 1) / 3));
|
|
22
|
+
const f2 = Math.max(1, Math.ceil(Math.max(0, n - 1) / 3));
|
|
23
|
+
if (weak) {
|
|
24
|
+
return Math.min(n, Math.ceil((n + f1 + 1) / 2), Math.ceil((n + f2 + 1) / 2));
|
|
25
|
+
}
|
|
26
|
+
return Math.min(n, Math.max(0, n - f1, Math.ceil((n + f1 + 1) / 2)));
|
|
27
|
+
}
|
|
28
|
+
const f = Math.max(0, faults);
|
|
29
|
+
const m1 = Math.ceil((n + f + 1) / 2);
|
|
30
|
+
const m2 = Math.max(0, n - f);
|
|
31
|
+
if (m2 < m1 && n > 0) {
|
|
32
|
+
throw new ValidationError(`Invalid faults ${faults} for witness count ${count}.`);
|
|
33
|
+
}
|
|
34
|
+
return weak ? Math.min(n, m1, m2) : Math.min(n, Math.max(m1, m2));
|
|
35
|
+
}
|
|
36
|
+
function cloneDataList(data) {
|
|
37
|
+
return [...(data ?? [])];
|
|
38
|
+
}
|
|
39
|
+
function cloneStringList(values) {
|
|
40
|
+
return [...(values ?? [])];
|
|
41
|
+
}
|
|
42
|
+
function coerceWholeNumber(value, label) {
|
|
43
|
+
if (typeof value === "number") {
|
|
44
|
+
if (!Number.isInteger(value) || value < 0) {
|
|
45
|
+
throw new ValidationError(`Invalid ${label} ${value}.`);
|
|
46
|
+
}
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
if (!/^[0-9a-f]+$/i.test(value)) {
|
|
50
|
+
throw new ValidationError(`Invalid ${label} ${value}.`);
|
|
51
|
+
}
|
|
52
|
+
return Number.parseInt(value, 16);
|
|
53
|
+
}
|
|
54
|
+
function validateThreshold(value, count, label, minimum) {
|
|
55
|
+
const tholder = new Tholder({
|
|
56
|
+
sith: value ?? defaultThreshold(count, minimum),
|
|
57
|
+
});
|
|
58
|
+
if (tholder.num !== null && tholder.num < BigInt(minimum)) {
|
|
59
|
+
throw new ValidationError(`Invalid ${label} threshold ${String(value ?? "")}.`);
|
|
60
|
+
}
|
|
61
|
+
if (tholder.size > count) {
|
|
62
|
+
throw new ValidationError(`Invalid ${label} threshold for ${count} keys.`);
|
|
63
|
+
}
|
|
64
|
+
return tholder;
|
|
65
|
+
}
|
|
66
|
+
function encodeThreshold(tholder, intive = false) {
|
|
67
|
+
if (intive
|
|
68
|
+
&& tholder.num !== null
|
|
69
|
+
&& tholder.num <= BigInt(MAX_INTIVE_THRESHOLD)) {
|
|
70
|
+
return Number(tholder.num);
|
|
71
|
+
}
|
|
72
|
+
return tholder.sith;
|
|
73
|
+
}
|
|
74
|
+
function encodeCount(value, intive = false) {
|
|
75
|
+
return intive && value <= MAX_INTIVE_THRESHOLD ? value : value.toString(16);
|
|
76
|
+
}
|
|
77
|
+
function resolveInceptiveSaidCodes(ked, explicitPrefixCode) {
|
|
78
|
+
const saids = {
|
|
79
|
+
d: DigDex.Blake3_256,
|
|
80
|
+
i: DigDex.Blake3_256,
|
|
81
|
+
};
|
|
82
|
+
if (explicitPrefixCode && PREFIX_CODES.has(explicitPrefixCode)) {
|
|
83
|
+
saids.i = explicitPrefixCode;
|
|
84
|
+
return saids;
|
|
85
|
+
}
|
|
86
|
+
if (typeof ked.i === "string" && ked.i.length > 0) {
|
|
87
|
+
try {
|
|
88
|
+
saids.i = parseMatter(new TextEncoder().encode(ked.i), "txt").code;
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
// Keep the default digest code when the provided prefix is not parseable.
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return saids;
|
|
95
|
+
}
|
|
96
|
+
export function state(pre, sn, pig, dig, fn, eilk, keys, eevt, { stamp, sith, ndigs, nsith, toad, wits, cnfg, dpre, version, pvrsn, intive = false, } = {}) {
|
|
97
|
+
const currentVersion = pvrsn ?? version ?? Vrsn_1_0;
|
|
98
|
+
const snNum = coerceWholeNumber(sn, "sn");
|
|
99
|
+
const fnNum = coerceWholeNumber(fn, "fn");
|
|
100
|
+
if (!(new Set([Ilks.icp, Ilks.rot, Ilks.ixn, Ilks.dip, Ilks.drt])).has(eilk)) {
|
|
101
|
+
throw new ValidationError(`Invalid event type et=${eilk} in key state.`);
|
|
102
|
+
}
|
|
103
|
+
const actualStamp = stamp ?? makeNowIso8601();
|
|
104
|
+
const currentTholder = validateThreshold(sith, keys.length, "current", 1);
|
|
105
|
+
const nextDigs = cloneStringList(ndigs);
|
|
106
|
+
const nextTholder = validateThreshold(nsith, nextDigs.length, "next", 0);
|
|
107
|
+
const witnessList = cloneStringList(wits);
|
|
108
|
+
if (!hasUniqueWitnesses(witnessList)) {
|
|
109
|
+
throw new ValidationError(`Invalid wits = ${witnessList}, has duplicates.`);
|
|
110
|
+
}
|
|
111
|
+
const resolvedToad = toad === undefined
|
|
112
|
+
? (witnessList.length === 0
|
|
113
|
+
? 0
|
|
114
|
+
: Math.max(1, Math.ceil(witnessList.length / 2)))
|
|
115
|
+
: coerceWholeNumber(toad, "toad");
|
|
116
|
+
if (witnessList.length === 0 && resolvedToad !== 0) {
|
|
117
|
+
throw new ValidationError(`Invalid toad = ${resolvedToad} for wits = ${witnessList}.`);
|
|
118
|
+
}
|
|
119
|
+
if (witnessList.length > 0
|
|
120
|
+
&& (resolvedToad < 1 || resolvedToad > witnessList.length)) {
|
|
121
|
+
throw new ValidationError(`Invalid toad = ${resolvedToad} for wits = ${witnessList}.`);
|
|
122
|
+
}
|
|
123
|
+
const latestEst = StateEERecord.fromDict(eevt);
|
|
124
|
+
if (!latestEst.s || !latestEst.d) {
|
|
125
|
+
throw new ValidationError(`Missing or invalid latest est event = ${String(eevt)} for key state.`);
|
|
126
|
+
}
|
|
127
|
+
const cuts = cloneStringList(latestEst.br);
|
|
128
|
+
const adds = cloneStringList(latestEst.ba);
|
|
129
|
+
if (!hasUniqueWitnesses(cuts)) {
|
|
130
|
+
throw new ValidationError(`Invalid cuts = ${cuts}, has duplicates.`);
|
|
131
|
+
}
|
|
132
|
+
if (!hasUniqueWitnesses(adds)) {
|
|
133
|
+
throw new ValidationError(`Invalid adds = ${adds}, has duplicates.`);
|
|
134
|
+
}
|
|
135
|
+
if (cuts.some((cut) => adds.includes(cut))) {
|
|
136
|
+
throw new ValidationError(`Intersecting cuts = ${cuts} and adds = ${adds}.`);
|
|
137
|
+
}
|
|
138
|
+
return new KeyStateRecord({
|
|
139
|
+
vn: [currentVersion.major, currentVersion.minor],
|
|
140
|
+
i: pre,
|
|
141
|
+
s: snNum.toString(16),
|
|
142
|
+
p: pig,
|
|
143
|
+
d: dig,
|
|
144
|
+
f: fnNum.toString(16),
|
|
145
|
+
dt: actualStamp,
|
|
146
|
+
et: eilk,
|
|
147
|
+
kt: encodeThreshold(currentTholder, intive),
|
|
148
|
+
k: [...keys],
|
|
149
|
+
nt: encodeThreshold(nextTholder, intive),
|
|
150
|
+
n: nextDigs,
|
|
151
|
+
bt: encodeCount(resolvedToad, intive).toString(),
|
|
152
|
+
b: witnessList,
|
|
153
|
+
c: cloneStringList(cnfg),
|
|
154
|
+
ee: new StateEERecord({
|
|
155
|
+
s: latestEst.s,
|
|
156
|
+
d: latestEst.d,
|
|
157
|
+
br: cuts,
|
|
158
|
+
ba: adds,
|
|
159
|
+
}),
|
|
160
|
+
di: dpre ?? "",
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
export function incept(keys, { isith, ndigs, nsith, toad, wits, cnfg, data, code, delpre, intive = false, ...versions } = {}) {
|
|
164
|
+
const resolved = resolveVersionOptions(versions);
|
|
165
|
+
const nextDigs = cloneStringList(ndigs);
|
|
166
|
+
const witnessList = cloneStringList(wits);
|
|
167
|
+
if (!hasUniqueWitnesses(witnessList)) {
|
|
168
|
+
throw new ValidationError(`Invalid wits = ${witnessList}, has duplicates.`);
|
|
169
|
+
}
|
|
170
|
+
const tholder = validateThreshold(isith, keys.length, "current", 1);
|
|
171
|
+
const ntholder = validateThreshold(nsith, nextDigs.length, "next", 0);
|
|
172
|
+
const resolvedToad = toad === undefined
|
|
173
|
+
? (witnessList.length === 0 ? 0 : ample(witnessList.length))
|
|
174
|
+
: coerceWholeNumber(toad, "toad");
|
|
175
|
+
if (witnessList.length === 0 && resolvedToad !== 0) {
|
|
176
|
+
throw new ValidationError(`Invalid toad = ${resolvedToad} for wits = ${witnessList}`);
|
|
177
|
+
}
|
|
178
|
+
if (witnessList.length > 0
|
|
179
|
+
&& (resolvedToad < 1 || resolvedToad > witnessList.length)) {
|
|
180
|
+
throw new ValidationError(`Invalid toad = ${resolvedToad} for wits = ${witnessList}`);
|
|
181
|
+
}
|
|
182
|
+
const sad = {
|
|
183
|
+
t: delpre ? Ilks.dip : Ilks.icp,
|
|
184
|
+
d: "",
|
|
185
|
+
i: "",
|
|
186
|
+
s: "0",
|
|
187
|
+
kt: encodeThreshold(tholder, intive),
|
|
188
|
+
k: [...keys],
|
|
189
|
+
nt: encodeThreshold(ntholder, intive),
|
|
190
|
+
n: nextDigs,
|
|
191
|
+
bt: encodeCount(resolvedToad, intive),
|
|
192
|
+
b: witnessList,
|
|
193
|
+
c: cloneStringList(cnfg),
|
|
194
|
+
a: cloneDataList(data),
|
|
195
|
+
};
|
|
196
|
+
if (delpre) {
|
|
197
|
+
sad.di = delpre;
|
|
198
|
+
}
|
|
199
|
+
else if ((!code || !DIGEST_CODES.has(code)) && keys.length === 1) {
|
|
200
|
+
sad.i = keys[0];
|
|
201
|
+
}
|
|
202
|
+
return new SerderKERI({
|
|
203
|
+
sad,
|
|
204
|
+
pvrsn: resolved.pvrsn,
|
|
205
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
206
|
+
kind: resolved.kind,
|
|
207
|
+
makify: true,
|
|
208
|
+
saids: resolveInceptiveSaidCodes(sad, code),
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
export function delcept(keys, delpre, options = {}) {
|
|
212
|
+
return incept(keys, { ...options, delpre });
|
|
213
|
+
}
|
|
214
|
+
export function rotate(pre, keys, dig, { ilk = Ilks.rot, sn = 1, isith, ndigs, nsith, toad, wits, cuts, adds, cnfg, data, intive = false, ...versions } = {}) {
|
|
215
|
+
const resolved = resolveVersionOptions(versions);
|
|
216
|
+
if (!(new Set([Ilks.rot, Ilks.drt])).has(ilk)) {
|
|
217
|
+
throw new ValidationError(`Invalid ilk=${ilk} for rot or drt.`);
|
|
218
|
+
}
|
|
219
|
+
const snNum = coerceWholeNumber(sn, "sn");
|
|
220
|
+
if (snNum < 1) {
|
|
221
|
+
throw new ValidationError(`Invalid sn = 0x${snNum.toString(16)} for rot or drt.`);
|
|
222
|
+
}
|
|
223
|
+
const currentTholder = validateThreshold(isith, keys.length, "current", 1);
|
|
224
|
+
const nextDigs = cloneStringList(ndigs);
|
|
225
|
+
const nextTholder = validateThreshold(nsith, nextDigs.length, "next", 0);
|
|
226
|
+
const currentWits = cloneStringList(wits);
|
|
227
|
+
if (!hasUniqueWitnesses(currentWits)) {
|
|
228
|
+
throw new ValidationError(`Invalid wits = ${currentWits}, has duplicates.`);
|
|
229
|
+
}
|
|
230
|
+
const cutsList = cloneStringList(cuts);
|
|
231
|
+
const addsList = cloneStringList(adds);
|
|
232
|
+
const derived = deriveRotatedWitnessSet(currentWits, cutsList, addsList);
|
|
233
|
+
if (derived.kind === "reject") {
|
|
234
|
+
throw new ValidationError(`Invalid witness cut/add combination: ${derived.reason}.`);
|
|
235
|
+
}
|
|
236
|
+
const nextWits = derived.value.wits;
|
|
237
|
+
const resolvedToad = toad === undefined
|
|
238
|
+
? (nextWits.length === 0 ? 0 : ample(nextWits.length))
|
|
239
|
+
: coerceWholeNumber(toad, "toad");
|
|
240
|
+
if (nextWits.length === 0 && resolvedToad !== 0) {
|
|
241
|
+
throw new ValidationError(`Invalid toad = ${resolvedToad} for wits = ${nextWits}`);
|
|
242
|
+
}
|
|
243
|
+
if (nextWits.length > 0 && (resolvedToad < 1 || resolvedToad > nextWits.length)) {
|
|
244
|
+
throw new ValidationError(`Invalid toad = ${resolvedToad} for wits = ${nextWits}`);
|
|
245
|
+
}
|
|
246
|
+
const sad = {
|
|
247
|
+
t: ilk,
|
|
248
|
+
d: "",
|
|
249
|
+
i: pre,
|
|
250
|
+
s: snNum.toString(16),
|
|
251
|
+
p: dig,
|
|
252
|
+
kt: encodeThreshold(currentTholder, intive),
|
|
253
|
+
k: [...keys],
|
|
254
|
+
nt: encodeThreshold(nextTholder, intive),
|
|
255
|
+
n: nextDigs,
|
|
256
|
+
bt: encodeCount(resolvedToad, intive),
|
|
257
|
+
br: cutsList,
|
|
258
|
+
ba: addsList,
|
|
259
|
+
};
|
|
260
|
+
if (resolved.pvrsn.major >= 2) {
|
|
261
|
+
sad.c = cloneStringList(cnfg);
|
|
262
|
+
sad.a = cloneDataList(data);
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
sad.a = cloneDataList(data);
|
|
266
|
+
}
|
|
267
|
+
return new SerderKERI({
|
|
268
|
+
sad,
|
|
269
|
+
pvrsn: resolved.pvrsn,
|
|
270
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
271
|
+
kind: resolved.kind,
|
|
272
|
+
makify: true,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
export function deltate(pre, keys, dig, options = {}) {
|
|
276
|
+
return rotate(pre, keys, dig, { ...options, ilk: Ilks.drt });
|
|
277
|
+
}
|
|
278
|
+
export function interact(pre, dig, sn = 1, data = [], versions = {}) {
|
|
279
|
+
const resolved = resolveVersionOptions(versions);
|
|
280
|
+
const snNum = coerceWholeNumber(sn, "sn");
|
|
281
|
+
if (snNum < 1) {
|
|
282
|
+
throw new ValidationError(`Invalid sn = 0x${snNum.toString(16)} for ixn.`);
|
|
283
|
+
}
|
|
284
|
+
return new SerderKERI({
|
|
285
|
+
sad: {
|
|
286
|
+
t: Ilks.ixn,
|
|
287
|
+
d: "",
|
|
288
|
+
i: pre,
|
|
289
|
+
s: snNum.toString(16),
|
|
290
|
+
p: dig,
|
|
291
|
+
a: cloneDataList(data),
|
|
292
|
+
},
|
|
293
|
+
pvrsn: resolved.pvrsn,
|
|
294
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
295
|
+
kind: resolved.kind,
|
|
296
|
+
makify: true,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
export function receipt(pre, sn, said, versions = {}) {
|
|
300
|
+
const resolved = resolveVersionOptions(versions);
|
|
301
|
+
const snNum = coerceWholeNumber(sn, "sn");
|
|
302
|
+
return new SerderKERI({
|
|
303
|
+
sad: {
|
|
304
|
+
t: Ilks.rct,
|
|
305
|
+
d: said,
|
|
306
|
+
i: pre,
|
|
307
|
+
s: snNum.toString(16),
|
|
308
|
+
},
|
|
309
|
+
pvrsn: resolved.pvrsn,
|
|
310
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
311
|
+
kind: resolved.kind,
|
|
312
|
+
makify: true,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
export function query(route = "", queryData = {}, stampOrOptions = {}) {
|
|
316
|
+
const options = typeof stampOrOptions === "string"
|
|
317
|
+
? { stamp: stampOrOptions }
|
|
318
|
+
: stampOrOptions;
|
|
319
|
+
const resolved = resolveVersionOptions(options);
|
|
320
|
+
const sad = {
|
|
321
|
+
t: Ilks.qry,
|
|
322
|
+
d: "",
|
|
323
|
+
dt: options.stamp ?? makeNowIso8601(),
|
|
324
|
+
r: route,
|
|
325
|
+
rr: options.replyRoute ?? "",
|
|
326
|
+
q: { ...queryData },
|
|
327
|
+
};
|
|
328
|
+
if (resolved.pvrsn.major >= 2) {
|
|
329
|
+
sad.i = options.pre ?? "";
|
|
330
|
+
}
|
|
331
|
+
return new SerderKERI({
|
|
332
|
+
sad,
|
|
333
|
+
pvrsn: resolved.pvrsn,
|
|
334
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
335
|
+
kind: resolved.kind,
|
|
336
|
+
makify: true,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
export function reply(route = "", data = {}, stampOrOptions = {}) {
|
|
340
|
+
const options = typeof stampOrOptions === "string"
|
|
341
|
+
? { stamp: stampOrOptions }
|
|
342
|
+
: stampOrOptions;
|
|
343
|
+
const resolved = resolveVersionOptions(options);
|
|
344
|
+
const sad = {
|
|
345
|
+
t: Ilks.rpy,
|
|
346
|
+
d: "",
|
|
347
|
+
dt: options.stamp ?? makeNowIso8601(),
|
|
348
|
+
r: route,
|
|
349
|
+
a: { ...data },
|
|
350
|
+
};
|
|
351
|
+
if (resolved.pvrsn.major >= 2) {
|
|
352
|
+
sad.i = options.pre ?? "";
|
|
353
|
+
}
|
|
354
|
+
return new SerderKERI({
|
|
355
|
+
sad,
|
|
356
|
+
pvrsn: resolved.pvrsn,
|
|
357
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
358
|
+
kind: resolved.kind,
|
|
359
|
+
makify: true,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
export function prod(route = "", queryData = {}, stampOrOptions = {}) {
|
|
363
|
+
const options = typeof stampOrOptions === "string"
|
|
364
|
+
? { stamp: stampOrOptions }
|
|
365
|
+
: stampOrOptions;
|
|
366
|
+
const resolved = resolveVersionOptions(options);
|
|
367
|
+
const sad = {
|
|
368
|
+
t: Ilks.pro,
|
|
369
|
+
d: "",
|
|
370
|
+
dt: options.stamp ?? makeNowIso8601(),
|
|
371
|
+
r: route,
|
|
372
|
+
rr: options.replyRoute ?? "",
|
|
373
|
+
q: { ...queryData },
|
|
374
|
+
};
|
|
375
|
+
if (resolved.pvrsn.major >= 2) {
|
|
376
|
+
sad.i = options.pre ?? "";
|
|
377
|
+
}
|
|
378
|
+
return new SerderKERI({
|
|
379
|
+
sad,
|
|
380
|
+
pvrsn: resolved.pvrsn,
|
|
381
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
382
|
+
kind: resolved.kind,
|
|
383
|
+
makify: true,
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
export function bare(route = "", data = {}, stampOrOptions = {}) {
|
|
387
|
+
const options = typeof stampOrOptions === "string"
|
|
388
|
+
? { stamp: stampOrOptions }
|
|
389
|
+
: stampOrOptions;
|
|
390
|
+
const resolved = resolveVersionOptions(options);
|
|
391
|
+
const sad = {
|
|
392
|
+
t: Ilks.bar,
|
|
393
|
+
d: "",
|
|
394
|
+
dt: options.stamp ?? makeNowIso8601(),
|
|
395
|
+
r: route,
|
|
396
|
+
a: { ...data },
|
|
397
|
+
};
|
|
398
|
+
if (resolved.pvrsn.major >= 2) {
|
|
399
|
+
sad.i = options.pre ?? "";
|
|
400
|
+
}
|
|
401
|
+
return new SerderKERI({
|
|
402
|
+
sad,
|
|
403
|
+
pvrsn: resolved.pvrsn,
|
|
404
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
405
|
+
kind: resolved.kind,
|
|
406
|
+
makify: true,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
export function exchept(route = "", { sender = "", receiver = "", modifiers, attributes, nonce, stamp, pvrsn = Vrsn_2_0, gvrsn, kind = Kinds.json, } = {}) {
|
|
410
|
+
return new SerderKERI({
|
|
411
|
+
sad: {
|
|
412
|
+
t: Ilks.xip,
|
|
413
|
+
d: "",
|
|
414
|
+
u: nonce ?? new Noncer({
|
|
415
|
+
code: NonceDex.Salt_128,
|
|
416
|
+
raw: crypto.getRandomValues(new Uint8Array(16)),
|
|
417
|
+
}).qb64,
|
|
418
|
+
i: sender,
|
|
419
|
+
ri: receiver,
|
|
420
|
+
dt: stamp ?? makeNowIso8601(),
|
|
421
|
+
r: route,
|
|
422
|
+
q: { ...(modifiers ?? {}) },
|
|
423
|
+
a: { ...(attributes ?? {}) },
|
|
424
|
+
},
|
|
425
|
+
pvrsn,
|
|
426
|
+
gvrsn: gvrsn ?? Vrsn_2_0,
|
|
427
|
+
kind,
|
|
428
|
+
makify: true,
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
export function exchange(route = "", { sender = "", receiver = "", xid = "", prior = "", modifiers, attributes, stamp, pvrsn = Vrsn_2_0, gvrsn, kind = Kinds.json, } = {}) {
|
|
432
|
+
return new SerderKERI({
|
|
433
|
+
sad: {
|
|
434
|
+
t: Ilks.exn,
|
|
435
|
+
d: "",
|
|
436
|
+
i: sender,
|
|
437
|
+
ri: receiver,
|
|
438
|
+
x: xid,
|
|
439
|
+
p: prior,
|
|
440
|
+
dt: stamp ?? makeNowIso8601(),
|
|
441
|
+
r: route,
|
|
442
|
+
q: { ...(modifiers ?? {}) },
|
|
443
|
+
a: { ...(attributes ?? {}) },
|
|
444
|
+
},
|
|
445
|
+
pvrsn,
|
|
446
|
+
gvrsn: gvrsn ?? Vrsn_2_0,
|
|
447
|
+
kind,
|
|
448
|
+
makify: true,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { concatBytes, Counter, CtrDexV1, Ilks, Kinds, makePather, NonceDex, Noncer, Saider, Serder, SerderKERI, Vrsn_1_0, Vrsn_2_0, } from "../../../cesr/mod.js";
|
|
2
|
+
import { makeNowIso8601 } from "../time/mod.js";
|
|
3
|
+
import { serializeMessage as serializeExchangeMessage } from "./protocol-serialization.js";
|
|
4
|
+
function resolveVersion(version, pvrsn, gvrsn, kind) {
|
|
5
|
+
const actualPvrsn = pvrsn ?? version ?? Vrsn_1_0;
|
|
6
|
+
return {
|
|
7
|
+
pvrsn: actualPvrsn,
|
|
8
|
+
gvrsn: gvrsn ?? (actualPvrsn.major >= 2 ? Vrsn_2_0 : null),
|
|
9
|
+
kind: kind ?? Kinds.json,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function encodePathedEmbeds(embeds) {
|
|
13
|
+
const e = {};
|
|
14
|
+
const groups = [];
|
|
15
|
+
for (const [label, msg] of Object.entries(embeds)) {
|
|
16
|
+
const serder = new Serder({ raw: msg });
|
|
17
|
+
e[label] = serder.ked;
|
|
18
|
+
const atc = msg.slice(serder.size);
|
|
19
|
+
if (atc.length === 0) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const pathed = concatBytes(makePather(["e", label]).qb64b, atc);
|
|
23
|
+
const code = pathed.length / 4 < 4096
|
|
24
|
+
? CtrDexV1.PathedMaterialCouples
|
|
25
|
+
: CtrDexV1.BigPathedMaterialCouples;
|
|
26
|
+
groups.push(concatBytes(new Counter({
|
|
27
|
+
code,
|
|
28
|
+
count: pathed.length / 4,
|
|
29
|
+
version: Vrsn_1_0,
|
|
30
|
+
}).qb64b, pathed));
|
|
31
|
+
}
|
|
32
|
+
if (Object.keys(e).length > 0) {
|
|
33
|
+
const saidified = Saider.saidify({ ...e, d: "" }, { label: "d" }).sad;
|
|
34
|
+
return {
|
|
35
|
+
e: saidified,
|
|
36
|
+
end: groups.length === 0 ? new Uint8Array() : concatBytes(...groups),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return { e, end: new Uint8Array() };
|
|
40
|
+
}
|
|
41
|
+
export function exincept(route = "", { sender = "", receiver = "", modifiers, attributes, nonce, stamp, pvrsn = Vrsn_2_0, gvrsn, kind = Kinds.json, } = {}) {
|
|
42
|
+
return new SerderKERI({
|
|
43
|
+
sad: {
|
|
44
|
+
t: Ilks.xip,
|
|
45
|
+
d: "",
|
|
46
|
+
u: nonce ?? new Noncer({
|
|
47
|
+
code: NonceDex.Salt_128,
|
|
48
|
+
raw: crypto.getRandomValues(new Uint8Array(16)),
|
|
49
|
+
}).qb64,
|
|
50
|
+
i: sender,
|
|
51
|
+
ri: receiver,
|
|
52
|
+
dt: stamp ?? makeNowIso8601(),
|
|
53
|
+
r: route,
|
|
54
|
+
q: { ...(modifiers ?? {}) },
|
|
55
|
+
a: { ...(attributes ?? {}) },
|
|
56
|
+
},
|
|
57
|
+
pvrsn,
|
|
58
|
+
gvrsn: gvrsn ?? Vrsn_2_0,
|
|
59
|
+
kind,
|
|
60
|
+
makify: true,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export function exchange(route, payload = {}, { sender, diger, recipient, date, stamp, dig = "", xid = "", modifiers, embeds, version, pvrsn, gvrsn, kind, }) {
|
|
64
|
+
const resolved = resolveVersion(version, pvrsn, gvrsn, kind);
|
|
65
|
+
const dt = date ?? stamp ?? makeNowIso8601();
|
|
66
|
+
const { e, end } = encodePathedEmbeds(embeds ?? {});
|
|
67
|
+
const actualModifiers = { ...(modifiers ?? {}) };
|
|
68
|
+
if (resolved.pvrsn.major === 1) {
|
|
69
|
+
const attrs = diger ? diger.qb64 : {
|
|
70
|
+
...(recipient === undefined ? {} : { i: recipient }),
|
|
71
|
+
...payload,
|
|
72
|
+
};
|
|
73
|
+
return [
|
|
74
|
+
new SerderKERI({
|
|
75
|
+
sad: {
|
|
76
|
+
t: Ilks.exn,
|
|
77
|
+
d: "",
|
|
78
|
+
i: sender,
|
|
79
|
+
rp: recipient ?? "",
|
|
80
|
+
p: dig ?? "",
|
|
81
|
+
dt,
|
|
82
|
+
r: route,
|
|
83
|
+
q: actualModifiers,
|
|
84
|
+
a: attrs,
|
|
85
|
+
e,
|
|
86
|
+
},
|
|
87
|
+
pvrsn: resolved.pvrsn,
|
|
88
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
89
|
+
kind: resolved.kind,
|
|
90
|
+
makify: true,
|
|
91
|
+
}),
|
|
92
|
+
end,
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
const attrs = {};
|
|
96
|
+
if (Object.keys(e).length > 0) {
|
|
97
|
+
attrs.e = e;
|
|
98
|
+
}
|
|
99
|
+
Object.assign(attrs, payload);
|
|
100
|
+
return [
|
|
101
|
+
new SerderKERI({
|
|
102
|
+
sad: {
|
|
103
|
+
t: Ilks.exn,
|
|
104
|
+
d: "",
|
|
105
|
+
i: sender,
|
|
106
|
+
ri: recipient ?? "",
|
|
107
|
+
x: xid ?? "",
|
|
108
|
+
p: dig ?? "",
|
|
109
|
+
dt,
|
|
110
|
+
r: route,
|
|
111
|
+
q: actualModifiers,
|
|
112
|
+
a: attrs,
|
|
113
|
+
},
|
|
114
|
+
pvrsn: resolved.pvrsn,
|
|
115
|
+
gvrsn: resolved.gvrsn ?? undefined,
|
|
116
|
+
kind: resolved.kind,
|
|
117
|
+
makify: true,
|
|
118
|
+
}),
|
|
119
|
+
end,
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
export function serializeMessage(serder, { tsgs, cigars, pathed, pipelined = false, } = {}) {
|
|
123
|
+
return serializeExchangeMessage(serder, { tsgs, cigars, pathed, pipelined });
|
|
124
|
+
}
|