lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commit 1eb5a4e7acd0ddf2fb810535e72c73460337214c
parent c8b9700fe93f80fbff0b7f0c05ec5f785ee0011e
Author: triesap <tyson@radroots.org>
Date:   Wed, 29 Jul 2026 04:47:06 +0000

event: normalize event modules and root exports

- expose only the eight canonical event root types
- nest legacy domains beneath the approved singular module vocabulary
- migrate capsule consumers and generated evidence to normalized paths
- add exact public-surface rustdoc and API baseline verification

Diffstat:
Mcontracts/operations.toml | 98++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mcrates/authority/src/authorization.rs | 2+-
Mcrates/authority/src/local_signer.rs | 4++--
Mcrates/authority/src/signer.rs | 2+-
Mcrates/event/README.md | 26+++++++++++++++++---------
Mcrates/event/src/account.rs | 2+-
Mcrates/event/src/app_data.rs | 2+-
Mcrates/event/src/calendar.rs | 11++++++-----
Mcrates/event/src/classified_listing.rs | 2+-
Mcrates/event/src/comment.rs | 12++++++------
Mcrates/event/src/contract.rs | 3+++
Mcrates/event/src/contract/registry_v7.rs | 16++++++++--------
Mcrates/event/src/contract/registry_v7/tests.rs | 4++--
Mcrates/event/src/coop.rs | 2+-
Mcrates/event/src/deletion.rs | 6+++---
Mcrates/event/src/draft.rs | 12++++++------
Mcrates/event/src/dto.rs | 4+++-
Mcrates/event/src/envelope.rs | 7++++++-
Mcrates/event/src/event_head.rs | 1+
Mcrates/event/src/event_head/v1.rs | 5+++--
Mcrates/event/src/event_head/v1/tests.rs | 6+++---
Mcrates/event/src/farm.rs | 20++++++++++++++++++++
Mcrates/event/src/farm_crdt.rs | 4++--
Mcrates/event/src/farm_file.rs | 6+++---
Mcrates/event/src/farm_workspace.rs | 4++--
Mcrates/event/src/food.rs | 9+++------
Mcrates/event/src/food_availability.rs | 2+-
Mcrates/event/src/generated/dto_roots.rs | 179++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Mcrates/event/src/group.rs | 2+-
Mcrates/event/src/http_auth.rs | 2+-
Mcrates/event/src/id.rs | 1502++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Dcrates/event/src/ids.rs | 1499-------------------------------------------------------------------------------
Mcrates/event/src/job_feedback.rs | 4++--
Mcrates/event/src/job_request.rs | 2+-
Mcrates/event/src/job_result.rs | 5++++-
Mcrates/event/src/knowledge.rs | 12++++++------
Mcrates/event/src/lib.rs | 103+++++++++++--------------------------------------------------------------------
Mcrates/event/src/list.rs | 2+-
Mcrates/event/src/list_set.rs | 2+-
Mcrates/event/src/listing.rs | 11+++++------
Mcrates/event/src/media.rs | 3+++
Mcrates/event/src/message.rs | 2+-
Mcrates/event/src/message_file.rs | 4++--
Mcrates/event/src/operational_listing.rs | 8++++----
Mcrates/event/src/order.rs | 12++++++------
Mcrates/event/src/order_economics.rs | 2+-
Mcrates/event/src/plot.rs | 2+-
Mcrates/event/src/post.rs | 20+++++++++++++++++++-
Mcrates/event/src/profile.rs | 4++++
Mcrates/event/src/relay_auth.rs | 2+-
Mcrates/event/src/relay_hint.rs | 6+++---
Mcrates/event/src/reply.rs | 6+++---
Mcrates/event/src/resource_area.rs | 2+-
Mcrates/event/src/resource_cap.rs | 2+-
Mcrates/event/src/social.rs | 36++++++++++++++++++++++++++++++++++++
Mcrates/event/src/tag.rs | 44++++++++++++++++++++++++++++++++++++++------
Mcrates/event/src/trade.rs | 21++++++++++++++-------
Mcrates/event/src/trade_validation.rs | 2+-
Mcrates/event/src/verification.rs | 2+-
Mcrates/event/src/wire/v1.rs | 2+-
Mcrates/event/tests/package_boundary.rs | 44++++++++++++++++++++++++++++++++++++++------
Mcrates/event_codec/src/admission.rs | 7++++---
Mcrates/event_codec/src/admission/registry_v7.rs | 4++--
Mcrates/event_codec/src/admission/registry_v7/tests.rs | 2+-
Mcrates/event_codec/src/app_data/decode.rs | 4++--
Mcrates/event_codec/src/app_data/encode.rs | 4++--
Mcrates/event_codec/src/article/decode.rs | 6+++---
Mcrates/event_codec/src/article/encode.rs | 6+++---
Mcrates/event_codec/src/calendar/decode.rs | 4++--
Mcrates/event_codec/src/calendar/encode.rs | 4++--
Mcrates/event_codec/src/comment/admission.rs | 2+-
Mcrates/event_codec/src/comment/authored.rs | 12+++++++-----
Mcrates/event_codec/src/comment/inbound/registry_v7.rs | 14+++++++-------
Mcrates/event_codec/src/coop/decode.rs | 2+-
Mcrates/event_codec/src/coop/encode.rs | 6+++---
Mcrates/event_codec/src/coop/list_sets.rs | 6+++---
Mcrates/event_codec/src/coop/mod.rs | 10++++++----
Mcrates/event_codec/src/deletion/authored.rs | 6+++---
Mcrates/event_codec/src/deletion/reconciliation_v1.rs | 16++++++++--------
Mcrates/event_codec/src/deletion/reconciliation_v1/admission/tests.rs | 2+-
Mcrates/event_codec/src/deletion/reconciliation_v1/evaluator/tests.rs | 3++-
Mcrates/event_codec/src/document/decode.rs | 6++++--
Mcrates/event_codec/src/document/encode.rs | 6+++---
Mcrates/event_codec/src/document/mod.rs | 2+-
Mcrates/event_codec/src/error.rs | 6+++---
Mcrates/event_codec/src/event_ref.rs | 4++--
Mcrates/event_codec/src/farm/decode.rs | 6+++---
Mcrates/event_codec/src/farm/encode.rs | 6+++---
Mcrates/event_codec/src/farm/list_sets.rs | 10+++++-----
Mcrates/event_codec/src/farm/mod.rs | 10+++++-----
Mcrates/event_codec/src/farm_crdt/decode.rs | 6+++---
Mcrates/event_codec/src/farm_crdt/encode.rs | 10++++++----
Mcrates/event_codec/src/farm_crdt/mod.rs | 6+++---
Mcrates/event_codec/src/farm_file/decode.rs | 10+++++-----
Mcrates/event_codec/src/farm_file/encode.rs | 8++++----
Mcrates/event_codec/src/farm_file/mod.rs | 8++++----
Mcrates/event_codec/src/farm_workspace/decode.rs | 6+++---
Mcrates/event_codec/src/farm_workspace/encode.rs | 6+++---
Mcrates/event_codec/src/farm_workspace/mod.rs | 6+++---
Mcrates/event_codec/src/file_metadata/decode.rs | 6+++---
Mcrates/event_codec/src/file_metadata/encode.rs | 6+++---
Mcrates/event_codec/src/follow/decode.rs | 4++--
Mcrates/event_codec/src/follow/encode.rs | 4++--
Mcrates/event_codec/src/food_availability/admission.rs | 5+++--
Mcrates/event_codec/src/food_availability/authored.rs | 13+++++++------
Mcrates/event_codec/src/food_availability/inbound/registry_v7.rs | 8++++----
Mcrates/event_codec/src/food_availability/inbound/registry_v7/tests.rs | 2+-
Mcrates/event_codec/src/geochat/decode.rs | 2+-
Mcrates/event_codec/src/geochat/encode.rs | 4++--
Mcrates/event_codec/src/gift_wrap/decode.rs | 4++--
Mcrates/event_codec/src/gift_wrap/encode.rs | 4++--
Mcrates/event_codec/src/group/decode.rs | 4++--
Mcrates/event_codec/src/group/encode.rs | 4++--
Mcrates/event_codec/src/group/mod.rs | 2+-
Mcrates/event_codec/src/http_auth/decode.rs | 4++--
Mcrates/event_codec/src/http_auth/encode.rs | 4++--
Mcrates/event_codec/src/http_auth/mod.rs | 2+-
Mcrates/event_codec/src/job/feedback/decode.rs | 4++--
Mcrates/event_codec/src/job/feedback/encode.rs | 4+++-
Mcrates/event_codec/src/job/request/decode.rs | 4++--
Mcrates/event_codec/src/job/request/encode.rs | 2+-
Mcrates/event_codec/src/job/result/decode.rs | 5+++--
Mcrates/event_codec/src/job/result/encode.rs | 2+-
Mcrates/event_codec/src/job/traits.rs | 6+++---
Mcrates/event_codec/src/job/util.rs | 4++--
Mcrates/event_codec/src/knowledge/decode.rs | 8+++++---
Mcrates/event_codec/src/knowledge/encode.rs | 8+++++---
Mcrates/event_codec/src/knowledge/verification.rs | 2+-
Mcrates/event_codec/src/list/decode.rs | 6+++---
Mcrates/event_codec/src/list/encode.rs | 6+++---
Mcrates/event_codec/src/list/mod.rs | 8+++++---
Mcrates/event_codec/src/list_set/decode.rs | 2+-
Mcrates/event_codec/src/list_set/encode.rs | 4++--
Mcrates/event_codec/src/list_set/mod.rs | 8++++----
Mcrates/event_codec/src/manifest.rs | 10+++++-----
Mcrates/event_codec/src/manifest/registry_v7.rs | 2+-
Mcrates/event_codec/src/message/decode.rs | 2+-
Mcrates/event_codec/src/message/encode.rs | 4++--
Mcrates/event_codec/src/message/tags.rs | 4++--
Mcrates/event_codec/src/message_file/decode.rs | 4++--
Mcrates/event_codec/src/message_file/encode.rs | 4++--
Mcrates/event_codec/src/operational_listing/decode.rs | 18+++++++++---------
Mcrates/event_codec/src/operational_listing/encode.rs | 8++++----
Mcrates/event_codec/src/operational_listing/tags.rs | 16++++++++--------
Mcrates/event_codec/src/order/decode.rs | 23+++++++++++++----------
Mcrates/event_codec/src/order/encode.rs | 14++++++++------
Mcrates/event_codec/src/order/tags.rs | 12++++++------
Mcrates/event_codec/src/parsed.rs | 4++--
Mcrates/event_codec/src/plot/decode.rs | 6+++---
Mcrates/event_codec/src/plot/encode.rs | 6+++---
Mcrates/event_codec/src/plot/mod.rs | 4++--
Mcrates/event_codec/src/post/admission.rs | 2+-
Mcrates/event_codec/src/post/authored.rs | 2+-
Mcrates/event_codec/src/post/decode.rs | 4++--
Mcrates/event_codec/src/post/inbound/registry_v7.rs | 2+-
Mcrates/event_codec/src/profile/admission.rs | 4++--
Mcrates/event_codec/src/profile/authored.rs | 2+-
Mcrates/event_codec/src/profile/decode.rs | 2+-
Mcrates/event_codec/src/reaction/decode.rs | 4++--
Mcrates/event_codec/src/reaction/encode.rs | 2+-
Mcrates/event_codec/src/relay_auth/decode.rs | 4++--
Mcrates/event_codec/src/relay_auth/encode.rs | 4++--
Mcrates/event_codec/src/relay_auth/mod.rs | 2+-
Mcrates/event_codec/src/relay_document/decode.rs | 2+-
Mcrates/event_codec/src/relay_document/encode.rs | 2+-
Mcrates/event_codec/src/reply/admission.rs | 2+-
Mcrates/event_codec/src/reply/authored.rs | 4++--
Mcrates/event_codec/src/reply/inbound/registry_v7.rs | 6+++---
Mcrates/event_codec/src/report/decode.rs | 6+++---
Mcrates/event_codec/src/report/encode.rs | 6+++---
Mcrates/event_codec/src/repost/decode.rs | 6+++---
Mcrates/event_codec/src/repost/encode.rs | 6+++---
Mcrates/event_codec/src/resource_area/decode.rs | 4+++-
Mcrates/event_codec/src/resource_area/encode.rs | 6+++---
Mcrates/event_codec/src/resource_area/list_sets.rs | 8++++----
Mcrates/event_codec/src/resource_area/mod.rs | 8+++++---
Mcrates/event_codec/src/resource_cap/decode.rs | 3++-
Mcrates/event_codec/src/resource_cap/encode.rs | 9+++++----
Mcrates/event_codec/src/resource_cap/mod.rs | 4++--
Mcrates/event_codec/src/seal/decode.rs | 2+-
Mcrates/event_codec/src/seal/encode.rs | 4++--
Mcrates/event_codec/src/tag_builders.rs | 18++++++++++--------
Mcrates/event_codec/src/trade/mod.rs | 20++++++++++++--------
Mcrates/event_codec/src/verification/v1/tests.rs | 2+-
Mcrates/event_codec/tests/app_data.rs | 4++--
Mcrates/event_codec/tests/article.rs | 6+++---
Mcrates/event_codec/tests/calendar.rs | 7++++---
Mcrates/event_codec/tests/calendar_conformance.rs | 10+++++-----
Mcrates/event_codec/tests/common/mod.rs | 3++-
Mcrates/event_codec/tests/coverage_edges.rs | 2+-
Mcrates/event_codec/tests/domain_encode_non_serde.rs | 18++++++++++--------
Mcrates/event_codec/tests/event_ref.rs | 2+-
Mcrates/event_codec/tests/farm_crdt.rs | 4++--
Mcrates/event_codec/tests/farm_workspace.rs | 8++++----
Mcrates/event_codec/tests/field_events.rs | 14+++++++-------
Mcrates/event_codec/tests/file_metadata.rs | 12++++++------
Mcrates/event_codec/tests/follow.rs | 4++--
Mcrates/event_codec/tests/food_availability_conformance.rs | 6+++---
Mcrates/event_codec/tests/geochat.rs | 4++--
Mcrates/event_codec/tests/gift_wrap.rs | 4++--
Mcrates/event_codec/tests/group.rs | 2+-
Mcrates/event_codec/tests/job_feedback.rs | 8+++++---
Mcrates/event_codec/tests/job_request.rs | 8+++++---
Mcrates/event_codec/tests/job_result.rs | 8++++----
Mcrates/event_codec/tests/job_traits.rs | 18++++++++++--------
Mcrates/event_codec/tests/job_util.rs | 2+-
Mcrates/event_codec/tests/knowledge.rs | 8++++----
Mcrates/event_codec/tests/knowledge_fixtures.rs | 4++--
Mcrates/event_codec/tests/knowledge_manifest.rs | 6+++---
Mcrates/event_codec/tests/list.rs | 6+++---
Mcrates/event_codec/tests/list_private.rs | 2+-
Mcrates/event_codec/tests/list_set.rs | 6+++---
Mcrates/event_codec/tests/message.rs | 6+++---
Mcrates/event_codec/tests/message_file.rs | 8++++----
Mcrates/event_codec/tests/nip09_suppression_conformance.rs | 2+-
Mcrates/event_codec/tests/operational_listing.rs | 19+++++++++++--------
Mcrates/event_codec/tests/operational_listing_conformance.rs | 4++--
Mcrates/event_codec/tests/post.rs | 2+-
Mcrates/event_codec/tests/profile.rs | 2+-
Mcrates/event_codec/tests/reaction.rs | 6+++---
Mcrates/event_codec/tests/report.rs | 6+++---
Mcrates/event_codec/tests/repost.rs | 6+++---
Mcrates/event_codec/tests/seal.rs | 4++--
Mcrates/event_codec/tests/social_events.rs | 12++++++------
Mcrates/event_codec/tests/structured_decode.rs | 22+++++++++++++---------
Mcrates/event_codec/tests/structured_encode_default.rs | 28++++++++++++++++------------
Mcrates/event_codec/tests/tag_builders.rs | 58+++++++++++++++++++++++++++++++---------------------------
Mcrates/event_codec/tests/verified_admission_conformance.rs | 2+-
Mcrates/event_codec/tests/verified_comment_conformance.rs | 6++++--
Mcrates/event_codec/tests/verified_deletion_conformance.rs | 6++++--
Mcrates/event_codec/tests/verified_post_conformance.rs | 8++++++--
Mcrates/event_codec/tests/verified_profile_conformance.rs | 9++++++---
Mcrates/event_codec/tests/wire.rs | 2+-
Mcrates/event_store/contracts/source_maintenance_v1.manifest.json | 221++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Mcrates/event_store/contracts/source_maintenance_v1.manifest.sha256 | 2+-
Mcrates/event_store/src/error.rs | 2+-
Mcrates/event_store/src/generated/source_maintenance_manifest.rs | 6+++---
Mcrates/event_store/src/model.rs | 10+++++-----
Mcrates/event_store/src/model/addressable_transition_feed_v1.rs | 4++--
Mcrates/event_store/src/model/current_visibility_v1.rs | 2+-
Mcrates/event_store/src/model/food_availability_projection_v1.rs | 4++--
Mcrates/event_store/src/model/reconciliation_v1.rs | 2+-
Mcrates/event_store/src/nip09/reconciliation_v1.rs | 10+++++-----
Mcrates/event_store/src/store.rs | 18++++++++----------
Mcrates/event_store/src/store/addressable_transition_feed_v1.rs | 2+-
Mcrates/event_store/src/store/current_visibility_v1.rs | 2+-
Mcrates/event_store/src/store/food_availability_projection_v1.rs | 4++--
Mcrates/event_store/src/store/post_core_extensions_v1.rs | 2+-
Mcrates/event_store/src/store/post_core_storage_v1.rs | 2+-
Mcrates/event_store/src/store/protocol_reconciliation_v1.rs | 6+++---
Mcrates/event_store/src/store/protocol_storage_v1.rs | 2+-
Mcrates/event_store/tests/food_availability_projection_v1_result_vector.rs | 2+-
Mcrates/event_store/tests/support/nip09_reconciliation_v1_result_vector_v2.rs | 2+-
Mcrates/net/src/nostr_client/events/post.rs | 2+-
Mcrates/nostr/src/client.rs | 12+++++++-----
Mcrates/nostr/src/codec_adapters.rs | 4++--
Mcrates/nostr/src/draft_signing.rs | 2+-
Mcrates/nostr/src/event_convert.rs | 3++-
Mcrates/nostr/src/event_verify.rs | 5+++--
Mcrates/nostr/src/events/application_handler.rs | 2+-
Mcrates/nostr/src/events/comment.rs | 8+++++---
Mcrates/nostr/src/events/deletion.rs | 2+-
Mcrates/nostr/src/events/food_availability.rs | 2+-
Mcrates/nostr/src/events/reply.rs | 2+-
Mcrates/nostr/src/job_adapter.rs | 2+-
Mcrates/nostr/src/nip11.rs | 2+-
Mcrates/nostr/src/nip17.rs | 14++++++++------
Mcrates/nostr/src/types.rs | 18++++++++++--------
Mcrates/nostr/tests/coverage.rs | 2+-
Mcrates/nostr/tests/food_availability_profile.rs | 8++++----
Mcrates/nostr/tests/nip09_deletion_request_profile.rs | 4++--
Mcrates/nostr/tests/nip10_reply_profile.rs | 2+-
Mcrates/nostr/tests/nip22_comment_profile.rs | 8++++----
Mcrates/nostr/tests/post_profile.rs | 2+-
Mcrates/outbox/src/model.rs | 2+-
Mcrates/outbox/src/store.rs | 14+++++++-------
Mcrates/replica_sync/src/emit.rs | 20+++++++++++---------
Mcrates/replica_sync/src/geo.rs | 2+-
Mcrates/replica_sync/src/ingest.rs | 54+++++++++++++++++++++++++++++-------------------------
Mcrates/replica_sync/src/tests.rs | 4++--
Mcrates/replica_sync/tests/ingest_roundtrip.rs | 20+++++++++++---------
Mcrates/test_fixtures/src/knowledge.rs | 4++--
Mcrates/trade/src/identity.rs | 4++--
Mcrates/trade/src/operational_listing/draft.rs | 16++++++++--------
Mcrates/trade/src/operational_listing/mod.rs | 25+++++++++++++------------
Mcrates/trade/src/operational_listing/mutation.rs | 12++++++------
Mcrates/trade/src/operational_listing/price_ext.rs | 6+++---
Mcrates/trade/src/operational_listing/validation.rs | 47++++++++++++++++++++++++-----------------------
Mcrates/trade/src/validation_receipt.rs | 19++++++++++---------
Mcrates/trade/src/workflow.rs | 4++--
Mcrates/trade/tests/operational_listing_conformance.rs | 2+-
Mcrates/trade_sp1_host/src/lib.rs | 3++-
Mcrates/transport_nostr/src/publish.rs | 2+-
Mcrates/transport_nostr/tests/transport.rs | 2+-
Mdocs/api/README.md | 1+
Adocs/api/radroots_event.txt | 4212+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtools/xtask/src/contract.rs | 30+++++++++++++++---------------
Mtools/xtask/src/contract/comment_authority.rs | 20++++++++++----------
Mtools/xtask/src/contract/deletion_authority.rs | 12++++++------
Mtools/xtask/src/contract/food_availability_projection.rs | 3++-
Mtools/xtask/src/contract/nip09_reconciliation.rs | 140++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
Mtools/xtask/src/contract/source_maintenance.rs | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
Mtools/xtask/src/dto_roots.rs | 94++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
303 files changed, 7424 insertions(+), 2765 deletions(-)

diff --git a/contracts/operations.toml b/contracts/operations.toml @@ -464,7 +464,7 @@ rust_modules = [ "crates/event_codec/src/verification.rs", ] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::verification::RadrootsIdVerifiedEvent", "radroots_event_codec::verification::RadrootsNip01VerificationError", "radroots_event_codec::verification::RadrootsSignatureVerifiedEvent", @@ -514,9 +514,9 @@ transport = "none" [operations.event_select_head.implementation] rust_modules = ["crates/event/src/event_head.rs"] rust_types = [ - "radroots_event::event_head::RadrootsCurrentEventHead", - "radroots_event::event_head::RadrootsEventHeadCandidate", - "radroots_event::event_head::RadrootsEventHeadDecision", + "radroots_event::envelope::event_head::RadrootsCurrentEventHead", + "radroots_event::envelope::event_head::RadrootsEventHeadCandidate", + "radroots_event::envelope::event_head::RadrootsEventHeadDecision", ] [operations.event_select_head.conformance] @@ -540,10 +540,10 @@ rust_modules = [ ] rust_types = [ "radroots_blossom::ByteVerifiedDescriptor", - "radroots_event::food_availability::RadrootsFoodAvailabilityDetails", - "radroots_event::food_availability::RadrootsFoodAvailabilityDetailsParts", - "radroots_event::food_availability::RadrootsFoodAvailabilityError", - "radroots_event::food_availability::RadrootsFoodAvailabilityImage", + "radroots_event::food::availability::RadrootsFoodAvailabilityDetails", + "radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts", + "radroots_event::food::availability::RadrootsFoodAvailabilityError", + "radroots_event::food::availability::RadrootsFoodAvailabilityImage", "radroots_event::media::RadrootsAuthoredImage", "radroots_event::wire::RadrootsNip01EventWireParts", "radroots_event_codec::food_availability::authored::RadrootsFoodAvailabilityEncodeError", @@ -574,8 +574,8 @@ rust_modules = [ "crates/event_codec/src/food_availability/inbound.rs", ] rust_types = [ - "radroots_event::classified_listing::RadrootsClassifiedListingPartition", - "radroots_event::food_availability::RadrootsFoodAvailabilityError", + "radroots_event::listing::classified::RadrootsClassifiedListingPartition", + "radroots_event::food::availability::RadrootsFoodAvailabilityError", "radroots_event_codec::food_availability::inbound::RadrootsFoodAvailabilityImageDiagnostic", "radroots_event_codec::food_availability::inbound::RadrootsFoodAvailabilityProjectionError", "radroots_event_codec::food_availability::inbound::RadrootsFoodAvailabilityProjectionOutcome", @@ -609,7 +609,7 @@ rust_modules = [ "crates/event_codec/src/verification.rs", ] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::food_availability::admission::RadrootsAdmittedFoodAvailabilityEvent", "radroots_event_codec::food_availability::admission::RadrootsExcludedClassifiedListingCandidate", "radroots_event_codec::food_availability::admission::RadrootsFoodAvailabilityAdmissionError", @@ -729,7 +729,7 @@ rust_modules = [ "crates/event_codec/src/verification.rs", ] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::profile::admission::RadrootsAdmittedProfileEvent", "radroots_event_codec::profile::admission::RadrootsProfileAdmissionError", "radroots_event_codec::profile::inbound::RadrootsInboundProfileMetadata", @@ -773,7 +773,7 @@ rust_modules = [ "crates/event_codec/src/operational_listing/encode.rs", "crates/event_codec/src/operational_listing/tags.rs", ] -rust_types = ["radroots_event::operational_listing::RadrootsOperationalListing"] +rust_types = ["radroots_event::listing::operational::RadrootsOperationalListing"] [operations.operational_listing_build_tags.conformance] vector = "contracts/conformance/vectors/operational_listing/build_tags.v1.json" @@ -794,7 +794,7 @@ rust_modules = [ "crates/event_codec/src/operational_listing/encode.rs", "crates/event_codec/src/wire.rs", ] -rust_types = ["radroots_event::operational_listing::RadrootsOperationalListing"] +rust_types = ["radroots_event::listing::operational::RadrootsOperationalListing"] [operations.operational_listing_build_draft.conformance] vector = "contracts/conformance/vectors/operational_listing/build_draft.v1.json" @@ -813,9 +813,9 @@ transport = "native" [operations.operational_listing_parse_event.implementation] rust_modules = ["crates/event_codec/src/operational_listing/decode.rs"] rust_types = [ - "radroots_event::RadrootsEventEnvelope", - "radroots_event::operational_listing::RadrootsOperationalListingParseError", - "radroots_event::operational_listing::RadrootsOperationalListing", + "radroots_event::envelope::RadrootsEventEnvelope", + "radroots_event::listing::operational::RadrootsOperationalListingParseError", + "radroots_event::listing::operational::RadrootsOperationalListing", ] [operations.operational_listing_parse_event.conformance] @@ -929,10 +929,10 @@ rust_modules = [ "crates/event_codec/src/reply/authored.rs", ] rust_types = [ - "radroots_event::reply::RadrootsAuthoredNip10Reply", - "radroots_event::reply::RadrootsNip10ReplyError", - "radroots_event::relay_hint::RadrootsNostrRelayHint", - "radroots_event::reply::RadrootsNip10ReplyReference", + "radroots_event::post::reply::RadrootsAuthoredNip10Reply", + "radroots_event::post::reply::RadrootsNip10ReplyError", + "radroots_event::tag::relay_hint::RadrootsNostrRelayHint", + "radroots_event::post::reply::RadrootsNip10ReplyReference", ] [operations.social_reply_build_authored_draft.conformance] @@ -959,7 +959,7 @@ rust_modules = [ "crates/event_codec/src/reply/inbound.rs", ] rust_types = [ - "radroots_event::relay_hint::RadrootsNostrRelayHint", + "radroots_event::tag::relay_hint::RadrootsNostrRelayHint", "radroots_event_codec::reply::inbound::RadrootsInboundNip10EventReference", "radroots_event_codec::reply::inbound::RadrootsInboundNip10Participant", "radroots_event_codec::reply::inbound::RadrootsInboundNip10ReplyProjection", @@ -994,7 +994,7 @@ rust_modules = [ "crates/event_codec/src/verification.rs", ] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::reply::admission::RadrootsAdmittedNip10ReplyEvent", "radroots_event_codec::reply::admission::RadrootsNip10ReplyAdmissionError", "radroots_event_codec::reply::inbound::RadrootsInboundNip10ReplyProjection", @@ -1055,7 +1055,7 @@ rust_modules = [ "crates/event_codec/src/verification.rs", ] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::post::admission::RadrootsAdmittedRootPostEvent", "radroots_event_codec::post::admission::RadrootsPostAdmissionError", "radroots_event_codec::post::admission::RadrootsPostAdmissionOutcome", @@ -1089,15 +1089,15 @@ rust_modules = [ "crates/event_codec/src/comment/authored.rs", ] rust_types = [ - "radroots_event::comment::RadrootsAuthoredNip22Comment", - "radroots_event::comment::RadrootsNip22AddressRootReference", - "radroots_event::comment::RadrootsNip22CommentError", - "radroots_event::comment::RadrootsNip22CommentParentReference", - "radroots_event::comment::RadrootsNip22CommentPosition", - "radroots_event::comment::RadrootsNip22CommentRoot", - "radroots_event::comment::RadrootsNip22CommentRootKind", - "radroots_event::comment::RadrootsNip22EventRootReference", - "radroots_event::relay_hint::RadrootsNostrRelayHint", + "radroots_event::post::comment::RadrootsAuthoredNip22Comment", + "radroots_event::post::comment::RadrootsNip22AddressRootReference", + "radroots_event::post::comment::RadrootsNip22CommentError", + "radroots_event::post::comment::RadrootsNip22CommentParentReference", + "radroots_event::post::comment::RadrootsNip22CommentPosition", + "radroots_event::post::comment::RadrootsNip22CommentRoot", + "radroots_event::post::comment::RadrootsNip22CommentRootKind", + "radroots_event::post::comment::RadrootsNip22EventRootReference", + "radroots_event::tag::relay_hint::RadrootsNostrRelayHint", "radroots_event::wire::RadrootsNip01EventWireParts", ] @@ -1165,7 +1165,7 @@ rust_modules = [ "crates/event_codec/src/verification.rs", ] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::comment::admission::RadrootsAdmittedNip22CommentEvent", "radroots_event_codec::comment::admission::RadrootsNip22CommentAdmissionError", "radroots_event_codec::comment::inbound::RadrootsInboundNip22CommentProjection", @@ -1197,11 +1197,11 @@ rust_modules = [ "crates/event_codec/src/deletion/authored.rs", ] rust_types = [ - "radroots_event::deletion::RadrootsAuthoredNip09DeletionRequest", - "radroots_event::deletion::RadrootsNip09DeletionAddressTarget", - "radroots_event::deletion::RadrootsNip09DeletionError", - "radroots_event::deletion::RadrootsNip09DeletionEventTarget", - "radroots_event::ids::RadrootsNip01Coordinate", + "radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest", + "radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget", + "radroots_event::post::deletion::RadrootsNip09DeletionError", + "radroots_event::post::deletion::RadrootsNip09DeletionEventTarget", + "radroots_event::id::RadrootsNip01Coordinate", "radroots_event::wire::RadrootsNip01EventWireParts", ] @@ -1263,7 +1263,7 @@ rust_modules = [ "crates/event_codec/src/verification.rs", ] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::deletion::admission::RadrootsAdmittedNip09DeletionRequestEvent", "radroots_event_codec::deletion::admission::RadrootsNip09DeletionAdmissionError", "radroots_event_codec::deletion::inbound::RadrootsInboundNip09DeletionProjection", @@ -1321,7 +1321,7 @@ transport = "native" [operations.social_reaction_build_tags.implementation] rust_modules = ["crates/event_codec/src/reaction/encode.rs"] -rust_types = ["radroots_event::reaction::RadrootsReaction"] +rust_types = ["radroots_event::post::reaction::RadrootsReaction"] [operations.social_reaction_build_tags.conformance] vector = "contracts/conformance/vectors/social/mvp.v1.json" @@ -1339,7 +1339,7 @@ transport = "native" [operations.social_article_build_tags.implementation] rust_modules = ["crates/event_codec/src/article/encode.rs"] -rust_types = ["radroots_event::article::RadrootsArticle"] +rust_types = ["radroots_event::post::article::RadrootsArticle"] [operations.social_article_build_tags.conformance] vector = "contracts/conformance/vectors/social/mvp.v1.json" @@ -1357,7 +1357,7 @@ transport = "native" [operations.social_file_metadata_build_tags.implementation] rust_modules = ["crates/event_codec/src/file_metadata/encode.rs"] -rust_types = ["radroots_event::file_metadata::RadrootsFileMetadata"] +rust_types = ["radroots_event::media::file_metadata::RadrootsFileMetadata"] [operations.social_file_metadata_build_tags.conformance] vector = "contracts/conformance/vectors/social/mvp.v1.json" @@ -1762,7 +1762,7 @@ transport = "native" [operations.trade_parse_mutation_event.implementation] rust_modules = ["crates/event_codec/src/trade/mod.rs"] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event::trade::RadrootsTradeMutationEnvelopeV1", ] @@ -1782,12 +1782,12 @@ transport = "native" [operations.trade_parse_classified_listing_address.implementation] rust_modules = [ - "crates/event/src/ids.rs", + "crates/event/src/id.rs", "crates/trade/src/operational_listing/mod.rs", ] rust_types = [ - "radroots_event::ids::RadrootsClassifiedListingAddress", - "radroots_event::ids::RadrootsIdParseError", + "radroots_event::id::RadrootsClassifiedListingAddress", + "radroots_event::id::RadrootsIdParseError", "radroots_trade::operational_listing::RadrootsClassifiedListingAddressParts", ] @@ -1837,7 +1837,7 @@ rust_modules = [ ] rust_types = [ "radroots_event_codec::verification::RadrootsSignatureVerifiedEvent", - "radroots_event::trade_validation::RadrootsOperationalListingValidationError", + "radroots_event::trade::validation::RadrootsOperationalListingValidationError", "radroots_trade::operational_listing::validation::RadrootsOperationalListingTradeProjection", ] @@ -1886,7 +1886,7 @@ rust_modules = [ "crates/event_codec/src/knowledge/decode.rs", ] rust_types = [ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::verification::RadrootsDecodedEvent", ] diff --git a/crates/authority/src/authorization.rs b/crates/authority/src/authorization.rs @@ -173,7 +173,7 @@ mod tests { use radroots_event::contract::{ AuthorRole, RADROOTS_EVENT_CONTRACT_REGISTRY_VERSION, event_contract, }; - use radroots_event::kinds::{KIND_CLASSIFIED_LISTING, KIND_POST, KIND_TRADE_PROPOSAL}; + use radroots_event::envelope::kind::{KIND_CLASSIFIED_LISTING, KIND_POST, KIND_TRADE_PROPOSAL}; use radroots_identity::PublicKey; const OTHER_VALID_PUBKEY: &str = diff --git a/crates/authority/src/local_signer.rs b/crates/authority/src/local_signer.rs @@ -38,8 +38,8 @@ impl RadrootsEventSigner for RadrootsLocalEventSigner { #[cfg(test)] mod tests { use super::*; - use radroots_event::RadrootsEventEnvelope; - use radroots_event::kinds::KIND_GEOCHAT; + use radroots_event::envelope::RadrootsEventEnvelope; + use radroots_event::envelope::kind::KIND_GEOCHAT; use radroots_nostr::prelude::{ RadrootsNostrEventVerification, RadrootsNostrSecretKey, radroots_nostr_verify_event, }; diff --git a/crates/authority/src/signer.rs b/crates/authority/src/signer.rs @@ -35,7 +35,7 @@ pub trait RadrootsEventSigner { #[cfg(test)] mod tests { use super::*; - use radroots_event::kinds::KIND_GEOCHAT; + use radroots_event::envelope::kind::KIND_GEOCHAT; fn hex_64(character: char) -> String { std::iter::repeat_n(character, 64).collect() diff --git a/crates/event/README.md b/crates/event/README.md @@ -5,15 +5,23 @@ models, kinds, and tag conventions for the `radroots` core libraries. ## Overview - * typed content modules for accounts, app data, comments, coops, documents, - farms, farm workspaces, farm CRDT changes, farm files, groups, auth events, - jobs, lists, messages, posts, profiles, reactions, trades, and related - domains; + * typed content grouped under the singular `admission`, `calendar`, + `contract`, `draft`, `envelope`, `farm`, `food`, `id`, `knowledge`, + `listing`, `media`, `post`, `profile`, `social`, `tag`, `trade`, and `wire` + modules; * shared event references, pointers, and kind and tag definitions used across event-processing code; * portable event model semantics for both `std` and `no_std` builds; * optional integration with `serde` for serialization. +The crate root is intentionally limited to `Event`, `EventDraft`, +`SignedEvent`, `VerifiedEvent`, `EventId`, `EventKind`, `EventTag`, and `Error`. +Domain-specific values live under their owning module. Existing focused models +are nested below that authority, including `food::availability`, +`listing::classified`, `listing::operational`, `post::comment`, +`post::deletion`, `post::reply`, `tag::relay_hint`, and the farm and social +subdomains. + The Profile module exposes the exclusive strict authored model. It requires a non-whitespace, control-free name; its media fields accept only image-typed, byte-verified Blossom descriptors; and its NIP-05 identifier type validates @@ -30,7 +38,7 @@ image-typed byte-verified Blossom descriptor. That descriptor state is not an upload receipt; BUD-02 completion remains a runtime prerequisite before signing. -The shared relay-hint module exposes `RadrootsNostrRelayHint` for NIP-10 Reply +The shared `tag::relay_hint` module exposes `RadrootsNostrRelayHint` for NIP-10 Reply and NIP-22 Comment references. It is a byte-stable subset of WebSocket URLs: exact lowercase `ws://` or `wss://`, visible ASCII, canonical lowercase DNS or four-octet IPv4 or bracketed pure-hex RFC 5952 IPv6, canonical optional port @@ -38,7 +46,7 @@ four-octet IPv4 or bracketed pure-hex RFC 5952 IPv6, canonical optional port escapes. It rejects IDNA and percent-encoded hosts, legacy IPv4, userinfo, fragments, controls, backslashes, and normalization-dependent spellings. -The Reply module exposes opaque `RadrootsNip10ReplyReference` and +The `post::reply` module exposes opaque `RadrootsNip10ReplyReference` and `RadrootsAuthoredNip10Reply` types for strict direct and nested kind-1 authoring. References carry a validated event id, referenced author, and optional shared relay hint; construction emits either one marked root or @@ -47,7 +55,7 @@ wire-size claim: Reply construction separately enforces the 4,096-byte tag-element ceiling. These values prove syntax and authored shape, not target existence, target kind, signature, author, or relay availability. -The Comment module implements the strict Radroots +The `post::comment` module implements the strict Radroots [NIP-22](https://github.com/nostr-protocol/nips/blob/bdfa7e62ef87fcfcb992b1a27aee49d36b0b4f91/22.md) kind-`1111` profile. `RadrootsAuthoredNip22Comment` and its opaque event-root, address-root, parent, position, and root-kind values admit only kind-`30402`, @@ -78,7 +86,7 @@ admission. The three governed Comment operations are 114-case corpus are owned by `radroots_event_codec` and `contracts/conformance`. -The Deletion module implements the effect-free request layer of +The `post::deletion` module implements the effect-free request layer of [NIP-09](https://github.com/nostr-protocol/nips/blob/bdfa7e62ef87fcfcb992b1a27aee49d36b0b4f91/09.md). `RadrootsAuthoredNip09DeletionRequest` requires at least one validated event-id or replaceable/addressable coordinate target. Event targets carry a @@ -114,7 +122,7 @@ one-element tag still contributes its raw first name, and marker matching is case-sensitive. `classify_classified_listing_tags` and the borrowed-slice variant inspect neither kind, tag values, nor tag arity. -The FoodAvailability module provides `RadrootsFoodAvailabilityDetails` and +The `food::availability` module provides `RadrootsFoodAvailabilityDetails` and checked identifier, text, publication timestamp, price, currency, unit, quantity, status, image-dimension, and image values. Content contains at least one scalar outside Unicode whitespace and U+001C through U+001F, and is bounded diff --git a/crates/event/src/account.rs b/crates/event/src/account.rs @@ -1,4 +1,4 @@ -use crate::kinds::KIND_ACCOUNT_CLAIM as KIND_ACCOUNT_CLAIM_EVENT; +use crate::envelope::kind::KIND_ACCOUNT_CLAIM as KIND_ACCOUNT_CLAIM_EVENT; #[cfg(not(feature = "std"))] use alloc::string::String; diff --git a/crates/event/src/app_data.rs b/crates/event/src/app_data.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use crate::kinds::KIND_APP_DATA as KIND_APP_DATA_EVENT; +use crate::envelope::kind::KIND_APP_DATA as KIND_APP_DATA_EVENT; #[cfg(not(feature = "std"))] use alloc::string::String; diff --git a/crates/event/src/calendar.rs b/crates/event/src/calendar.rs @@ -7,7 +7,7 @@ use alloc::{ }; use core::{fmt, ops::RangeInclusive, str::FromStr}; -use crate::ids::{ +use crate::id::{ RadrootsAddressableCoordinate, RadrootsAddressableCoordinateParts, RadrootsDTag, RadrootsEventId, RadrootsRelayUrl, parse_public_key, }; @@ -298,7 +298,8 @@ impl RadrootsCalendarEventReference { .map_err(|_| RadrootsCalendarEventError::InvalidEventReference)?; if !matches!( parts.kind, - crate::kinds::KIND_CALENDAR_DATE_EVENT | crate::kinds::KIND_CALENDAR_TIME_EVENT + crate::envelope::kind::KIND_CALENDAR_DATE_EVENT + | crate::envelope::kind::KIND_CALENDAR_TIME_EVENT ) { return Err(RadrootsCalendarEventError::InvalidEventReference); } @@ -833,9 +834,9 @@ impl RadrootsCalendarRequest { ) -> Result<Self, RadrootsCalendarEventError> { let calendar = RadrootsAddressableCoordinate::parse(calendar.as_ref()) .map_err(|_| RadrootsCalendarEventError::InvalidUrl("calendar request"))?; - let parts = crate::ids::RadrootsAddressableCoordinateParts::parse(calendar.as_str()) + let parts = crate::id::RadrootsAddressableCoordinateParts::parse(calendar.as_str()) .map_err(|_| RadrootsCalendarEventError::InvalidUrl("calendar request"))?; - if parts.kind != crate::kinds::KIND_CALENDAR { + if parts.kind != crate::envelope::kind::KIND_CALENDAR { return Err(RadrootsCalendarEventError::InvalidUrl("calendar request")); } let relay = relay @@ -862,7 +863,7 @@ impl RadrootsCalendarRequest { pub fn is_canonical(&self) -> bool { let Ok(parts) = - crate::ids::RadrootsAddressableCoordinateParts::parse(self.calendar.as_str()) + crate::id::RadrootsAddressableCoordinateParts::parse(self.calendar.as_str()) else { return false; }; diff --git a/crates/event/src/classified_listing.rs b/crates/event/src/classified_listing.rs @@ -3,7 +3,7 @@ use alloc::string::String; #[cfg(feature = "std")] use std::string::String; -use crate::{RadrootsEventTag, RadrootsEventTags}; +use crate::envelope::{RadrootsEventTag, RadrootsEventTags}; pub const TAG_RADROOTS_PRICE_UNIT: &str = "radroots:price_unit"; pub const TAG_RADROOTS_QUANTITY: &str = "radroots:quantity"; diff --git a/crates/event/src/comment.rs b/crates/event/src/comment.rs @@ -6,14 +6,14 @@ use alloc::{ use core::fmt; use crate::{ - ids::{ + envelope::kind::{ + KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_TIME_EVENT, KIND_CLASSIFIED_LISTING, KIND_COMMENT, + }, + id::{ RadrootsAddressableCoordinate, RadrootsAddressableCoordinateParts, RadrootsEventId, RadrootsIdParseError, parse_public_key, }, - kinds::{ - KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_TIME_EVENT, KIND_CLASSIFIED_LISTING, KIND_COMMENT, - }, - relay_hint::RadrootsNostrRelayHint, + tag::relay_hint::RadrootsNostrRelayHint, wire::{ DEFAULT_CONTENT_MAX_BYTES, DEFAULT_RAW_JSON_MAX_BYTES, DEFAULT_TAG_ELEMENT_MAX_BYTES, DEFAULT_TAG_MAX_COUNT, DEFAULT_TAG_TOTAL_ELEMENT_MAX_COUNT, DEFAULT_TAG_TOTAL_MAX_BYTES, @@ -466,7 +466,7 @@ pub enum RadrootsNip22CommentPosition { /// This type is opaque and has no Serde construction path. /// /// ```compile_fail -/// let _: radroots_event::comment::RadrootsAuthoredNip22Comment = +/// let _: radroots_event::post::comment::RadrootsAuthoredNip22Comment = /// serde_json::from_str(r#"{"content":"comment"}"#).unwrap(); /// ``` #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/crates/event/src/contract.rs b/crates/event/src/contract.rs @@ -1,5 +1,8 @@ #![forbid(unsafe_code)] +/// Exact package version implementing this event contract surface. +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); + #[doc(hidden)] pub mod registry_v7; diff --git a/crates/event/src/contract/registry_v7.rs b/crates/event/src/contract/registry_v7.rs @@ -11,15 +11,15 @@ use crate::{ RadrootsCalendarUri, RadrootsIanaTimeZoneId, canonical_calendar_geohash_is_valid, canonical_calendar_tag_text_is_valid, covered_utc_days, }, - classified_listing::{ - RadrootsClassifiedListingPartition, TAG_RADROOTS_PRICE_UNIT, TAG_RADROOTS_QUANTITY, - }, envelope::RadrootsEventEnvelope, - ids::{ + envelope::kind::*, + id::{ RadrootsAddressableCoordinate, RadrootsDTag, RadrootsEventId, RadrootsNip01Coordinate, parse_public_key, relay_url_is_valid, }, - kinds::*, + listing::classified::{ + RadrootsClassifiedListingPartition, TAG_RADROOTS_PRICE_UNIT, TAG_RADROOTS_QUANTITY, + }, }; use radroots_blossom::BlobUrl; @@ -4402,7 +4402,7 @@ fn validate_calendar_rsvp_contract( .find(|tag| tag.first().map(String::as_str) == Some("a")) .and_then(|tag| tag.get(1)) .and_then(|coordinate| { - crate::ids::RadrootsAddressableCoordinateParts::parse(coordinate).ok() + crate::id::RadrootsAddressableCoordinateParts::parse(coordinate).ok() }) .map(|parts| parts.pubkey); if let Some(author_hint) = tag_value(tags, "p") { @@ -4737,7 +4737,7 @@ fn canonical_calendar_coordinate_is_valid(value: &str) -> bool { let Some((pubkey, d_tag)) = remainder.split_once(':') else { return false; }; - let Ok(parts) = crate::ids::RadrootsAddressableCoordinateParts::parse(value) else { + let Ok(parts) = crate::id::RadrootsAddressableCoordinateParts::parse(value) else { return false; }; kind == "31924" && pubkey == parts.pubkey.to_hex() && d_tag == parts.d_tag.as_str() @@ -4750,7 +4750,7 @@ fn canonical_calendar_event_coordinate_is_valid(value: &str) -> bool { let Some((pubkey, d_tag)) = remainder.split_once(':') else { return false; }; - let Ok(parts) = crate::ids::RadrootsAddressableCoordinateParts::parse(value) else { + let Ok(parts) = crate::id::RadrootsAddressableCoordinateParts::parse(value) else { return false; }; matches!( diff --git a/crates/event/src/contract/registry_v7/tests.rs b/crates/event/src/contract/registry_v7/tests.rs @@ -1,5 +1,5 @@ use super::*; -use crate::RadrootsEventEnvelopeParts; +use crate::envelope::RadrootsEventEnvelopeParts; use std::collections::BTreeSet; static AMBIGUOUS_TEST_CONTRACTS: &[RadrootsEventContract] = &[ @@ -1035,7 +1035,7 @@ fn nip22_comment_contract_is_typed_and_admission_only() { #[test] fn nip09_deletion_request_contract_is_typed_and_admission_only() { - use crate::deletion::{ + use crate::post::deletion::{ RADROOTS_NIP09_DELETION_CONTENT_MAX_BYTES, RADROOTS_NIP09_DELETION_EVENT_WIRE_MAX_BYTES, RADROOTS_NIP09_DELETION_TAG_ELEMENT_MAX_BYTES, RADROOTS_NIP09_DELETION_TAG_MAX_COUNT, RADROOTS_NIP09_DELETION_TAG_TOTAL_ELEMENT_MAX_COUNT, diff --git a/crates/event/src/coop.rs b/crates/event/src/coop.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use crate::gcs::RadrootsGcsLocation; +use crate::farm::change_set::RadrootsGcsLocation; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/deletion.rs b/crates/event/src/deletion.rs @@ -11,7 +11,7 @@ use std::{string::String, vec::Vec}; use core::fmt; use crate::{ - ids::{ + id::{ RadrootsEventId, RadrootsIdParseError, RadrootsNip01Coordinate, RadrootsNip01CoordinateParseError, }, @@ -235,7 +235,7 @@ impl RadrootsNip09DeletionAddressTarget { /// This type is opaque and has no Serde construction path. /// /// ```compile_fail -/// let _: radroots_event::deletion::RadrootsAuthoredNip09DeletionRequest = +/// let _: radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest = /// serde_json::from_str( /// r#"{"content":"","event_targets":[],"address_targets":[]}"# /// ).unwrap(); @@ -492,7 +492,7 @@ fn canonical_json_string_bytes(value: &str) -> usize { #[cfg(test)] mod tests { use super::*; - use crate::ids::RADROOTS_NIP01_COORDINATE_MAX_BYTES; + use crate::id::RADROOTS_NIP01_COORDINATE_MAX_BYTES; fn event_target(character: char, kind: u32) -> RadrootsNip09DeletionEventTarget { RadrootsNip09DeletionEventTarget::parse(character.to_string().repeat(64), kind) diff --git a/crates/event/src/draft.rs b/crates/event/src/draft.rs @@ -10,15 +10,15 @@ use crate::contract::registry_v7::{ RADROOTS_EVENT_CONTRACT_REGISTRY_VERSION, RadrootsContractValidationError, RadrootsEventContract, event_contract, validate_event_contract_parts, }; -use crate::ids::{RadrootsEventId, RadrootsEventSignature, RadrootsIdParseError, parse_public_key}; +use crate::envelope::{ + RadrootsEventEnvelope, RadrootsEventEnvelopeError, RadrootsEventKind, RadrootsEventTags, + RadrootsEventTimestamp, +}; +use crate::id::{RadrootsEventId, RadrootsEventSignature, RadrootsIdParseError, parse_public_key}; use crate::wire::v1::{ RadrootsCanonicalEventIdError, RadrootsEventWireError, RadrootsNip01EventWire, canonical_nip01_event_id_preimage, compute_canonical_nip01_event_id, }; -use crate::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeError, RadrootsEventKind, RadrootsEventTags, - RadrootsEventTimestamp, -}; use core::fmt; use radroots_identity::PublicKey; @@ -858,7 +858,7 @@ fn nip01_event_id_preimage_for_valid_pubkey( #[cfg(test)] mod tests { use super::*; - use crate::kinds::{ + use crate::envelope::kind::{ KIND_COMMENT, KIND_DELETION_REQUEST, KIND_FARM_CRDT_CHANGE, KIND_GEOCHAT, KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_SOURCE, KIND_POST, KIND_PROFILE, }; diff --git a/crates/event/src/dto.rs b/crates/event/src/dto.rs @@ -1,4 +1,6 @@ -use crate::RadrootsEventEnvelope; +#![allow(dead_code, unused_imports)] + +use crate::envelope::RadrootsEventEnvelope; #[derive(dto_bindgen::Dto)] #[dto(export)] diff --git a/crates/event/src/envelope.rs b/crates/event/src/envelope.rs @@ -1,12 +1,17 @@ #![forbid(unsafe_code)] +#[path = "event_head.rs"] +pub mod event_head; +#[path = "kinds.rs"] +pub mod kind; + #[cfg(all(not(feature = "std"), not(test)))] use alloc::{string::String, vec::Vec}; #[cfg(any(feature = "std", test))] use std::{string::String, vec::Vec}; -use crate::ids::{RadrootsEventId, RadrootsEventSignature, RadrootsIdParseError, parse_public_key}; +use crate::id::{RadrootsEventId, RadrootsEventSignature, RadrootsIdParseError, parse_public_key}; use crate::wire::v1::{ DEFAULT_CONTENT_MAX_BYTES, DEFAULT_TAG_ELEMENT_MAX_BYTES, DEFAULT_TAG_MAX_COUNT, DEFAULT_TAG_TOTAL_ELEMENT_MAX_COUNT, DEFAULT_TAG_TOTAL_MAX_BYTES, RadrootsNip01EventWire, diff --git a/crates/event/src/event_head.rs b/crates/event/src/event_head.rs @@ -1,6 +1,7 @@ #![forbid(unsafe_code)] #[doc(hidden)] +#[path = "event_head/v1.rs"] pub mod v1; pub use v1::*; diff --git a/crates/event/src/event_head/v1.rs b/crates/event/src/event_head/v1.rs @@ -9,8 +9,8 @@ use crate::contract::registry_v7::{ RadrootsContractMatchError, RadrootsEventClass, RadrootsEventContract, identify_event_contract, }; use crate::envelope::{RadrootsEventEnvelope, RadrootsEventKindClass, RadrootsEventTag}; -use crate::ids::{RadrootsDTag, RadrootsEventId, RadrootsIdParseError}; -use crate::tags::TAG_D; +use crate::id::{RadrootsDTag, RadrootsEventId, RadrootsIdParseError}; +use crate::tag::name::TAG_D; use radroots_identity::PublicKey; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -215,4 +215,5 @@ fn first_tag_value<'a>(tags: &'a [RadrootsEventTag], name: &str) -> Option<&'a s } #[cfg(test)] +#[path = "v1/tests.rs"] mod tests; diff --git a/crates/event/src/event_head/v1/tests.rs b/crates/event/src/event_head/v1/tests.rs @@ -1,10 +1,10 @@ use super::*; -use crate::RadrootsEventEnvelopeParts; use crate::contract::RadrootsContractMatchError; -use crate::ids::parse_public_key; -use crate::kinds::{ +use crate::envelope::RadrootsEventEnvelopeParts; +use crate::envelope::kind::{ KIND_FOLLOW, KIND_LIST_SET_GENERIC, KIND_POST, KIND_PROFILE, KIND_TRADE_PROPOSAL, }; +use crate::id::parse_public_key; fn hex_64(character: char) -> String { crate::test_valid_hex_64(character) diff --git a/crates/event/src/farm.rs b/crates/event/src/farm.rs @@ -1,3 +1,5 @@ +//! Farm, cooperative, plot, resource, and farm-document event models. + #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; @@ -45,3 +47,21 @@ pub struct RadrootsFarmPublicLocation { pub country: Option<String>, pub geohash: String, } +#[path = "gcs.rs"] +pub mod change_set; +#[path = "coop.rs"] +pub mod coop; +#[path = "farm_crdt.rs"] +pub mod crdt; +#[path = "farm_file.rs"] +pub mod file; +#[path = "location.rs"] +pub mod location; +#[path = "plot.rs"] +pub mod plot; +#[path = "resource_area.rs"] +pub mod resource_area; +#[path = "resource_cap.rs"] +pub mod resource_cap; +#[path = "farm_workspace.rs"] +pub mod workspace; diff --git a/crates/event/src/farm_crdt.rs b/crates/event/src/farm_crdt.rs @@ -1,7 +1,7 @@ #![forbid(unsafe_code)] -use crate::farm_workspace::RadrootsFarmWorkspaceRef; -use crate::kinds::KIND_FARM_CRDT_CHANGE as KIND_FARM_CRDT_CHANGE_EVENT; +use crate::envelope::kind::KIND_FARM_CRDT_CHANGE as KIND_FARM_CRDT_CHANGE_EVENT; +use crate::farm::workspace::RadrootsFarmWorkspaceRef; #[cfg(not(feature = "std"))] use alloc::{ diff --git a/crates/event/src/farm_file.rs b/crates/event/src/farm_file.rs @@ -1,8 +1,8 @@ #![forbid(unsafe_code)] -use crate::farm_crdt::RadrootsFarmCrdtDocumentKind; -use crate::farm_workspace::RadrootsFarmWorkspaceRef; -use crate::kinds::KIND_FARM_FILE_METADATA as KIND_FARM_FILE_METADATA_EVENT; +use crate::envelope::kind::KIND_FARM_FILE_METADATA as KIND_FARM_FILE_METADATA_EVENT; +use crate::farm::crdt::RadrootsFarmCrdtDocumentKind; +use crate::farm::workspace::RadrootsFarmWorkspaceRef; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/farm_workspace.rs b/crates/event/src/farm_workspace.rs @@ -1,7 +1,7 @@ #![forbid(unsafe_code)] +use crate::envelope::kind::KIND_FARM_WORKSPACE_MANIFEST as KIND_FARM_WORKSPACE_MANIFEST_EVENT; use crate::farm::RadrootsFarmRef; -use crate::kinds::KIND_FARM_WORKSPACE_MANIFEST as KIND_FARM_WORKSPACE_MANIFEST_EVENT; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; @@ -75,7 +75,7 @@ pub struct RadrootsFarmWorkspaceMediaServer { #[cfg(all(test, feature = "serde"))] mod tests { use super::*; - use crate::kinds::{ + use crate::envelope::kind::{ KIND_APP_DATA, KIND_FARM_CRDT_CHANGE, KIND_FARM_FILE_METADATA, KIND_FARM_WORKSPACE_MANIFEST as KIND_FARM_WORKSPACE_MANIFEST_KIND, KIND_HTTP_AUTH, KIND_RELAY_AUTH, diff --git a/crates/event/src/food.rs b/crates/event/src/food.rs @@ -1,7 +1,4 @@ -//! Canonical food-event domain model. -//! -//! Existing food-availability behavior moves here during module normalization. +//! Canonical food-event domain models. -/// Internal marker for the target module while its models are consolidated. -#[allow(dead_code)] -pub(crate) struct ModuleScaffold; +#[path = "food_availability.rs"] +pub mod availability; diff --git a/crates/event/src/food_availability.rs b/crates/event/src/food_availability.rs @@ -619,7 +619,7 @@ impl RadrootsFoodAvailabilityImage { /// and bind these details to a per-revision `created_at` before signing. /// /// ```compile_fail -/// let _: radroots_event::food_availability::RadrootsFoodAvailabilityDetails = +/// let _: radroots_event::food::availability::RadrootsFoodAvailabilityDetails = /// serde_json::from_str(r#"{"content":"carrots"}"#).unwrap(); /// ``` #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/crates/event/src/generated/dto_roots.rs b/crates/event/src/generated/dto_roots.rs @@ -3,15 +3,6 @@ pub fn dto_bindgen_roots() -> ::std::vec::Vec<::dto_bindgen::export::RootDescriptor> { ::std::vec![ - ::dto_bindgen::export::RootDescriptor::new::<crate::RadrootsEventPtr>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::RadrootsEventRef>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::account::RadrootsAccountClaim>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::app_data::RadrootsAppData>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::coop::RadrootsCoop>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::coop::RadrootsCoopLocation>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::coop::RadrootsCoopRef>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::document::RadrootsDocument>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::document::RadrootsDocumentSubject>(), ::dto_bindgen::export::RootDescriptor::new::<crate::dto::RadrootsNip01EventWireDto>(), ::dto_bindgen::export::RootDescriptor::new::<crate::dto::RadrootsSignedEventDto>(), ::dto_bindgen::export::RootDescriptor::new::< @@ -25,22 +16,33 @@ pub fn dto_bindgen_roots() -> ::std::vec::Vec<::dto_bindgen::export::RootDescrip ::dto_bindgen::export::RootDescriptor::new::<crate::farm::RadrootsFarm>(), ::dto_bindgen::export::RootDescriptor::new::<crate::farm::RadrootsFarmPublicLocation>(), ::dto_bindgen::export::RootDescriptor::new::<crate::farm::RadrootsFarmRef>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::follow::RadrootsFollow>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::follow::RadrootsFollowProfile>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::gcs::RadrootsGcsLocation>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::gcs::RadrootsGeoJsonPoint>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::gcs::RadrootsGeoJsonPolygon>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::geochat::RadrootsGeoChat>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::gift_wrap::RadrootsGiftWrap>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::gift_wrap::RadrootsGiftWrapRecipient>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::job::JobFeedbackStatus>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::job::JobInputType>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::job::JobPaymentRequest>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::job_feedback::RadrootsJobFeedback>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::job_request::RadrootsJobInput>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::job_request::RadrootsJobParam>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::job_request::RadrootsJobRequest>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::job_result::RadrootsJobResult>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::change_set::RadrootsGcsLocation>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::change_set::RadrootsGeoJsonPoint>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::change_set::RadrootsGeoJsonPolygon>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::coop::RadrootsCoop>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::coop::RadrootsCoopLocation>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::coop::RadrootsCoopRef>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::plot::RadrootsPlot>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::plot::RadrootsPlotLocation>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::farm::plot::RadrootsPlotRef>(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::farm::resource_area::RadrootsResourceArea, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::farm::resource_area::RadrootsResourceAreaLocation, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::farm::resource_area::RadrootsResourceAreaRef, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::farm::resource_cap::RadrootsResourceHarvestCap, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::farm::resource_cap::RadrootsResourceHarvestProduct, + >(), ::dto_bindgen::export::RootDescriptor::new::<crate::knowledge::RadrootsAddressableRef>(), ::dto_bindgen::export::RootDescriptor::new::< crate::knowledge::RadrootsContributionAttestation, @@ -81,96 +83,123 @@ pub fn dto_bindgen_roots() -> ::std::vec::Vec<::dto_bindgen::export::RootDescrip ), ::dto_bindgen::export::RootDescriptor::new::<crate::knowledge::RadrootsWikiMergeRequest>(), ::dto_bindgen::export::RootDescriptor::new::<crate::knowledge::RadrootsWikiRedirect>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::list::RadrootsList>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::list::RadrootsListEntry>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::list_set::RadrootsListSet>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::message::RadrootsMessage>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::message::RadrootsMessageRecipient>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::message_file::RadrootsMessageFile>(), ::dto_bindgen::export::RootDescriptor::new::< - crate::message_file::RadrootsMessageFileDimensions, + crate::listing::operational::RadrootsOperationalListing, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListing, + crate::listing::operational::RadrootsOperationalListingAvailability, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListingAvailability, + crate::listing::operational::RadrootsOperationalListingBin, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListingBin, + crate::listing::operational::RadrootsOperationalListingDeliveryMethod, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListingDeliveryMethod, + crate::listing::operational::RadrootsOperationalListingImage, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListingImage, + crate::listing::operational::RadrootsOperationalListingParseError, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListingParseError, + crate::listing::operational::RadrootsOperationalListingProduct, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListingProduct, + crate::listing::operational::RadrootsOperationalListingPublicLocation, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListingPublicLocation, + crate::listing::operational::RadrootsOperationalListingStatus, >(), + ::dto_bindgen::export::RootDescriptor::new::<crate::post::RadrootsPost>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::post::document::RadrootsDocument>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::post::document::RadrootsDocumentSubject>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::post::reaction::RadrootsReaction>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::profile::RadrootsProfileType>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::profile::account::RadrootsAccountClaim>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::app_data::RadrootsAppData>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::follow::RadrootsFollow>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::follow::RadrootsFollowProfile>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::geochat::RadrootsGeoChat>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::gift_wrap::RadrootsGiftWrap>(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::social::gift_wrap::RadrootsGiftWrapRecipient, + >(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::job::JobFeedbackStatus>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::job::JobInputType>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::job::JobPaymentRequest>(), ::dto_bindgen::export::RootDescriptor::new::< - crate::operational_listing::RadrootsOperationalListingStatus, + crate::social::job_feedback::RadrootsJobFeedback, >(), - ::dto_bindgen::export::RootDescriptor::new::<crate::order::RadrootsCommercialDomain>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::order::RadrootsOrderCancellation>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::order::RadrootsOrderDecision>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::order::RadrootsOrderDecisionOutcome>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::order::RadrootsOrderEventType>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::order::RadrootsOrderInventoryCommitment>( + ::dto_bindgen::export::RootDescriptor::new::<crate::social::job_request::RadrootsJobInput>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::job_request::RadrootsJobParam>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::job_request::RadrootsJobRequest>( ), - ::dto_bindgen::export::RootDescriptor::new::<crate::order::RadrootsOrderRequest>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::job_result::RadrootsJobResult>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::list::RadrootsList>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::list::RadrootsListEntry>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::list_set::RadrootsListSet>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::message::RadrootsMessage>(), ::dto_bindgen::export::RootDescriptor::new::< - crate::order_economics::RadrootsOrderEconomicActor, + crate::social::message::RadrootsMessageRecipient, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::order_economics::RadrootsOrderEconomicEffect, + crate::social::message_file::RadrootsMessageFile, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::order_economics::RadrootsOrderEconomicItem, + crate::social::message_file::RadrootsMessageFileDimensions, >(), ::dto_bindgen::export::RootDescriptor::new::< - crate::order_economics::RadrootsOrderEconomicLine, + crate::social::relay_document::RadrootsRelayDocument, >(), + ::dto_bindgen::export::RootDescriptor::new::<crate::social::seal::RadrootsSeal>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::trade::order::RadrootsCommercialDomain>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::trade::order::RadrootsOrderCancellation>( + ), + ::dto_bindgen::export::RootDescriptor::new::<crate::trade::order::RadrootsOrderDecision>(), ::dto_bindgen::export::RootDescriptor::new::< - crate::order_economics::RadrootsOrderEconomicLineKind, + crate::trade::order::RadrootsOrderDecisionOutcome, >(), + ::dto_bindgen::export::RootDescriptor::new::<crate::trade::order::RadrootsOrderEventType>(), ::dto_bindgen::export::RootDescriptor::new::< - crate::order_economics::RadrootsOrderEconomicTotals, + crate::trade::order::RadrootsOrderInventoryCommitment, >(), - ::dto_bindgen::export::RootDescriptor::new::<crate::order_economics::RadrootsOrderEconomics>( - ), - ::dto_bindgen::export::RootDescriptor::new::<crate::order_economics::RadrootsOrderItem>(), + ::dto_bindgen::export::RootDescriptor::new::<crate::trade::order::RadrootsOrderRequest>(), ::dto_bindgen::export::RootDescriptor::new::< - crate::order_economics::RadrootsOrderPricingBasis, + crate::trade::order_economics::RadrootsOrderEconomicActor, >(), - ::dto_bindgen::export::RootDescriptor::new::<crate::plot::RadrootsPlot>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::plot::RadrootsPlotLocation>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::plot::RadrootsPlotRef>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::post::RadrootsPost>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::profile::RadrootsProfileType>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::reaction::RadrootsReaction>(), - ::dto_bindgen::export::RootDescriptor::new::<crate::relay_document::RadrootsRelayDocument>( - ), - ::dto_bindgen::export::RootDescriptor::new::<crate::resource_area::RadrootsResourceArea>(), ::dto_bindgen::export::RootDescriptor::new::< - crate::resource_area::RadrootsResourceAreaLocation, + crate::trade::order_economics::RadrootsOrderEconomicEffect, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::trade::order_economics::RadrootsOrderEconomicItem, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::trade::order_economics::RadrootsOrderEconomicLine, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::trade::order_economics::RadrootsOrderEconomicLineKind, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::trade::order_economics::RadrootsOrderEconomicTotals, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::trade::order_economics::RadrootsOrderEconomics, + >(), + ::dto_bindgen::export::RootDescriptor::new::< + crate::trade::order_economics::RadrootsOrderItem, >(), - ::dto_bindgen::export::RootDescriptor::new::<crate::resource_area::RadrootsResourceAreaRef>( - ), - ::dto_bindgen::export::RootDescriptor::new::<crate::resource_cap::RadrootsResourceHarvestCap>( - ), ::dto_bindgen::export::RootDescriptor::new::< - crate::resource_cap::RadrootsResourceHarvestProduct, + crate::trade::order_economics::RadrootsOrderPricingBasis, >(), - ::dto_bindgen::export::RootDescriptor::new::<crate::seal::RadrootsSeal>(), ::dto_bindgen::export::RootDescriptor::new::< - crate::trade_validation::RadrootsOperationalListingValidationError, + crate::trade::validation::RadrootsOperationalListingValidationError, >(), ] } diff --git a/crates/event/src/group.rs b/crates/event/src/group.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use crate::kinds::{ +use crate::envelope::kind::{ KIND_GROUP_ADMINS as KIND_GROUP_ADMINS_EVENT, KIND_GROUP_CREATE_GROUP as KIND_GROUP_CREATE_GROUP_EVENT, KIND_GROUP_CREATE_INVITE as KIND_GROUP_CREATE_INVITE_EVENT, diff --git a/crates/event/src/http_auth.rs b/crates/event/src/http_auth.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use crate::kinds::KIND_HTTP_AUTH as KIND_HTTP_AUTH_EVENT; +use crate::envelope::kind::KIND_HTTP_AUTH as KIND_HTTP_AUTH_EVENT; #[cfg(not(feature = "std"))] use alloc::string::String; diff --git a/crates/event/src/id.rs b/crates/event/src/id.rs @@ -1,6 +1,712 @@ -//! Canonical owned event identifiers and explicit boundary encoders. +#![forbid(unsafe_code)] -pub use crate::ids::{ +#[cfg(not(feature = "std"))] +use alloc::{format, string::String, string::ToString, vec::Vec}; + +#[cfg(feature = "std")] +use std::{string::String, vec::Vec}; + +use core::{ + fmt::{self, Write as _}, + str::FromStr, +}; +use radroots_identity::PublicKey; +use url_nostd::Url; + +use crate::envelope::kind::KIND_CLASSIFIED_LISTING; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum RadrootsIdParseError { + Empty, + InvalidFormat, + InvalidLength { expected: usize, actual: usize }, + InvalidCharacter, + InvalidPublicKey, + UnexpectedKind { expected: u32, actual: u32 }, + TooLong { max: usize, actual: usize }, +} + +impl fmt::Display for RadrootsIdParseError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Empty => write!(f, "identifier is empty"), + Self::InvalidFormat => write!(f, "identifier has invalid format"), + Self::InvalidLength { expected, actual } => { + write!( + f, + "identifier length {actual} does not match required length {expected}" + ) + } + Self::InvalidCharacter => write!(f, "identifier contains an invalid character"), + Self::InvalidPublicKey => { + write!(f, "identifier is not a valid secp256k1 x-only public key") + } + Self::UnexpectedKind { expected, actual } => { + write!( + f, + "identifier kind {actual} does not match required kind {expected}" + ) + } + Self::TooLong { max, actual } => { + write!(f, "identifier length {actual} exceeds maximum length {max}") + } + } + } +} + +#[cfg(feature = "std")] +impl std::error::Error for RadrootsIdParseError {} + +macro_rules! validated_string_id { + ($name:ident, $validator:ident) => { + #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] + #[cfg_attr(feature = "dto-bindgen", dto(as = "string"))] + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct $name(String); + + impl $name { + pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsIdParseError> { + $validator(value.as_ref()).map(Self) + } + + #[inline] + pub fn as_str(&self) -> &str { + self.0.as_str() + } + + #[inline] + pub fn into_string(self) -> String { + self.0 + } + } + + impl AsRef<str> for $name { + #[inline] + fn as_ref(&self) -> &str { + self.as_str() + } + } + + impl From<$name> for String { + #[inline] + fn from(value: $name) -> Self { + value.into_string() + } + } + + impl fmt::Display for $name { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(self.as_str()) + } + } + + impl FromStr for $name { + type Err = RadrootsIdParseError; + + fn from_str(value: &str) -> Result<Self, Self::Err> { + Self::parse(value) + } + } + + impl TryFrom<&str> for $name { + type Error = RadrootsIdParseError; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + Self::parse(value) + } + } + + impl TryFrom<String> for $name { + type Error = RadrootsIdParseError; + + fn try_from(value: String) -> Result<Self, Self::Error> { + Self::parse(value) + } + } + + #[cfg(any(feature = "serde", test))] + impl serde::Serialize for $name { + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } + } + + #[cfg(any(feature = "serde", test))] + impl<'de> serde::Deserialize<'de> for $name { + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + let value = String::deserialize(deserializer)?; + Self::parse(value).map_err(serde::de::Error::custom) + } + } + }; +} + +macro_rules! validated_hex_id { + ($name:ident, $byte_len:expr) => { + #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] + #[cfg_attr(feature = "dto-bindgen", dto(as = "string"))] + #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + pub struct $name([u8; $byte_len]); + + impl $name { + pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsIdParseError> { + decode_hex::<$byte_len>(value.as_ref()).map(Self) + } + + #[inline] + pub const fn from_bytes(bytes: [u8; $byte_len]) -> Self { + Self(bytes) + } + + #[inline] + pub const fn as_bytes(&self) -> &[u8; $byte_len] { + &self.0 + } + + #[inline] + pub const fn into_bytes(self) -> [u8; $byte_len] { + self.0 + } + + pub fn to_hex(&self) -> String { + encode_hex(self.0.as_slice()) + } + + #[inline] + pub fn into_string(self) -> String { + self.to_hex() + } + } + + impl AsRef<[u8]> for $name { + #[inline] + fn as_ref(&self) -> &[u8] { + self.0.as_slice() + } + } + + impl From<[u8; $byte_len]> for $name { + #[inline] + fn from(bytes: [u8; $byte_len]) -> Self { + Self::from_bytes(bytes) + } + } + + impl From<$name> for [u8; $byte_len] { + #[inline] + fn from(value: $name) -> Self { + value.into_bytes() + } + } + + impl fmt::Display for $name { + fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + write_hex(formatter, self.0.as_slice()) + } + } + + impl FromStr for $name { + type Err = RadrootsIdParseError; + + fn from_str(value: &str) -> Result<Self, Self::Err> { + Self::parse(value) + } + } + + impl TryFrom<&str> for $name { + type Error = RadrootsIdParseError; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + Self::parse(value) + } + } + + impl TryFrom<String> for $name { + type Error = RadrootsIdParseError; + + fn try_from(value: String) -> Result<Self, Self::Error> { + Self::parse(value) + } + } + + #[cfg(any(feature = "serde", test))] + impl serde::Serialize for $name { + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + serializer.collect_str(self) + } + } + + #[cfg(any(feature = "serde", test))] + impl<'de> serde::Deserialize<'de> for $name { + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + let value = String::deserialize(deserializer)?; + Self::parse(value).map_err(serde::de::Error::custom) + } + } + }; +} + +validated_hex_id!(RadrootsEventId, 32); +validated_hex_id!(RadrootsEventSignature, 64); +validated_hex_id!(RadrootsTradeId, 16); +validated_hex_id!(RadrootsTradeCandidateId, 32); +validated_hex_id!(RadrootsTradeMutationId, 32); +validated_string_id!(RadrootsDTag, validate_d_tag); +validated_string_id!( + RadrootsAddressableCoordinate, + validate_addressable_coordinate +); +validated_string_id!( + RadrootsClassifiedListingAddress, + validate_classified_listing_address +); +validated_string_id!(RadrootsOrderId, validate_commercial_id); +validated_string_id!(RadrootsOrderQuoteId, validate_commercial_id); +validated_string_id!(RadrootsInventoryBinId, validate_commercial_id); +validated_string_id!(RadrootsEconomicsDigest, validate_economics_digest); +validated_hex_id!(RadrootsEventPointer, 32); +validated_string_id!(RadrootsRelayUrl, validate_relay_url); + +pub(crate) fn parse_public_key(value: impl AsRef<str>) -> Result<PublicKey, RadrootsIdParseError> { + PublicKey::from_hex(value.as_ref()).map_err(|error| match error { + radroots_identity::Error::InvalidHexLength { expected, actual } + | radroots_identity::Error::InvalidByteLength { expected, actual } => { + RadrootsIdParseError::InvalidLength { expected, actual } + } + radroots_identity::Error::InvalidHexCharacter { .. } => { + RadrootsIdParseError::InvalidCharacter + } + _ => RadrootsIdParseError::InvalidPublicKey, + }) +} + +/// Radroots tag-element policy for a NIP-01 coordinate. +/// +/// NIP-01 does not define this resource limit. +pub const RADROOTS_NIP01_COORDINATE_MAX_BYTES: usize = + crate::wire::v1::DEFAULT_TAG_ELEMENT_MAX_BYTES; + +#[non_exhaustive] +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum RadrootsNip01CoordinateParseError { + Empty, + InvalidFormat, + Pubkey(RadrootsIdParseError), + UnsupportedKind { actual: u32 }, + IdentifierMustBeEmpty { kind: u32 }, + TooLong { max: usize, actual: usize }, +} + +impl fmt::Display for RadrootsNip01CoordinateParseError { + fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Empty => formatter.write_str("NIP-01 coordinate is empty"), + Self::InvalidFormat => formatter.write_str("NIP-01 coordinate has invalid format"), + Self::Pubkey(error) => { + write!(formatter, "NIP-01 coordinate pubkey is invalid: {error}") + } + Self::UnsupportedKind { actual } => write!( + formatter, + "NIP-01 coordinate kind {actual} is not replaceable or addressable" + ), + Self::IdentifierMustBeEmpty { kind } => write!( + formatter, + "NIP-01 coordinate identifier must be empty for replaceable kind {kind}" + ), + Self::TooLong { max, actual } => write!( + formatter, + "NIP-01 coordinate is {actual} bytes; Radroots tag-element max is {max}" + ), + } + } +} + +#[cfg(feature = "std")] +impl std::error::Error for RadrootsNip01CoordinateParseError { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + Self::Pubkey(error) => Some(error), + _ => None, + } + } +} + +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct RadrootsNip01CoordinateParts { + pub kind: u32, + pub pubkey: PublicKey, + pub identifier: String, +} + +impl RadrootsNip01CoordinateParts { + pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsNip01CoordinateParseError> { + RadrootsNip01Coordinate::parse(value).map(RadrootsNip01Coordinate::into_parts) + } +} + +/// A canonical NIP-01 replaceable or addressable event coordinate. +/// +/// Parsing splits only the first two `:` delimiters. The remaining identifier +/// is opaque protocol data and is preserved byte-for-byte. +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct RadrootsNip01Coordinate { + canonical: String, + kind: u32, + pubkey: PublicKey, + identifier: String, +} + +impl RadrootsNip01Coordinate { + pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsNip01CoordinateParseError> { + let value = value.as_ref(); + if value.is_empty() { + return Err(RadrootsNip01CoordinateParseError::Empty); + } + if value.len() > RADROOTS_NIP01_COORDINATE_MAX_BYTES { + return Err(RadrootsNip01CoordinateParseError::TooLong { + max: RADROOTS_NIP01_COORDINATE_MAX_BYTES, + actual: value.len(), + }); + } + + let (kind, remainder) = value + .split_once(':') + .ok_or(RadrootsNip01CoordinateParseError::InvalidFormat)?; + let (pubkey, identifier) = remainder + .split_once(':') + .ok_or(RadrootsNip01CoordinateParseError::InvalidFormat)?; + let kind = kind + .parse::<u32>() + .map_err(|_| RadrootsNip01CoordinateParseError::InvalidFormat)?; + let requires_empty_identifier = matches!(kind, 0 | 3) || (10_000..=19_999).contains(&kind); + if !requires_empty_identifier && !(30_000..=39_999).contains(&kind) { + return Err(RadrootsNip01CoordinateParseError::UnsupportedKind { actual: kind }); + } + if requires_empty_identifier && !identifier.is_empty() { + return Err(RadrootsNip01CoordinateParseError::IdentifierMustBeEmpty { kind }); + } + + let pubkey = parse_public_key(pubkey).map_err(RadrootsNip01CoordinateParseError::Pubkey)?; + let identifier = identifier.to_string(); + let canonical = format!("{kind}:{pubkey}:{identifier}"); + Ok(Self { + canonical, + kind, + pubkey, + identifier, + }) + } + + #[inline] + pub fn as_str(&self) -> &str { + self.canonical.as_str() + } + + #[inline] + pub const fn kind(&self) -> u32 { + self.kind + } + + #[inline] + pub const fn pubkey(&self) -> &PublicKey { + &self.pubkey + } + + #[inline] + pub fn identifier(&self) -> &str { + self.identifier.as_str() + } + + #[inline] + pub fn parts(&self) -> RadrootsNip01CoordinateParts { + RadrootsNip01CoordinateParts { + kind: self.kind, + pubkey: self.pubkey, + identifier: self.identifier.clone(), + } + } + + #[inline] + pub fn into_parts(self) -> RadrootsNip01CoordinateParts { + RadrootsNip01CoordinateParts { + kind: self.kind, + pubkey: self.pubkey, + identifier: self.identifier, + } + } + + #[inline] + pub fn into_string(self) -> String { + self.canonical + } +} + +impl AsRef<str> for RadrootsNip01Coordinate { + #[inline] + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl From<RadrootsNip01Coordinate> for String { + #[inline] + fn from(value: RadrootsNip01Coordinate) -> Self { + value.into_string() + } +} + +impl fmt::Display for RadrootsNip01Coordinate { + fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str(self.as_str()) + } +} + +impl FromStr for RadrootsNip01Coordinate { + type Err = RadrootsNip01CoordinateParseError; + + fn from_str(value: &str) -> Result<Self, Self::Err> { + Self::parse(value) + } +} + +impl TryFrom<&str> for RadrootsNip01Coordinate { + type Error = RadrootsNip01CoordinateParseError; + + fn try_from(value: &str) -> Result<Self, Self::Error> { + Self::parse(value) + } +} + +impl TryFrom<String> for RadrootsNip01Coordinate { + type Error = RadrootsNip01CoordinateParseError; + + fn try_from(value: String) -> Result<Self, Self::Error> { + Self::parse(value) + } +} + +#[cfg(any(feature = "serde", test))] +impl serde::Serialize for RadrootsNip01Coordinate { + fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> + where + S: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +#[cfg(any(feature = "serde", test))] +impl<'de> serde::Deserialize<'de> for RadrootsNip01Coordinate { + fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> + where + D: serde::Deserializer<'de>, + { + let value = <String as serde::Deserialize>::deserialize(deserializer)?; + Self::parse(value).map_err(serde::de::Error::custom) + } +} + +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct RadrootsAddressableCoordinateParts { + pub kind: u32, + pub pubkey: PublicKey, + pub d_tag: RadrootsDTag, +} + +impl RadrootsAddressableCoordinateParts { + pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsIdParseError> { + parse_addressable_coordinate_parts(value.as_ref()) + } +} + +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct RadrootsEventEnvelopePointer { + pub event_id: RadrootsEventId, + pub relays: Vec<String>, +} + +impl RadrootsEventEnvelopePointer { + pub fn new<I, S>(event_id: RadrootsEventId, relays: I) -> Result<Self, RadrootsIdParseError> + where + I: IntoIterator<Item = S>, + S: Into<String>, + { + let mut canonical_relays = Vec::new(); + for relay in relays { + let relay = relay.into(); + RadrootsRelayUrl::parse(relay.as_str())?; + canonical_relays.push(relay); + } + Ok(Self { + event_id, + relays: canonical_relays, + }) + } +} + +fn decode_hex<const N: usize>(value: &str) -> Result<[u8; N], RadrootsIdParseError> { + let expected = N * 2; + if value.len() != expected { + return Err(RadrootsIdParseError::InvalidLength { + expected, + actual: value.len(), + }); + } + + let mut decoded = [0_u8; N]; + for (index, pair) in value.as_bytes().chunks_exact(2).enumerate() { + decoded[index] = (decode_hex_nibble(pair[0])? << 4) | decode_hex_nibble(pair[1])?; + } + Ok(decoded) +} + +fn decode_hex_nibble(value: u8) -> Result<u8, RadrootsIdParseError> { + match value { + b'0'..=b'9' => Ok(value - b'0'), + b'a'..=b'f' => Ok(value - b'a' + 10), + b'A'..=b'F' => Ok(value - b'A' + 10), + _ => Err(RadrootsIdParseError::InvalidCharacter), + } +} + +fn encode_hex(bytes: &[u8]) -> String { + const LOWER_HEX: &[u8; 16] = b"0123456789abcdef"; + let mut encoded = String::with_capacity(bytes.len() * 2); + for byte in bytes { + encoded.push(LOWER_HEX[usize::from(byte >> 4)] as char); + encoded.push(LOWER_HEX[usize::from(byte & 0x0f)] as char); + } + encoded +} + +fn write_hex(formatter: &mut fmt::Formatter<'_>, bytes: &[u8]) -> fmt::Result { + for byte in bytes { + formatter.write_char(lower_hex_digit(byte >> 4))?; + formatter.write_char(lower_hex_digit(byte & 0x0f))?; + } + Ok(()) +} + +const fn lower_hex_digit(value: u8) -> char { + match value { + 0..=9 => (b'0' + value) as char, + _ => (b'a' + value - 10) as char, + } +} + +fn validate_hex(value: &str, expected_len: usize) -> Result<String, RadrootsIdParseError> { + if value.len() != expected_len { + return Err(RadrootsIdParseError::InvalidLength { + expected: expected_len, + actual: value.len(), + }); + } + + let mut canonical = String::with_capacity(expected_len); + for byte in value.bytes() { + match byte { + b'0'..=b'9' => canonical.push(byte as char), + b'a'..=b'f' => canonical.push(byte as char), + b'A'..=b'F' => canonical.push((byte + 32) as char), + _ => return Err(RadrootsIdParseError::InvalidCharacter), + } + } + Ok(canonical) +} + +fn validate_d_tag(value: &str) -> Result<String, RadrootsIdParseError> { + validate_visible_token(value, 512) +} + +fn validate_commercial_id(value: &str) -> Result<String, RadrootsIdParseError> { + validate_visible_token(value, 128) +} + +fn validate_economics_digest(value: &str) -> Result<String, RadrootsIdParseError> { + if let Some(hex) = value.strip_prefix("sha256:") { + validate_hex(hex, 64)?; + return Ok(value.to_string()); + } + validate_visible_token(value, 128) +} + +fn validate_addressable_coordinate(value: &str) -> Result<String, RadrootsIdParseError> { + parse_addressable_coordinate_parts(value)?; + Ok(value.to_string()) +} + +fn validate_classified_listing_address(value: &str) -> Result<String, RadrootsIdParseError> { + let parts = parse_addressable_coordinate_parts(value)?; + if parts.kind != KIND_CLASSIFIED_LISTING { + return Err(RadrootsIdParseError::UnexpectedKind { + expected: KIND_CLASSIFIED_LISTING, + actual: parts.kind, + }); + } + Ok(format!( + "{}:{}:{}", + KIND_CLASSIFIED_LISTING, parts.pubkey, parts.d_tag + )) +} + +fn parse_addressable_coordinate_parts( + value: &str, +) -> Result<RadrootsAddressableCoordinateParts, RadrootsIdParseError> { + let (kind, remainder) = value + .split_once(':') + .ok_or(RadrootsIdParseError::InvalidFormat)?; + let (pubkey, d_tag) = remainder + .split_once(':') + .ok_or(RadrootsIdParseError::InvalidFormat)?; + let kind = kind + .parse::<u32>() + .map_err(|_| RadrootsIdParseError::InvalidFormat)?; + let pubkey = parse_public_key(pubkey)?; + let d_tag = RadrootsDTag::parse(d_tag)?; + Ok(RadrootsAddressableCoordinateParts { + kind, + pubkey, + d_tag, + }) +} + +fn validate_visible_token(value: &str, max_len: usize) -> Result<String, RadrootsIdParseError> { + if value.is_empty() { + return Err(RadrootsIdParseError::Empty); + } + if value.len() > max_len { + return Err(RadrootsIdParseError::TooLong { + max: max_len, + actual: value.len(), + }); + } + if value.trim() != value + || value + .chars() + .any(|character| character.is_control() || character.is_whitespace()) + { + return Err(RadrootsIdParseError::InvalidCharacter); + } + Ok(value.to_string()) +} + +pub fn relay_url_is_valid(value: &str) -> bool { + validate_relay_url(value).is_ok() +} + +pub use self::{ RadrootsAddressableCoordinate as AddressableCoordinate, RadrootsAddressableCoordinateParts as AddressableCoordinateParts, RadrootsClassifiedListingAddress as ClassifiedListingAddress, RadrootsDTag as DTag, @@ -11,3 +717,795 @@ pub use crate::ids::{ RadrootsNip01CoordinateParts as Nip01CoordinateParts, RadrootsTradeCandidateId as CandidateId, RadrootsTradeId as TradeId, RadrootsTradeMutationId as MutationId, }; + +fn validate_relay_url(value: &str) -> Result<String, RadrootsIdParseError> { + if value.is_empty() { + return Err(RadrootsIdParseError::Empty); + } + if value + .chars() + .any(|character| character.is_control() || character.is_whitespace()) + { + return Err(RadrootsIdParseError::InvalidCharacter); + } + if !(value.starts_with("ws://") || value.starts_with("wss://")) { + return Err(RadrootsIdParseError::InvalidFormat); + } + + let parsed = Url::parse(value).map_err(|_| RadrootsIdParseError::InvalidFormat)?; + if !matches!(parsed.scheme(), "ws" | "wss") + || parsed.host_str().is_none_or(str::is_empty) + || !parsed.username().is_empty() + || parsed.password().is_some() + || parsed.fragment().is_some() + || parsed.port() == Some(0) + { + return Err(RadrootsIdParseError::InvalidFormat); + } + + // `Url::username` cannot distinguish absent userinfo from an empty userinfo field. + let authority = value + .split_once("://") + .map(|(_, remainder)| remainder.split(['/', '?', '#']).next().unwrap_or(remainder)) + .ok_or(RadrootsIdParseError::InvalidFormat)?; + if authority.contains('@') { + return Err(RadrootsIdParseError::InvalidFormat); + } + + Ok(value.to_string()) +} + +#[cfg(test)] +mod tests { + use super::*; + + macro_rules! assert_string_identifier_impls { + ($ty:ty, $value:expr) => {{ + let value = $value.to_owned(); + let value = value.as_str(); + let id = <$ty>::parse(value).expect("parse"); + + assert_eq!(id.as_str(), value); + assert_eq!(id.as_ref(), value); + assert_eq!(id.to_string(), value); + assert_eq!( + <$ty as core::str::FromStr>::from_str(value).expect("from str"), + id + ); + assert_eq!( + <$ty as TryFrom<&str>>::try_from(value).expect("try from str"), + id + ); + assert_eq!( + <$ty as TryFrom<String>>::try_from(value.to_owned()).expect("try from string"), + id + ); + let id = <$ty>::parse(value).expect("parse"); + let converted: String = String::from(id.clone()); + assert_eq!(converted, value); + assert_eq!(id.into_string(), value.to_owned()); + + #[cfg(any(feature = "serde", test))] + { + let id = <$ty>::parse(value).expect("parse"); + let encoded = serde_json::to_string(&id).expect("serialize"); + let decoded: $ty = serde_json::from_str(&encoded).expect("deserialize"); + assert_eq!(decoded.as_str(), value); + } + }}; + } + + macro_rules! assert_hex_identifier_impls { + ($ty:ty, $value:expr, $byte_len:expr) => {{ + let value = $value.to_owned(); + let value = value.as_str(); + let id = <$ty>::parse(value).expect("parse"); + + assert_eq!(id.to_hex(), value); + assert_eq!(id.as_bytes().len(), $byte_len); + assert_eq!(id.as_ref(), id.as_bytes()); + assert_eq!(id.to_string(), value); + assert_eq!( + <$ty as core::str::FromStr>::from_str(value).expect("from str"), + id + ); + assert_eq!( + <$ty as TryFrom<&str>>::try_from(value).expect("try from str"), + id + ); + assert_eq!( + <$ty as TryFrom<String>>::try_from(value.to_owned()).expect("try from string"), + id + ); + + let bytes = id.into_bytes(); + assert_eq!(<$ty>::from_bytes(bytes), id); + assert_eq!(id.into_string(), value.to_owned()); + + #[cfg(any(feature = "serde", test))] + { + let encoded = serde_json::to_string(&id).expect("serialize"); + let decoded: $ty = serde_json::from_str(&encoded).expect("deserialize"); + assert_eq!(decoded.to_hex(), value); + } + }}; + } + + fn hex_64(character: char) -> String { + crate::test_valid_hex_64(character) + } + + fn hex_32(character: char) -> String { + core::iter::repeat_n(character, 32).collect() + } + + fn hex_128(character: char) -> String { + core::iter::repeat_n(character, 128).collect() + } + + #[test] + fn public_keys_and_event_ids_require_64_hex_chars() { + let upper = "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF"; + let public_key = parse_public_key(upper).expect("public key"); + assert_eq!( + public_key.to_hex(), + "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" + ); + + let event_id = RadrootsEventId::parse(hex_64('f')).expect("event id"); + assert_eq!(event_id.to_hex(), hex_64('f')); + assert_eq!( + RadrootsEventId::parse(" ".repeat(64)).unwrap_err(), + RadrootsIdParseError::InvalidCharacter + ); + assert_eq!( + RadrootsEventId::parse("a".repeat(63)).unwrap_err(), + RadrootsIdParseError::InvalidLength { + expected: 64, + actual: 63 + } + ); + } + + #[test] + fn id_parse_errors_have_stable_display_messages() { + let errors = [ + RadrootsIdParseError::Empty, + RadrootsIdParseError::InvalidFormat, + RadrootsIdParseError::InvalidLength { + expected: 64, + actual: 7, + }, + RadrootsIdParseError::InvalidCharacter, + RadrootsIdParseError::InvalidPublicKey, + RadrootsIdParseError::UnexpectedKind { + expected: KIND_CLASSIFIED_LISTING, + actual: 30023, + }, + RadrootsIdParseError::TooLong { + max: 128, + actual: 129, + }, + ]; + + for error in errors { + assert!(!error.to_string().is_empty()); + } + assert_eq!( + RadrootsIdParseError::UnexpectedKind { + expected: KIND_CLASSIFIED_LISTING, + actual: 30023, + } + .to_string(), + "identifier kind 30023 does not match required kind 30402" + ); + } + + #[test] + fn signatures_require_128_hex_chars() { + let signature = RadrootsEventSignature::parse(hex_128('B')).expect("signature"); + assert_eq!(signature.to_hex(), "b".repeat(128)); + assert_eq!( + RadrootsEventSignature::parse(hex_64('b')).unwrap_err(), + RadrootsIdParseError::InvalidLength { + expected: 128, + actual: 64 + } + ); + } + + #[test] + fn trade_semantic_ids_use_protocol_sized_hex() { + let trade_id = RadrootsTradeId::parse(hex_32('A')).expect("trade id"); + assert_eq!(trade_id.to_hex(), hex_32('a')); + assert_eq!( + RadrootsTradeId::parse(hex_64('a')).unwrap_err(), + RadrootsIdParseError::InvalidLength { + expected: 32, + actual: 64 + } + ); + assert_hex_identifier_impls!(RadrootsTradeId, &hex_32('a'), 16); + assert_hex_identifier_impls!(RadrootsTradeCandidateId, &hex_64('b'), 32); + assert_hex_identifier_impls!(RadrootsTradeMutationId, &hex_64('c'), 32); + } + + #[test] + fn d_tags_reject_empty_control_and_whitespace() { + assert_eq!( + RadrootsDTag::parse("").unwrap_err(), + RadrootsIdParseError::Empty + ); + assert_eq!( + RadrootsDTag::parse(" listing").unwrap_err(), + RadrootsIdParseError::InvalidCharacter + ); + assert_eq!( + RadrootsDTag::parse("listing\none").unwrap_err(), + RadrootsIdParseError::InvalidCharacter + ); + assert_eq!( + RadrootsDTag::parse("farm:farm-1:members") + .expect("d tag") + .as_str(), + "farm:farm-1:members" + ); + } + + #[test] + fn addressable_coordinates_validate_kind_pubkey_and_d_tag() { + let addr = format!("30402:{}:listing-1", hex_64('0')); + assert_eq!( + RadrootsAddressableCoordinate::parse(&addr) + .expect("coordinate") + .as_str(), + addr + ); + assert_eq!( + RadrootsClassifiedListingAddress::parse("30402:not_hex:listing-1").unwrap_err(), + RadrootsIdParseError::InvalidLength { + expected: 64, + actual: 7 + } + ); + assert_eq!( + RadrootsClassifiedListingAddress::parse(format!("30023:{}:listing-1", hex_64('0'))) + .unwrap_err(), + RadrootsIdParseError::UnexpectedKind { + expected: KIND_CLASSIFIED_LISTING, + actual: 30023, + } + ); + let canonical_pubkey = hex_64('a'); + for noncanonical_kind in ["030402", "+30402"] { + assert_eq!( + RadrootsClassifiedListingAddress::parse(format!( + "{noncanonical_kind}:{}:listing-1", + hex_64('A') + )) + .expect("classified listing coordinate") + .as_str(), + format!("30402:{canonical_pubkey}:listing-1") + ); + } + assert_eq!( + RadrootsAddressableCoordinate::parse("30402").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsAddressableCoordinate::parse(format!("bad:{}:listing-1", hex_64('a'))) + .unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsAddressableCoordinate::parse(format!("30402:{}:bad d", hex_64('0'))) + .unwrap_err(), + RadrootsIdParseError::InvalidCharacter + ); + + let noncanonical = format!("030402:{}:listing-1", hex_64('A')); + assert_eq!( + RadrootsAddressableCoordinate::parse(&noncanonical) + .expect("validated addressable coordinate") + .as_str(), + noncanonical + ); + } + + #[test] + fn binary_identifier_order_matches_canonical_hex_order() { + let lower = RadrootsEventId::from_bytes([0_u8; 32]); + let mut upper_bytes = [0_u8; 32]; + upper_bytes[31] = 1; + let upper = RadrootsEventId::from_bytes(upper_bytes); + + assert!(lower < upper); + assert!(lower.to_hex() < upper.to_hex()); + + let mut identifiers = [upper, lower]; + identifiers.sort(); + assert_eq!(identifiers, [lower, upper]); + } + + #[test] + fn addressable_coordinate_parts_parse_kind_pubkey_and_d_tag() { + let addr = format!("30402:{}:farm:farm-1:members", hex_64('A')); + let parts = RadrootsAddressableCoordinateParts::parse(&addr).expect("coordinate parts"); + assert_eq!(parts.kind, 30402); + assert_eq!(parts.pubkey.to_hex(), hex_64('a')); + assert_eq!(parts.d_tag.as_str(), "farm:farm-1:members"); + } + + #[test] + fn nip01_coordinates_cover_replaceable_and_addressable_kinds() { + for kind in [0, 3, 10_000, 19_999] { + let coordinate = RadrootsNip01Coordinate::parse(format!("+0{kind}:{}:", hex_64('A'))) + .expect("replaceable coordinate"); + assert_eq!(coordinate.kind(), kind); + assert_eq!(coordinate.pubkey().to_hex(), hex_64('a')); + assert_eq!(coordinate.identifier(), ""); + assert_eq!(coordinate.as_str(), format!("{kind}:{}:", hex_64('a'))); + } + + for kind in [30_000, 39_999] { + let coordinate = RadrootsNip01Coordinate::parse(format!("{kind}:{}:", hex_64('b'))) + .expect("empty addressable coordinate"); + assert_eq!(coordinate.kind(), kind); + assert_eq!(coordinate.identifier(), ""); + } + } + + #[test] + fn nip01_coordinate_identifier_is_opaque_after_second_colon() { + let identifier = " victoria:\u{0000}seed:\u{2603}\n"; + let coordinate = + RadrootsNip01Coordinate::parse(format!("030402:{}:{identifier}", hex_64('A'))) + .expect("opaque addressable coordinate"); + + assert_eq!(coordinate.kind(), 30_402); + assert_eq!(coordinate.pubkey().to_hex(), hex_64('a')); + assert_eq!(coordinate.identifier().as_bytes(), identifier.as_bytes()); + assert_eq!( + coordinate.as_str().as_bytes(), + format!("30402:{}:{identifier}", hex_64('a')).as_bytes() + ); + let parts = coordinate.parts(); + assert_eq!(parts.kind, 30_402); + assert_eq!(parts.pubkey.to_hex(), hex_64('a')); + assert_eq!(parts.identifier.as_bytes(), identifier.as_bytes()); + assert_eq!( + RadrootsNip01CoordinateParts::parse(coordinate.as_str()).expect("parts"), + parts + ); + } + + #[test] + fn nip01_coordinates_reject_unsupported_shapes_and_kinds() { + let pubkey = hex_64('a'); + assert_eq!( + RadrootsNip01Coordinate::parse("").unwrap_err(), + RadrootsNip01CoordinateParseError::Empty + ); + assert_eq!( + RadrootsNip01Coordinate::parse("30000").unwrap_err(), + RadrootsNip01CoordinateParseError::InvalidFormat + ); + assert_eq!( + RadrootsNip01Coordinate::parse("30000:bad:identifier").unwrap_err(), + RadrootsNip01CoordinateParseError::Pubkey(RadrootsIdParseError::InvalidLength { + expected: 64, + actual: 3 + }) + ); + for kind in [1, 9_999, 20_000, 29_999, 40_000, u32::MAX] { + assert_eq!( + RadrootsNip01Coordinate::parse(format!("{kind}:{pubkey}:")).unwrap_err(), + RadrootsNip01CoordinateParseError::UnsupportedKind { actual: kind } + ); + } + for kind in [0, 3, 10_000, 19_999] { + assert_eq!( + RadrootsNip01Coordinate::parse(format!("{kind}:{pubkey}:not-empty")).unwrap_err(), + RadrootsNip01CoordinateParseError::IdentifierMustBeEmpty { kind } + ); + } + assert_eq!( + RadrootsNip01Coordinate::parse(format!("30000:{pubkey}")).unwrap_err(), + RadrootsNip01CoordinateParseError::InvalidFormat + ); + } + + #[test] + fn nip01_coordinate_errors_and_policy_limit_are_explicit() { + assert_eq!( + RADROOTS_NIP01_COORDINATE_MAX_BYTES, + crate::wire::v1::DEFAULT_TAG_ELEMENT_MAX_BYTES + ); + let errors = [ + RadrootsNip01CoordinateParseError::Empty, + RadrootsNip01CoordinateParseError::InvalidFormat, + RadrootsNip01CoordinateParseError::Pubkey(RadrootsIdParseError::InvalidCharacter), + RadrootsNip01CoordinateParseError::UnsupportedKind { actual: 20_000 }, + RadrootsNip01CoordinateParseError::IdentifierMustBeEmpty { kind: 10_000 }, + RadrootsNip01CoordinateParseError::TooLong { + max: RADROOTS_NIP01_COORDINATE_MAX_BYTES, + actual: RADROOTS_NIP01_COORDINATE_MAX_BYTES + 1, + }, + ]; + for error in errors { + assert!(!error.to_string().is_empty()); + } + } + + #[test] + fn nip01_coordinate_enforces_entire_element_byte_limit() { + let prefix = format!("30000:{}:", hex_64('a')); + let exact = format!( + "{prefix}{}", + "x".repeat(RADROOTS_NIP01_COORDINATE_MAX_BYTES - prefix.len()) + ); + let coordinate = + RadrootsNip01Coordinate::parse(&exact).expect("exact coordinate byte limit"); + assert_eq!( + coordinate.as_str().len(), + RADROOTS_NIP01_COORDINATE_MAX_BYTES + ); + + assert_eq!( + RadrootsNip01Coordinate::parse(format!("{exact}x")).unwrap_err(), + RadrootsNip01CoordinateParseError::TooLong { + max: RADROOTS_NIP01_COORDINATE_MAX_BYTES, + actual: RADROOTS_NIP01_COORDINATE_MAX_BYTES + 1, + } + ); + } + + #[test] + fn nip01_coordinate_enforces_multibyte_boundary_by_utf8_bytes() { + let prefix = format!("30000:{}:", hex_64('a')); + let remaining = RADROOTS_NIP01_COORDINATE_MAX_BYTES - prefix.len(); + let identifier = format!("{}x", "\u{00e9}".repeat((remaining - 1) / 2)); + let exact = format!("{prefix}{identifier}"); + assert_eq!(exact.len(), RADROOTS_NIP01_COORDINATE_MAX_BYTES); + RadrootsNip01Coordinate::parse(&exact).expect("exact multibyte coordinate limit"); + + let overflow = format!("{exact}x"); + assert_eq!( + RadrootsNip01Coordinate::parse(&overflow).unwrap_err(), + RadrootsNip01CoordinateParseError::TooLong { + max: RADROOTS_NIP01_COORDINATE_MAX_BYTES, + actual: RADROOTS_NIP01_COORDINATE_MAX_BYTES + 1, + } + ); + } + + #[test] + fn nip01_coordinate_exposes_explicit_text_and_validating_serde() { + let value = format!("30000:{}:farm:victoria", hex_64('a')); + let coordinate = RadrootsNip01Coordinate::parse(&value).expect("coordinate"); + assert_eq!(coordinate.as_ref(), value); + assert_eq!(coordinate.to_string(), value); + assert_eq!( + RadrootsNip01Coordinate::from_str(&value).expect("from str"), + coordinate + ); + assert_eq!( + RadrootsNip01Coordinate::try_from(value.clone()).expect("try from string"), + coordinate + ); + assert_eq!(String::from(coordinate.clone()), value); + + let encoded = serde_json::to_string(&coordinate).expect("serialize"); + assert_eq!( + serde_json::from_str::<RadrootsNip01Coordinate>(&encoded).expect("deserialize"), + coordinate + ); + assert!(serde_json::from_str::<RadrootsNip01Coordinate>("\"1:bad:\"").is_err()); + } + + #[test] + fn commercial_ids_reject_empty_whitespace_control_and_long_values() { + assert_eq!( + RadrootsOrderId::parse("order-1") + .expect("order id") + .as_str(), + "order-1" + ); + assert_eq!( + RadrootsInventoryBinId::parse("a".repeat(129)).unwrap_err(), + RadrootsIdParseError::TooLong { + max: 128, + actual: 129 + } + ); + } + + #[test] + fn economics_digest_accepts_sha256_and_existing_wire_tokens() { + let digest = format!("sha256:{}", hex_64('c')); + assert_eq!( + RadrootsEconomicsDigest::parse(&digest) + .expect("digest") + .as_str(), + digest + ); + assert_eq!( + RadrootsEconomicsDigest::parse("digest-1") + .expect("wire v1 digest") + .as_str(), + "digest-1" + ); + assert_eq!( + RadrootsEconomicsDigest::parse("sha256:not-hex").unwrap_err(), + RadrootsIdParseError::InvalidLength { + expected: 64, + actual: 7 + } + ); + } + + #[test] + fn validated_types_do_not_offer_infallible_string_conversion() { + let id = RadrootsOrderQuoteId::try_from(String::from("quote-1")).expect("quote id"); + assert_eq!(id.as_ref(), "quote-1"); + let parsed: RadrootsEventPointer = hex_64('d').parse().expect("event pointer"); + assert_eq!(parsed.to_hex(), hex_64('d')); + } + + #[test] + fn validated_identifier_wrappers_expose_consistent_traits() { + let addressable = format!("30402:{}:listing-1", hex_64('0')); + + assert_hex_identifier_impls!(RadrootsEventId, hex_64('b').as_str(), 32); + assert_hex_identifier_impls!(RadrootsEventSignature, hex_128('c').as_str(), 64); + assert_string_identifier_impls!(RadrootsDTag, "listing-1"); + assert_string_identifier_impls!(RadrootsAddressableCoordinate, addressable.as_str()); + assert_string_identifier_impls!(RadrootsClassifiedListingAddress, addressable.as_str()); + assert_string_identifier_impls!(RadrootsOrderId, "order-1"); + assert_string_identifier_impls!(RadrootsOrderQuoteId, "quote-1"); + assert_string_identifier_impls!(RadrootsInventoryBinId, "bin-1"); + assert_string_identifier_impls!(RadrootsEconomicsDigest, "digest-1"); + assert_hex_identifier_impls!(RadrootsEventPointer, hex_64('d').as_str(), 32); + assert_string_identifier_impls!(RadrootsRelayUrl, "wss://relay.example.com"); + } + + #[test] + fn relay_urls_require_valid_websocket_urls() { + assert_eq!( + RadrootsRelayUrl::parse("ws://relay.example.com") + .expect("relay url") + .as_str(), + "ws://relay.example.com" + ); + assert_eq!( + RadrootsRelayUrl::parse("wss://relay.example.com") + .expect("relay url") + .as_str(), + "wss://relay.example.com" + ); + assert!(relay_url_is_valid("wss://relay.example.com")); + assert_eq!( + RadrootsRelayUrl::parse("").unwrap_err(), + RadrootsIdParseError::Empty + ); + assert_eq!( + RadrootsRelayUrl::parse("http://relay.example.com").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsRelayUrl::parse("WSS://relay.example.com").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsRelayUrl::parse("ws://").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsRelayUrl::parse("wss://").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsRelayUrl::parse(" wss://relay.example.com").unwrap_err(), + RadrootsIdParseError::InvalidCharacter + ); + assert_eq!( + RadrootsRelayUrl::parse("wss://relay.example.com\nmiddle").unwrap_err(), + RadrootsIdParseError::InvalidCharacter + ); + assert_eq!( + RadrootsRelayUrl::parse("wss://user@relay.example.com").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsRelayUrl::parse("wss://user:secret@relay.example.com").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsRelayUrl::parse("wss://relay.example.com#read").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsRelayUrl::parse("wss://relay.example.com:0").unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsRelayUrl::parse("wss://relay.example.com/nostr/v1?region=ca-bc") + .expect("relay URL with path and query") + .as_str(), + "wss://relay.example.com/nostr/v1?region=ca-bc" + ); + } + + #[test] + fn nostr_event_pointers_validate_relay_values() { + let event_id = RadrootsEventId::parse(hex_64('e')).expect("event id"); + let pointer = RadrootsEventEnvelopePointer::new( + event_id, + ["wss://relay.one.example", "wss://relay.two.example"], + ) + .expect("pointer"); + + assert_eq!(pointer.event_id, event_id); + assert_eq!( + pointer.relays, + vec![ + "wss://relay.one.example".to_owned(), + "wss://relay.two.example".to_owned() + ] + ); + + assert_eq!( + RadrootsEventEnvelopePointer::new( + RadrootsEventId::parse(hex_64('e')).expect("event id"), + [""], + ) + .unwrap_err(), + RadrootsIdParseError::Empty + ); + assert_eq!( + RadrootsEventEnvelopePointer::new( + RadrootsEventId::parse(hex_64('e')).expect("event id"), + ["http://relay.example"], + ) + .unwrap_err(), + RadrootsIdParseError::InvalidFormat + ); + assert_eq!( + RadrootsEventEnvelopePointer::new( + RadrootsEventId::parse(hex_64('e')).expect("event id"), + [" wss://relay.example"], + ) + .unwrap_err(), + RadrootsIdParseError::InvalidCharacter + ); + assert_eq!( + RadrootsEventEnvelopePointer::new( + RadrootsEventId::parse(hex_64('e')).expect("event id"), + ["wss://relay.example\n"], + ) + .unwrap_err(), + RadrootsIdParseError::InvalidCharacter + ); + } + + #[cfg(feature = "serde")] + #[test] + fn serde_deserialization_validates_identifiers() { + let encoded = format!("\"{}\"", hex_64('E')); + let event_id: RadrootsEventId = serde_json::from_str(&encoded).expect("event id"); + assert_eq!(event_id.to_hex(), hex_64('e')); + + let invalid = serde_json::from_str::<RadrootsOrderId>("\"bad id\""); + assert!(invalid.is_err()); + assert_eq!( + serde_json::to_string(&event_id).expect("json"), + format!("\"{}\"", hex_64('e')) + ); + } + + #[cfg(feature = "serde")] + #[test] + fn serde_missing_fields_exercise_identifier_deserializers() { + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingPublicKey { + value: PublicKey, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingEventId { + value: RadrootsEventId, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingEventSignature { + value: RadrootsEventSignature, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingTradeId { + value: RadrootsTradeId, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingTradeCandidateId { + value: RadrootsTradeCandidateId, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingTradeMutationId { + value: RadrootsTradeMutationId, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingDTag { + value: RadrootsDTag, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingClassifiedListingAddress { + value: RadrootsClassifiedListingAddress, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingAddressableCoordinate { + value: RadrootsAddressableCoordinate, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingOrderId { + value: RadrootsOrderId, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingOrderQuoteId { + value: RadrootsOrderQuoteId, + } + #[allow(dead_code)] + #[derive(Debug, serde::Deserialize)] + struct MissingInventoryBinId { + value: RadrootsInventoryBinId, + } + + fn missing_field_message<T>() -> String + where + T: serde::de::DeserializeOwned + core::fmt::Debug, + { + serde_json::from_str::<T>("{}") + .expect_err("missing field") + .to_string() + } + + let missing = "missing field `value` at line 1 column 2"; + assert_eq!(missing_field_message::<MissingPublicKey>(), missing); + assert_eq!(missing_field_message::<MissingEventId>(), missing); + assert_eq!(missing_field_message::<MissingEventSignature>(), missing); + assert_eq!(missing_field_message::<MissingTradeId>(), missing); + assert_eq!(missing_field_message::<MissingTradeCandidateId>(), missing); + assert_eq!(missing_field_message::<MissingTradeMutationId>(), missing); + assert_eq!(missing_field_message::<MissingDTag>(), missing); + assert_eq!( + missing_field_message::<MissingClassifiedListingAddress>(), + missing + ); + assert_eq!( + missing_field_message::<MissingAddressableCoordinate>(), + missing + ); + assert_eq!(missing_field_message::<MissingOrderId>(), missing); + assert_eq!(missing_field_message::<MissingOrderQuoteId>(), missing); + assert_eq!(missing_field_message::<MissingInventoryBinId>(), missing); + + let order: RadrootsOrderId = + serde_json::from_value(serde_json::json!("order-1")).expect("order from value"); + let listing: RadrootsClassifiedListingAddress = serde_json::from_value(serde_json::json!( + format!("30402:{}:listing-1", hex_64('a')) + )) + .expect("listing from value"); + let quote: RadrootsOrderQuoteId = + serde_json::from_value(serde_json::json!("quote-1")).expect("quote from value"); + assert_eq!(order.as_str(), "order-1"); + assert_eq!(listing.as_str().split(':').next(), Some("30402")); + assert_eq!(quote.as_str(), "quote-1"); + } +} diff --git a/crates/event/src/ids.rs b/crates/event/src/ids.rs @@ -1,1499 +0,0 @@ -#![forbid(unsafe_code)] - -#[cfg(not(feature = "std"))] -use alloc::{format, string::String, string::ToString, vec::Vec}; - -#[cfg(feature = "std")] -use std::{string::String, vec::Vec}; - -use core::{ - fmt::{self, Write as _}, - str::FromStr, -}; -use radroots_identity::PublicKey; -use url_nostd::Url; - -use crate::kinds::KIND_CLASSIFIED_LISTING; - -#[derive(Clone, Debug, PartialEq, Eq)] -pub enum RadrootsIdParseError { - Empty, - InvalidFormat, - InvalidLength { expected: usize, actual: usize }, - InvalidCharacter, - InvalidPublicKey, - UnexpectedKind { expected: u32, actual: u32 }, - TooLong { max: usize, actual: usize }, -} - -impl fmt::Display for RadrootsIdParseError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Empty => write!(f, "identifier is empty"), - Self::InvalidFormat => write!(f, "identifier has invalid format"), - Self::InvalidLength { expected, actual } => { - write!( - f, - "identifier length {actual} does not match required length {expected}" - ) - } - Self::InvalidCharacter => write!(f, "identifier contains an invalid character"), - Self::InvalidPublicKey => { - write!(f, "identifier is not a valid secp256k1 x-only public key") - } - Self::UnexpectedKind { expected, actual } => { - write!( - f, - "identifier kind {actual} does not match required kind {expected}" - ) - } - Self::TooLong { max, actual } => { - write!(f, "identifier length {actual} exceeds maximum length {max}") - } - } - } -} - -#[cfg(feature = "std")] -impl std::error::Error for RadrootsIdParseError {} - -macro_rules! validated_string_id { - ($name:ident, $validator:ident) => { - #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] - #[cfg_attr(feature = "dto-bindgen", dto(as = "string"))] - #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct $name(String); - - impl $name { - pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsIdParseError> { - $validator(value.as_ref()).map(Self) - } - - #[inline] - pub fn as_str(&self) -> &str { - self.0.as_str() - } - - #[inline] - pub fn into_string(self) -> String { - self.0 - } - } - - impl AsRef<str> for $name { - #[inline] - fn as_ref(&self) -> &str { - self.as_str() - } - } - - impl From<$name> for String { - #[inline] - fn from(value: $name) -> Self { - value.into_string() - } - } - - impl fmt::Display for $name { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str(self.as_str()) - } - } - - impl FromStr for $name { - type Err = RadrootsIdParseError; - - fn from_str(value: &str) -> Result<Self, Self::Err> { - Self::parse(value) - } - } - - impl TryFrom<&str> for $name { - type Error = RadrootsIdParseError; - - fn try_from(value: &str) -> Result<Self, Self::Error> { - Self::parse(value) - } - } - - impl TryFrom<String> for $name { - type Error = RadrootsIdParseError; - - fn try_from(value: String) -> Result<Self, Self::Error> { - Self::parse(value) - } - } - - #[cfg(any(feature = "serde", test))] - impl serde::Serialize for $name { - fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> - where - S: serde::Serializer, - { - serializer.serialize_str(self.as_str()) - } - } - - #[cfg(any(feature = "serde", test))] - impl<'de> serde::Deserialize<'de> for $name { - fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> - where - D: serde::Deserializer<'de>, - { - let value = String::deserialize(deserializer)?; - Self::parse(value).map_err(serde::de::Error::custom) - } - } - }; -} - -macro_rules! validated_hex_id { - ($name:ident, $byte_len:expr) => { - #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] - #[cfg_attr(feature = "dto-bindgen", dto(as = "string"))] - #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - pub struct $name([u8; $byte_len]); - - impl $name { - pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsIdParseError> { - decode_hex::<$byte_len>(value.as_ref()).map(Self) - } - - #[inline] - pub const fn from_bytes(bytes: [u8; $byte_len]) -> Self { - Self(bytes) - } - - #[inline] - pub const fn as_bytes(&self) -> &[u8; $byte_len] { - &self.0 - } - - #[inline] - pub const fn into_bytes(self) -> [u8; $byte_len] { - self.0 - } - - pub fn to_hex(&self) -> String { - encode_hex(self.0.as_slice()) - } - - #[inline] - pub fn into_string(self) -> String { - self.to_hex() - } - } - - impl AsRef<[u8]> for $name { - #[inline] - fn as_ref(&self) -> &[u8] { - self.0.as_slice() - } - } - - impl From<[u8; $byte_len]> for $name { - #[inline] - fn from(bytes: [u8; $byte_len]) -> Self { - Self::from_bytes(bytes) - } - } - - impl From<$name> for [u8; $byte_len] { - #[inline] - fn from(value: $name) -> Self { - value.into_bytes() - } - } - - impl fmt::Display for $name { - fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - write_hex(formatter, self.0.as_slice()) - } - } - - impl FromStr for $name { - type Err = RadrootsIdParseError; - - fn from_str(value: &str) -> Result<Self, Self::Err> { - Self::parse(value) - } - } - - impl TryFrom<&str> for $name { - type Error = RadrootsIdParseError; - - fn try_from(value: &str) -> Result<Self, Self::Error> { - Self::parse(value) - } - } - - impl TryFrom<String> for $name { - type Error = RadrootsIdParseError; - - fn try_from(value: String) -> Result<Self, Self::Error> { - Self::parse(value) - } - } - - #[cfg(any(feature = "serde", test))] - impl serde::Serialize for $name { - fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> - where - S: serde::Serializer, - { - serializer.collect_str(self) - } - } - - #[cfg(any(feature = "serde", test))] - impl<'de> serde::Deserialize<'de> for $name { - fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> - where - D: serde::Deserializer<'de>, - { - let value = String::deserialize(deserializer)?; - Self::parse(value).map_err(serde::de::Error::custom) - } - } - }; -} - -validated_hex_id!(RadrootsEventId, 32); -validated_hex_id!(RadrootsEventSignature, 64); -validated_hex_id!(RadrootsTradeId, 16); -validated_hex_id!(RadrootsTradeCandidateId, 32); -validated_hex_id!(RadrootsTradeMutationId, 32); -validated_string_id!(RadrootsDTag, validate_d_tag); -validated_string_id!( - RadrootsAddressableCoordinate, - validate_addressable_coordinate -); -validated_string_id!( - RadrootsClassifiedListingAddress, - validate_classified_listing_address -); -validated_string_id!(RadrootsOrderId, validate_commercial_id); -validated_string_id!(RadrootsOrderQuoteId, validate_commercial_id); -validated_string_id!(RadrootsInventoryBinId, validate_commercial_id); -validated_string_id!(RadrootsEconomicsDigest, validate_economics_digest); -validated_hex_id!(RadrootsEventPointer, 32); -validated_string_id!(RadrootsRelayUrl, validate_relay_url); - -pub(crate) fn parse_public_key(value: impl AsRef<str>) -> Result<PublicKey, RadrootsIdParseError> { - PublicKey::from_hex(value.as_ref()).map_err(|error| match error { - radroots_identity::Error::InvalidHexLength { expected, actual } - | radroots_identity::Error::InvalidByteLength { expected, actual } => { - RadrootsIdParseError::InvalidLength { expected, actual } - } - radroots_identity::Error::InvalidHexCharacter { .. } => { - RadrootsIdParseError::InvalidCharacter - } - _ => RadrootsIdParseError::InvalidPublicKey, - }) -} - -/// Radroots tag-element policy for a NIP-01 coordinate. -/// -/// NIP-01 does not define this resource limit. -pub const RADROOTS_NIP01_COORDINATE_MAX_BYTES: usize = - crate::wire::v1::DEFAULT_TAG_ELEMENT_MAX_BYTES; - -#[non_exhaustive] -#[derive(Clone, Debug, PartialEq, Eq)] -pub enum RadrootsNip01CoordinateParseError { - Empty, - InvalidFormat, - Pubkey(RadrootsIdParseError), - UnsupportedKind { actual: u32 }, - IdentifierMustBeEmpty { kind: u32 }, - TooLong { max: usize, actual: usize }, -} - -impl fmt::Display for RadrootsNip01CoordinateParseError { - fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Empty => formatter.write_str("NIP-01 coordinate is empty"), - Self::InvalidFormat => formatter.write_str("NIP-01 coordinate has invalid format"), - Self::Pubkey(error) => { - write!(formatter, "NIP-01 coordinate pubkey is invalid: {error}") - } - Self::UnsupportedKind { actual } => write!( - formatter, - "NIP-01 coordinate kind {actual} is not replaceable or addressable" - ), - Self::IdentifierMustBeEmpty { kind } => write!( - formatter, - "NIP-01 coordinate identifier must be empty for replaceable kind {kind}" - ), - Self::TooLong { max, actual } => write!( - formatter, - "NIP-01 coordinate is {actual} bytes; Radroots tag-element max is {max}" - ), - } - } -} - -#[cfg(feature = "std")] -impl std::error::Error for RadrootsNip01CoordinateParseError { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - match self { - Self::Pubkey(error) => Some(error), - _ => None, - } - } -} - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct RadrootsNip01CoordinateParts { - pub kind: u32, - pub pubkey: PublicKey, - pub identifier: String, -} - -impl RadrootsNip01CoordinateParts { - pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsNip01CoordinateParseError> { - RadrootsNip01Coordinate::parse(value).map(RadrootsNip01Coordinate::into_parts) - } -} - -/// A canonical NIP-01 replaceable or addressable event coordinate. -/// -/// Parsing splits only the first two `:` delimiters. The remaining identifier -/// is opaque protocol data and is preserved byte-for-byte. -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct RadrootsNip01Coordinate { - canonical: String, - kind: u32, - pubkey: PublicKey, - identifier: String, -} - -impl RadrootsNip01Coordinate { - pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsNip01CoordinateParseError> { - let value = value.as_ref(); - if value.is_empty() { - return Err(RadrootsNip01CoordinateParseError::Empty); - } - if value.len() > RADROOTS_NIP01_COORDINATE_MAX_BYTES { - return Err(RadrootsNip01CoordinateParseError::TooLong { - max: RADROOTS_NIP01_COORDINATE_MAX_BYTES, - actual: value.len(), - }); - } - - let (kind, remainder) = value - .split_once(':') - .ok_or(RadrootsNip01CoordinateParseError::InvalidFormat)?; - let (pubkey, identifier) = remainder - .split_once(':') - .ok_or(RadrootsNip01CoordinateParseError::InvalidFormat)?; - let kind = kind - .parse::<u32>() - .map_err(|_| RadrootsNip01CoordinateParseError::InvalidFormat)?; - let requires_empty_identifier = matches!(kind, 0 | 3) || (10_000..=19_999).contains(&kind); - if !requires_empty_identifier && !(30_000..=39_999).contains(&kind) { - return Err(RadrootsNip01CoordinateParseError::UnsupportedKind { actual: kind }); - } - if requires_empty_identifier && !identifier.is_empty() { - return Err(RadrootsNip01CoordinateParseError::IdentifierMustBeEmpty { kind }); - } - - let pubkey = parse_public_key(pubkey).map_err(RadrootsNip01CoordinateParseError::Pubkey)?; - let identifier = identifier.to_string(); - let canonical = format!("{kind}:{pubkey}:{identifier}"); - Ok(Self { - canonical, - kind, - pubkey, - identifier, - }) - } - - #[inline] - pub fn as_str(&self) -> &str { - self.canonical.as_str() - } - - #[inline] - pub const fn kind(&self) -> u32 { - self.kind - } - - #[inline] - pub const fn pubkey(&self) -> &PublicKey { - &self.pubkey - } - - #[inline] - pub fn identifier(&self) -> &str { - self.identifier.as_str() - } - - #[inline] - pub fn parts(&self) -> RadrootsNip01CoordinateParts { - RadrootsNip01CoordinateParts { - kind: self.kind, - pubkey: self.pubkey, - identifier: self.identifier.clone(), - } - } - - #[inline] - pub fn into_parts(self) -> RadrootsNip01CoordinateParts { - RadrootsNip01CoordinateParts { - kind: self.kind, - pubkey: self.pubkey, - identifier: self.identifier, - } - } - - #[inline] - pub fn into_string(self) -> String { - self.canonical - } -} - -impl AsRef<str> for RadrootsNip01Coordinate { - #[inline] - fn as_ref(&self) -> &str { - self.as_str() - } -} - -impl From<RadrootsNip01Coordinate> for String { - #[inline] - fn from(value: RadrootsNip01Coordinate) -> Self { - value.into_string() - } -} - -impl fmt::Display for RadrootsNip01Coordinate { - fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - formatter.write_str(self.as_str()) - } -} - -impl FromStr for RadrootsNip01Coordinate { - type Err = RadrootsNip01CoordinateParseError; - - fn from_str(value: &str) -> Result<Self, Self::Err> { - Self::parse(value) - } -} - -impl TryFrom<&str> for RadrootsNip01Coordinate { - type Error = RadrootsNip01CoordinateParseError; - - fn try_from(value: &str) -> Result<Self, Self::Error> { - Self::parse(value) - } -} - -impl TryFrom<String> for RadrootsNip01Coordinate { - type Error = RadrootsNip01CoordinateParseError; - - fn try_from(value: String) -> Result<Self, Self::Error> { - Self::parse(value) - } -} - -#[cfg(any(feature = "serde", test))] -impl serde::Serialize for RadrootsNip01Coordinate { - fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> - where - S: serde::Serializer, - { - serializer.serialize_str(self.as_str()) - } -} - -#[cfg(any(feature = "serde", test))] -impl<'de> serde::Deserialize<'de> for RadrootsNip01Coordinate { - fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> - where - D: serde::Deserializer<'de>, - { - let value = <String as serde::Deserialize>::deserialize(deserializer)?; - Self::parse(value).map_err(serde::de::Error::custom) - } -} - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct RadrootsAddressableCoordinateParts { - pub kind: u32, - pub pubkey: PublicKey, - pub d_tag: RadrootsDTag, -} - -impl RadrootsAddressableCoordinateParts { - pub fn parse(value: impl AsRef<str>) -> Result<Self, RadrootsIdParseError> { - parse_addressable_coordinate_parts(value.as_ref()) - } -} - -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct RadrootsEventEnvelopePointer { - pub event_id: RadrootsEventId, - pub relays: Vec<String>, -} - -impl RadrootsEventEnvelopePointer { - pub fn new<I, S>(event_id: RadrootsEventId, relays: I) -> Result<Self, RadrootsIdParseError> - where - I: IntoIterator<Item = S>, - S: Into<String>, - { - let mut canonical_relays = Vec::new(); - for relay in relays { - let relay = relay.into(); - RadrootsRelayUrl::parse(relay.as_str())?; - canonical_relays.push(relay); - } - Ok(Self { - event_id, - relays: canonical_relays, - }) - } -} - -fn decode_hex<const N: usize>(value: &str) -> Result<[u8; N], RadrootsIdParseError> { - let expected = N * 2; - if value.len() != expected { - return Err(RadrootsIdParseError::InvalidLength { - expected, - actual: value.len(), - }); - } - - let mut decoded = [0_u8; N]; - for (index, pair) in value.as_bytes().chunks_exact(2).enumerate() { - decoded[index] = (decode_hex_nibble(pair[0])? << 4) | decode_hex_nibble(pair[1])?; - } - Ok(decoded) -} - -fn decode_hex_nibble(value: u8) -> Result<u8, RadrootsIdParseError> { - match value { - b'0'..=b'9' => Ok(value - b'0'), - b'a'..=b'f' => Ok(value - b'a' + 10), - b'A'..=b'F' => Ok(value - b'A' + 10), - _ => Err(RadrootsIdParseError::InvalidCharacter), - } -} - -fn encode_hex(bytes: &[u8]) -> String { - const LOWER_HEX: &[u8; 16] = b"0123456789abcdef"; - let mut encoded = String::with_capacity(bytes.len() * 2); - for byte in bytes { - encoded.push(LOWER_HEX[usize::from(byte >> 4)] as char); - encoded.push(LOWER_HEX[usize::from(byte & 0x0f)] as char); - } - encoded -} - -fn write_hex(formatter: &mut fmt::Formatter<'_>, bytes: &[u8]) -> fmt::Result { - for byte in bytes { - formatter.write_char(lower_hex_digit(byte >> 4))?; - formatter.write_char(lower_hex_digit(byte & 0x0f))?; - } - Ok(()) -} - -const fn lower_hex_digit(value: u8) -> char { - match value { - 0..=9 => (b'0' + value) as char, - _ => (b'a' + value - 10) as char, - } -} - -fn validate_hex(value: &str, expected_len: usize) -> Result<String, RadrootsIdParseError> { - if value.len() != expected_len { - return Err(RadrootsIdParseError::InvalidLength { - expected: expected_len, - actual: value.len(), - }); - } - - let mut canonical = String::with_capacity(expected_len); - for byte in value.bytes() { - match byte { - b'0'..=b'9' => canonical.push(byte as char), - b'a'..=b'f' => canonical.push(byte as char), - b'A'..=b'F' => canonical.push((byte + 32) as char), - _ => return Err(RadrootsIdParseError::InvalidCharacter), - } - } - Ok(canonical) -} - -fn validate_d_tag(value: &str) -> Result<String, RadrootsIdParseError> { - validate_visible_token(value, 512) -} - -fn validate_commercial_id(value: &str) -> Result<String, RadrootsIdParseError> { - validate_visible_token(value, 128) -} - -fn validate_economics_digest(value: &str) -> Result<String, RadrootsIdParseError> { - if let Some(hex) = value.strip_prefix("sha256:") { - validate_hex(hex, 64)?; - return Ok(value.to_string()); - } - validate_visible_token(value, 128) -} - -fn validate_addressable_coordinate(value: &str) -> Result<String, RadrootsIdParseError> { - parse_addressable_coordinate_parts(value)?; - Ok(value.to_string()) -} - -fn validate_classified_listing_address(value: &str) -> Result<String, RadrootsIdParseError> { - let parts = parse_addressable_coordinate_parts(value)?; - if parts.kind != KIND_CLASSIFIED_LISTING { - return Err(RadrootsIdParseError::UnexpectedKind { - expected: KIND_CLASSIFIED_LISTING, - actual: parts.kind, - }); - } - Ok(format!( - "{}:{}:{}", - KIND_CLASSIFIED_LISTING, parts.pubkey, parts.d_tag - )) -} - -fn parse_addressable_coordinate_parts( - value: &str, -) -> Result<RadrootsAddressableCoordinateParts, RadrootsIdParseError> { - let (kind, remainder) = value - .split_once(':') - .ok_or(RadrootsIdParseError::InvalidFormat)?; - let (pubkey, d_tag) = remainder - .split_once(':') - .ok_or(RadrootsIdParseError::InvalidFormat)?; - let kind = kind - .parse::<u32>() - .map_err(|_| RadrootsIdParseError::InvalidFormat)?; - let pubkey = parse_public_key(pubkey)?; - let d_tag = RadrootsDTag::parse(d_tag)?; - Ok(RadrootsAddressableCoordinateParts { - kind, - pubkey, - d_tag, - }) -} - -fn validate_visible_token(value: &str, max_len: usize) -> Result<String, RadrootsIdParseError> { - if value.is_empty() { - return Err(RadrootsIdParseError::Empty); - } - if value.len() > max_len { - return Err(RadrootsIdParseError::TooLong { - max: max_len, - actual: value.len(), - }); - } - if value.trim() != value - || value - .chars() - .any(|character| character.is_control() || character.is_whitespace()) - { - return Err(RadrootsIdParseError::InvalidCharacter); - } - Ok(value.to_string()) -} - -pub fn relay_url_is_valid(value: &str) -> bool { - validate_relay_url(value).is_ok() -} - -fn validate_relay_url(value: &str) -> Result<String, RadrootsIdParseError> { - if value.is_empty() { - return Err(RadrootsIdParseError::Empty); - } - if value - .chars() - .any(|character| character.is_control() || character.is_whitespace()) - { - return Err(RadrootsIdParseError::InvalidCharacter); - } - if !(value.starts_with("ws://") || value.starts_with("wss://")) { - return Err(RadrootsIdParseError::InvalidFormat); - } - - let parsed = Url::parse(value).map_err(|_| RadrootsIdParseError::InvalidFormat)?; - if !matches!(parsed.scheme(), "ws" | "wss") - || parsed.host_str().is_none_or(str::is_empty) - || !parsed.username().is_empty() - || parsed.password().is_some() - || parsed.fragment().is_some() - || parsed.port() == Some(0) - { - return Err(RadrootsIdParseError::InvalidFormat); - } - - // `Url::username` cannot distinguish absent userinfo from an empty userinfo field. - let authority = value - .split_once("://") - .map(|(_, remainder)| remainder.split(['/', '?', '#']).next().unwrap_or(remainder)) - .ok_or(RadrootsIdParseError::InvalidFormat)?; - if authority.contains('@') { - return Err(RadrootsIdParseError::InvalidFormat); - } - - Ok(value.to_string()) -} - -#[cfg(test)] -mod tests { - use super::*; - - macro_rules! assert_string_identifier_impls { - ($ty:ty, $value:expr) => {{ - let value = $value.to_owned(); - let value = value.as_str(); - let id = <$ty>::parse(value).expect("parse"); - - assert_eq!(id.as_str(), value); - assert_eq!(id.as_ref(), value); - assert_eq!(id.to_string(), value); - assert_eq!( - <$ty as core::str::FromStr>::from_str(value).expect("from str"), - id - ); - assert_eq!( - <$ty as TryFrom<&str>>::try_from(value).expect("try from str"), - id - ); - assert_eq!( - <$ty as TryFrom<String>>::try_from(value.to_owned()).expect("try from string"), - id - ); - let id = <$ty>::parse(value).expect("parse"); - let converted: String = String::from(id.clone()); - assert_eq!(converted, value); - assert_eq!(id.into_string(), value.to_owned()); - - #[cfg(any(feature = "serde", test))] - { - let id = <$ty>::parse(value).expect("parse"); - let encoded = serde_json::to_string(&id).expect("serialize"); - let decoded: $ty = serde_json::from_str(&encoded).expect("deserialize"); - assert_eq!(decoded.as_str(), value); - } - }}; - } - - macro_rules! assert_hex_identifier_impls { - ($ty:ty, $value:expr, $byte_len:expr) => {{ - let value = $value.to_owned(); - let value = value.as_str(); - let id = <$ty>::parse(value).expect("parse"); - - assert_eq!(id.to_hex(), value); - assert_eq!(id.as_bytes().len(), $byte_len); - assert_eq!(id.as_ref(), id.as_bytes()); - assert_eq!(id.to_string(), value); - assert_eq!( - <$ty as core::str::FromStr>::from_str(value).expect("from str"), - id - ); - assert_eq!( - <$ty as TryFrom<&str>>::try_from(value).expect("try from str"), - id - ); - assert_eq!( - <$ty as TryFrom<String>>::try_from(value.to_owned()).expect("try from string"), - id - ); - - let bytes = id.into_bytes(); - assert_eq!(<$ty>::from_bytes(bytes), id); - assert_eq!(id.into_string(), value.to_owned()); - - #[cfg(any(feature = "serde", test))] - { - let encoded = serde_json::to_string(&id).expect("serialize"); - let decoded: $ty = serde_json::from_str(&encoded).expect("deserialize"); - assert_eq!(decoded.to_hex(), value); - } - }}; - } - - fn hex_64(character: char) -> String { - crate::test_valid_hex_64(character) - } - - fn hex_32(character: char) -> String { - core::iter::repeat_n(character, 32).collect() - } - - fn hex_128(character: char) -> String { - core::iter::repeat_n(character, 128).collect() - } - - #[test] - fn public_keys_and_event_ids_require_64_hex_chars() { - let upper = "585591529DA0BAB31B3B1B1F986611CF5F435DCA84F978C89EE8A40CCA7103DF"; - let public_key = parse_public_key(upper).expect("public key"); - assert_eq!( - public_key.to_hex(), - "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df" - ); - - let event_id = RadrootsEventId::parse(hex_64('f')).expect("event id"); - assert_eq!(event_id.to_hex(), hex_64('f')); - assert_eq!( - RadrootsEventId::parse(" ".repeat(64)).unwrap_err(), - RadrootsIdParseError::InvalidCharacter - ); - assert_eq!( - RadrootsEventId::parse("a".repeat(63)).unwrap_err(), - RadrootsIdParseError::InvalidLength { - expected: 64, - actual: 63 - } - ); - } - - #[test] - fn id_parse_errors_have_stable_display_messages() { - let errors = [ - RadrootsIdParseError::Empty, - RadrootsIdParseError::InvalidFormat, - RadrootsIdParseError::InvalidLength { - expected: 64, - actual: 7, - }, - RadrootsIdParseError::InvalidCharacter, - RadrootsIdParseError::InvalidPublicKey, - RadrootsIdParseError::UnexpectedKind { - expected: KIND_CLASSIFIED_LISTING, - actual: 30023, - }, - RadrootsIdParseError::TooLong { - max: 128, - actual: 129, - }, - ]; - - for error in errors { - assert!(!error.to_string().is_empty()); - } - assert_eq!( - RadrootsIdParseError::UnexpectedKind { - expected: KIND_CLASSIFIED_LISTING, - actual: 30023, - } - .to_string(), - "identifier kind 30023 does not match required kind 30402" - ); - } - - #[test] - fn signatures_require_128_hex_chars() { - let signature = RadrootsEventSignature::parse(hex_128('B')).expect("signature"); - assert_eq!(signature.to_hex(), "b".repeat(128)); - assert_eq!( - RadrootsEventSignature::parse(hex_64('b')).unwrap_err(), - RadrootsIdParseError::InvalidLength { - expected: 128, - actual: 64 - } - ); - } - - #[test] - fn trade_semantic_ids_use_protocol_sized_hex() { - let trade_id = RadrootsTradeId::parse(hex_32('A')).expect("trade id"); - assert_eq!(trade_id.to_hex(), hex_32('a')); - assert_eq!( - RadrootsTradeId::parse(hex_64('a')).unwrap_err(), - RadrootsIdParseError::InvalidLength { - expected: 32, - actual: 64 - } - ); - assert_hex_identifier_impls!(RadrootsTradeId, &hex_32('a'), 16); - assert_hex_identifier_impls!(RadrootsTradeCandidateId, &hex_64('b'), 32); - assert_hex_identifier_impls!(RadrootsTradeMutationId, &hex_64('c'), 32); - } - - #[test] - fn d_tags_reject_empty_control_and_whitespace() { - assert_eq!( - RadrootsDTag::parse("").unwrap_err(), - RadrootsIdParseError::Empty - ); - assert_eq!( - RadrootsDTag::parse(" listing").unwrap_err(), - RadrootsIdParseError::InvalidCharacter - ); - assert_eq!( - RadrootsDTag::parse("listing\none").unwrap_err(), - RadrootsIdParseError::InvalidCharacter - ); - assert_eq!( - RadrootsDTag::parse("farm:farm-1:members") - .expect("d tag") - .as_str(), - "farm:farm-1:members" - ); - } - - #[test] - fn addressable_coordinates_validate_kind_pubkey_and_d_tag() { - let addr = format!("30402:{}:listing-1", hex_64('0')); - assert_eq!( - RadrootsAddressableCoordinate::parse(&addr) - .expect("coordinate") - .as_str(), - addr - ); - assert_eq!( - RadrootsClassifiedListingAddress::parse("30402:not_hex:listing-1").unwrap_err(), - RadrootsIdParseError::InvalidLength { - expected: 64, - actual: 7 - } - ); - assert_eq!( - RadrootsClassifiedListingAddress::parse(format!("30023:{}:listing-1", hex_64('0'))) - .unwrap_err(), - RadrootsIdParseError::UnexpectedKind { - expected: KIND_CLASSIFIED_LISTING, - actual: 30023, - } - ); - let canonical_pubkey = hex_64('a'); - for noncanonical_kind in ["030402", "+30402"] { - assert_eq!( - RadrootsClassifiedListingAddress::parse(format!( - "{noncanonical_kind}:{}:listing-1", - hex_64('A') - )) - .expect("classified listing coordinate") - .as_str(), - format!("30402:{canonical_pubkey}:listing-1") - ); - } - assert_eq!( - RadrootsAddressableCoordinate::parse("30402").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsAddressableCoordinate::parse(format!("bad:{}:listing-1", hex_64('a'))) - .unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsAddressableCoordinate::parse(format!("30402:{}:bad d", hex_64('0'))) - .unwrap_err(), - RadrootsIdParseError::InvalidCharacter - ); - - let noncanonical = format!("030402:{}:listing-1", hex_64('A')); - assert_eq!( - RadrootsAddressableCoordinate::parse(&noncanonical) - .expect("validated addressable coordinate") - .as_str(), - noncanonical - ); - } - - #[test] - fn binary_identifier_order_matches_canonical_hex_order() { - let lower = RadrootsEventId::from_bytes([0_u8; 32]); - let mut upper_bytes = [0_u8; 32]; - upper_bytes[31] = 1; - let upper = RadrootsEventId::from_bytes(upper_bytes); - - assert!(lower < upper); - assert!(lower.to_hex() < upper.to_hex()); - - let mut identifiers = [upper, lower]; - identifiers.sort(); - assert_eq!(identifiers, [lower, upper]); - } - - #[test] - fn addressable_coordinate_parts_parse_kind_pubkey_and_d_tag() { - let addr = format!("30402:{}:farm:farm-1:members", hex_64('A')); - let parts = RadrootsAddressableCoordinateParts::parse(&addr).expect("coordinate parts"); - assert_eq!(parts.kind, 30402); - assert_eq!(parts.pubkey.to_hex(), hex_64('a')); - assert_eq!(parts.d_tag.as_str(), "farm:farm-1:members"); - } - - #[test] - fn nip01_coordinates_cover_replaceable_and_addressable_kinds() { - for kind in [0, 3, 10_000, 19_999] { - let coordinate = RadrootsNip01Coordinate::parse(format!("+0{kind}:{}:", hex_64('A'))) - .expect("replaceable coordinate"); - assert_eq!(coordinate.kind(), kind); - assert_eq!(coordinate.pubkey().to_hex(), hex_64('a')); - assert_eq!(coordinate.identifier(), ""); - assert_eq!(coordinate.as_str(), format!("{kind}:{}:", hex_64('a'))); - } - - for kind in [30_000, 39_999] { - let coordinate = RadrootsNip01Coordinate::parse(format!("{kind}:{}:", hex_64('b'))) - .expect("empty addressable coordinate"); - assert_eq!(coordinate.kind(), kind); - assert_eq!(coordinate.identifier(), ""); - } - } - - #[test] - fn nip01_coordinate_identifier_is_opaque_after_second_colon() { - let identifier = " victoria:\u{0000}seed:\u{2603}\n"; - let coordinate = - RadrootsNip01Coordinate::parse(format!("030402:{}:{identifier}", hex_64('A'))) - .expect("opaque addressable coordinate"); - - assert_eq!(coordinate.kind(), 30_402); - assert_eq!(coordinate.pubkey().to_hex(), hex_64('a')); - assert_eq!(coordinate.identifier().as_bytes(), identifier.as_bytes()); - assert_eq!( - coordinate.as_str().as_bytes(), - format!("30402:{}:{identifier}", hex_64('a')).as_bytes() - ); - let parts = coordinate.parts(); - assert_eq!(parts.kind, 30_402); - assert_eq!(parts.pubkey.to_hex(), hex_64('a')); - assert_eq!(parts.identifier.as_bytes(), identifier.as_bytes()); - assert_eq!( - RadrootsNip01CoordinateParts::parse(coordinate.as_str()).expect("parts"), - parts - ); - } - - #[test] - fn nip01_coordinates_reject_unsupported_shapes_and_kinds() { - let pubkey = hex_64('a'); - assert_eq!( - RadrootsNip01Coordinate::parse("").unwrap_err(), - RadrootsNip01CoordinateParseError::Empty - ); - assert_eq!( - RadrootsNip01Coordinate::parse("30000").unwrap_err(), - RadrootsNip01CoordinateParseError::InvalidFormat - ); - assert_eq!( - RadrootsNip01Coordinate::parse("30000:bad:identifier").unwrap_err(), - RadrootsNip01CoordinateParseError::Pubkey(RadrootsIdParseError::InvalidLength { - expected: 64, - actual: 3 - }) - ); - for kind in [1, 9_999, 20_000, 29_999, 40_000, u32::MAX] { - assert_eq!( - RadrootsNip01Coordinate::parse(format!("{kind}:{pubkey}:")).unwrap_err(), - RadrootsNip01CoordinateParseError::UnsupportedKind { actual: kind } - ); - } - for kind in [0, 3, 10_000, 19_999] { - assert_eq!( - RadrootsNip01Coordinate::parse(format!("{kind}:{pubkey}:not-empty")).unwrap_err(), - RadrootsNip01CoordinateParseError::IdentifierMustBeEmpty { kind } - ); - } - assert_eq!( - RadrootsNip01Coordinate::parse(format!("30000:{pubkey}")).unwrap_err(), - RadrootsNip01CoordinateParseError::InvalidFormat - ); - } - - #[test] - fn nip01_coordinate_errors_and_policy_limit_are_explicit() { - assert_eq!( - RADROOTS_NIP01_COORDINATE_MAX_BYTES, - crate::wire::v1::DEFAULT_TAG_ELEMENT_MAX_BYTES - ); - let errors = [ - RadrootsNip01CoordinateParseError::Empty, - RadrootsNip01CoordinateParseError::InvalidFormat, - RadrootsNip01CoordinateParseError::Pubkey(RadrootsIdParseError::InvalidCharacter), - RadrootsNip01CoordinateParseError::UnsupportedKind { actual: 20_000 }, - RadrootsNip01CoordinateParseError::IdentifierMustBeEmpty { kind: 10_000 }, - RadrootsNip01CoordinateParseError::TooLong { - max: RADROOTS_NIP01_COORDINATE_MAX_BYTES, - actual: RADROOTS_NIP01_COORDINATE_MAX_BYTES + 1, - }, - ]; - for error in errors { - assert!(!error.to_string().is_empty()); - } - } - - #[test] - fn nip01_coordinate_enforces_entire_element_byte_limit() { - let prefix = format!("30000:{}:", hex_64('a')); - let exact = format!( - "{prefix}{}", - "x".repeat(RADROOTS_NIP01_COORDINATE_MAX_BYTES - prefix.len()) - ); - let coordinate = - RadrootsNip01Coordinate::parse(&exact).expect("exact coordinate byte limit"); - assert_eq!( - coordinate.as_str().len(), - RADROOTS_NIP01_COORDINATE_MAX_BYTES - ); - - assert_eq!( - RadrootsNip01Coordinate::parse(format!("{exact}x")).unwrap_err(), - RadrootsNip01CoordinateParseError::TooLong { - max: RADROOTS_NIP01_COORDINATE_MAX_BYTES, - actual: RADROOTS_NIP01_COORDINATE_MAX_BYTES + 1, - } - ); - } - - #[test] - fn nip01_coordinate_enforces_multibyte_boundary_by_utf8_bytes() { - let prefix = format!("30000:{}:", hex_64('a')); - let remaining = RADROOTS_NIP01_COORDINATE_MAX_BYTES - prefix.len(); - let identifier = format!("{}x", "\u{00e9}".repeat((remaining - 1) / 2)); - let exact = format!("{prefix}{identifier}"); - assert_eq!(exact.len(), RADROOTS_NIP01_COORDINATE_MAX_BYTES); - RadrootsNip01Coordinate::parse(&exact).expect("exact multibyte coordinate limit"); - - let overflow = format!("{exact}x"); - assert_eq!( - RadrootsNip01Coordinate::parse(&overflow).unwrap_err(), - RadrootsNip01CoordinateParseError::TooLong { - max: RADROOTS_NIP01_COORDINATE_MAX_BYTES, - actual: RADROOTS_NIP01_COORDINATE_MAX_BYTES + 1, - } - ); - } - - #[test] - fn nip01_coordinate_exposes_explicit_text_and_validating_serde() { - let value = format!("30000:{}:farm:victoria", hex_64('a')); - let coordinate = RadrootsNip01Coordinate::parse(&value).expect("coordinate"); - assert_eq!(coordinate.as_ref(), value); - assert_eq!(coordinate.to_string(), value); - assert_eq!( - RadrootsNip01Coordinate::from_str(&value).expect("from str"), - coordinate - ); - assert_eq!( - RadrootsNip01Coordinate::try_from(value.clone()).expect("try from string"), - coordinate - ); - assert_eq!(String::from(coordinate.clone()), value); - - let encoded = serde_json::to_string(&coordinate).expect("serialize"); - assert_eq!( - serde_json::from_str::<RadrootsNip01Coordinate>(&encoded).expect("deserialize"), - coordinate - ); - assert!(serde_json::from_str::<RadrootsNip01Coordinate>("\"1:bad:\"").is_err()); - } - - #[test] - fn commercial_ids_reject_empty_whitespace_control_and_long_values() { - assert_eq!( - RadrootsOrderId::parse("order-1") - .expect("order id") - .as_str(), - "order-1" - ); - assert_eq!( - RadrootsInventoryBinId::parse("a".repeat(129)).unwrap_err(), - RadrootsIdParseError::TooLong { - max: 128, - actual: 129 - } - ); - } - - #[test] - fn economics_digest_accepts_sha256_and_existing_wire_tokens() { - let digest = format!("sha256:{}", hex_64('c')); - assert_eq!( - RadrootsEconomicsDigest::parse(&digest) - .expect("digest") - .as_str(), - digest - ); - assert_eq!( - RadrootsEconomicsDigest::parse("digest-1") - .expect("wire v1 digest") - .as_str(), - "digest-1" - ); - assert_eq!( - RadrootsEconomicsDigest::parse("sha256:not-hex").unwrap_err(), - RadrootsIdParseError::InvalidLength { - expected: 64, - actual: 7 - } - ); - } - - #[test] - fn validated_types_do_not_offer_infallible_string_conversion() { - let id = RadrootsOrderQuoteId::try_from(String::from("quote-1")).expect("quote id"); - assert_eq!(id.as_ref(), "quote-1"); - let parsed: RadrootsEventPointer = hex_64('d').parse().expect("event pointer"); - assert_eq!(parsed.to_hex(), hex_64('d')); - } - - #[test] - fn validated_identifier_wrappers_expose_consistent_traits() { - let addressable = format!("30402:{}:listing-1", hex_64('0')); - - assert_hex_identifier_impls!(RadrootsEventId, hex_64('b').as_str(), 32); - assert_hex_identifier_impls!(RadrootsEventSignature, hex_128('c').as_str(), 64); - assert_string_identifier_impls!(RadrootsDTag, "listing-1"); - assert_string_identifier_impls!(RadrootsAddressableCoordinate, addressable.as_str()); - assert_string_identifier_impls!(RadrootsClassifiedListingAddress, addressable.as_str()); - assert_string_identifier_impls!(RadrootsOrderId, "order-1"); - assert_string_identifier_impls!(RadrootsOrderQuoteId, "quote-1"); - assert_string_identifier_impls!(RadrootsInventoryBinId, "bin-1"); - assert_string_identifier_impls!(RadrootsEconomicsDigest, "digest-1"); - assert_hex_identifier_impls!(RadrootsEventPointer, hex_64('d').as_str(), 32); - assert_string_identifier_impls!(RadrootsRelayUrl, "wss://relay.example.com"); - } - - #[test] - fn relay_urls_require_valid_websocket_urls() { - assert_eq!( - RadrootsRelayUrl::parse("ws://relay.example.com") - .expect("relay url") - .as_str(), - "ws://relay.example.com" - ); - assert_eq!( - RadrootsRelayUrl::parse("wss://relay.example.com") - .expect("relay url") - .as_str(), - "wss://relay.example.com" - ); - assert!(relay_url_is_valid("wss://relay.example.com")); - assert_eq!( - RadrootsRelayUrl::parse("").unwrap_err(), - RadrootsIdParseError::Empty - ); - assert_eq!( - RadrootsRelayUrl::parse("http://relay.example.com").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsRelayUrl::parse("WSS://relay.example.com").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsRelayUrl::parse("ws://").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsRelayUrl::parse("wss://").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsRelayUrl::parse(" wss://relay.example.com").unwrap_err(), - RadrootsIdParseError::InvalidCharacter - ); - assert_eq!( - RadrootsRelayUrl::parse("wss://relay.example.com\nmiddle").unwrap_err(), - RadrootsIdParseError::InvalidCharacter - ); - assert_eq!( - RadrootsRelayUrl::parse("wss://user@relay.example.com").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsRelayUrl::parse("wss://user:secret@relay.example.com").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsRelayUrl::parse("wss://relay.example.com#read").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsRelayUrl::parse("wss://relay.example.com:0").unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsRelayUrl::parse("wss://relay.example.com/nostr/v1?region=ca-bc") - .expect("relay URL with path and query") - .as_str(), - "wss://relay.example.com/nostr/v1?region=ca-bc" - ); - } - - #[test] - fn nostr_event_pointers_validate_relay_values() { - let event_id = RadrootsEventId::parse(hex_64('e')).expect("event id"); - let pointer = RadrootsEventEnvelopePointer::new( - event_id, - ["wss://relay.one.example", "wss://relay.two.example"], - ) - .expect("pointer"); - - assert_eq!(pointer.event_id, event_id); - assert_eq!( - pointer.relays, - vec![ - "wss://relay.one.example".to_owned(), - "wss://relay.two.example".to_owned() - ] - ); - - assert_eq!( - RadrootsEventEnvelopePointer::new( - RadrootsEventId::parse(hex_64('e')).expect("event id"), - [""], - ) - .unwrap_err(), - RadrootsIdParseError::Empty - ); - assert_eq!( - RadrootsEventEnvelopePointer::new( - RadrootsEventId::parse(hex_64('e')).expect("event id"), - ["http://relay.example"], - ) - .unwrap_err(), - RadrootsIdParseError::InvalidFormat - ); - assert_eq!( - RadrootsEventEnvelopePointer::new( - RadrootsEventId::parse(hex_64('e')).expect("event id"), - [" wss://relay.example"], - ) - .unwrap_err(), - RadrootsIdParseError::InvalidCharacter - ); - assert_eq!( - RadrootsEventEnvelopePointer::new( - RadrootsEventId::parse(hex_64('e')).expect("event id"), - ["wss://relay.example\n"], - ) - .unwrap_err(), - RadrootsIdParseError::InvalidCharacter - ); - } - - #[cfg(feature = "serde")] - #[test] - fn serde_deserialization_validates_identifiers() { - let encoded = format!("\"{}\"", hex_64('E')); - let event_id: RadrootsEventId = serde_json::from_str(&encoded).expect("event id"); - assert_eq!(event_id.to_hex(), hex_64('e')); - - let invalid = serde_json::from_str::<RadrootsOrderId>("\"bad id\""); - assert!(invalid.is_err()); - assert_eq!( - serde_json::to_string(&event_id).expect("json"), - format!("\"{}\"", hex_64('e')) - ); - } - - #[cfg(feature = "serde")] - #[test] - fn serde_missing_fields_exercise_identifier_deserializers() { - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingPublicKey { - value: PublicKey, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingEventId { - value: RadrootsEventId, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingEventSignature { - value: RadrootsEventSignature, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingTradeId { - value: RadrootsTradeId, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingTradeCandidateId { - value: RadrootsTradeCandidateId, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingTradeMutationId { - value: RadrootsTradeMutationId, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingDTag { - value: RadrootsDTag, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingClassifiedListingAddress { - value: RadrootsClassifiedListingAddress, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingAddressableCoordinate { - value: RadrootsAddressableCoordinate, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingOrderId { - value: RadrootsOrderId, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingOrderQuoteId { - value: RadrootsOrderQuoteId, - } - #[allow(dead_code)] - #[derive(Debug, serde::Deserialize)] - struct MissingInventoryBinId { - value: RadrootsInventoryBinId, - } - - fn missing_field_message<T>() -> String - where - T: serde::de::DeserializeOwned + core::fmt::Debug, - { - serde_json::from_str::<T>("{}") - .expect_err("missing field") - .to_string() - } - - let missing = "missing field `value` at line 1 column 2"; - assert_eq!(missing_field_message::<MissingPublicKey>(), missing); - assert_eq!(missing_field_message::<MissingEventId>(), missing); - assert_eq!(missing_field_message::<MissingEventSignature>(), missing); - assert_eq!(missing_field_message::<MissingTradeId>(), missing); - assert_eq!(missing_field_message::<MissingTradeCandidateId>(), missing); - assert_eq!(missing_field_message::<MissingTradeMutationId>(), missing); - assert_eq!(missing_field_message::<MissingDTag>(), missing); - assert_eq!( - missing_field_message::<MissingClassifiedListingAddress>(), - missing - ); - assert_eq!( - missing_field_message::<MissingAddressableCoordinate>(), - missing - ); - assert_eq!(missing_field_message::<MissingOrderId>(), missing); - assert_eq!(missing_field_message::<MissingOrderQuoteId>(), missing); - assert_eq!(missing_field_message::<MissingInventoryBinId>(), missing); - - let order: RadrootsOrderId = - serde_json::from_value(serde_json::json!("order-1")).expect("order from value"); - let listing: RadrootsClassifiedListingAddress = serde_json::from_value(serde_json::json!( - format!("30402:{}:listing-1", hex_64('a')) - )) - .expect("listing from value"); - let quote: RadrootsOrderQuoteId = - serde_json::from_value(serde_json::json!("quote-1")).expect("quote from value"); - assert_eq!(order.as_str(), "order-1"); - assert_eq!(listing.as_str().split(':').next(), Some("30402")); - assert_eq!(quote.as_str(), "quote-1"); - } -} diff --git a/crates/event/src/job_feedback.rs b/crates/event/src/job_feedback.rs @@ -1,6 +1,6 @@ use crate::{ - RadrootsEventPtr, - job::{JobFeedbackStatus, JobPaymentRequest}, + social::job::{JobFeedbackStatus, JobPaymentRequest}, + tag::RadrootsEventPtr, }; #[cfg(not(feature = "std"))] diff --git a/crates/event/src/job_request.rs b/crates/event/src/job_request.rs @@ -1,4 +1,4 @@ -use crate::job::JobInputType; +use crate::social::job::JobInputType; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/job_result.rs b/crates/event/src/job_result.rs @@ -1,4 +1,7 @@ -use crate::{RadrootsEventPtr, job::JobPaymentRequest, job_request::RadrootsJobInput}; +use crate::{ + social::{job::JobPaymentRequest, job_request::RadrootsJobInput}, + tag::RadrootsEventPtr, +}; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/knowledge.rs b/crates/event/src/knowledge.rs @@ -5,12 +5,12 @@ use alloc::{string::String, vec::Vec}; use core::fmt; -use crate::RadrootsEventRef; -use crate::ids::{ +use crate::envelope::kind::KIND_WIKI_ARTICLE; +use crate::id::{ RadrootsAddressableCoordinate, RadrootsDTag, RadrootsEventId, RadrootsRelayUrl, parse_public_key, }; -use crate::kinds::KIND_WIKI_ARTICLE; +use crate::tag::RadrootsEventRef; pub const RADROOTS_KNOWLEDGE_SCHEMA_VERSION: u16 = 1; pub const RADROOTS_WIKI_D_TAG_MAX_LEN: usize = 512; @@ -372,7 +372,7 @@ pub fn validate_knowledge_claim( )); } for citation in &claim.citation_spans { - if citation.source_ref.kind != crate::kinds::KIND_KNOWLEDGE_SOURCE { + if citation.source_ref.kind != crate::envelope::kind::KIND_KNOWLEDGE_SOURCE { return Err(RadrootsKnowledgeValidationError::InvalidField( "citation_spans", )); @@ -986,7 +986,7 @@ mod tests { fn citation_span() -> RadrootsKnowledgeCitationSpan { RadrootsKnowledgeCitationSpan { - source_ref: event_ref_with_kind(crate::kinds::KIND_KNOWLEDGE_SOURCE), + source_ref: event_ref_with_kind(crate::envelope::kind::KIND_KNOWLEDGE_SOURCE), artifact_ref: Some(event_ref()), page_start: None, page_end: None, @@ -1040,7 +1040,7 @@ mod tests { target: RadrootsKnowledgeReviewTarget { event_id: hex_64('d'), author_pubkey: hex_64('a'), - kind: crate::kinds::KIND_KNOWLEDGE_CLAIM, + kind: crate::envelope::kind::KIND_KNOWLEDGE_CLAIM, address: None, relays: Vec::new(), review_scope: RadrootsKnowledgeReviewScope::SpecificVersion, diff --git a/crates/event/src/lib.rs b/crates/event/src/lib.rs @@ -1,13 +1,17 @@ #![cfg_attr(coverage_nightly, feature(coverage_attribute))] #![cfg_attr(all(not(feature = "std"), not(test)), no_std)] #![forbid(unsafe_code)] -#[cfg(not(feature = "std"))] -extern crate alloc; +#![deny(rustdoc::broken_intra_doc_links)] -#[cfg(not(feature = "std"))] -use alloc::{string::String, vec::Vec}; +//! Canonical Radroots event-domain models. +//! +//! Public behavior is grouped under the approved singular domain modules. +//! The crate root intentionally exposes only [`Event`], [`EventDraft`], +//! [`SignedEvent`], [`VerifiedEvent`], [`EventId`], [`EventKind`], [`EventTag`], +//! and [`Error`]. -pub const RADROOTS_EVENT_VERSION: &str = env!("CARGO_PKG_VERSION"); +#[cfg(not(feature = "std"))] +extern crate alloc; #[cfg(test)] /// Returns deterministic 64-character fixtures that are also valid secp256k1 @@ -34,110 +38,31 @@ pub(crate) fn test_valid_hex_64(character: char) -> String { core::iter::repeat_n(character, 64).collect() } -pub mod account; pub mod admission; -pub mod app_data; -pub mod article; pub mod calendar; -pub mod classified_listing; -pub mod comment; pub mod contract; -pub mod coop; -pub mod deletion; -pub mod document; pub mod draft; #[cfg(feature = "dto-bindgen")] -pub mod dto; +mod dto; pub mod envelope; -pub mod event_head; pub mod farm; -pub mod farm_crdt; -pub mod farm_file; -pub mod farm_workspace; -pub mod file_metadata; -pub mod follow; pub mod food; -pub mod food_availability; -pub mod gcs; -pub mod geochat; -pub mod gift_wrap; -pub mod group; -pub mod http_auth; pub mod id; -pub mod ids; -pub mod job; -pub mod job_feedback; -pub mod job_request; -pub mod job_result; -pub mod kinds; #[cfg(feature = "knowledge")] pub mod knowledge; -pub mod list; -pub mod list_set; pub mod listing; -pub mod location; pub mod media; -pub mod message; -pub mod message_file; -pub mod operational_listing; -pub mod order; -pub mod order_economics; -pub mod plot; pub mod post; pub mod profile; -pub mod reaction; -pub mod relay_auth; -pub mod relay_document; -pub mod relay_hint; -pub mod reply; -pub mod report; -pub mod repost; -pub mod resource_area; -pub mod resource_cap; -pub mod seal; pub mod social; pub mod tag; -pub mod tags; pub mod trade; -pub mod trade_validation; mod verification; pub mod wire; +pub use draft::{RadrootsEventDraft as EventDraft, RadrootsSignedEvent as SignedEvent}; pub use envelope::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeError, RadrootsEventEnvelopeLimits, - RadrootsEventEnvelopeParts, RadrootsEventKind, RadrootsEventKindClass, RadrootsEventTag, - RadrootsEventTags, RadrootsEventTimestamp, + RadrootsEventEnvelope as Event, RadrootsEventKind as EventKind, RadrootsEventTag as EventTag, }; -pub use media::{RadrootsAuthoredImage, RadrootsAuthoredImageError}; -pub use wire::{ - RadrootsCanonicalEventIdError, RadrootsEventWireError, RadrootsEventWireLimits, - RadrootsNip01EventWire, canonical_nip01_event_id_preimage, compute_canonical_nip01_event_id, -}; - -#[cfg_attr( - any(feature = "serde", test), - derive(serde::Serialize, serde::Deserialize) -)] -#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] -#[cfg_attr(feature = "dto-bindgen", dto(export))] -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct RadrootsEventRef { - pub id: String, - #[cfg_attr(feature = "dto-bindgen", dto(as = "string"))] - pub author: radroots_identity::PublicKey, - pub kind: u32, - pub d_tag: Option<String>, - pub relays: Option<Vec<String>>, -} - -#[cfg_attr( - any(feature = "serde", test), - derive(serde::Serialize, serde::Deserialize) -)] -#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] -#[cfg_attr(feature = "dto-bindgen", dto(export))] -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct RadrootsEventPtr { - pub id: String, - pub relays: Option<String>, -} +pub use id::EventId; +pub use verification::{Error, SignatureVerifiedEvent as VerifiedEvent}; diff --git a/crates/event/src/list.rs b/crates/event/src/list.rs @@ -28,7 +28,7 @@ pub struct RadrootsListEntry { #[cfg(test)] mod tests { use super::*; - use crate::kinds::{KIND_LIST_READ_WRITE_RELAYS, is_nip51_standard_list_kind}; + use crate::envelope::kind::{KIND_LIST_READ_WRITE_RELAYS, is_nip51_standard_list_kind}; #[test] fn generic_list_model_covers_nip65_relay_entries() { diff --git a/crates/event/src/list_set.rs b/crates/event/src/list_set.rs @@ -1,4 +1,4 @@ -use crate::list::RadrootsListEntry; +use crate::social::list::RadrootsListEntry; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/listing.rs b/crates/event/src/listing.rs @@ -1,7 +1,6 @@ -//! Canonical listing-event domain model. -//! -//! Existing listing behavior moves here during module normalization. +//! Canonical listing-event domain models. -/// Internal marker for the target module while its models are consolidated. -#[allow(dead_code)] -pub(crate) struct ModuleScaffold; +#[path = "classified_listing.rs"] +pub mod classified; +#[path = "operational_listing.rs"] +pub mod operational; diff --git a/crates/event/src/media.rs b/crates/event/src/media.rs @@ -1,5 +1,8 @@ use core::fmt; +#[path = "file_metadata.rs"] +pub mod file_metadata; + use radroots_blossom::ByteVerifiedDescriptor; /// Errors raised while constructing strict authored image media. diff --git a/crates/event/src/message.rs b/crates/event/src/message.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use crate::RadrootsEventPtr; +use crate::tag::RadrootsEventPtr; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/message_file.rs b/crates/event/src/message_file.rs @@ -1,7 +1,7 @@ #![forbid(unsafe_code)] -use crate::RadrootsEventPtr; -use crate::message::RadrootsMessageRecipient; +use crate::social::message::RadrootsMessageRecipient; +use crate::tag::RadrootsEventPtr; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/operational_listing.rs b/crates/event/src/operational_listing.rs @@ -2,9 +2,9 @@ use radroots_core::pricing::Discount; use radroots_core::{Decimal, Money, Quantity, QuantityPrice, Unit}; use crate::farm::RadrootsFarmRef; -use crate::ids::{RadrootsDTag, RadrootsInventoryBinId}; -use crate::plot::RadrootsPlotRef; -use crate::resource_area::RadrootsResourceAreaRef; +use crate::farm::plot::RadrootsPlotRef; +use crate::farm::resource_area::RadrootsResourceAreaRef; +use crate::id::{RadrootsDTag, RadrootsInventoryBinId}; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; @@ -235,7 +235,7 @@ mod tests { #[test] fn listing_model_covers_published_metadata() { - use crate::kinds::{KIND_CLASSIFIED_LISTING, is_classified_listing_kind}; + use crate::envelope::kind::{KIND_CLASSIFIED_LISTING, is_classified_listing_kind}; let listing = super::RadrootsOperationalListing { d_tag: "listing-draft".parse().unwrap(), diff --git a/crates/event/src/order.rs b/crates/event/src/order.rs @@ -6,15 +6,15 @@ use alloc::{ vec::Vec, }; +use crate::envelope::kind::*; #[cfg(test)] -use crate::ids::RadrootsOrderQuoteId; -use crate::ids::{RadrootsClassifiedListingAddress, RadrootsInventoryBinId, RadrootsOrderId}; -use crate::kinds::*; +use crate::id::RadrootsOrderQuoteId; +use crate::id::{RadrootsClassifiedListingAddress, RadrootsInventoryBinId, RadrootsOrderId}; #[cfg(test)] -use crate::operational_listing::RadrootsOperationalListingParseError; -pub use crate::order_economics::*; +use crate::listing::operational::RadrootsOperationalListingParseError; +pub use crate::trade::order_economics::*; #[cfg(test)] -use crate::trade_validation::RadrootsOperationalListingValidationError; +use crate::trade::validation::RadrootsOperationalListingValidationError; use radroots_core::{Currency, Decimal, Money}; use radroots_identity::PublicKey; diff --git a/crates/event/src/order_economics.rs b/crates/event/src/order_economics.rs @@ -5,7 +5,7 @@ use alloc::{string::String, vec::Vec}; use radroots_core::{Currency, Decimal, Money, Unit}; -use crate::ids::{RadrootsInventoryBinId, RadrootsOrderQuoteId}; +use crate::id::{RadrootsInventoryBinId, RadrootsOrderQuoteId}; #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] #[cfg_attr(feature = "dto-bindgen", dto(export))] diff --git a/crates/event/src/plot.rs b/crates/event/src/plot.rs @@ -1,4 +1,4 @@ -use crate::{farm::RadrootsFarmRef, gcs::RadrootsGcsLocation}; +use crate::{farm::RadrootsFarmRef, farm::change_set::RadrootsGcsLocation}; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/post.rs b/crates/event/src/post.rs @@ -1,3 +1,5 @@ +//! Authored posts and related public social-content event models. + #[cfg(not(feature = "std"))] use alloc::{format, string::String, vec::Vec}; use core::fmt; @@ -10,7 +12,7 @@ use crate::social::{ RadrootsSocialFarmAnchor, RadrootsSocialLocation, RadrootsSocialMediaMetadata, RadrootsSocialTarget, }; -use crate::tags::TAG_IMETA; +use crate::tag::name::TAG_IMETA; pub const RADROOTS_POST_CONTENT_MAX_BYTES: usize = crate::wire::v1::DEFAULT_CONTENT_MAX_BYTES; pub const RADROOTS_POST_IMETA_MAX_COUNT: usize = 64; @@ -680,3 +682,19 @@ mod tests { } } } +#[path = "article.rs"] +pub mod article; +#[path = "comment.rs"] +pub mod comment; +#[path = "deletion.rs"] +pub mod deletion; +#[path = "document.rs"] +pub mod document; +#[path = "reaction.rs"] +pub mod reaction; +#[path = "reply.rs"] +pub mod reply; +#[path = "report.rs"] +pub mod report; +#[path = "repost.rs"] +pub mod repost; diff --git a/crates/event/src/profile.rs b/crates/event/src/profile.rs @@ -1,3 +1,5 @@ +//! Profile and account event models. + #[cfg(not(feature = "std"))] use alloc::string::String; use core::{fmt, str::FromStr}; @@ -550,3 +552,5 @@ mod tests { .unwrap() } } +#[path = "account.rs"] +pub mod account; diff --git a/crates/event/src/relay_auth.rs b/crates/event/src/relay_auth.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use crate::kinds::KIND_RELAY_AUTH as KIND_RELAY_AUTH_EVENT; +use crate::envelope::kind::KIND_RELAY_AUTH as KIND_RELAY_AUTH_EVENT; #[cfg(not(feature = "std"))] use alloc::string::String; diff --git a/crates/event/src/relay_hint.rs b/crates/event/src/relay_hint.rs @@ -2,14 +2,14 @@ use alloc::string::{String, ToString}; use core::{fmt, net::Ipv6Addr, str::FromStr}; -use crate::ids::RadrootsIdParseError; +use crate::id::RadrootsIdParseError; /// One canonical, byte-stable Nostr relay hint. /// /// This intentionally accepts a conservative subset of WebSocket URLs. It /// does not inherit browser URL normalization, legacy IPv4 syntax, Unicode /// host processing, user information, or fragments. It is separate from the -/// generic [`crate::ids::RadrootsRelayUrl`] type because protocol-tag +/// generic [`crate::id::RadrootsRelayUrl`] type because protocol-tag /// validation must be portable across implementations. #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct RadrootsNostrRelayHint(String); @@ -334,7 +334,7 @@ fn upper_hex_digit(byte: u8) -> bool { #[cfg(test)] mod tests { use super::*; - use crate::ids::RadrootsRelayUrl; + use crate::id::RadrootsRelayUrl; #[test] fn canonical_relay_hints_accept_portable_hosts_paths_and_queries() { diff --git a/crates/event/src/reply.rs b/crates/event/src/reply.rs @@ -3,12 +3,12 @@ use alloc::string::String; use core::fmt; use crate::{ - ids::{RadrootsEventId, RadrootsIdParseError, parse_public_key}, + id::{RadrootsEventId, RadrootsIdParseError, parse_public_key}, post::{ RADROOTS_POST_CONTENT_MAX_BYTES, RADROOTS_POST_EVENT_WIRE_MAX_BYTES, RADROOTS_POST_TAG_ELEMENT_MAX_BYTES, RADROOTS_POST_TAG_TOTAL_MAX_BYTES, }, - relay_hint::RadrootsNostrRelayHint, + tag::relay_hint::RadrootsNostrRelayHint, }; use radroots_identity::PublicKey; @@ -181,7 +181,7 @@ impl RadrootsNip10ReplyReference { /// and has no Serde construction path. /// /// ```compile_fail -/// let _: radroots_event::reply::RadrootsAuthoredNip10Reply = +/// let _: radroots_event::post::reply::RadrootsAuthoredNip10Reply = /// serde_json::from_str(r#"{"content":"reply"}"#).unwrap(); /// ``` #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/crates/event/src/resource_area.rs b/crates/event/src/resource_area.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use crate::gcs::RadrootsGcsLocation; +use crate::farm::change_set::RadrootsGcsLocation; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/resource_cap.rs b/crates/event/src/resource_cap.rs @@ -2,7 +2,7 @@ use radroots_core::{Decimal, Quantity, Unit}; -use crate::resource_area::RadrootsResourceAreaRef; +use crate::farm::resource_area::RadrootsResourceAreaRef; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; diff --git a/crates/event/src/social.rs b/crates/event/src/social.rs @@ -1,3 +1,5 @@ +//! Social graph, messaging, access, and job event models. + use crate::farm::RadrootsFarmRef; #[cfg(not(feature = "std"))] @@ -188,3 +190,37 @@ mod tests { assert_eq!(RadrootsReportType::Spam, RadrootsReportType::Spam); } } +#[path = "app_data.rs"] +pub mod app_data; +#[path = "follow.rs"] +pub mod follow; +#[path = "geochat.rs"] +pub mod geochat; +#[path = "gift_wrap.rs"] +pub mod gift_wrap; +#[path = "group.rs"] +pub mod group; +#[path = "http_auth.rs"] +pub mod http_auth; +#[path = "job.rs"] +pub mod job; +#[path = "job_feedback.rs"] +pub mod job_feedback; +#[path = "job_request.rs"] +pub mod job_request; +#[path = "job_result.rs"] +pub mod job_result; +#[path = "list.rs"] +pub mod list; +#[path = "list_set.rs"] +pub mod list_set; +#[path = "message.rs"] +pub mod message; +#[path = "message_file.rs"] +pub mod message_file; +#[path = "relay_auth.rs"] +pub mod relay_auth; +#[path = "relay_document.rs"] +pub mod relay_document; +#[path = "seal.rs"] +pub mod seal; diff --git a/crates/event/src/tag.rs b/crates/event/src/tag.rs @@ -1,7 +1,39 @@ -//! Canonical event-tag types. -//! -//! Existing tag behavior moves here during module normalization. +//! Canonical event-tag types, references, and relay hints. -/// Internal marker for the target module while tag types are migrated. -#[allow(dead_code)] -pub(crate) struct ModuleScaffold; +#[cfg(not(feature = "std"))] +use alloc::{string::String, vec::Vec}; +#[cfg(feature = "std")] +use std::{string::String, vec::Vec}; + +#[path = "tags.rs"] +pub mod name; +#[path = "relay_hint.rs"] +pub mod relay_hint; + +#[cfg_attr( + any(feature = "serde", test), + derive(serde::Serialize, serde::Deserialize) +)] +#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] +#[cfg_attr(feature = "dto-bindgen", dto(export))] +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct RadrootsEventRef { + pub id: String, + #[cfg_attr(feature = "dto-bindgen", dto(as = "string"))] + pub author: radroots_identity::PublicKey, + pub kind: u32, + pub d_tag: Option<String>, + pub relays: Option<Vec<String>>, +} + +#[cfg_attr( + any(feature = "serde", test), + derive(serde::Serialize, serde::Deserialize) +)] +#[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))] +#[cfg_attr(feature = "dto-bindgen", dto(export))] +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct RadrootsEventPtr { + pub id: String, + pub relays: Option<String>, +} diff --git a/crates/event/src/trade.rs b/crates/event/src/trade.rs @@ -1,5 +1,12 @@ #![forbid(unsafe_code)] +#[path = "order.rs"] +pub mod order; +#[path = "order_economics.rs"] +pub mod order_economics; +#[path = "trade_validation.rs"] +pub mod validation; + #[cfg(all(not(feature = "std"), feature = "serde"))] use alloc::{collections::BTreeMap, format, string::ToString}; #[cfg(not(feature = "std"))] @@ -11,18 +18,18 @@ use std::{string::String, vec::Vec}; use core::fmt; -use crate::ids::{ +use crate::envelope::kind::{ + KIND_TRADE_CANCELLATION, KIND_TRADE_DECISION, KIND_TRADE_PROPOSAL, + KIND_TRADE_REVISION_DECISION, KIND_TRADE_REVISION_PROPOSAL, +}; +use crate::id::{ RadrootsClassifiedListingAddress, RadrootsDTag, RadrootsEventId, RadrootsIdParseError, RadrootsInventoryBinId, RadrootsTradeCandidateId, RadrootsTradeId, RadrootsTradeMutationId, }; -pub use crate::ids::{ +pub use crate::id::{ RadrootsTradeCandidateId as CandidateId, RadrootsTradeId as TradeId, RadrootsTradeMutationId as MutationId, }; -use crate::kinds::{ - KIND_TRADE_CANCELLATION, KIND_TRADE_DECISION, KIND_TRADE_PROPOSAL, - KIND_TRADE_REVISION_DECISION, KIND_TRADE_REVISION_PROPOSAL, -}; use radroots_identity::PublicKey; #[cfg(feature = "serde")] use serde::{ @@ -1080,7 +1087,7 @@ impl<'de> Visitor<'de> for NoDuplicateJsonValueVisitor { #[cfg(all(test, feature = "serde"))] mod tests { use super::*; - use crate::ids::parse_public_key; + use crate::id::parse_public_key; fn hex_64(character: char) -> String { core::iter::repeat_n(character, 64).collect() diff --git a/crates/event/src/trade_validation.rs b/crates/event/src/trade_validation.rs @@ -3,7 +3,7 @@ #[cfg(not(feature = "std"))] use alloc::string::String; -use crate::operational_listing::RadrootsOperationalListingParseError; +use crate::listing::operational::RadrootsOperationalListingParseError; #[cfg_attr( any(feature = "serde", test), diff --git a/crates/event/src/verification.rs b/crates/event/src/verification.rs @@ -12,7 +12,7 @@ use crate::{ RadrootsContractValidationError, RadrootsEventContract, validate_event_contract_registry_v7, }, envelope::RadrootsEventEnvelope, - ids::RadrootsEventId, + id::RadrootsEventId, wire::compute_canonical_nip01_event_id, }; diff --git a/crates/event/src/wire/v1.rs b/crates/event/src/wire/v1.rs @@ -15,7 +15,7 @@ use std::{collections::BTreeMap, string::String, vec::Vec}; use crate::envelope::{ RadrootsEventEnvelope, RadrootsEventEnvelopeError, RadrootsEventEnvelopeParts, }; -use crate::ids::{RadrootsEventId, RadrootsEventSignature, RadrootsIdParseError, parse_public_key}; +use crate::id::{RadrootsEventId, RadrootsEventSignature, RadrootsIdParseError, parse_public_key}; use core::fmt; use serde_json::{Map, Value}; use sha2::{Digest, Sha256}; diff --git a/crates/event/tests/package_boundary.rs b/crates/event/tests/package_boundary.rs @@ -16,7 +16,7 @@ use radroots_identity::PublicKey; const MANIFEST: &str = include_str!("../Cargo.toml"); const ROOT: &str = include_str!("../src/lib.rs"); -const IDENTIFIERS: &str = include_str!("../src/ids.rs"); +const IDENTIFIERS: &str = include_str!("../src/id.rs"); const CONTRACT_REGISTRY: &str = include_str!("../src/contract/registry_v7.rs"); const RELAY_HINT: &str = include_str!("../src/relay_hint.rs"); const TRADE: &str = include_str!("../src/trade.rs"); @@ -48,7 +48,7 @@ fn manifest_has_final_identity_and_required_radroots_dependencies() { #[test] fn crate_root_declares_every_approved_module() { let declared = root_declarations("pub mod "); - for module in [ + let approved = [ "admission", "calendar", "contract", @@ -66,12 +66,44 @@ fn crate_root_declares_every_approved_module() { "tag", "trade", "wire", + ]; + assert_eq!( + declared, + approved.into_iter().collect(), + "the crate root must expose exactly the approved singular module vocabulary" + ); +} + +#[test] +fn crate_root_exposes_the_curated_native_event_vocabulary() { + type CuratedRootTypes = ( + radroots_event::Event, + radroots_event::EventDraft, + radroots_event::SignedEvent, + radroots_event::VerifiedEvent, + radroots_event::EventId, + radroots_event::EventKind, + radroots_event::EventTag, + radroots_event::Error, + ); + let _: Option<CuratedRootTypes> = None; + for root_export in [ + "Event", + "EventDraft", + "SignedEvent", + "VerifiedEvent", + "EventId", + "EventKind", + "EventTag", + "Error", ] { assert!( - declared.contains(module), - "missing approved module {module}" + ROOT.contains(root_export), + "missing root export {root_export}" ); } + assert!(!ROOT.contains("pub use *")); + assert!(!ROOT.contains("pub use crate::*")); } #[test] @@ -147,7 +179,7 @@ fn event_references_use_the_identity_owned_public_key() { let author = PublicKey::from_hex("585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df") .expect("valid public key"); - let reference = radroots_event::RadrootsEventRef { + let reference = radroots_event::tag::RadrootsEventRef { id: "a".repeat(64), author, kind: 1, @@ -176,7 +208,7 @@ fn trade_protocol_identifiers_have_one_definition_and_deliberate_facades() { assert_eq!(core::mem::size_of::<CandidateId>(), 32); assert_eq!(core::mem::size_of::<MutationId>(), 32); assert!(TradeId::parse("order-1").is_err()); - assert!(radroots_event::ids::RadrootsOrderId::parse("order-1").is_ok()); + assert!(radroots_event::id::RadrootsOrderId::parse("order-1").is_ok()); for definition in [ "validated_hex_id!(RadrootsTradeId, 16);", diff --git a/crates/event_codec/src/admission.rs b/crates/event_codec/src/admission.rs @@ -4,11 +4,11 @@ use alloc::boxed::Box; use core::fmt; use radroots_event::{ - RadrootsEventEnvelope, contract::{ RadrootsContractMatchError, RadrootsContractValidationError, RadrootsEventContract, }, - kinds::{ + envelope::RadrootsEventEnvelope, + envelope::kind::{ KIND_CLASSIFIED_LISTING, KIND_COMMENT, KIND_DELETION_REQUEST, KIND_POST, KIND_PROFILE, }, }; @@ -323,7 +323,8 @@ mod tests { use nostr::secp256k1::Message; use nostr::{Keys, SECP256K1}; use radroots_event::{ - RadrootsEventEnvelopeParts, kinds::KIND_FOLLOW, wire::compute_canonical_nip01_event_id, + envelope::RadrootsEventEnvelopeParts, envelope::kind::KIND_FOLLOW, + wire::compute_canonical_nip01_event_id, }; #[test] diff --git a/crates/event_codec/src/admission/registry_v7.rs b/crates/event_codec/src/admission/registry_v7.rs @@ -3,10 +3,10 @@ use radroots_event::{ RadrootsContractMatchError, RadrootsContractValidationError, RadrootsEventContract, event_contract_registry_v7, validate_event_contract_registry_v7, }, - food_availability::RADROOTS_FOOD_AVAILABILITY_CONTRACT_ID, - kinds::{ + envelope::kind::{ KIND_CLASSIFIED_LISTING, KIND_COMMENT, KIND_DELETION_REQUEST, KIND_POST, KIND_PROFILE, }, + food::availability::RADROOTS_FOOD_AVAILABILITY_CONTRACT_ID, }; use crate::{ diff --git a/crates/event_codec/src/admission/registry_v7/tests.rs b/crates/event_codec/src/admission/registry_v7/tests.rs @@ -17,7 +17,7 @@ fn frozen_typed_contract_ids_resolve_in_registry_v7() { "radroots.social.reply.v1", "radroots.social.comment.v1", "radroots.social.deletion_request.v1", - radroots_event::food_availability::RADROOTS_FOOD_AVAILABILITY_CONTRACT_ID, + radroots_event::food::availability::RADROOTS_FOOD_AVAILABILITY_CONTRACT_ID, ] { assert_eq!( event_contract_registry_v7(contract_id).map(|contract| contract.id), diff --git a/crates/event_codec/src/app_data/decode.rs b/crates/event_codec/src/app_data/decode.rs @@ -5,8 +5,8 @@ use alloc::{ }; use radroots_event::{ - app_data::{KIND_APP_DATA, RadrootsAppData}, - tags::TAG_D, + social::app_data::{KIND_APP_DATA, RadrootsAppData}, + tag::name::TAG_D, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/app_data/encode.rs b/crates/event_codec/src/app_data/encode.rs @@ -5,8 +5,8 @@ use alloc::{ vec::Vec, }; -use radroots_event::app_data::{KIND_APP_DATA, RadrootsAppData}; -use radroots_event::tags::TAG_D; +use radroots_event::social::app_data::{KIND_APP_DATA, RadrootsAppData}; +use radroots_event::tag::name::TAG_D; use crate::error::EventEncodeError; use radroots_event::wire::RadrootsNip01EventWireParts; diff --git a/crates/event_codec/src/article/decode.rs b/crates/event_codec/src/article/decode.rs @@ -5,11 +5,11 @@ use alloc::{ }; use radroots_event::{ - article::RadrootsArticle, + envelope::kind::{KIND_ARTICLE, KIND_FARM}, farm::RadrootsFarmRef, - kinds::{KIND_ARTICLE, KIND_FARM}, + post::article::RadrootsArticle, social::RadrootsSocialFarmAnchor, - tags::{TAG_A, TAG_D, TAG_IMAGE, TAG_PUBLISHED_AT, TAG_SUMMARY, TAG_T, TAG_TITLE}, + tag::name::{TAG_A, TAG_D, TAG_IMAGE, TAG_PUBLISHED_AT, TAG_SUMMARY, TAG_T, TAG_TITLE}, }; use crate::d_tag::validate_d_tag_tag; diff --git a/crates/event_codec/src/article/encode.rs b/crates/event_codec/src/article/encode.rs @@ -5,9 +5,9 @@ use alloc::{ }; use radroots_event::{ - article::RadrootsArticle, - kinds::KIND_ARTICLE, - tags::{TAG_D, TAG_IMAGE, TAG_PUBLISHED_AT, TAG_SUMMARY, TAG_T, TAG_TITLE}, + envelope::kind::KIND_ARTICLE, + post::article::RadrootsArticle, + tag::name::{TAG_D, TAG_IMAGE, TAG_PUBLISHED_AT, TAG_SUMMARY, TAG_T, TAG_TITLE}, }; use crate::d_tag::validate_d_tag; diff --git a/crates/event_codec/src/calendar/decode.rs b/crates/event_codec/src/calendar/decode.rs @@ -19,10 +19,10 @@ use radroots_event::{ RadrootsParsedNip52CalendarParts, RadrootsParsedNip52CalendarTimeEvent, calendar_geohash_is_valid, calendar_relay_url_is_valid, calendar_tag_text_is_valid, }, - kinds::{ + envelope::kind::{ KIND_CALENDAR, KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_EVENT_RSVP, KIND_CALENDAR_TIME_EVENT, }, - tags::{ + tag::name::{ TAG_A, TAG_D, TAG_D_DAY, TAG_DESCRIPTION, TAG_E, TAG_END, TAG_END_TZID, TAG_FREE_BUSY, TAG_G, TAG_IMAGE, TAG_LOCATION, TAG_P, TAG_R, TAG_START, TAG_START_TZID, TAG_STATUS, TAG_SUMMARY, TAG_T, TAG_TITLE, diff --git a/crates/event_codec/src/calendar/encode.rs b/crates/event_codec/src/calendar/encode.rs @@ -14,10 +14,10 @@ use radroots_event::{ RadrootsCalendarEventRsvpStatus, RadrootsCalendarParticipant, RadrootsCalendarRequest, RadrootsCalendarUri, covered_utc_days, }, - kinds::{ + envelope::kind::{ KIND_CALENDAR, KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_EVENT_RSVP, KIND_CALENDAR_TIME_EVENT, }, - tags::{ + tag::name::{ TAG_A, TAG_D, TAG_D_DAY, TAG_DESCRIPTION, TAG_E, TAG_END, TAG_END_TZID, TAG_FREE_BUSY, TAG_G, TAG_IMAGE, TAG_LOCATION, TAG_P, TAG_R, TAG_START, TAG_START_TZID, TAG_STATUS, TAG_SUMMARY, TAG_T, TAG_TITLE, diff --git a/crates/event_codec/src/comment/admission.rs b/crates/event_codec/src/comment/admission.rs @@ -1,6 +1,6 @@ use core::fmt; -use radroots_event::{RadrootsEventEnvelope, contract::RadrootsEventContract}; +use radroots_event::{contract::RadrootsEventContract, envelope::RadrootsEventEnvelope}; use crate::{ comment::inbound::{ diff --git a/crates/event_codec/src/comment/authored.rs b/crates/event_codec/src/comment/authored.rs @@ -6,13 +6,13 @@ use alloc::{ }; use radroots_event::{ - comment::{ + envelope::kind::KIND_COMMENT, + post::comment::{ RadrootsAuthoredNip22Comment, RadrootsNip22AddressRootReference, RadrootsNip22CommentParentReference, RadrootsNip22CommentPosition, RadrootsNip22CommentRoot, RadrootsNip22EventRootReference, }, - kinds::KIND_COMMENT, - relay_hint::RadrootsNostrRelayHint, + tag::relay_hint::RadrootsNostrRelayHint, wire::RadrootsNip01EventWireParts, }; use radroots_identity::PublicKey; @@ -119,12 +119,14 @@ fn optional_relay_tag( mod tests { use super::*; use radroots_event::{ - comment::{ + envelope::kind::{ + KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_TIME_EVENT, KIND_CLASSIFIED_LISTING, + }, + post::comment::{ RADROOTS_NIP22_COMMENT_CONTENT_MAX_BYTES, RADROOTS_NIP22_COMMENT_EVENT_WIRE_MAX_BYTES, RadrootsNip22AddressRootReference, RadrootsNip22CommentError, RadrootsNip22CommentParentReference, RadrootsNip22EventRootReference, }, - kinds::{KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_TIME_EVENT, KIND_CLASSIFIED_LISTING}, }; fn h(character: char) -> String { diff --git a/crates/event_codec/src/comment/inbound/registry_v7.rs b/crates/event_codec/src/comment/inbound/registry_v7.rs @@ -5,18 +5,18 @@ use alloc::{format, string::String, vec::Vec}; use core::fmt; use radroots_event::{ - comment::{ + envelope::kind::KIND_COMMENT, + id::{ + RadrootsAddressableCoordinate, RadrootsAddressableCoordinateParts, RadrootsEventId, + RadrootsIdParseError, + }, + post::comment::{ RADROOTS_NIP22_COMMENT_CONTENT_MAX_BYTES, RADROOTS_NIP22_COMMENT_EVENT_WIRE_MAX_BYTES, RADROOTS_NIP22_COMMENT_TAG_ELEMENT_MAX_BYTES, RADROOTS_NIP22_COMMENT_TAG_MAX_COUNT, RADROOTS_NIP22_COMMENT_TAG_TOTAL_ELEMENT_MAX_COUNT, RADROOTS_NIP22_COMMENT_TAG_TOTAL_MAX_BYTES, RadrootsNip22CommentRootKind, }, - ids::{ - RadrootsAddressableCoordinate, RadrootsAddressableCoordinateParts, RadrootsEventId, - RadrootsIdParseError, - }, - kinds::KIND_COMMENT, - relay_hint::RadrootsNostrRelayHint, + tag::relay_hint::RadrootsNostrRelayHint, }; use radroots_identity::PublicKey; diff --git a/crates/event_codec/src/coop/decode.rs b/crates/event_codec/src/coop/decode.rs @@ -7,7 +7,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::{coop::RadrootsCoop, kinds::KIND_COOP, tags::TAG_D}; +use radroots_event::{envelope::kind::KIND_COOP, farm::coop::RadrootsCoop, tag::name::TAG_D}; use crate::d_tag::validate_d_tag_tag; use crate::error::EventParseError; diff --git a/crates/event_codec/src/coop/encode.rs b/crates/event_codec/src/coop/encode.rs @@ -8,9 +8,9 @@ use alloc::{ }; use radroots_event::{ - coop::{RadrootsCoop, RadrootsCoopRef}, - kinds::KIND_COOP, - tags::TAG_D, + envelope::kind::KIND_COOP, + farm::coop::{RadrootsCoop, RadrootsCoopRef}, + tag::name::TAG_D, }; use crate::d_tag::validate_d_tag; diff --git a/crates/event_codec/src/coop/list_sets.rs b/crates/event_codec/src/coop/list_sets.rs @@ -8,10 +8,10 @@ use alloc::{ vec::Vec, }; +use radroots_event::envelope::kind::KIND_FARM; use radroots_event::farm::RadrootsFarmRef; -use radroots_event::kinds::KIND_FARM; -use radroots_event::list::RadrootsListEntry; -use radroots_event::list_set::RadrootsListSet; +use radroots_event::social::list::RadrootsListEntry; +use radroots_event::social::list_set::RadrootsListSet; use crate::d_tag::validate_d_tag; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/coop/mod.rs b/crates/event_codec/src/coop/mod.rs @@ -14,11 +14,13 @@ mod tests { member_of_coops_list_set, }; use crate::error::EventEncodeError; - use radroots_event::coop::{RadrootsCoop, RadrootsCoopLocation, RadrootsCoopRef}; - use radroots_event::farm::RadrootsFarmRef; - use radroots_event::gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; #[cfg(feature = "serde_json")] - use radroots_event::kinds::KIND_COOP; + use radroots_event::envelope::kind::KIND_COOP; + use radroots_event::farm::RadrootsFarmRef; + use radroots_event::farm::change_set::{ + RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon, + }; + use radroots_event::farm::coop::{RadrootsCoop, RadrootsCoopLocation, RadrootsCoopRef}; #[test] fn coop_tags_include_required_fields() { diff --git a/crates/event_codec/src/deletion/authored.rs b/crates/event_codec/src/deletion/authored.rs @@ -2,7 +2,7 @@ use alloc::{string::ToString, vec, vec::Vec}; use radroots_event::{ - deletion::RadrootsAuthoredNip09DeletionRequest, kinds::KIND_DELETION_REQUEST, + envelope::kind::KIND_DELETION_REQUEST, post::deletion::RadrootsAuthoredNip09DeletionRequest, wire::RadrootsNip01EventWireParts, }; @@ -49,7 +49,7 @@ pub fn authored_nip09_deletion_request_to_wire_parts( #[cfg(test)] mod tests { use super::*; - use radroots_event::deletion::{ + use radroots_event::post::deletion::{ RADROOTS_NIP09_DELETION_EVENT_WIRE_MAX_BYTES, RadrootsNip09DeletionAddressTarget, RadrootsNip09DeletionEventTarget, }; @@ -97,7 +97,7 @@ mod tests { fn core_wire_estimator_matches_emitted_json_at_the_strict_boundary() { let target = RadrootsNip09DeletionEventTarget::parse(h('a'), 1).expect("event target"); let mut lower = 0usize; - let mut upper = radroots_event::deletion::RADROOTS_NIP09_DELETION_CONTENT_MAX_BYTES; + let mut upper = radroots_event::post::deletion::RADROOTS_NIP09_DELETION_CONTENT_MAX_BYTES; while lower < upper { let candidate = lower + (upper - lower).div_ceil(2); if RadrootsAuthoredNip09DeletionRequest::new( diff --git a/crates/event_codec/src/deletion/reconciliation_v1.rs b/crates/event_codec/src/deletion/reconciliation_v1.rs @@ -148,8 +148,8 @@ pub mod evaluator { use alloc::format; use radroots_event::{ - ids::{RadrootsEventId, RadrootsNip01Coordinate}, - kinds::KIND_DELETION_REQUEST, + envelope::kind::KIND_DELETION_REQUEST, + id::{RadrootsEventId, RadrootsNip01Coordinate}, }; use crate::verification::v1::RadrootsSignatureVerifiedEvent; @@ -439,18 +439,18 @@ pub mod inbound { }; use radroots_event::{ - deletion::{ + envelope::kind::KIND_DELETION_REQUEST, + id::{ + RadrootsEventId, RadrootsIdParseError, RadrootsNip01Coordinate, + RadrootsNip01CoordinateParseError, + }, + post::deletion::{ RADROOTS_NIP09_DELETION_CONTENT_MAX_BYTES, RADROOTS_NIP09_DELETION_EVENT_WIRE_MAX_BYTES, RADROOTS_NIP09_DELETION_TAG_ELEMENT_MAX_BYTES, RADROOTS_NIP09_DELETION_TAG_MAX_COUNT, RADROOTS_NIP09_DELETION_TAG_TOTAL_ELEMENT_MAX_COUNT, RADROOTS_NIP09_DELETION_TAG_TOTAL_MAX_BYTES, RADROOTS_NIP09_DELETION_TARGET_KIND_MAX, }, - ids::{ - RadrootsEventId, RadrootsIdParseError, RadrootsNip01Coordinate, - RadrootsNip01CoordinateParseError, - }, - kinds::KIND_DELETION_REQUEST, }; use crate::verification::v1::RadrootsSignatureVerifiedEvent; diff --git a/crates/event_codec/src/deletion/reconciliation_v1/admission/tests.rs b/crates/event_codec/src/deletion/reconciliation_v1/admission/tests.rs @@ -6,7 +6,7 @@ fn admitted_contract_resolves_registry_entry() { use nostr::secp256k1::Message; use nostr::{Keys, SECP256K1}; use radroots_event::{ - RadrootsEventEnvelopeParts, kinds::KIND_DELETION_REQUEST, + envelope::RadrootsEventEnvelopeParts, envelope::kind::KIND_DELETION_REQUEST, wire::compute_canonical_nip01_event_id, }; use radroots_test_fixtures::FIXTURE_ALICE_SECRET_KEY_HEX; diff --git a/crates/event_codec/src/deletion/reconciliation_v1/evaluator/tests.rs b/crates/event_codec/src/deletion/reconciliation_v1/evaluator/tests.rs @@ -2,7 +2,8 @@ use super::*; use nostr::{Keys, SECP256K1, secp256k1::Message}; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, wire::compute_canonical_nip01_event_id, + envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts, + wire::compute_canonical_nip01_event_id, }; use crate::{ diff --git a/crates/event_codec/src/document/decode.rs b/crates/event_codec/src/document/decode.rs @@ -7,7 +7,9 @@ use alloc::{ vec::Vec, }; -use radroots_event::{document::RadrootsDocument, kinds::KIND_DOCUMENT, tags::TAG_D}; +use radroots_event::{ + envelope::kind::KIND_DOCUMENT, post::document::RadrootsDocument, tag::name::TAG_D, +}; use crate::d_tag::validate_d_tag_tag; use crate::error::EventParseError; @@ -160,7 +162,7 @@ pub fn parsed_from_event( #[cfg(test)] mod tests { use super::*; - use radroots_event::document::{RadrootsDocument, RadrootsDocumentSubject}; + use radroots_event::post::document::{RadrootsDocument, RadrootsDocumentSubject}; #[test] fn document_decode_accepts_subject_without_address() { diff --git a/crates/event_codec/src/document/encode.rs b/crates/event_codec/src/document/encode.rs @@ -7,13 +7,13 @@ use alloc::{ vec::Vec, }; -use radroots_event::{document::RadrootsDocument, tags::TAG_D}; +use radroots_event::{post::document::RadrootsDocument, tag::name::TAG_D}; use crate::d_tag::validate_d_tag; use crate::error::EventEncodeError; #[cfg(feature = "serde_json")] -use radroots_event::kinds::KIND_DOCUMENT; +use radroots_event::envelope::kind::KIND_DOCUMENT; #[cfg(feature = "serde_json")] use radroots_event::wire::RadrootsNip01EventWireParts; @@ -91,7 +91,7 @@ pub fn to_wire_parts_with_kind( mod tests { use super::*; use crate::test_fixtures::FIXTURE_ALICE_PUBLIC_KEY_HEX; - use radroots_event::document::RadrootsDocumentSubject; + use radroots_event::post::document::RadrootsDocumentSubject; fn sample_document_address() -> String { format!("30340:{FIXTURE_ALICE_PUBLIC_KEY_HEX}:AAAAAAAAAAAAAAAAAAAAAA") diff --git a/crates/event_codec/src/document/mod.rs b/crates/event_codec/src/document/mod.rs @@ -6,7 +6,7 @@ pub mod encode; #[cfg(test)] mod tests { use crate::document::encode::document_build_tags; - use radroots_event::document::{RadrootsDocument, RadrootsDocumentSubject}; + use radroots_event::post::document::{RadrootsDocument, RadrootsDocumentSubject}; #[test] fn document_tags_include_required_fields() { diff --git a/crates/event_codec/src/error.rs b/crates/event_codec/src/error.rs @@ -51,8 +51,8 @@ impl std::error::Error for EventParseError { } } -impl From<radroots_event::RadrootsEventEnvelopeError> for EventParseError { - fn from(_: radroots_event::RadrootsEventEnvelopeError) -> Self { +impl From<radroots_event::envelope::RadrootsEventEnvelopeError> for EventParseError { + fn from(_: radroots_event::envelope::RadrootsEventEnvelopeError) -> Self { Self::InvalidEnvelope } } @@ -97,7 +97,7 @@ impl std::error::Error for EventEncodeError {} #[cfg(test)] mod tests { use super::EventParseError; - use radroots_event::RadrootsEventEnvelopeError; + use radroots_event::envelope::RadrootsEventEnvelopeError; #[test] #[cfg_attr(coverage_nightly, coverage(off))] diff --git a/crates/event_codec/src/event_ref.rs b/crates/event_codec/src/event_ref.rs @@ -6,8 +6,8 @@ use alloc::{ }; use radroots_event::{ - RadrootsEventRef, - ids::{RadrootsDTag, RadrootsEventId, RadrootsRelayUrl}, + id::{RadrootsDTag, RadrootsEventId, RadrootsRelayUrl}, + tag::RadrootsEventRef, }; use radroots_identity::PublicKey; diff --git a/crates/event_codec/src/farm/decode.rs b/crates/event_codec/src/farm/decode.rs @@ -7,10 +7,10 @@ use alloc::{ }; use radroots_event::{ + envelope::kind::KIND_FARM, farm::RadrootsFarm, - kinds::KIND_FARM, - location::{has_textual_locality, is_public_geohash5}, - tags::TAG_D, + farm::location::{has_textual_locality, is_public_geohash5}, + tag::name::TAG_D, }; use crate::d_tag::validate_d_tag_tag; diff --git a/crates/event_codec/src/farm/encode.rs b/crates/event_codec/src/farm/encode.rs @@ -6,10 +6,10 @@ use alloc::{ }; use radroots_event::{ + envelope::kind::KIND_FARM, + farm::location::{has_textual_locality, is_public_geohash5}, farm::{RadrootsFarm, RadrootsFarmRef}, - kinds::KIND_FARM, - location::{has_textual_locality, is_public_geohash5}, - tags::TAG_D, + tag::name::TAG_D, }; use crate::d_tag::validate_d_tag; diff --git a/crates/event_codec/src/farm/list_sets.rs b/crates/event_codec/src/farm/list_sets.rs @@ -8,11 +8,11 @@ use alloc::{ vec::Vec, }; -use radroots_event::kinds::KIND_CLASSIFIED_LISTING; -use radroots_event::list::RadrootsListEntry; -use radroots_event::list_set::RadrootsListSet; -use radroots_event::operational_listing::RadrootsOperationalListing; -use radroots_event::plot::RadrootsPlot; +use radroots_event::envelope::kind::KIND_CLASSIFIED_LISTING; +use radroots_event::farm::plot::RadrootsPlot; +use radroots_event::listing::operational::RadrootsOperationalListing; +use radroots_event::social::list::RadrootsListEntry; +use radroots_event::social::list_set::RadrootsListSet; use crate::d_tag::validate_d_tag; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/farm/mod.rs b/crates/event_codec/src/farm/mod.rs @@ -15,15 +15,15 @@ mod tests { farm_plots_list_set_from_plots, member_of_farms_list_set, }; use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; - use radroots_event::farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}; - use radroots_event::ids::{RadrootsDTag, RadrootsInventoryBinId}; #[cfg(feature = "serde_json")] - use radroots_event::kinds::KIND_FARM; - use radroots_event::operational_listing::{ + use radroots_event::envelope::kind::KIND_FARM; + use radroots_event::farm::plot::RadrootsPlot; + use radroots_event::farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}; + use radroots_event::id::{RadrootsDTag, RadrootsInventoryBinId}; + use radroots_event::listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingBin, RadrootsOperationalListingProduct, }; - use radroots_event::plot::RadrootsPlot; #[cfg(feature = "serde_json")] const EVENT_ID: &str = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; diff --git a/crates/event_codec/src/farm_crdt/decode.rs b/crates/event_codec/src/farm_crdt/decode.rs @@ -2,9 +2,9 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - farm_crdt::{KIND_FARM_CRDT_CHANGE, RADROOTS_FARM_CRDT_TAG, RadrootsFarmCrdtChange}, - farm_workspace::KIND_FARM_WORKSPACE_MANIFEST, - tags::{TAG_A, TAG_D, TAG_H, TAG_P, TAG_T}, + farm::crdt::{KIND_FARM_CRDT_CHANGE, RADROOTS_FARM_CRDT_TAG, RadrootsFarmCrdtChange}, + farm::workspace::KIND_FARM_WORKSPACE_MANIFEST, + tag::name::{TAG_A, TAG_D, TAG_H, TAG_P, TAG_T}, }; use crate::d_tag::validate_d_tag_tag; diff --git a/crates/event_codec/src/farm_crdt/encode.rs b/crates/event_codec/src/farm_crdt/encode.rs @@ -2,11 +2,13 @@ use alloc::{format, string::String, vec::Vec}; #[cfg(feature = "serde_json")] -use radroots_event::farm_crdt::KIND_FARM_CRDT_CHANGE; +use radroots_event::farm::crdt::KIND_FARM_CRDT_CHANGE; use radroots_event::{ - farm_crdt::{RADROOTS_FARM_CRDT_CHANGE_SCHEMA, RADROOTS_FARM_CRDT_TAG, RadrootsFarmCrdtChange}, - farm_workspace::KIND_FARM_WORKSPACE_MANIFEST, - tags::{TAG_A, TAG_D, TAG_H, TAG_P, TAG_T}, + farm::crdt::{ + RADROOTS_FARM_CRDT_CHANGE_SCHEMA, RADROOTS_FARM_CRDT_TAG, RadrootsFarmCrdtChange, + }, + farm::workspace::KIND_FARM_WORKSPACE_MANIFEST, + tag::name::{TAG_A, TAG_D, TAG_H, TAG_P, TAG_T}, }; use crate::d_tag::validate_d_tag; diff --git a/crates/event_codec/src/farm_crdt/mod.rs b/crates/event_codec/src/farm_crdt/mod.rs @@ -6,13 +6,13 @@ pub mod decode; #[cfg(all(test, feature = "serde_json"))] mod tests { use radroots_event::{ - farm_crdt::{ + envelope::kind::KIND_POST, + farm::crdt::{ KIND_FARM_CRDT_CHANGE, RADROOTS_FARM_CRDT_CHANGE_SCHEMA, RADROOTS_FARM_CRDT_TAG, RadrootsCrdtBackend, RadrootsFarmCrdtChange, RadrootsFarmCrdtDocumentKind, RadrootsFarmSemanticKind, }, - farm_workspace::{KIND_FARM_WORKSPACE_MANIFEST, RadrootsFarmWorkspaceRef}, - kinds::KIND_POST, + farm::workspace::{KIND_FARM_WORKSPACE_MANIFEST, RadrootsFarmWorkspaceRef}, }; use crate::error::{EventEncodeError, EventParseError}; diff --git a/crates/event_codec/src/farm_file/decode.rs b/crates/event_codec/src/farm_file/decode.rs @@ -5,13 +5,13 @@ use alloc::{ }; use radroots_event::{ - farm_crdt::RadrootsFarmCrdtDocumentKind, - farm_file::{ + farm::crdt::RadrootsFarmCrdtDocumentKind, + farm::file::{ KIND_FARM_FILE_METADATA, RadrootsFarmFileDimensions, RadrootsFarmFileMetadata, RadrootsFarmFileSource, }, - farm_workspace::KIND_FARM_WORKSPACE_MANIFEST, - tags::{TAG_A, TAG_D, TAG_H, TAG_MIME, TAG_ORIGINAL_SHA256, TAG_SHA256, TAG_URL}, + farm::workspace::KIND_FARM_WORKSPACE_MANIFEST, + tag::name::{TAG_A, TAG_D, TAG_H, TAG_MIME, TAG_ORIGINAL_SHA256, TAG_SHA256, TAG_URL}, }; use crate::d_tag::validate_d_tag_tag; @@ -71,7 +71,7 @@ pub fn farm_file_metadata_from_event( let metadata = RadrootsFarmFileMetadata { d_tag, - workspace: radroots_event::farm_workspace::RadrootsFarmWorkspaceRef { + workspace: radroots_event::farm::workspace::RadrootsFarmWorkspaceRef { pubkey: workspace.pubkey, d_tag: workspace.d_tag, }, diff --git a/crates/event_codec/src/farm_file/encode.rs b/crates/event_codec/src/farm_file/encode.rs @@ -7,13 +7,13 @@ use alloc::{ }; use radroots_event::{ - farm_crdt::RadrootsFarmCrdtDocumentKind, - farm_file::{ + farm::crdt::RadrootsFarmCrdtDocumentKind, + farm::file::{ KIND_FARM_FILE_METADATA, RadrootsFarmFileDimensions, RadrootsFarmFileMetadata, RadrootsFarmFileSource, }, - farm_workspace::KIND_FARM_WORKSPACE_MANIFEST, - tags::{TAG_A, TAG_D, TAG_H, TAG_MIME, TAG_ORIGINAL_SHA256, TAG_SHA256, TAG_URL}, + farm::workspace::KIND_FARM_WORKSPACE_MANIFEST, + tag::name::{TAG_A, TAG_D, TAG_H, TAG_MIME, TAG_ORIGINAL_SHA256, TAG_SHA256, TAG_URL}, }; use crate::d_tag::validate_d_tag; diff --git a/crates/event_codec/src/farm_file/mod.rs b/crates/event_codec/src/farm_file/mod.rs @@ -4,13 +4,13 @@ pub mod encode; #[cfg(test)] mod tests { use radroots_event::{ - farm_crdt::RadrootsFarmCrdtDocumentKind, - farm_file::{ + envelope::kind::KIND_POST, + farm::crdt::RadrootsFarmCrdtDocumentKind, + farm::file::{ KIND_FARM_FILE_METADATA, RadrootsFarmFileDimensions, RadrootsFarmFileMetadata, RadrootsFarmFileSource, }, - farm_workspace::RadrootsFarmWorkspaceRef, - kinds::KIND_POST, + farm::workspace::RadrootsFarmWorkspaceRef, }; use crate::error::{EventEncodeError, EventParseError}; diff --git a/crates/event_codec/src/farm_workspace/decode.rs b/crates/event_codec/src/farm_workspace/decode.rs @@ -2,11 +2,11 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - farm_workspace::{ + envelope::kind::KIND_FARM, + farm::workspace::{ KIND_FARM_WORKSPACE_MANIFEST, RADROOTS_FARM_WORKSPACE_TAG, RadrootsFarmWorkspaceManifest, }, - kinds::KIND_FARM, - tags::{TAG_A, TAG_D, TAG_H, TAG_P, TAG_T}, + tag::name::{TAG_A, TAG_D, TAG_H, TAG_P, TAG_T}, }; use crate::d_tag::validate_d_tag_tag; diff --git a/crates/event_codec/src/farm_workspace/encode.rs b/crates/event_codec/src/farm_workspace/encode.rs @@ -2,12 +2,12 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - farm_workspace::{ + envelope::kind::{KIND_FARM, KIND_FARM_CRDT_CHANGE, KIND_FARM_FILE_METADATA}, + farm::workspace::{ KIND_FARM_WORKSPACE_MANIFEST, RADROOTS_FARM_WORKSPACE_SCHEMA, RADROOTS_FARM_WORKSPACE_TAG, RadrootsFarmWorkspaceManifest, }, - kinds::{KIND_FARM, KIND_FARM_CRDT_CHANGE, KIND_FARM_FILE_METADATA}, - tags::{TAG_A, TAG_D, TAG_H, TAG_P, TAG_T}, + tag::name::{TAG_A, TAG_D, TAG_H, TAG_P, TAG_T}, }; use crate::d_tag::validate_d_tag; diff --git a/crates/event_codec/src/farm_workspace/mod.rs b/crates/event_codec/src/farm_workspace/mod.rs @@ -6,15 +6,15 @@ pub mod decode; #[cfg(all(test, feature = "serde_json"))] mod tests { use radroots_event::{ + envelope::kind::{KIND_FARM, KIND_FARM_FILE_METADATA, KIND_POST}, farm::RadrootsFarmRef, - farm_crdt::KIND_FARM_CRDT_CHANGE, - farm_workspace::{ + farm::crdt::KIND_FARM_CRDT_CHANGE, + farm::workspace::{ KIND_FARM_WORKSPACE_MANIFEST, RADROOTS_FARM_WORKSPACE_PROTOCOL_VERSION, RADROOTS_FARM_WORKSPACE_SCHEMA, RADROOTS_FARM_WORKSPACE_TAG, RadrootsFarmWorkspaceManifest, RadrootsFarmWorkspaceMediaServer, RadrootsFarmWorkspaceRelay, RadrootsFarmWorkspaceRelayMode, }, - kinds::{KIND_FARM, KIND_FARM_FILE_METADATA, KIND_POST}, }; use crate::error::{EventEncodeError, EventParseError}; diff --git a/crates/event_codec/src/file_metadata/decode.rs b/crates/event_codec/src/file_metadata/decode.rs @@ -5,10 +5,10 @@ use alloc::{ }; use radroots_event::{ - file_metadata::RadrootsFileMetadata, - kinds::KIND_PUBLIC_FILE_METADATA, + envelope::kind::KIND_PUBLIC_FILE_METADATA, + media::file_metadata::RadrootsFileMetadata, social::RadrootsSocialMediaThumbnail, - tags::{ + tag::name::{ TAG_ALT, TAG_BLURHASH, TAG_DIMENSIONS, TAG_FALLBACK, TAG_MAGNET, TAG_MIME, TAG_ORIGINAL_SHA256, TAG_SERVICE, TAG_SHA256, TAG_SIZE, TAG_SUMMARY, TAG_THUMB, TAG_URL, }, diff --git a/crates/event_codec/src/file_metadata/encode.rs b/crates/event_codec/src/file_metadata/encode.rs @@ -5,9 +5,9 @@ use alloc::{ }; use radroots_event::{ - file_metadata::RadrootsFileMetadata, - kinds::KIND_PUBLIC_FILE_METADATA, - tags::{ + envelope::kind::KIND_PUBLIC_FILE_METADATA, + media::file_metadata::RadrootsFileMetadata, + tag::name::{ TAG_ALT, TAG_BLURHASH, TAG_DIMENSIONS, TAG_FALLBACK, TAG_MAGNET, TAG_MIME, TAG_ORIGINAL_SHA256, TAG_SERVICE, TAG_SHA256, TAG_SIZE, TAG_SUMMARY, TAG_URL, }, diff --git a/crates/event_codec/src/follow/decode.rs b/crates/event_codec/src/follow/decode.rs @@ -2,8 +2,8 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - follow::{RadrootsFollow, RadrootsFollowProfile}, - kinds::KIND_FOLLOW, + envelope::kind::KIND_FOLLOW, + social::follow::{RadrootsFollow, RadrootsFollowProfile}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/follow/encode.rs b/crates/event_codec/src/follow/encode.rs @@ -4,10 +4,10 @@ use alloc::{ vec::Vec, }; -use radroots_event::follow::{RadrootsFollow, RadrootsFollowProfile}; +use radroots_event::social::follow::{RadrootsFollow, RadrootsFollowProfile}; use crate::error::EventEncodeError; -use radroots_event::kinds::KIND_FOLLOW; +use radroots_event::envelope::kind::KIND_FOLLOW; use radroots_event::wire::RadrootsNip01EventWireParts; const DEFAULT_KIND: u32 = KIND_FOLLOW; diff --git a/crates/event_codec/src/food_availability/admission.rs b/crates/event_codec/src/food_availability/admission.rs @@ -4,8 +4,9 @@ use alloc::boxed::Box; use core::fmt; use radroots_event::{ - RadrootsEventEnvelope, classified_listing::RadrootsClassifiedListingPartition, - contract::RadrootsEventContract, food_availability::RADROOTS_FOOD_AVAILABILITY_CONTRACT_ID, + contract::RadrootsEventContract, envelope::RadrootsEventEnvelope, + food::availability::RADROOTS_FOOD_AVAILABILITY_CONTRACT_ID, + listing::classified::RadrootsClassifiedListingPartition, }; use crate::{ diff --git a/crates/event_codec/src/food_availability/authored.rs b/crates/event_codec/src/food_availability/authored.rs @@ -3,11 +3,12 @@ use alloc::{string::String, string::ToString, vec, vec::Vec}; use core::fmt; use radroots_event::{ - RadrootsEventEnvelopeError, RadrootsEventTags, - classified_listing::{TAG_RADROOTS_PRICE_UNIT, TAG_RADROOTS_QUANTITY}, - food_availability::{RadrootsFoodAvailabilityDetails, RadrootsFoodAvailabilityError}, - kinds::KIND_CLASSIFIED_LISTING, - tags::{ + envelope::RadrootsEventEnvelopeError, + envelope::RadrootsEventTags, + envelope::kind::KIND_CLASSIFIED_LISTING, + food::availability::{RadrootsFoodAvailabilityDetails, RadrootsFoodAvailabilityError}, + listing::classified::{TAG_RADROOTS_PRICE_UNIT, TAG_RADROOTS_QUANTITY}, + tag::name::{ TAG_D, TAG_IMAGE, TAG_LOCATION, TAG_PRICE, TAG_PUBLISHED_AT, TAG_STATUS, TAG_SUMMARY, TAG_TITLE, }, @@ -211,7 +212,7 @@ fn canonical_json_string_bytes(value: &str) -> usize { #[cfg(test)] mod tests { use super::*; - use radroots_event::food_availability::{ + use radroots_event::food::availability::{ RadrootsFoodAvailabilityDetailsParts, RadrootsFoodAvailabilityStatus, RadrootsFoodContent, RadrootsFoodCurrency, RadrootsFoodIdentifier, RadrootsFoodPrice, RadrootsFoodPublishedAt, RadrootsFoodQuantity, RadrootsFoodText, RadrootsFoodUnit, diff --git a/crates/event_codec/src/food_availability/inbound/registry_v7.rs b/crates/event_codec/src/food_availability/inbound/registry_v7.rs @@ -6,16 +6,16 @@ use alloc::{boxed::Box, string::String, string::ToString, vec::Vec}; use core::fmt; use radroots_blossom::{BlobUrl, Sha256}; use radroots_event::{ - RadrootsEventTags, - classified_listing::RadrootsClassifiedListingPartition, - food_availability::{ + envelope::RadrootsEventTags, + envelope::kind::KIND_CLASSIFIED_LISTING, + food::availability::{ RADROOTS_FOOD_DECIMAL_MAX_DIGITS, RADROOTS_FOOD_IMAGE_MAX_COUNT, RadrootsFoodAvailabilityError, RadrootsFoodAvailabilityStatus, RadrootsFoodContent, RadrootsFoodCurrency, RadrootsFoodIdentifier, RadrootsFoodImageDimensions, RadrootsFoodPrice, RadrootsFoodPublishedAt, RadrootsFoodQuantity, RadrootsFoodText, RadrootsFoodUnit, food_media_blossom_digest, food_media_http_url_is_valid, }, - kinds::KIND_CLASSIFIED_LISTING, + listing::classified::RadrootsClassifiedListingPartition, wire::DEFAULT_RAW_JSON_MAX_BYTES, }; diff --git a/crates/event_codec/src/food_availability/inbound/registry_v7/tests.rs b/crates/event_codec/src/food_availability/inbound/registry_v7/tests.rs @@ -1,5 +1,5 @@ use super::*; -use radroots_event::RadrootsEventTags; +use radroots_event::envelope::RadrootsEventTags; const HASH: &str = "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"; diff --git a/crates/event_codec/src/geochat/decode.rs b/crates/event_codec/src/geochat/decode.rs @@ -4,7 +4,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::{geochat::RadrootsGeoChat, kinds::KIND_GEOCHAT}; +use radroots_event::{envelope::kind::KIND_GEOCHAT, social::geochat::RadrootsGeoChat}; use crate::error::EventParseError; use crate::parsed::{RadrootsParsedData, RadrootsParsedEvent}; diff --git a/crates/event_codec/src/geochat/encode.rs b/crates/event_codec/src/geochat/encode.rs @@ -6,8 +6,8 @@ use alloc::{ vec::Vec, }; -use radroots_event::geochat::RadrootsGeoChat; -use radroots_event::kinds::KIND_GEOCHAT; +use radroots_event::envelope::kind::KIND_GEOCHAT; +use radroots_event::social::geochat::RadrootsGeoChat; use crate::error::EventEncodeError; use radroots_event::wire::RadrootsNip01EventWireParts; diff --git a/crates/event_codec/src/gift_wrap/decode.rs b/crates/event_codec/src/gift_wrap/decode.rs @@ -5,8 +5,8 @@ use alloc::{ }; use radroots_event::{ - gift_wrap::{RadrootsGiftWrap, RadrootsGiftWrapRecipient}, - kinds::KIND_GIFT_WRAP, + envelope::kind::KIND_GIFT_WRAP, + social::gift_wrap::{RadrootsGiftWrap, RadrootsGiftWrapRecipient}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/gift_wrap/encode.rs b/crates/event_codec/src/gift_wrap/encode.rs @@ -6,8 +6,8 @@ use alloc::{ vec::Vec, }; -use radroots_event::gift_wrap::{RadrootsGiftWrap, RadrootsGiftWrapRecipient}; -use radroots_event::kinds::KIND_GIFT_WRAP; +use radroots_event::envelope::kind::KIND_GIFT_WRAP; +use radroots_event::social::gift_wrap::{RadrootsGiftWrap, RadrootsGiftWrapRecipient}; use crate::error::EventEncodeError; use radroots_event::wire::RadrootsNip01EventWireParts; diff --git a/crates/event_codec/src/group/decode.rs b/crates/event_codec/src/group/decode.rs @@ -5,7 +5,7 @@ use alloc::{ }; use radroots_event::{ - group::{ + social::group::{ KIND_GROUP_ADMINS, KIND_GROUP_CREATE_GROUP, KIND_GROUP_CREATE_INVITE, KIND_GROUP_DELETE_EVENT, KIND_GROUP_DELETE_GROUP, KIND_GROUP_EDIT_METADATA, KIND_GROUP_JOIN_REQUEST, KIND_GROUP_LEAVE_REQUEST, KIND_GROUP_MEMBERS, KIND_GROUP_METADATA, @@ -16,7 +16,7 @@ use radroots_event::{ RadrootsGroupMetadata, RadrootsGroupPutUser, RadrootsGroupRemoveUser, RadrootsGroupRole, RadrootsGroupRoles, RadrootsGroupUserRef, }, - tags::{TAG_D, TAG_E, TAG_H, TAG_P}, + tag::name::{TAG_D, TAG_E, TAG_H, TAG_P}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/group/encode.rs b/crates/event_codec/src/group/encode.rs @@ -6,7 +6,7 @@ use alloc::{ }; use radroots_event::{ - group::{ + social::group::{ KIND_GROUP_ADMINS, KIND_GROUP_CREATE_GROUP, KIND_GROUP_CREATE_INVITE, KIND_GROUP_DELETE_EVENT, KIND_GROUP_DELETE_GROUP, KIND_GROUP_EDIT_METADATA, KIND_GROUP_JOIN_REQUEST, KIND_GROUP_LEAVE_REQUEST, KIND_GROUP_MEMBERS, KIND_GROUP_METADATA, @@ -17,7 +17,7 @@ use radroots_event::{ RadrootsGroupMetadata, RadrootsGroupPutUser, RadrootsGroupRemoveUser, RadrootsGroupRole, RadrootsGroupRoles, RadrootsGroupUserRef, }, - tags::{TAG_D, TAG_E, TAG_H, TAG_P}, + tag::name::{TAG_D, TAG_E, TAG_H, TAG_P}, }; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/group/mod.rs b/crates/event_codec/src/group/mod.rs @@ -3,7 +3,7 @@ pub mod encode; #[cfg(test)] mod tests { - use radroots_event::group::{ + use radroots_event::social::group::{ KIND_GROUP_ADMINS, KIND_GROUP_CREATE_GROUP, KIND_GROUP_CREATE_INVITE, KIND_GROUP_DELETE_EVENT, KIND_GROUP_DELETE_GROUP, KIND_GROUP_EDIT_METADATA, KIND_GROUP_JOIN_REQUEST, KIND_GROUP_LEAVE_REQUEST, KIND_GROUP_MEMBERS, KIND_GROUP_METADATA, diff --git a/crates/event_codec/src/http_auth/decode.rs b/crates/event_codec/src/http_auth/decode.rs @@ -2,8 +2,8 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - http_auth::{KIND_HTTP_AUTH, RadrootsHttpAuth}, - tags::{TAG_METHOD, TAG_PAYLOAD, TAG_URL_AUTH}, + social::http_auth::{KIND_HTTP_AUTH, RadrootsHttpAuth}, + tag::name::{TAG_METHOD, TAG_PAYLOAD, TAG_URL_AUTH}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/http_auth/encode.rs b/crates/event_codec/src/http_auth/encode.rs @@ -2,8 +2,8 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - http_auth::{KIND_HTTP_AUTH, RadrootsHttpAuth}, - tags::{TAG_METHOD, TAG_PAYLOAD, TAG_URL_AUTH}, + social::http_auth::{KIND_HTTP_AUTH, RadrootsHttpAuth}, + tag::name::{TAG_METHOD, TAG_PAYLOAD, TAG_URL_AUTH}, }; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/http_auth/mod.rs b/crates/event_codec/src/http_auth/mod.rs @@ -3,7 +3,7 @@ pub mod encode; #[cfg(test)] mod tests { - use radroots_event::{http_auth::RadrootsHttpAuth, kinds::KIND_POST}; + use radroots_event::{envelope::kind::KIND_POST, social::http_auth::RadrootsHttpAuth}; use crate::error::{EventEncodeError, EventParseError}; use crate::http_auth::decode::{data_from_event, http_auth_from_event, parsed_from_event}; diff --git a/crates/event_codec/src/job/feedback/decode.rs b/crates/event_codec/src/job/feedback/decode.rs @@ -1,6 +1,6 @@ use radroots_event::{ - RadrootsEventPtr, job::JobPaymentRequest, job_feedback::RadrootsJobFeedback, - kinds::KIND_JOB_FEEDBACK, + envelope::kind::KIND_JOB_FEEDBACK, social::job::JobPaymentRequest, + social::job_feedback::RadrootsJobFeedback, tag::RadrootsEventPtr, }; #[cfg(not(feature = "std"))] diff --git a/crates/event_codec/src/job/feedback/encode.rs b/crates/event_codec/src/job/feedback/encode.rs @@ -1,4 +1,6 @@ -use radroots_event::{job_feedback::RadrootsJobFeedback, kinds::KIND_JOB_FEEDBACK}; +use radroots_event::{ + envelope::kind::KIND_JOB_FEEDBACK, social::job_feedback::RadrootsJobFeedback, +}; use crate::job::encode::{JobEncodeError, canonicalize_tags}; use crate::job::util::{feedback_status_tag, push_amount_tag_msat}; diff --git a/crates/event_codec/src/job/request/decode.rs b/crates/event_codec/src/job/request/decode.rs @@ -1,6 +1,6 @@ use radroots_event::{ - job_request::{RadrootsJobInput, RadrootsJobParam, RadrootsJobRequest}, - kinds::is_request_kind, + envelope::kind::is_request_kind, + social::job_request::{RadrootsJobInput, RadrootsJobParam, RadrootsJobRequest}, }; #[cfg(not(feature = "std"))] diff --git a/crates/event_codec/src/job/request/encode.rs b/crates/event_codec/src/job/request/encode.rs @@ -1,4 +1,4 @@ -use radroots_event::{job_request::RadrootsJobRequest, kinds::is_request_kind}; +use radroots_event::{envelope::kind::is_request_kind, social::job_request::RadrootsJobRequest}; use crate::job::encode::{JobEncodeError, canonicalize_tags}; use crate::job::util::{job_input_type_tag, push_bid_tag_sat}; diff --git a/crates/event_codec/src/job/result/decode.rs b/crates/event_codec/src/job/result/decode.rs @@ -1,6 +1,7 @@ use radroots_event::{ - RadrootsEventPtr, job::JobPaymentRequest, job_request::RadrootsJobInput, - job_result::RadrootsJobResult, kinds::is_result_kind, + envelope::kind::is_result_kind, social::job::JobPaymentRequest, + social::job_request::RadrootsJobInput, social::job_result::RadrootsJobResult, + tag::RadrootsEventPtr, }; #[cfg(not(feature = "std"))] diff --git a/crates/event_codec/src/job/result/encode.rs b/crates/event_codec/src/job/result/encode.rs @@ -1,4 +1,4 @@ -use radroots_event::{job_result::RadrootsJobResult, kinds::is_result_kind}; +use radroots_event::{envelope::kind::is_result_kind, social::job_result::RadrootsJobResult}; use crate::job::encode::{JobEncodeError, canonicalize_tags}; use crate::job::util::{job_input_type_tag, push_amount_tag_msat}; diff --git a/crates/event_codec/src/job/traits.rs b/crates/event_codec/src/job/traits.rs @@ -5,8 +5,8 @@ use crate::parsed::{RadrootsParsedData, RadrootsParsedEvent}; #[cfg(not(feature = "std"))] use alloc::{borrow::ToOwned, string::String, vec::Vec}; use radroots_event::{ - job_feedback::RadrootsJobFeedback, job_request::RadrootsJobRequest, - job_result::RadrootsJobResult, + social::job_feedback::RadrootsJobFeedback, social::job_request::RadrootsJobRequest, + social::job_result::RadrootsJobResult, }; use crate::job::{ @@ -176,7 +176,7 @@ impl<'a, E: JobEventBorrow<'a>> JobEventLike for BorrowedEventAdapter<'a, E> { } } -impl<'a> JobEventBorrow<'a> for radroots_event::RadrootsEventEnvelope { +impl<'a> JobEventBorrow<'a> for radroots_event::envelope::RadrootsEventEnvelope { #[inline] fn raw_id(&'a self) -> String { self.id_hex() diff --git a/crates/event_codec/src/job/util.rs b/crates/event_codec/src/job/util.rs @@ -6,8 +6,8 @@ use alloc::{ }; use radroots_event::{ - job::{JobFeedbackStatus, JobInputType}, - job_request::{RadrootsJobInput, RadrootsJobParam}, + social::job::{JobFeedbackStatus, JobInputType}, + social::job_request::{RadrootsJobInput, RadrootsJobParam}, }; use crate::job::error::JobParseError; diff --git a/crates/event_codec/src/knowledge/decode.rs b/crates/event_codec/src/knowledge/decode.rs @@ -4,7 +4,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_CONTRIBUTION_ATTESTATION, KIND_EVIDENCE_BOUNTY, KIND_KNOWLEDGE_CHANGE_PROPOSAL, KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_FIELD_REPORT, KIND_KNOWLEDGE_RELATION, KIND_KNOWLEDGE_REVIEW, KIND_KNOWLEDGE_SOURCE, KIND_WIKI_ARTICLE, KIND_WIKI_MERGE_REQUEST, @@ -25,8 +25,10 @@ use radroots_event::knowledge::{ validate_wiki_article, validate_wiki_d_tag, validate_wiki_merge_request, validate_wiki_redirect, }; -use radroots_event::tags::{TAG_A, TAG_CONTRACT, TAG_D, TAG_E, TAG_G, TAG_P, TAG_SUMMARY, TAG_T}; -use radroots_event::{RadrootsEventEnvelope, RadrootsEventRef}; +use radroots_event::tag::name::{ + TAG_A, TAG_CONTRACT, TAG_D, TAG_E, TAG_G, TAG_P, TAG_SUMMARY, TAG_T, +}; +use radroots_event::{envelope::RadrootsEventEnvelope, tag::RadrootsEventRef}; use serde::de::DeserializeOwned; use crate::error::EventParseError; diff --git a/crates/event_codec/src/knowledge/encode.rs b/crates/event_codec/src/knowledge/encode.rs @@ -6,8 +6,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::RadrootsEventRef; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_CONTRIBUTION_ATTESTATION, KIND_EVIDENCE_BOUNTY, KIND_KNOWLEDGE_CHANGE_PROPOSAL, KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_FIELD_REPORT, KIND_KNOWLEDGE_RELATION, KIND_KNOWLEDGE_REVIEW, KIND_KNOWLEDGE_SOURCE, KIND_WIKI_ARTICLE, KIND_WIKI_MERGE_REQUEST, @@ -28,7 +27,10 @@ use radroots_event::knowledge::{ validate_knowledge_source, validate_wiki_article, validate_wiki_merge_request, validate_wiki_redirect, }; -use radroots_event::tags::{TAG_A, TAG_CONTRACT, TAG_D, TAG_E, TAG_G, TAG_P, TAG_SUMMARY, TAG_T}; +use radroots_event::tag::RadrootsEventRef; +use radroots_event::tag::name::{ + TAG_A, TAG_CONTRACT, TAG_D, TAG_E, TAG_G, TAG_P, TAG_SUMMARY, TAG_T, +}; use serde::Serialize; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/knowledge/verification.rs b/crates/event_codec/src/knowledge/verification.rs @@ -3,8 +3,8 @@ use alloc::string::{String, ToString}; use core::fmt; -use radroots_event::RadrootsEventEnvelope; use radroots_event::contract::RadrootsContractValidationError; +use radroots_event::envelope::RadrootsEventEnvelope; use radroots_event::knowledge::{ RadrootsContributionAttestation, RadrootsEvidenceBounty, RadrootsKnowledgeChangeProposal, RadrootsKnowledgeClaim, RadrootsKnowledgeFieldReport, RadrootsKnowledgeRelation, diff --git a/crates/event_codec/src/list/decode.rs b/crates/event_codec/src/list/decode.rs @@ -2,9 +2,9 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - kinds::KIND_LIST_READ_WRITE_RELAYS, - list::{RadrootsList, RadrootsListEntry}, - tags::TAG_R, + envelope::kind::KIND_LIST_READ_WRITE_RELAYS, + social::list::{RadrootsList, RadrootsListEntry}, + tag::name::TAG_R, }; use super::is_generic_list_codec_kind; diff --git a/crates/event_codec/src/list/encode.rs b/crates/event_codec/src/list/encode.rs @@ -2,9 +2,9 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - kinds::KIND_LIST_READ_WRITE_RELAYS, - list::{RadrootsList, RadrootsListEntry}, - tags::TAG_R, + envelope::kind::KIND_LIST_READ_WRITE_RELAYS, + social::list::{RadrootsList, RadrootsListEntry}, + tag::name::TAG_R, }; use super::is_generic_list_codec_kind; diff --git a/crates/event_codec/src/list/mod.rs b/crates/event_codec/src/list/mod.rs @@ -1,7 +1,9 @@ pub mod decode; pub mod encode; -use radroots_event::kinds::{KIND_CALENDAR, is_nip51_list_set_kind, is_nip51_standard_list_kind}; +use radroots_event::envelope::kind::{ + KIND_CALENDAR, is_nip51_list_set_kind, is_nip51_standard_list_kind, +}; pub(crate) fn is_generic_list_codec_kind(kind: u32) -> bool { is_nip51_standard_list_kind(kind) || (is_nip51_list_set_kind(kind) && kind != KIND_CALENDAR) @@ -11,8 +13,8 @@ pub(crate) fn is_generic_list_codec_kind(kind: u32) -> bool { mod tests { use super::{decode::list_from_tags, encode::list_build_tags, is_generic_list_codec_kind}; use radroots_event::{ - kinds::{KIND_CALENDAR, KIND_LIST_MUTE, KIND_LIST_SET_FOLLOW, KIND_POST}, - list::{RadrootsList, RadrootsListEntry}, + envelope::kind::{KIND_CALENDAR, KIND_LIST_MUTE, KIND_LIST_SET_FOLLOW, KIND_POST}, + social::list::{RadrootsList, RadrootsListEntry}, }; #[test] diff --git a/crates/event_codec/src/list_set/decode.rs b/crates/event_codec/src/list_set/decode.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; -use radroots_event::{list::RadrootsListEntry, list_set::RadrootsListSet}; +use radroots_event::{social::list::RadrootsListEntry, social::list_set::RadrootsListSet}; use crate::error::EventParseError; #[cfg(feature = "serde_json")] diff --git a/crates/event_codec/src/list_set/encode.rs b/crates/event_codec/src/list_set/encode.rs @@ -5,7 +5,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::list_set::RadrootsListSet; +use radroots_event::social::list_set::RadrootsListSet; use crate::error::EventEncodeError; #[cfg(feature = "serde_json")] @@ -75,7 +75,7 @@ pub fn to_wire_parts_with_kind( #[cfg(feature = "serde_json")] pub fn list_set_private_entries_json( - entries: &[radroots_event::list::RadrootsListEntry], + entries: &[radroots_event::social::list::RadrootsListEntry], ) -> Result<String, EventEncodeError> { let tags = list_entries_to_tags(entries)?; serde_json::to_string(&tags).map_err(|_| EventEncodeError::Json) diff --git a/crates/event_codec/src/list_set/mod.rs b/crates/event_codec/src/list_set/mod.rs @@ -2,7 +2,7 @@ pub mod decode; pub mod encode; use crate::d_tag::is_d_tag_base64url; -use radroots_event::kinds::{KIND_CALENDAR, is_nip51_list_set_kind}; +use radroots_event::envelope::kind::{KIND_CALENDAR, is_nip51_list_set_kind}; pub(crate) const fn is_generic_list_set_codec_kind(kind: u32) -> bool { is_nip51_list_set_kind(kind) && kind != KIND_CALENDAR @@ -30,9 +30,9 @@ mod tests { }; use crate::error::{EventEncodeError, EventParseError}; use radroots_event::{ - kinds::{KIND_CALENDAR, KIND_LIST_SET_FOLLOW, KIND_POST, is_nip51_list_set_kind}, - list::RadrootsListEntry, - list_set::RadrootsListSet, + envelope::kind::{KIND_CALENDAR, KIND_LIST_SET_FOLLOW, KIND_POST, is_nip51_list_set_kind}, + social::list::RadrootsListEntry, + social::list_set::RadrootsListSet, }; #[test] diff --git a/crates/event_codec/src/manifest.rs b/crates/event_codec/src/manifest.rs @@ -5,7 +5,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::RADROOTS_EVENT_VERSION; +use radroots_event::contract::VERSION; use radroots_event::contract::{ RADROOTS_EVENT_CONTRACT_REGISTRY_VERSION, RadrootsContentSchema, RadrootsContractFamily, RadrootsEventClass, RadrootsEventContract, RadrootsEventDiscriminator, RadrootsEventPrivacy, @@ -135,7 +135,7 @@ pub fn knowledge_contract_manifest() -> RadrootsKnowledgeContractManifest { RadrootsKnowledgeContractManifest { schema_version: RADROOTS_KNOWLEDGE_CONTRACT_MANIFEST_SCHEMA_VERSION, registry_version: RADROOTS_EVENT_CONTRACT_REGISTRY_VERSION, - radroots_event_version: RADROOTS_EVENT_VERSION.to_string(), + radroots_event_version: VERSION.to_string(), radroots_event_codec_version: env!("CARGO_PKG_VERSION").to_string(), contract_count: contracts.len(), contracts, @@ -270,9 +270,9 @@ fn discriminator_manifest( } fn classified_listing_partition_label( - value: radroots_event::classified_listing::RadrootsClassifiedListingPartition, + value: radroots_event::listing::classified::RadrootsClassifiedListingPartition, ) -> &'static str { - use radroots_event::classified_listing::RadrootsClassifiedListingPartition; + use radroots_event::listing::classified::RadrootsClassifiedListingPartition; match value { RadrootsClassifiedListingPartition::FocusedFoodAvailability => "focused_food_availability", @@ -464,8 +464,8 @@ fn reducer_label(value: RadrootsReducer) -> &'static str { mod tests { use super::{discriminator_manifest, reducer_label, standard_label}; use radroots_event::{ - classified_listing::RadrootsClassifiedListingPartition, contract::{RadrootsEventDiscriminator, RadrootsNostrStandard, RadrootsReducer}, + listing::classified::RadrootsClassifiedListingPartition, }; #[test] diff --git a/crates/event_codec/src/manifest/registry_v7.rs b/crates/event_codec/src/manifest/registry_v7.rs @@ -6,7 +6,6 @@ use alloc::{ }; use radroots_event::{ - classified_listing::RadrootsClassifiedListingPartition, contract::{ AuthorRole, RadrootsContentSchema, RadrootsEventAuthoringPolicy, RadrootsEventClass, RadrootsEventContract, RadrootsEventDiscriminator, RadrootsEventPrivacy, @@ -14,6 +13,7 @@ use radroots_event::{ RadrootsTagCardinality, RadrootsTagContract, RadrootsTagSemantic, RadrootsTagValueType, all_event_contracts_registry_v7, all_kind_contracts_registry_v7, }, + listing::classified::RadrootsClassifiedListingPartition, }; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; diff --git a/crates/event_codec/src/message/decode.rs b/crates/event_codec/src/message/decode.rs @@ -4,7 +4,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::{kinds::KIND_MESSAGE, message::RadrootsMessage}; +use radroots_event::{envelope::kind::KIND_MESSAGE, social::message::RadrootsMessage}; use crate::error::EventParseError; use crate::message::tags::{parse_recipients, parse_reply_tag, parse_subject_tag}; diff --git a/crates/event_codec/src/message/encode.rs b/crates/event_codec/src/message/encode.rs @@ -1,8 +1,8 @@ #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; -use radroots_event::kinds::KIND_MESSAGE; -use radroots_event::message::RadrootsMessage; +use radroots_event::envelope::kind::KIND_MESSAGE; +use radroots_event::social::message::RadrootsMessage; use crate::error::EventEncodeError; use crate::message::tags::{build_recipient_tags, build_reply_tag, build_subject_tag}; diff --git a/crates/event_codec/src/message/tags.rs b/crates/event_codec/src/message/tags.rs @@ -6,7 +6,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::{RadrootsEventPtr, message::RadrootsMessageRecipient}; +use radroots_event::{social::message::RadrootsMessageRecipient, tag::RadrootsEventPtr}; use crate::error::{EventEncodeError, EventParseError}; @@ -156,7 +156,7 @@ pub(crate) fn parse_subject_tag(tags: &[Vec<String>]) -> Result<Option<String>, mod tests { use super::*; use crate::test_fixtures::RELAY_PRIMARY_WSS; - use radroots_event::{RadrootsEventPtr, message::RadrootsMessageRecipient}; + use radroots_event::{social::message::RadrootsMessageRecipient, tag::RadrootsEventPtr}; #[test] fn parse_recipients_rejects_missing_p_tags() { diff --git a/crates/event_codec/src/message_file/decode.rs b/crates/event_codec/src/message_file/decode.rs @@ -5,8 +5,8 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_MESSAGE_FILE, - message_file::{RadrootsMessageFile, RadrootsMessageFileDimensions}, + envelope::kind::KIND_MESSAGE_FILE, + social::message_file::{RadrootsMessageFile, RadrootsMessageFileDimensions}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/message_file/encode.rs b/crates/event_codec/src/message_file/encode.rs @@ -7,8 +7,8 @@ use alloc::{ vec::Vec, }; -use radroots_event::kinds::KIND_MESSAGE_FILE; -use radroots_event::message_file::{RadrootsMessageFile, RadrootsMessageFileDimensions}; +use radroots_event::envelope::kind::KIND_MESSAGE_FILE; +use radroots_event::social::message_file::{RadrootsMessageFile, RadrootsMessageFileDimensions}; use crate::error::EventEncodeError; use crate::message::tags::{build_recipient_tags, build_reply_tag, build_subject_tag}; diff --git a/crates/event_codec/src/operational_listing/decode.rs b/crates/event_codec/src/operational_listing/decode.rs @@ -7,22 +7,22 @@ use alloc::{ use radroots_core::pricing::Discount; use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; use radroots_event::{ - RadrootsEventEnvelope, + envelope::RadrootsEventEnvelope, + envelope::kind::{KIND_FARM, KIND_PLOT, KIND_RESOURCE_AREA, is_classified_listing_kind}, farm::RadrootsFarmRef, - ids::{RadrootsDTag, RadrootsInventoryBinId}, - kinds::{KIND_FARM, KIND_PLOT, KIND_RESOURCE_AREA, is_classified_listing_kind}, - location::is_public_geohash5, - operational_listing::RadrootsOperationalListingParseError, - operational_listing::{ + farm::location::is_public_geohash5, + farm::plot::RadrootsPlotRef, + farm::resource_area::RadrootsResourceAreaRef, + id::{RadrootsDTag, RadrootsInventoryBinId}, + listing::operational::RadrootsOperationalListingParseError, + listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingDeliveryMethod, RadrootsOperationalListingImage, RadrootsOperationalListingImageSize, RadrootsOperationalListingProduct, RadrootsOperationalListingPublicLocation, RadrootsOperationalListingStatus, }, - plot::RadrootsPlotRef, - resource_area::RadrootsResourceAreaRef, - tags::{TAG_D, TAG_PUBLISHED_AT}, + tag::name::{TAG_D, TAG_PUBLISHED_AT}, }; use crate::d_tag::validate_d_tag_tag; diff --git a/crates/event_codec/src/operational_listing/encode.rs b/crates/event_codec/src/operational_listing/encode.rs @@ -6,8 +6,8 @@ use alloc::{format, string::ToString}; use alloc::{string::String, vec::Vec}; #[cfg(feature = "serde_json")] -use radroots_event::kinds::{KIND_CLASSIFIED_LISTING, is_classified_listing_kind}; -use radroots_event::operational_listing::RadrootsOperationalListing; +use radroots_event::envelope::kind::{KIND_CLASSIFIED_LISTING, is_classified_listing_kind}; +use radroots_event::listing::operational::RadrootsOperationalListing; use crate::error::EventEncodeError; use crate::operational_listing::tags::operational_listing_tags; @@ -74,8 +74,8 @@ mod tests { use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; use radroots_event::{ farm::RadrootsFarmRef, - ids::{RadrootsDTag, RadrootsInventoryBinId}, - operational_listing::{RadrootsOperationalListingBin, RadrootsOperationalListingProduct}, + id::{RadrootsDTag, RadrootsInventoryBinId}, + listing::operational::{RadrootsOperationalListingBin, RadrootsOperationalListingProduct}, }; fn decimal(value: &str) -> Decimal { diff --git a/crates/event_codec/src/operational_listing/tags.rs b/crates/event_codec/src/operational_listing/tags.rs @@ -11,18 +11,18 @@ use alloc::{ use radroots_core::Money; #[cfg(any(feature = "serde_json", test))] use radroots_core::pricing::Discount; +use radroots_event::envelope::kind::{KIND_FARM, KIND_PLOT, KIND_RESOURCE_AREA}; use radroots_event::farm::RadrootsFarmRef; -use radroots_event::kinds::{KIND_FARM, KIND_PLOT, KIND_RESOURCE_AREA}; -use radroots_event::location::{has_textual_locality, is_public_geohash5}; -use radroots_event::operational_listing::{ +use radroots_event::farm::location::{has_textual_locality, is_public_geohash5}; +use radroots_event::farm::plot::RadrootsPlotRef; +use radroots_event::farm::resource_area::RadrootsResourceAreaRef; +use radroots_event::listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingDeliveryMethod, RadrootsOperationalListingImage, RadrootsOperationalListingPublicLocation, RadrootsOperationalListingStatus, }; -use radroots_event::plot::RadrootsPlotRef; -use radroots_event::resource_area::RadrootsResourceAreaRef; -use radroots_event::tags::{TAG_D, TAG_PUBLISHED_AT}; +use radroots_event::tag::name::{TAG_D, TAG_PUBLISHED_AT}; use crate::d_tag::validate_d_tag; use crate::error::EventEncodeError; @@ -462,8 +462,8 @@ mod tests { }; use radroots_core::pricing::{DiscountScope, DiscountThreshold, DiscountValue}; use radroots_core::{Currency, Decimal, Quantity, QuantityPrice, Unit}; - use radroots_event::ids::{RadrootsDTag, RadrootsInventoryBinId}; - use radroots_event::operational_listing::{ + use radroots_event::id::{RadrootsDTag, RadrootsInventoryBinId}; + use radroots_event::listing::operational::{ RadrootsOperationalListingImageSize, RadrootsOperationalListingProduct, RadrootsOperationalListingStatus, }; diff --git a/crates/event_codec/src/order/decode.rs b/crates/event_codec/src/order/decode.rs @@ -3,15 +3,16 @@ use alloc::{string::String, vec::Vec}; #[cfg(feature = "serde_json")] use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventPtr, - ids::{RadrootsClassifiedListingAddress, RadrootsEventId, RadrootsIdParseError}, - kinds::is_order_event_kind, - order::{ + envelope::RadrootsEventEnvelope, + envelope::kind::is_order_event_kind, + id::{RadrootsClassifiedListingAddress, RadrootsEventId, RadrootsIdParseError}, + tag::RadrootsEventPtr, + tag::name::{TAG_D, TAG_E_PREV, TAG_E_ROOT}, + trade::order::{ RadrootsOrderCancellation, RadrootsOrderDecision, RadrootsOrderEnvelope, RadrootsOrderEnvelopeError, RadrootsOrderEventType, RadrootsOrderPayloadError, RadrootsOrderRequest, }, - tags::{TAG_D, TAG_E_PREV, TAG_E_ROOT}, }; #[cfg(feature = "serde_json")] use radroots_identity::PublicKey; @@ -352,20 +353,22 @@ mod tests { use crate::order::tags::TAG_LISTING_EVENT; use radroots_core::{Currency, Decimal, Money, Unit}; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, RadrootsEventPtr, - ids::{ + envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeParts, + envelope::kind::{KIND_ORDER_CANCELLATION, KIND_ORDER_DECISION, KIND_ORDER_REQUEST}, + id::{ RadrootsClassifiedListingAddress, RadrootsEventId, RadrootsInventoryBinId, RadrootsOrderId, RadrootsOrderQuoteId, }, - kinds::{KIND_ORDER_CANCELLATION, KIND_ORDER_DECISION, KIND_ORDER_REQUEST}, - order::{ + tag::RadrootsEventPtr, + tag::name::{TAG_D, TAG_E_PREV, TAG_E_ROOT}, + trade::order::{ RadrootsOrderCancellation, RadrootsOrderDecision, RadrootsOrderDecisionOutcome, RadrootsOrderEconomicItem, RadrootsOrderEconomicLine, RadrootsOrderEconomics, RadrootsOrderEnvelope, RadrootsOrderEnvelopeError, RadrootsOrderEventType, RadrootsOrderInventoryCommitment, RadrootsOrderItem, RadrootsOrderPayloadError, RadrootsOrderPricingBasis, RadrootsOrderRequest, }, - tags::{TAG_D, TAG_E_PREV, TAG_E_ROOT}, }; use radroots_identity::PublicKey; diff --git a/crates/event_codec/src/order/encode.rs b/crates/event_codec/src/order/encode.rs @@ -1,8 +1,8 @@ #[cfg(feature = "serde_json")] use radroots_event::{ - RadrootsEventPtr, - ids::RadrootsEventId, - order::{ + id::RadrootsEventId, + tag::RadrootsEventPtr, + trade::order::{ RadrootsOrderCancellation, RadrootsOrderDecision, RadrootsOrderEnvelope, RadrootsOrderEnvelopeError, RadrootsOrderEventType, RadrootsOrderPayloadError, RadrootsOrderRequest, @@ -192,9 +192,11 @@ mod tests { }; use crate::error::EventEncodeError; use radroots_event::{ - RadrootsEventPtr, - ids::RadrootsEventId, - order::{RadrootsOrderEnvelopeError, RadrootsOrderEventType, RadrootsOrderPayloadError}, + id::RadrootsEventId, + tag::RadrootsEventPtr, + trade::order::{ + RadrootsOrderEnvelopeError, RadrootsOrderEventType, RadrootsOrderPayloadError, + }, }; use radroots_identity::PublicKey; diff --git a/crates/event_codec/src/order/tags.rs b/crates/event_codec/src/order/tags.rs @@ -2,9 +2,9 @@ use alloc::{borrow::ToOwned, string::String, vec, vec::Vec}; use radroots_event::{ - RadrootsEventPtr, - ids::{RadrootsEventEnvelopePointer, RadrootsEventId}, - tags::{TAG_D, TAG_E_PREV, TAG_E_ROOT}, + id::{RadrootsEventEnvelopePointer, RadrootsEventId}, + tag::RadrootsEventPtr, + tag::name::{TAG_D, TAG_E_PREV, TAG_E_ROOT}, }; use crate::{ @@ -253,9 +253,9 @@ mod tests { job::error::JobParseError, }; use radroots_event::{ - RadrootsEventPtr, - kinds::KIND_CLASSIFIED_LISTING, - tags::{TAG_D, TAG_E_PREV, TAG_E_ROOT}, + envelope::kind::KIND_CLASSIFIED_LISTING, + tag::RadrootsEventPtr, + tag::name::{TAG_D, TAG_E_PREV, TAG_E_ROOT}, }; fn event_id(character: char) -> String { diff --git a/crates/event_codec/src/parsed.rs b/crates/event_codec/src/parsed.rs @@ -2,7 +2,7 @@ use alloc::{string::String, vec::Vec}; use crate::error::EventParseError; -use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts}; +use radroots_event::{envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts}; #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(Clone, Debug, PartialEq, Eq)] @@ -92,7 +92,7 @@ impl<T> RadrootsParsedEvent<T> { #[cfg(test)] mod tests { use super::{RadrootsParsedData, RadrootsParsedEvent}; - use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts}; + use radroots_event::{envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts}; const EVENT_ID: &str = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; const AUTHOR: &str = crate::test_fixtures::FIXTURE_ALICE_PUBLIC_KEY_HEX; diff --git a/crates/event_codec/src/plot/decode.rs b/crates/event_codec/src/plot/decode.rs @@ -7,10 +7,10 @@ use alloc::{ }; use radroots_event::{ + envelope::kind::{KIND_FARM, KIND_PLOT}, farm::RadrootsFarmRef, - kinds::{KIND_FARM, KIND_PLOT}, - plot::RadrootsPlot, - tags::TAG_D, + farm::plot::RadrootsPlot, + tag::name::TAG_D, }; use crate::d_tag::validate_d_tag_tag; diff --git a/crates/event_codec/src/plot/encode.rs b/crates/event_codec/src/plot/encode.rs @@ -6,10 +6,10 @@ use alloc::{ }; use radroots_event::{ + envelope::kind::{KIND_FARM, KIND_PLOT}, farm::RadrootsFarmRef, - kinds::{KIND_FARM, KIND_PLOT}, - plot::RadrootsPlot, - tags::TAG_D, + farm::plot::RadrootsPlot, + tag::name::TAG_D, }; use crate::d_tag::validate_d_tag; diff --git a/crates/event_codec/src/plot/mod.rs b/crates/event_codec/src/plot/mod.rs @@ -7,8 +7,8 @@ mod tests { use crate::plot::encode::{plot_address, plot_build_tags}; use radroots_event::{ farm::RadrootsFarmRef, - gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}, - plot::{RadrootsPlot, RadrootsPlotLocation}, + farm::change_set::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}, + farm::plot::{RadrootsPlot, RadrootsPlotLocation}, }; #[test] diff --git a/crates/event_codec/src/post/admission.rs b/crates/event_codec/src/post/admission.rs @@ -1,6 +1,6 @@ use core::fmt; -use radroots_event::{RadrootsEventEnvelope, contract::RadrootsEventContract}; +use radroots_event::{contract::RadrootsEventContract, envelope::RadrootsEventEnvelope}; use crate::{ post::inbound::{ diff --git a/crates/event_codec/src/post/authored.rs b/crates/event_codec/src/post/authored.rs @@ -6,7 +6,7 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_POST, + envelope::kind::KIND_POST, post::{ RADROOTS_ASK_MARKER_TAG_KEY, RADROOTS_ASK_MARKER_TAG_VALUE, RadrootsAuthoredAsk, RadrootsAuthoredPhotoUpdate, RadrootsAuthoredPostImage, RadrootsAuthoredUpdate, diff --git a/crates/event_codec/src/post/decode.rs b/crates/event_codec/src/post/decode.rs @@ -6,11 +6,11 @@ use alloc::{ }; use radroots_event::{ + envelope::kind::{KIND_FARM, KIND_POST}, farm::RadrootsFarmRef, - kinds::{KIND_FARM, KIND_POST}, post::RadrootsPost, social::{RadrootsSocialFarmAnchor, RadrootsSocialMediaMetadata, RadrootsSocialTarget}, - tags::{TAG_A, TAG_IMETA, TAG_Q, TAG_T}, + tag::name::{TAG_A, TAG_IMETA, TAG_Q, TAG_T}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/post/inbound/registry_v7.rs b/crates/event_codec/src/post/inbound/registry_v7.rs @@ -12,7 +12,7 @@ use core::fmt; use std::collections::{BTreeMap, BTreeSet}; use radroots_event::{ - kinds::KIND_POST, + envelope::kind::KIND_POST, post::{ RADROOTS_ASK_MARKER_TAG_VALUE, RADROOTS_POST_ALT_MAX_BYTES, RADROOTS_POST_CONTENT_MAX_BYTES, RADROOTS_POST_IMETA_MAX_COUNT, diff --git a/crates/event_codec/src/profile/admission.rs b/crates/event_codec/src/profile/admission.rs @@ -1,9 +1,9 @@ use core::fmt; use radroots_event::{ - RadrootsEventEnvelope, contract::{RadrootsEventContract, event_contract}, - kinds::KIND_PROFILE, + envelope::RadrootsEventEnvelope, + envelope::kind::KIND_PROFILE, }; use crate::profile::inbound::{ diff --git a/crates/event_codec/src/profile/authored.rs b/crates/event_codec/src/profile/authored.rs @@ -3,7 +3,7 @@ use alloc::vec::Vec; use core::fmt; use radroots_event::{ - kinds::KIND_PROFILE, + envelope::kind::KIND_PROFILE, profile::{RADROOTS_PROFILE_METADATA_MAX_CONTENT_BYTES, RadrootsAuthoredProfile}, wire::RadrootsNip01EventWireParts, }; diff --git a/crates/event_codec/src/profile/decode.rs b/crates/event_codec/src/profile/decode.rs @@ -6,7 +6,7 @@ use alloc::{ use super::RadrootsProfileData; use radroots_event::{ - kinds::KIND_PROFILE, + envelope::kind::KIND_PROFILE, profile::{ RADROOTS_PROFILE_TYPE_TAG_KEY, RadrootsProfile, RadrootsProfileType, radroots_profile_type_from_tag_value, diff --git a/crates/event_codec/src/reaction/decode.rs b/crates/event_codec/src/reaction/decode.rs @@ -5,8 +5,8 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_REACTION, reaction::RadrootsReaction, social::RadrootsSocialTarget, - tags::TAG_E_ROOT, + envelope::kind::KIND_REACTION, post::reaction::RadrootsReaction, social::RadrootsSocialTarget, + tag::name::TAG_E_ROOT, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/reaction/encode.rs b/crates/event_codec/src/reaction/encode.rs @@ -7,7 +7,7 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_REACTION, reaction::RadrootsReaction, social::RadrootsSocialTarget, + envelope::kind::KIND_REACTION, post::reaction::RadrootsReaction, social::RadrootsSocialTarget, }; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/relay_auth/decode.rs b/crates/event_codec/src/relay_auth/decode.rs @@ -2,8 +2,8 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - relay_auth::{KIND_RELAY_AUTH, RadrootsRelayAuth}, - tags::{TAG_CHALLENGE, TAG_RELAY}, + social::relay_auth::{KIND_RELAY_AUTH, RadrootsRelayAuth}, + tag::name::{TAG_CHALLENGE, TAG_RELAY}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/relay_auth/encode.rs b/crates/event_codec/src/relay_auth/encode.rs @@ -2,8 +2,8 @@ use alloc::{string::String, vec::Vec}; use radroots_event::{ - relay_auth::{KIND_RELAY_AUTH, RadrootsRelayAuth}, - tags::{TAG_CHALLENGE, TAG_RELAY}, + social::relay_auth::{KIND_RELAY_AUTH, RadrootsRelayAuth}, + tag::name::{TAG_CHALLENGE, TAG_RELAY}, }; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/relay_auth/mod.rs b/crates/event_codec/src/relay_auth/mod.rs @@ -3,7 +3,7 @@ pub mod encode; #[cfg(test)] mod tests { - use radroots_event::{kinds::KIND_POST, relay_auth::RadrootsRelayAuth}; + use radroots_event::{envelope::kind::KIND_POST, social::relay_auth::RadrootsRelayAuth}; use crate::error::{EventEncodeError, EventParseError}; use crate::relay_auth::decode::{data_from_event, parsed_from_event, relay_auth_from_event}; diff --git a/crates/event_codec/src/relay_document/decode.rs b/crates/event_codec/src/relay_document/decode.rs @@ -1,6 +1,6 @@ #![cfg(feature = "serde_json")] -use radroots_event::relay_document::RadrootsRelayDocument; +use radroots_event::social::relay_document::RadrootsRelayDocument; use crate::error::EventParseError; diff --git a/crates/event_codec/src/relay_document/encode.rs b/crates/event_codec/src/relay_document/encode.rs @@ -3,7 +3,7 @@ #[cfg(not(feature = "std"))] use alloc::string::String; -use radroots_event::relay_document::RadrootsRelayDocument; +use radroots_event::social::relay_document::RadrootsRelayDocument; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/reply/admission.rs b/crates/event_codec/src/reply/admission.rs @@ -1,6 +1,6 @@ use core::fmt; -use radroots_event::{RadrootsEventEnvelope, contract::RadrootsEventContract}; +use radroots_event::{contract::RadrootsEventContract, envelope::RadrootsEventEnvelope}; use crate::{ post::admission::RadrootsThreadExcludedPostCandidate, diff --git a/crates/event_codec/src/reply/authored.rs b/crates/event_codec/src/reply/authored.rs @@ -6,8 +6,8 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_POST, - reply::{RadrootsAuthoredNip10Reply, RadrootsNip10ReplyReference}, + envelope::kind::KIND_POST, + post::reply::{RadrootsAuthoredNip10Reply, RadrootsNip10ReplyReference}, wire::RadrootsNip01EventWireParts, }; diff --git a/crates/event_codec/src/reply/inbound/registry_v7.rs b/crates/event_codec/src/reply/inbound/registry_v7.rs @@ -7,13 +7,13 @@ use core::fmt; use std::collections::BTreeSet; use radroots_event::{ - ids::{RadrootsEventId, RadrootsIdParseError}, - kinds::KIND_POST, + envelope::kind::KIND_POST, + id::{RadrootsEventId, RadrootsIdParseError}, post::{ RADROOTS_POST_CONTENT_MAX_BYTES, RADROOTS_POST_EVENT_WIRE_MAX_BYTES, RADROOTS_POST_TAG_ELEMENT_MAX_BYTES, RADROOTS_POST_TAG_TOTAL_MAX_BYTES, }, - relay_hint::RadrootsNostrRelayHint, + tag::relay_hint::RadrootsNostrRelayHint, }; use radroots_identity::{Error as PublicKeyError, PublicKey}; diff --git a/crates/event_codec/src/report/decode.rs b/crates/event_codec/src/report/decode.rs @@ -5,10 +5,10 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_REPORT, - report::RadrootsReport, + envelope::kind::KIND_REPORT, + post::report::RadrootsReport, social::{RadrootsReportFileTarget, RadrootsReportType, RadrootsSocialTarget}, - tags::{TAG_A, TAG_E, TAG_MAGNET, TAG_P, TAG_SERVER, TAG_SHA256}, + tag::name::{TAG_A, TAG_E, TAG_MAGNET, TAG_P, TAG_SERVER, TAG_SHA256}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/report/encode.rs b/crates/event_codec/src/report/encode.rs @@ -7,10 +7,10 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_REPORT, - report::RadrootsReport, + envelope::kind::KIND_REPORT, + post::report::RadrootsReport, social::{RadrootsReportFileTarget, RadrootsReportType, RadrootsSocialTarget}, - tags::{TAG_A, TAG_E, TAG_MAGNET, TAG_P, TAG_SERVER, TAG_SHA256}, + tag::name::{TAG_A, TAG_E, TAG_MAGNET, TAG_P, TAG_SERVER, TAG_SHA256}, }; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/repost/decode.rs b/crates/event_codec/src/repost/decode.rs @@ -5,10 +5,10 @@ use alloc::{ }; use radroots_event::{ - kinds::{KIND_GENERIC_REPOST, KIND_POST, KIND_REPOST}, - repost::{RadrootsGenericRepost, RadrootsRepost}, + envelope::kind::{KIND_GENERIC_REPOST, KIND_POST, KIND_REPOST}, + post::repost::{RadrootsGenericRepost, RadrootsRepost}, social::RadrootsSocialTarget, - tags::{TAG_A, TAG_E, TAG_K, TAG_P}, + tag::name::{TAG_A, TAG_E, TAG_K, TAG_P}, }; use crate::error::EventParseError; diff --git a/crates/event_codec/src/repost/encode.rs b/crates/event_codec/src/repost/encode.rs @@ -7,10 +7,10 @@ use alloc::{ }; use radroots_event::{ - kinds::{KIND_GENERIC_REPOST, KIND_POST, KIND_REPOST}, - repost::{RadrootsGenericRepost, RadrootsRepost}, + envelope::kind::{KIND_GENERIC_REPOST, KIND_POST, KIND_REPOST}, + post::repost::{RadrootsGenericRepost, RadrootsRepost}, social::RadrootsSocialTarget, - tags::{TAG_A, TAG_E, TAG_K, TAG_P}, + tag::name::{TAG_A, TAG_E, TAG_K, TAG_P}, }; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/resource_area/decode.rs b/crates/event_codec/src/resource_area/decode.rs @@ -6,7 +6,9 @@ use alloc::{ vec::Vec, }; -use radroots_event::{kinds::KIND_RESOURCE_AREA, resource_area::RadrootsResourceArea, tags::TAG_D}; +use radroots_event::{ + envelope::kind::KIND_RESOURCE_AREA, farm::resource_area::RadrootsResourceArea, tag::name::TAG_D, +}; use crate::d_tag::validate_d_tag_tag; use crate::error::EventParseError; diff --git a/crates/event_codec/src/resource_area/encode.rs b/crates/event_codec/src/resource_area/encode.rs @@ -6,9 +6,9 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_RESOURCE_AREA, - resource_area::{RadrootsResourceArea, RadrootsResourceAreaRef}, - tags::TAG_D, + envelope::kind::KIND_RESOURCE_AREA, + farm::resource_area::{RadrootsResourceArea, RadrootsResourceAreaRef}, + tag::name::TAG_D, }; use crate::d_tag::validate_d_tag; diff --git a/crates/event_codec/src/resource_area/list_sets.rs b/crates/event_codec/src/resource_area/list_sets.rs @@ -8,11 +8,11 @@ use alloc::{ vec::Vec, }; +use radroots_event::envelope::kind::{KIND_FARM, KIND_PLOT}; use radroots_event::farm::RadrootsFarmRef; -use radroots_event::kinds::{KIND_FARM, KIND_PLOT}; -use radroots_event::list::RadrootsListEntry; -use radroots_event::list_set::RadrootsListSet; -use radroots_event::plot::RadrootsPlotRef; +use radroots_event::farm::plot::RadrootsPlotRef; +use radroots_event::social::list::RadrootsListEntry; +use radroots_event::social::list_set::RadrootsListSet; use crate::d_tag::validate_d_tag; use crate::error::EventEncodeError; diff --git a/crates/event_codec/src/resource_area/mod.rs b/crates/event_codec/src/resource_area/mod.rs @@ -13,9 +13,11 @@ mod tests { resource_area_stewards_list_set, }; use radroots_event::farm::RadrootsFarmRef; - use radroots_event::gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; - use radroots_event::plot::RadrootsPlotRef; - use radroots_event::resource_area::{ + use radroots_event::farm::change_set::{ + RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon, + }; + use radroots_event::farm::plot::RadrootsPlotRef; + use radroots_event::farm::resource_area::{ RadrootsResourceArea, RadrootsResourceAreaLocation, RadrootsResourceAreaRef, }; diff --git a/crates/event_codec/src/resource_cap/decode.rs b/crates/event_codec/src/resource_cap/decode.rs @@ -7,7 +7,8 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_RESOURCE_HARVEST_CAP, resource_cap::RadrootsResourceHarvestCap, tags::TAG_D, + envelope::kind::KIND_RESOURCE_HARVEST_CAP, farm::resource_cap::RadrootsResourceHarvestCap, + tag::name::TAG_D, }; use crate::d_tag::validate_d_tag_tag; diff --git a/crates/event_codec/src/resource_cap/encode.rs b/crates/event_codec/src/resource_cap/encode.rs @@ -6,14 +6,15 @@ use alloc::{ }; use radroots_event::{ - kinds::KIND_RESOURCE_AREA, resource_cap::RadrootsResourceHarvestCap, tags::TAG_D, + envelope::kind::KIND_RESOURCE_AREA, farm::resource_cap::RadrootsResourceHarvestCap, + tag::name::TAG_D, }; use crate::d_tag::validate_d_tag; use crate::error::EventEncodeError; #[cfg(feature = "serde_json")] -use radroots_event::kinds::KIND_RESOURCE_HARVEST_CAP; +use radroots_event::envelope::kind::KIND_RESOURCE_HARVEST_CAP; #[cfg(feature = "serde_json")] use radroots_event::wire::RadrootsNip01EventWireParts; @@ -107,8 +108,8 @@ mod tests { use super::*; use crate::test_fixtures::FIXTURE_ALICE_PUBLIC_KEY_HEX; use radroots_core::{Decimal, Quantity, Unit}; - use radroots_event::resource_area::RadrootsResourceAreaRef; - use radroots_event::resource_cap::RadrootsResourceHarvestProduct; + use radroots_event::farm::resource_area::RadrootsResourceAreaRef; + use radroots_event::farm::resource_cap::RadrootsResourceHarvestProduct; fn sample_cap_with_category(category: Option<&str>) -> RadrootsResourceHarvestCap { RadrootsResourceHarvestCap { diff --git a/crates/event_codec/src/resource_cap/mod.rs b/crates/event_codec/src/resource_cap/mod.rs @@ -8,8 +8,8 @@ mod tests { use crate::error::EventEncodeError; use crate::resource_cap::encode::resource_harvest_cap_build_tags; use radroots_core::{Decimal, Quantity, Unit}; - use radroots_event::resource_area::RadrootsResourceAreaRef; - use radroots_event::resource_cap::{ + use radroots_event::farm::resource_area::RadrootsResourceAreaRef; + use radroots_event::farm::resource_cap::{ RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct, }; diff --git a/crates/event_codec/src/seal/decode.rs b/crates/event_codec/src/seal/decode.rs @@ -4,7 +4,7 @@ use alloc::{ vec::Vec, }; -use radroots_event::{kinds::KIND_SEAL, seal::RadrootsSeal}; +use radroots_event::{envelope::kind::KIND_SEAL, social::seal::RadrootsSeal}; use crate::error::EventParseError; use crate::parsed::{RadrootsParsedData, RadrootsParsedEvent}; diff --git a/crates/event_codec/src/seal/encode.rs b/crates/event_codec/src/seal/encode.rs @@ -1,8 +1,8 @@ #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; -use radroots_event::kinds::KIND_SEAL; -use radroots_event::seal::RadrootsSeal; +use radroots_event::envelope::kind::KIND_SEAL; +use radroots_event::social::seal::RadrootsSeal; use crate::error::EventEncodeError; use radroots_event::wire::RadrootsNip01EventWireParts; diff --git a/crates/event_codec/src/tag_builders.rs b/crates/event_codec/src/tag_builders.rs @@ -11,14 +11,16 @@ use radroots_event::knowledge::{ RadrootsWikiMergeRequest, RadrootsWikiRedirect, }; use radroots_event::{ - app_data::RadrootsAppData, coop::RadrootsCoop, document::RadrootsDocument, farm::RadrootsFarm, - follow::RadrootsFollow, geochat::RadrootsGeoChat, gift_wrap::RadrootsGiftWrap, - job_feedback::RadrootsJobFeedback, job_request::RadrootsJobRequest, - job_result::RadrootsJobResult, list::RadrootsList, list_set::RadrootsListSet, - message::RadrootsMessage, message_file::RadrootsMessageFile, - operational_listing::RadrootsOperationalListing, plot::RadrootsPlot, - reaction::RadrootsReaction, resource_area::RadrootsResourceArea, - resource_cap::RadrootsResourceHarvestCap, seal::RadrootsSeal, + farm::RadrootsFarm, farm::coop::RadrootsCoop, farm::plot::RadrootsPlot, + farm::resource_area::RadrootsResourceArea, farm::resource_cap::RadrootsResourceHarvestCap, + listing::operational::RadrootsOperationalListing, post::document::RadrootsDocument, + post::reaction::RadrootsReaction, social::app_data::RadrootsAppData, + social::follow::RadrootsFollow, social::geochat::RadrootsGeoChat, + social::gift_wrap::RadrootsGiftWrap, social::job_feedback::RadrootsJobFeedback, + social::job_request::RadrootsJobRequest, social::job_result::RadrootsJobResult, + social::list::RadrootsList, social::list_set::RadrootsListSet, + social::message::RadrootsMessage, social::message_file::RadrootsMessageFile, + social::seal::RadrootsSeal, }; use crate::app_data::encode::app_data_build_tags; diff --git a/crates/event_codec/src/trade/mod.rs b/crates/event_codec/src/trade/mod.rs @@ -7,10 +7,10 @@ use alloc::{ #[cfg(feature = "serde_json")] use radroots_event::{ - RadrootsEventEnvelope, - ids::RadrootsTradeMutationId, - kinds::is_trade_mutation_event_kind, - tags::{TAG_D, TAG_E}, + envelope::RadrootsEventEnvelope, + envelope::kind::is_trade_mutation_event_kind, + id::RadrootsTradeMutationId, + tag::name::{TAG_D, TAG_E}, trade::{ RadrootsTradeMutationEnvelopeV1, RadrootsTradeProtocolError, canonical_trade_mutation_content, trade_mutation_from_canonical_content, @@ -213,8 +213,9 @@ fn map_trade_protocol_error_to_encode_error(error: RadrootsTradeProtocolError) - mod tests { use super::*; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, - ids::{ + envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeParts, + id::{ RadrootsClassifiedListingAddress, RadrootsDTag, RadrootsEventId, RadrootsInventoryBinId, RadrootsTradeId, }, @@ -330,7 +331,10 @@ mod tests { #[test] fn trade_mutation_event_build_roundtrips_canonical_content_and_tags() { let parts = trade_mutation_event_build(proposal()).unwrap(); - assert_eq!(parts.kind, radroots_event::kinds::KIND_TRADE_PROPOSAL); + assert_eq!( + parts.kind, + radroots_event::envelope::kind::KIND_TRADE_PROPOSAL + ); assert_eq!( parts.tags[0], vec![ @@ -472,7 +476,7 @@ mod tests { id: hex_64('e'), author: pubkey('a').to_hex(), created_at: 1_799_000_000, - kind: radroots_event::kinds::KIND_TRADE_DECISION, + kind: radroots_event::envelope::kind::KIND_TRADE_DECISION, tags: built.tags, content: built.content, sig: core::iter::repeat_n('f', 128).collect(), diff --git a/crates/event_codec/src/verification/v1/tests.rs b/crates/event_codec/src/verification/v1/tests.rs @@ -1,5 +1,5 @@ use super::*; -use radroots_event::RadrootsEventEnvelopeParts; +use radroots_event::envelope::RadrootsEventEnvelopeParts; #[test] fn id_verification_returns_the_exact_envelope() { diff --git a/crates/event_codec/tests/app_data.rs b/crates/event_codec/tests/app_data.rs @@ -2,8 +2,8 @@ mod common; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; use radroots_event::{ - app_data::{KIND_APP_DATA, RadrootsAppData}, - kinds::KIND_POST, + envelope::kind::KIND_POST, + social::app_data::{KIND_APP_DATA, RadrootsAppData}, }; use radroots_event_codec::app_data::decode::{ app_data_from_tags, data_from_event, parsed_from_event, diff --git a/crates/event_codec/tests/article.rs b/crates/event_codec/tests/article.rs @@ -4,11 +4,11 @@ mod common; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; use radroots_event::{ - article::RadrootsArticle, + envelope::kind::{KIND_ARTICLE, KIND_POST}, farm::RadrootsFarmRef, - kinds::{KIND_ARTICLE, KIND_POST}, + post::article::RadrootsArticle, social::{RadrootsSocialFarmAnchor, RadrootsSocialLocation}, - tags::{TAG_A, TAG_D, TAG_G, TAG_IMAGE, TAG_LOCATION, TAG_PUBLISHED_AT, TAG_T, TAG_TITLE}, + tag::name::{TAG_A, TAG_D, TAG_G, TAG_IMAGE, TAG_LOCATION, TAG_PUBLISHED_AT, TAG_T, TAG_TITLE}, }; use radroots_event_codec::{ article::{ diff --git a/crates/event_codec/tests/calendar.rs b/crates/event_codec/tests/calendar.rs @@ -1,6 +1,5 @@ use radroots_blossom::{BlobDescriptor, BlobUrl, MediaType, Sha256}; use radroots_event::{ - RadrootsAuthoredImage, RadrootsEventTags, calendar::{ RADROOTS_CALENDAR_MAX_COVERED_UTC_DAYS, RADROOTS_CALENDAR_SECONDS_PER_DAY, RadrootsAuthoredCalendar, RadrootsAuthoredCalendarDateEvent, @@ -9,11 +8,13 @@ use radroots_event::{ RadrootsCalendarEventReference, RadrootsCalendarEventRsvpStatus, RadrootsCalendarParticipant, RadrootsCalendarUid, RadrootsIanaTimeZoneId, covered_utc_days, }, - kinds::{ + envelope::RadrootsEventTags, + envelope::kind::{ KIND_CALENDAR, KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_EVENT_RSVP, KIND_CALENDAR_TIME_EVENT, KIND_POST, }, - tags::{ + media::RadrootsAuthoredImage, + tag::name::{ TAG_A, TAG_D, TAG_D_DAY, TAG_END, TAG_END_TZID, TAG_G, TAG_IMAGE, TAG_LOCATION, TAG_P, TAG_R, TAG_START, TAG_START_TZID, TAG_SUMMARY, TAG_T, TAG_TITLE, }, diff --git a/crates/event_codec/tests/calendar_conformance.rs b/crates/event_codec/tests/calendar_conformance.rs @@ -2,7 +2,6 @@ use std::{borrow::Cow, fs, path::Path}; use radroots_blossom::{BlobDescriptor, ByteVerifiedDescriptor, Error}; use radroots_event::{ - RadrootsAuthoredImage, calendar::{ RADROOTS_CALENDAR_MAX_COVERED_UTC_DAYS, RadrootsAuthoredCalendar, RadrootsAuthoredCalendarDateEvent, RadrootsAuthoredCalendarEventRsvp, @@ -15,6 +14,7 @@ use radroots_event::{ RadrootsParsedNip52CalendarCommon, RadrootsParsedNip52CalendarEventRsvp, }, contract::validate_event_contract_parts, + media::RadrootsAuthoredImage, }; use radroots_event_codec::{ calendar::{ @@ -534,11 +534,11 @@ fn assert_event_reference( ); assert_eq!(actual.relay(), relay, "{}", vector_id(vector)); - let parts = radroots_event::ids::RadrootsAddressableCoordinateParts::parse(coordinate) + let parts = radroots_event::id::RadrootsAddressableCoordinateParts::parse(coordinate) .expect("expected event reference coordinate"); let canonical_coordinate = format!("{}:{}:{}", parts.kind, parts.pubkey, parts.d_tag); let canonical_relay = - relay.is_none_or(|relay| radroots_event::ids::RadrootsRelayUrl::parse(relay).is_ok()); + relay.is_none_or(|relay| radroots_event::id::RadrootsRelayUrl::parse(relay).is_ok()); assert_eq!( actual.is_canonical(), coordinate == canonical_coordinate && canonical_relay, @@ -571,7 +571,7 @@ fn assert_revision_reference( ); assert_eq!(actual.relay(), relay, "{}", vector_id(vector)); let canonical_relay = - relay.is_none_or(|relay| radroots_event::ids::RadrootsRelayUrl::parse(relay).is_ok()); + relay.is_none_or(|relay| radroots_event::id::RadrootsRelayUrl::parse(relay).is_ok()); assert_eq!( actual.is_canonical(), event_id == actual.event_id().to_hex() && canonical_relay, @@ -601,7 +601,7 @@ fn assert_author_reference( ); assert_eq!(actual.relay(), relay, "{}", vector_id(vector)); let canonical_relay = - relay.is_none_or(|relay| radroots_event::ids::RadrootsRelayUrl::parse(relay).is_ok()); + relay.is_none_or(|relay| radroots_event::id::RadrootsRelayUrl::parse(relay).is_ok()); assert_eq!( actual.is_canonical(), pubkey == actual.pubkey().to_hex() && canonical_relay, diff --git a/crates/event_codec/tests/common/mod.rs b/crates/event_codec/tests/common/mod.rs @@ -1,7 +1,8 @@ #![allow(dead_code)] use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, RadrootsEventPtr, RadrootsEventRef, + envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts, tag::RadrootsEventPtr, + tag::RadrootsEventRef, }; use radroots_identity::PublicKey; diff --git a/crates/event_codec/tests/coverage_edges.rs b/crates/event_codec/tests/coverage_edges.rs @@ -1,6 +1,6 @@ #![cfg(feature = "serde_json")] -use radroots_event::kinds::KIND_POST; +use radroots_event::envelope::kind::KIND_POST; use radroots_event_codec::error::EventParseError; fn assert_invalid_kind<T>(result: Result<T, EventParseError>, expected: &'static str, got: u32) { diff --git a/crates/event_codec/tests/domain_encode_non_serde.rs b/crates/event_codec/tests/domain_encode_non_serde.rs @@ -5,19 +5,21 @@ use std::str::FromStr; use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; use radroots_event::{ - coop::{RadrootsCoop, RadrootsCoopLocation, RadrootsCoopRef}, - document::{RadrootsDocument, RadrootsDocumentSubject}, + farm::change_set::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}, + farm::coop::{RadrootsCoop, RadrootsCoopLocation, RadrootsCoopRef}, + farm::plot::{RadrootsPlot, RadrootsPlotLocation, RadrootsPlotRef}, + farm::resource_area::{ + RadrootsResourceArea, RadrootsResourceAreaLocation, RadrootsResourceAreaRef, + }, + farm::resource_cap::{RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct}, farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}, - gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}, - ids::{RadrootsDTag, RadrootsInventoryBinId}, - operational_listing::{ + id::{RadrootsDTag, RadrootsInventoryBinId}, + listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingDeliveryMethod, RadrootsOperationalListingProduct, RadrootsOperationalListingPublicLocation, }, - plot::{RadrootsPlot, RadrootsPlotLocation, RadrootsPlotRef}, - resource_area::{RadrootsResourceArea, RadrootsResourceAreaLocation, RadrootsResourceAreaRef}, - resource_cap::{RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct}, + post::document::{RadrootsDocument, RadrootsDocumentSubject}, }; use radroots_event_codec::coop::encode::{coop_build_tags, coop_ref_tags}; use radroots_event_codec::coop::list_sets::{coop_members_farms_list_set, coop_members_list_set}; diff --git a/crates/event_codec/tests/event_ref.rs b/crates/event_codec/tests/event_ref.rs @@ -2,7 +2,7 @@ mod common; #[path = "../src/test_fixtures.rs"] mod test_fixtures; -use radroots_event::kinds::KIND_POST; +use radroots_event::envelope::kind::KIND_POST; use radroots_event_codec::error::EventParseError; use radroots_event_codec::event_ref::{ build_event_ref_tag, find_event_ref_tag, parse_event_ref_tag, parse_nip10_ref_tags, diff --git a/crates/event_codec/tests/farm_crdt.rs b/crates/event_codec/tests/farm_crdt.rs @@ -1,11 +1,11 @@ #![cfg(feature = "serde_json")] use radroots_event::{ - farm_crdt::{ + farm::crdt::{ RADROOTS_FARM_CRDT_CHANGE_SCHEMA, RadrootsCrdtBackend, RadrootsFarmCrdtChange, RadrootsFarmCrdtDocumentKind, RadrootsFarmSemanticKind, }, - farm_workspace::RadrootsFarmWorkspaceRef, + farm::workspace::RadrootsFarmWorkspaceRef, }; use radroots_event_codec::farm_crdt::encode::to_wire_parts; diff --git a/crates/event_codec/tests/farm_workspace.rs b/crates/event_codec/tests/farm_workspace.rs @@ -1,16 +1,16 @@ #![cfg(feature = "serde_json")] use radroots_event::{ + envelope::kind::{KIND_FARM, KIND_FARM_FILE_METADATA}, farm::RadrootsFarmRef, - farm_crdt::KIND_FARM_CRDT_CHANGE, - farm_workspace::{ + farm::crdt::KIND_FARM_CRDT_CHANGE, + farm::workspace::{ KIND_FARM_WORKSPACE_MANIFEST, RADROOTS_FARM_WORKSPACE_PROTOCOL_VERSION, RADROOTS_FARM_WORKSPACE_SCHEMA, RadrootsFarmWorkspaceManifest, RadrootsFarmWorkspaceMediaServer, RadrootsFarmWorkspaceRelay, RadrootsFarmWorkspaceRelayMode, }, - kinds::{KIND_FARM, KIND_FARM_FILE_METADATA}, - tags::{TAG_A, TAG_H, TAG_P}, + tag::name::{TAG_A, TAG_H, TAG_P}, }; use radroots_event_codec::{ error::{EventEncodeError, EventParseError}, diff --git a/crates/event_codec/tests/field_events.rs b/crates/event_codec/tests/field_events.rs @@ -1,25 +1,25 @@ #![cfg(feature = "serde_json")] use radroots_event::{ + envelope::kind::{KIND_FARM_FILE_METADATA, KIND_POST}, farm::RadrootsFarmRef, - farm_crdt::{ + farm::crdt::{ RADROOTS_FARM_CRDT_CHANGE_SCHEMA, RadrootsCrdtBackend, RadrootsFarmCrdtChange, RadrootsFarmCrdtDocumentKind, RadrootsFarmSemanticKind, }, - farm_file::{RadrootsFarmFileDimensions, RadrootsFarmFileMetadata, RadrootsFarmFileSource}, - farm_workspace::{ + farm::file::{RadrootsFarmFileDimensions, RadrootsFarmFileMetadata, RadrootsFarmFileSource}, + farm::workspace::{ RADROOTS_FARM_WORKSPACE_PROTOCOL_VERSION, RADROOTS_FARM_WORKSPACE_SCHEMA, RadrootsFarmWorkspaceManifest, RadrootsFarmWorkspaceMediaServer, RadrootsFarmWorkspaceRef, RadrootsFarmWorkspaceRelay, RadrootsFarmWorkspaceRelayMode, }, - group::{ + social::group::{ KIND_GROUP_CREATE_INVITE, KIND_GROUP_METADATA, RadrootsGroupAdmins, RadrootsGroupCreateInvite, RadrootsGroupEditableMetadata, RadrootsGroupMetadata, RadrootsGroupPutUser, RadrootsGroupUserRef, }, - http_auth::RadrootsHttpAuth, - kinds::{KIND_FARM_FILE_METADATA, KIND_POST}, - relay_auth::RadrootsRelayAuth, + social::http_auth::RadrootsHttpAuth, + social::relay_auth::RadrootsRelayAuth, }; use radroots_event_codec::{ error::EventParseError, diff --git a/crates/event_codec/tests/file_metadata.rs b/crates/event_codec/tests/file_metadata.rs @@ -4,13 +4,13 @@ mod common; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; use radroots_event::{ - farm_crdt::RadrootsFarmCrdtDocumentKind, - farm_file::{RadrootsFarmFileDimensions, RadrootsFarmFileMetadata, RadrootsFarmFileSource}, - farm_workspace::RadrootsFarmWorkspaceRef, - file_metadata::RadrootsFileMetadata, - kinds::{KIND_POST, KIND_PUBLIC_FILE_METADATA}, + envelope::kind::{KIND_POST, KIND_PUBLIC_FILE_METADATA}, + farm::crdt::RadrootsFarmCrdtDocumentKind, + farm::file::{RadrootsFarmFileDimensions, RadrootsFarmFileMetadata, RadrootsFarmFileSource}, + farm::workspace::RadrootsFarmWorkspaceRef, + media::file_metadata::RadrootsFileMetadata, social::{RadrootsSocialMediaDimensions, RadrootsSocialMediaThumbnail}, - tags::{ + tag::name::{ TAG_ALT, TAG_DIMENSIONS, TAG_FALLBACK, TAG_MAGNET, TAG_MIME, TAG_ORIGINAL_SHA256, TAG_SERVICE, TAG_SHA256, TAG_SIZE, TAG_SUMMARY, TAG_THUMB, TAG_URL, }, diff --git a/crates/event_codec/tests/follow.rs b/crates/event_codec/tests/follow.rs @@ -4,8 +4,8 @@ mod test_fixtures; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; use radroots_event::{ - follow::{RadrootsFollow, RadrootsFollowProfile}, - kinds::{KIND_FOLLOW, KIND_POST}, + envelope::kind::{KIND_FOLLOW, KIND_POST}, + social::follow::{RadrootsFollow, RadrootsFollowProfile}, }; use radroots_event_codec::error::{EventEncodeError, EventParseError}; diff --git a/crates/event_codec/tests/food_availability_conformance.rs b/crates/event_codec/tests/food_availability_conformance.rs @@ -5,7 +5,7 @@ use std::{borrow::Cow, collections::BTreeSet, fs, path::Path}; use nostr::secp256k1::Message; use nostr::{Event as NostrEvent, JsonUtil, Keys, SECP256K1}; use radroots_blossom::{BlobDescriptor, BlobUrl, MediaType, Sha256}; -use radroots_event::food_availability::{ +use radroots_event::food::availability::{ RadrootsFoodAvailabilityDetails, RadrootsFoodAvailabilityDetailsParts, RadrootsFoodAvailabilityError, RadrootsFoodAvailabilityImage, RadrootsFoodAvailabilityStatus, RadrootsFoodContent, RadrootsFoodCurrency, RadrootsFoodIdentifier, RadrootsFoodImageDimensions, @@ -15,8 +15,8 @@ use radroots_event::food_availability::{ use radroots_event::media::RadrootsAuthoredImage; use radroots_event::wire::{RadrootsNip01EventWire, compute_canonical_nip01_event_id}; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, - classified_listing::RadrootsClassifiedListingPartition, + envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts, + listing::classified::RadrootsClassifiedListingPartition, }; use radroots_event_codec::food_availability::admission::{ RadrootsFoodAvailabilityAdmissionError, RadrootsFoodAvailabilityAdmissionOutcome, diff --git a/crates/event_codec/tests/geochat.rs b/crates/event_codec/tests/geochat.rs @@ -2,8 +2,8 @@ mod common; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; use radroots_event::{ - geochat::RadrootsGeoChat, - kinds::{KIND_GEOCHAT, KIND_POST}, + envelope::kind::{KIND_GEOCHAT, KIND_POST}, + social::geochat::RadrootsGeoChat, }; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::geochat::decode::{ diff --git a/crates/event_codec/tests/gift_wrap.rs b/crates/event_codec/tests/gift_wrap.rs @@ -3,8 +3,8 @@ mod common; mod test_fixtures; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; -use radroots_event::gift_wrap::{RadrootsGiftWrap, RadrootsGiftWrapRecipient}; -use radroots_event::kinds::{KIND_GIFT_WRAP, KIND_MESSAGE}; +use radroots_event::envelope::kind::{KIND_GIFT_WRAP, KIND_MESSAGE}; +use radroots_event::social::gift_wrap::{RadrootsGiftWrap, RadrootsGiftWrapRecipient}; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::gift_wrap::decode::{ diff --git a/crates/event_codec/tests/group.rs b/crates/event_codec/tests/group.rs @@ -1,4 +1,4 @@ -use radroots_event::group::{ +use radroots_event::social::group::{ KIND_GROUP_ADMINS, KIND_GROUP_CREATE_GROUP, KIND_GROUP_CREATE_INVITE, KIND_GROUP_DELETE_EVENT, KIND_GROUP_DELETE_GROUP, KIND_GROUP_EDIT_METADATA, KIND_GROUP_JOIN_REQUEST, KIND_GROUP_LEAVE_REQUEST, KIND_GROUP_MEMBERS, KIND_GROUP_METADATA, KIND_GROUP_PUT_USER, diff --git a/crates/event_codec/tests/job_feedback.rs b/crates/event_codec/tests/job_feedback.rs @@ -1,8 +1,10 @@ mod common; -use radroots_event::job::{JobFeedbackStatus, JobPaymentRequest}; -use radroots_event::job_feedback::RadrootsJobFeedback; -use radroots_event::kinds::{KIND_JOB_FEEDBACK, KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN}; +use radroots_event::envelope::kind::{ + KIND_JOB_FEEDBACK, KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN, +}; +use radroots_event::social::job::{JobFeedbackStatus, JobPaymentRequest}; +use radroots_event::social::job_feedback::RadrootsJobFeedback; use radroots_event_codec::job::encode::JobEncodeError; use radroots_event_codec::job::error::JobParseError; use radroots_event_codec::job::feedback::decode::{job_feedback_from_tags, parsed_from_event}; diff --git a/crates/event_codec/tests/job_request.rs b/crates/event_codec/tests/job_request.rs @@ -1,9 +1,11 @@ #[path = "../src/test_fixtures.rs"] mod test_fixtures; -use radroots_event::job::JobInputType; -use radroots_event::job_request::{RadrootsJobInput, RadrootsJobParam, RadrootsJobRequest}; -use radroots_event::kinds::{KIND_JOB_FEEDBACK, KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN}; +use radroots_event::envelope::kind::{ + KIND_JOB_FEEDBACK, KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN, +}; +use radroots_event::social::job::JobInputType; +use radroots_event::social::job_request::{RadrootsJobInput, RadrootsJobParam, RadrootsJobRequest}; use radroots_event_codec::job::encode::JobEncodeError; use radroots_event_codec::job::error::JobParseError; use radroots_event_codec::job::request::decode::{job_request_from_tags, parsed_from_event}; diff --git a/crates/event_codec/tests/job_result.rs b/crates/event_codec/tests/job_result.rs @@ -2,10 +2,10 @@ mod common; #[path = "../src/test_fixtures.rs"] mod test_fixtures; -use radroots_event::job::{JobInputType, JobPaymentRequest}; -use radroots_event::job_request::RadrootsJobInput; -use radroots_event::job_result::RadrootsJobResult; -use radroots_event::kinds::{KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN}; +use radroots_event::envelope::kind::{KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN}; +use radroots_event::social::job::{JobInputType, JobPaymentRequest}; +use radroots_event::social::job_request::RadrootsJobInput; +use radroots_event::social::job_result::RadrootsJobResult; use radroots_event_codec::job::encode::JobEncodeError; use radroots_event_codec::job::error::JobParseError; use radroots_event_codec::job::result::decode::{job_result_from_tags, parsed_from_event}; diff --git a/crates/event_codec/tests/job_traits.rs b/crates/event_codec/tests/job_traits.rs @@ -1,12 +1,14 @@ #[path = "../src/test_fixtures.rs"] mod test_fixtures; -use radroots_event::job::{JobFeedbackStatus, JobInputType, JobPaymentRequest}; -use radroots_event::job_feedback::RadrootsJobFeedback; -use radroots_event::job_request::{RadrootsJobInput, RadrootsJobParam, RadrootsJobRequest}; -use radroots_event::job_result::RadrootsJobResult; -use radroots_event::kinds::{KIND_JOB_FEEDBACK, KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN}; -use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts}; +use radroots_event::envelope::kind::{ + KIND_JOB_FEEDBACK, KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN, +}; +use radroots_event::social::job::{JobFeedbackStatus, JobInputType, JobPaymentRequest}; +use radroots_event::social::job_feedback::RadrootsJobFeedback; +use radroots_event::social::job_request::{RadrootsJobInput, RadrootsJobParam, RadrootsJobRequest}; +use radroots_event::social::job_result::RadrootsJobResult; +use radroots_event::{envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts}; use radroots_event_codec::job::feedback::encode::to_wire_parts as to_feedback_wire_parts; use radroots_event_codec::job::request::encode::to_wire_parts as to_request_wire_parts; use radroots_event_codec::job::result::encode::to_wire_parts as to_result_wire_parts; @@ -77,7 +79,7 @@ fn borrowed_event_adapter_builds_request_metadata() { fn sample_result() -> RadrootsJobResult { RadrootsJobResult { kind: u16::try_from(KIND_JOB_RESULT_MIN + 1).expect("result kind must fit NIP-01"), - request_event: radroots_event::RadrootsEventPtr { + request_event: radroots_event::tag::RadrootsEventPtr { id: "req".to_string(), relays: Some(RELAY_PRIMARY_WSS.to_string()), }, @@ -103,7 +105,7 @@ fn sample_feedback() -> RadrootsJobFeedback { kind: u16::try_from(KIND_JOB_FEEDBACK).expect("feedback kind must fit NIP-01"), status: JobFeedbackStatus::Processing, extra_info: Some("processing".to_string()), - request_event: radroots_event::RadrootsEventPtr { + request_event: radroots_event::tag::RadrootsEventPtr { id: "req".to_string(), relays: Some(RELAY_PRIMARY_WSS.to_string()), }, diff --git a/crates/event_codec/tests/job_util.rs b/crates/event_codec/tests/job_util.rs @@ -1,7 +1,7 @@ #[path = "../src/test_fixtures.rs"] mod test_fixtures; -use radroots_event::job::{JobFeedbackStatus, JobInputType}; +use radroots_event::social::job::{JobFeedbackStatus, JobInputType}; use radroots_event_codec::job::error::JobParseError; use radroots_event_codec::job::util::{ feedback_status_from_tag, feedback_status_tag, job_input_type_from_tag, job_input_type_tag, diff --git a/crates/event_codec/tests/knowledge.rs b/crates/event_codec/tests/knowledge.rs @@ -1,7 +1,7 @@ #![cfg(all(feature = "knowledge", feature = "nostr"))] use radroots_event::contract::validate_event_contract_shape; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_REVIEW, KIND_KNOWLEDGE_SOURCE, KIND_WIKI_ARTICLE, }; use radroots_event::knowledge::{ @@ -19,7 +19,7 @@ use radroots_event::knowledge::{ RadrootsWikiArticleVersionRef, RadrootsWikiMergeRequest, RadrootsWikiRedirect, }; use radroots_event::wire::RadrootsNip01EventWireParts; -use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts}; +use radroots_event::{envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts}; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::knowledge::{ contribution_attestation_from_event, contribution_attestation_to_wire_parts, @@ -41,8 +41,8 @@ fn hex_64(character: char) -> String { core::iter::repeat_n(character, 64).collect() } -fn event_ref(character: char, kind: u32) -> radroots_event::RadrootsEventRef { - radroots_event::RadrootsEventRef { +fn event_ref(character: char, kind: u32) -> radroots_event::tag::RadrootsEventRef { + radroots_event::tag::RadrootsEventRef { id: hex_64(character), author: radroots_identity::PublicKey::from_hex( "585591529da0bab31b3b1b1f986611cf5f435dca84f978c89ee8a40cca7103df", diff --git a/crates/event_codec/tests/knowledge_fixtures.rs b/crates/event_codec/tests/knowledge_fixtures.rs @@ -6,7 +6,7 @@ use radroots_event::contract::{ RadrootsContractValidationError, RadrootsEventClass, all_event_contracts, validate_event_contract_shape, }; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_CONTRIBUTION_ATTESTATION, KIND_KNOWLEDGE_CHANGE_PROPOSAL, KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_FIELD_REPORT, KIND_KNOWLEDGE_RELATION, KIND_KNOWLEDGE_REVIEW, KIND_WIKI_ARTICLE, }; @@ -14,7 +14,7 @@ use radroots_event::knowledge::{ RADROOTS_KNOWLEDGE_CLAIM_SCHEMA, RADROOTS_KNOWLEDGE_FIELD_REPORT_SCHEMA, RadrootsWikiArticle, }; use radroots_event::wire::RadrootsNip01EventWireParts; -use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts}; +use radroots_event::{envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts}; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::knowledge::{ contribution_attestation_to_wire_parts, evidence_bounty_to_wire_parts, diff --git a/crates/event_codec/tests/knowledge_manifest.rs b/crates/event_codec/tests/knowledge_manifest.rs @@ -2,11 +2,11 @@ use std::collections::BTreeSet; -use radroots_event::RADROOTS_EVENT_VERSION; +use radroots_event::contract::VERSION; use radroots_event::contract::{ RADROOTS_EVENT_CONTRACT_REGISTRY_VERSION, RadrootsEventClass, all_event_contracts, }; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_CONTRIBUTION_ATTESTATION, KIND_KNOWLEDGE_CHANGE_PROPOSAL, KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_FIELD_REPORT, KIND_KNOWLEDGE_RELATION, KIND_KNOWLEDGE_REVIEW, }; @@ -67,7 +67,7 @@ fn knowledge_manifest_covers_required_fields_for_every_contract() { manifest.registry_version, RADROOTS_EVENT_CONTRACT_REGISTRY_VERSION ); - assert_eq!(manifest.radroots_event_version, RADROOTS_EVENT_VERSION); + assert_eq!(manifest.radroots_event_version, VERSION); assert_eq!( manifest.radroots_event_codec_version, env!("CARGO_PKG_VERSION") diff --git a/crates/event_codec/tests/list.rs b/crates/event_codec/tests/list.rs @@ -2,11 +2,11 @@ mod common; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; use radroots_event::{ - kinds::{ + envelope::kind::{ KIND_CALENDAR, KIND_LIST_MUTE, KIND_LIST_READ_WRITE_RELAYS, KIND_LIST_SET_FOLLOW, KIND_POST, }, - list::{RadrootsList, RadrootsListEntry}, - tags::TAG_R, + social::list::{RadrootsList, RadrootsListEntry}, + tag::name::TAG_R, }; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::list::decode::{ diff --git a/crates/event_codec/tests/list_private.rs b/crates/event_codec/tests/list_private.rs @@ -1,6 +1,6 @@ #![cfg(feature = "serde_json")] -use radroots_event::list::RadrootsListEntry; +use radroots_event::social::list::RadrootsListEntry; use radroots_event_codec::list::decode::list_private_entries_from_json; use radroots_event_codec::list::encode::list_private_entries_json; use radroots_event_codec::list_set::decode::list_set_private_entries_from_json; diff --git a/crates/event_codec/tests/list_set.rs b/crates/event_codec/tests/list_set.rs @@ -4,9 +4,9 @@ mod test_fixtures; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; use radroots_event::{ - kinds::{KIND_CALENDAR, KIND_LIST_SET_FOLLOW, KIND_POST, is_nip51_list_set_kind}, - list::RadrootsListEntry, - list_set::RadrootsListSet, + envelope::kind::{KIND_CALENDAR, KIND_LIST_SET_FOLLOW, KIND_POST, is_nip51_list_set_kind}, + social::list::RadrootsListEntry, + social::list_set::RadrootsListSet, }; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::list_set::decode::{ diff --git a/crates/event_codec/tests/message.rs b/crates/event_codec/tests/message.rs @@ -2,9 +2,9 @@ mod test_fixtures; use radroots_event::{ - RadrootsEventPtr, - kinds::{KIND_MESSAGE, KIND_POST}, - message::{RadrootsMessage, RadrootsMessageRecipient}, + envelope::kind::{KIND_MESSAGE, KIND_POST}, + social::message::{RadrootsMessage, RadrootsMessageRecipient}, + tag::RadrootsEventPtr, }; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::message::decode::{ diff --git a/crates/event_codec/tests/message_file.rs b/crates/event_codec/tests/message_file.rs @@ -3,10 +3,10 @@ mod common; mod test_fixtures; use common::{AUTHOR, EVENT_ID, EVENT_SIG}; -use radroots_event::RadrootsEventPtr; -use radroots_event::kinds::{KIND_MESSAGE, KIND_MESSAGE_FILE}; -use radroots_event::message::RadrootsMessageRecipient; -use radroots_event::message_file::{RadrootsMessageFile, RadrootsMessageFileDimensions}; +use radroots_event::envelope::kind::{KIND_MESSAGE, KIND_MESSAGE_FILE}; +use radroots_event::social::message::RadrootsMessageRecipient; +use radroots_event::social::message_file::{RadrootsMessageFile, RadrootsMessageFileDimensions}; +use radroots_event::tag::RadrootsEventPtr; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::message_file::decode::{ diff --git a/crates/event_codec/tests/nip09_suppression_conformance.rs b/crates/event_codec/tests/nip09_suppression_conformance.rs @@ -7,7 +7,7 @@ use std::{ path::Path, }; -use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts}; +use radroots_event::{envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts}; use radroots_event_codec::{ deletion::{ admission::{ diff --git a/crates/event_codec/tests/operational_listing.rs b/crates/event_codec/tests/operational_listing.rs @@ -3,21 +3,24 @@ use radroots_core::pricing::{Discount, DiscountScope, DiscountThreshold, DiscountValue}; use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, + envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeParts, + envelope::kind::{ + KIND_CLASSIFIED_LISTING, KIND_FARM, KIND_PLOT, KIND_POST, KIND_RESOURCE_AREA, + }, farm::RadrootsFarmRef, - ids::{RadrootsDTag, RadrootsInventoryBinId}, - kinds::{KIND_CLASSIFIED_LISTING, KIND_FARM, KIND_PLOT, KIND_POST, KIND_RESOURCE_AREA}, - operational_listing::RadrootsOperationalListingParseError, - operational_listing::{ + farm::plot::RadrootsPlotRef, + farm::resource_area::RadrootsResourceAreaRef, + id::{RadrootsDTag, RadrootsInventoryBinId}, + listing::operational::RadrootsOperationalListingParseError, + listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingDeliveryMethod, RadrootsOperationalListingImage, RadrootsOperationalListingImageSize, RadrootsOperationalListingProduct, RadrootsOperationalListingPublicLocation, RadrootsOperationalListingStatus, }, - plot::RadrootsPlotRef, - resource_area::RadrootsResourceAreaRef, - tags::{TAG_D, TAG_PUBLISHED_AT}, + tag::name::{TAG_D, TAG_PUBLISHED_AT}, }; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::operational_listing::decode::{ diff --git a/crates/event_codec/tests/operational_listing_conformance.rs b/crates/event_codec/tests/operational_listing_conformance.rs @@ -3,8 +3,8 @@ use std::{borrow::Cow, collections::BTreeSet, fs, path::Path}; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, contract::validate_event_contract_shape, - operational_listing::RadrootsOperationalListing, + contract::validate_event_contract_shape, envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeParts, listing::operational::RadrootsOperationalListing, }; use radroots_event_codec::{ error::EventEncodeError, diff --git a/crates/event_codec/tests/post.rs b/crates/event_codec/tests/post.rs @@ -1,6 +1,6 @@ use radroots_blossom::{BlobDescriptor, BlobUrl, ByteVerifiedDescriptor, MediaType, Sha256}; use radroots_event::{ - RadrootsAuthoredImage, + media::RadrootsAuthoredImage, post::{ RADROOTS_ASK_MARKER_TAG_VALUE, RADROOTS_POST_ALT_MAX_BYTES, RADROOTS_POST_CONTENT_MAX_BYTES, RADROOTS_POST_EVENT_WIRE_MAX_BYTES, diff --git a/crates/event_codec/tests/profile.rs b/crates/event_codec/tests/profile.rs @@ -1,7 +1,7 @@ #![cfg(feature = "serde_json")] use radroots_event::{ - kinds::{KIND_POST, KIND_PROFILE}, + envelope::kind::{KIND_POST, KIND_PROFILE}, profile::{ RADROOTS_PROFILE_TYPE_TAG_ANY, RADROOTS_PROFILE_TYPE_TAG_COOP, RADROOTS_PROFILE_TYPE_TAG_FARM, RADROOTS_PROFILE_TYPE_TAG_KEY, diff --git a/crates/event_codec/tests/reaction.rs b/crates/event_codec/tests/reaction.rs @@ -2,10 +2,10 @@ mod common; use common::{AUTHOR as ENVELOPE_AUTHOR, EVENT_ID as ENVELOPE_ID, EVENT_SIG}; use radroots_event::{ - kinds::{KIND_ARTICLE, KIND_COMMENT, KIND_POST, KIND_REACTION}, - reaction::RadrootsReaction, + envelope::kind::{KIND_ARTICLE, KIND_COMMENT, KIND_POST, KIND_REACTION}, + post::reaction::RadrootsReaction, social::RadrootsSocialTarget, - tags::TAG_E_ROOT, + tag::name::TAG_E_ROOT, }; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::reaction::decode::{ diff --git a/crates/event_codec/tests/report.rs b/crates/event_codec/tests/report.rs @@ -4,10 +4,10 @@ mod common; use common::{AUTHOR as ENVELOPE_AUTHOR, EVENT_ID as ENVELOPE_ID, EVENT_SIG}; use radroots_event::{ - kinds::{KIND_ARTICLE, KIND_POST, KIND_REPORT}, - report::RadrootsReport, + envelope::kind::{KIND_ARTICLE, KIND_POST, KIND_REPORT}, + post::report::RadrootsReport, social::{RadrootsReportFileTarget, RadrootsReportType, RadrootsSocialTarget}, - tags::{TAG_A, TAG_E, TAG_MAGNET, TAG_P, TAG_SERVER, TAG_SHA256}, + tag::name::{TAG_A, TAG_E, TAG_MAGNET, TAG_P, TAG_SERVER, TAG_SHA256}, }; use radroots_event_codec::{ error::{EventEncodeError, EventParseError}, diff --git a/crates/event_codec/tests/repost.rs b/crates/event_codec/tests/repost.rs @@ -1,10 +1,10 @@ #![cfg(feature = "serde_json")] use radroots_event::{ - kinds::{KIND_ARTICLE, KIND_GENERIC_REPOST, KIND_POST, KIND_REACTION, KIND_REPOST}, - repost::{RadrootsGenericRepost, RadrootsRepost}, + envelope::kind::{KIND_ARTICLE, KIND_GENERIC_REPOST, KIND_POST, KIND_REACTION, KIND_REPOST}, + post::repost::{RadrootsGenericRepost, RadrootsRepost}, social::RadrootsSocialTarget, - tags::{TAG_A, TAG_E, TAG_K, TAG_P}, + tag::name::{TAG_A, TAG_E, TAG_K, TAG_P}, }; use radroots_event_codec::{ error::{EventEncodeError, EventParseError}, diff --git a/crates/event_codec/tests/seal.rs b/crates/event_codec/tests/seal.rs @@ -1,5 +1,5 @@ -use radroots_event::kinds::{KIND_MESSAGE, KIND_SEAL}; -use radroots_event::seal::RadrootsSeal; +use radroots_event::envelope::kind::{KIND_MESSAGE, KIND_SEAL}; +use radroots_event::social::seal::RadrootsSeal; mod common; diff --git a/crates/event_codec/tests/social_events.rs b/crates/event_codec/tests/social_events.rs @@ -1,18 +1,18 @@ #![cfg(feature = "serde_json")] use radroots_event::{ - farm_crdt::RadrootsFarmCrdtDocumentKind, - farm_file::{RadrootsFarmFileDimensions, RadrootsFarmFileMetadata}, - farm_workspace::RadrootsFarmWorkspaceRef, - file_metadata::RadrootsFileMetadata, - group::{RadrootsGroupEditableMetadata, RadrootsGroupMetadata}, - kinds::{ + envelope::kind::{ KIND_ARTICLE, KIND_CLASSIFIED_LISTING, KIND_FARM, KIND_FARM_CRDT_CHANGE, KIND_GROUP_METADATA, KIND_HTTP_AUTH, KIND_POST, KIND_PUBLIC_FILE_METADATA, KIND_RELAY_AUTH, KIND_REPORT, is_home_feed_candidate_kind, is_market_candidate_kind, is_private_farm_ops_kind, is_public_social_kind, }, + farm::crdt::RadrootsFarmCrdtDocumentKind, + farm::file::{RadrootsFarmFileDimensions, RadrootsFarmFileMetadata}, + farm::workspace::RadrootsFarmWorkspaceRef, + media::file_metadata::RadrootsFileMetadata, social::RadrootsSocialMediaDimensions, + social::group::{RadrootsGroupEditableMetadata, RadrootsGroupMetadata}, }; use radroots_event_codec::{ article::decode::article_from_event, diff --git a/crates/event_codec/tests/structured_decode.rs b/crates/event_codec/tests/structured_decode.rs @@ -7,19 +7,23 @@ mod common; use common::{EVENT_ID, EVENT_SIG}; use radroots_core::{Decimal, Quantity, Unit}; -use radroots_event::coop::RadrootsCoop; -use radroots_event::document::{RadrootsDocument, RadrootsDocumentSubject}; -use radroots_event::farm::{RadrootsFarm, RadrootsFarmRef}; -use radroots_event::gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_COOP, KIND_DOCUMENT, KIND_FARM, KIND_PLOT, KIND_RESOURCE_AREA, KIND_RESOURCE_HARVEST_CAP, }; -use radroots_event::plot::RadrootsPlot; -use radroots_event::resource_area::{ +use radroots_event::farm::change_set::{ + RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon, +}; +use radroots_event::farm::coop::RadrootsCoop; +use radroots_event::farm::plot::RadrootsPlot; +use radroots_event::farm::resource_area::{ RadrootsResourceArea, RadrootsResourceAreaLocation, RadrootsResourceAreaRef, }; -use radroots_event::resource_cap::{RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct}; -use radroots_event::tags::TAG_D; +use radroots_event::farm::resource_cap::{ + RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct, +}; +use radroots_event::farm::{RadrootsFarm, RadrootsFarmRef}; +use radroots_event::post::document::{RadrootsDocument, RadrootsDocumentSubject}; +use radroots_event::tag::name::TAG_D; use radroots_event_codec::coop::decode::{ coop_from_event, data_from_event as coop_metadata_from_event, parsed_from_event as coop_index_from_event, diff --git a/crates/event_codec/tests/structured_encode_default.rs b/crates/event_codec/tests/structured_encode_default.rs @@ -4,23 +4,27 @@ mod test_fixtures; use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; -use radroots_event::coop::{RadrootsCoop, RadrootsCoopLocation, RadrootsCoopRef}; -use radroots_event::document::{RadrootsDocument, RadrootsDocumentSubject}; -use radroots_event::farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}; -use radroots_event::gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; -use radroots_event::ids::{RadrootsDTag, RadrootsInventoryBinId}; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_COOP, KIND_DOCUMENT, KIND_FARM, KIND_PLOT, KIND_RESOURCE_AREA, KIND_RESOURCE_HARVEST_CAP, }; -use radroots_event::list_set::RadrootsListSet; -use radroots_event::operational_listing::{ - RadrootsOperationalListing, RadrootsOperationalListingBin, RadrootsOperationalListingProduct, +use radroots_event::farm::change_set::{ + RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon, }; -use radroots_event::plot::{RadrootsPlot, RadrootsPlotLocation, RadrootsPlotRef}; -use radroots_event::resource_area::{ +use radroots_event::farm::coop::{RadrootsCoop, RadrootsCoopLocation, RadrootsCoopRef}; +use radroots_event::farm::plot::{RadrootsPlot, RadrootsPlotLocation, RadrootsPlotRef}; +use radroots_event::farm::resource_area::{ RadrootsResourceArea, RadrootsResourceAreaLocation, RadrootsResourceAreaRef, }; -use radroots_event::resource_cap::{RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct}; +use radroots_event::farm::resource_cap::{ + RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct, +}; +use radroots_event::farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}; +use radroots_event::id::{RadrootsDTag, RadrootsInventoryBinId}; +use radroots_event::listing::operational::{ + RadrootsOperationalListing, RadrootsOperationalListingBin, RadrootsOperationalListingProduct, +}; +use radroots_event::post::document::{RadrootsDocument, RadrootsDocumentSubject}; +use radroots_event::social::list_set::RadrootsListSet; use radroots_event_codec::coop::encode::{ coop_build_tags, coop_ref_tags, to_wire_parts as coop_to_wire_parts, to_wire_parts_with_kind as coop_to_wire_parts_with_kind, diff --git a/crates/event_codec/tests/tag_builders.rs b/crates/event_codec/tests/tag_builders.rs @@ -3,41 +3,45 @@ mod test_fixtures; use radroots_core::pricing::{Discount, DiscountScope, DiscountThreshold, DiscountValue}; use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; -use radroots_event::RadrootsEventPtr; -use radroots_event::app_data::RadrootsAppData; -use radroots_event::coop::RadrootsCoop; -use radroots_event::document::{RadrootsDocument, RadrootsDocumentSubject}; -use radroots_event::farm::{RadrootsFarm, RadrootsFarmRef}; -use radroots_event::follow::{RadrootsFollow, RadrootsFollowProfile}; -use radroots_event::gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; -use radroots_event::geochat::RadrootsGeoChat; -use radroots_event::gift_wrap::{RadrootsGiftWrap, RadrootsGiftWrapRecipient}; -use radroots_event::ids::{RadrootsDTag, RadrootsInventoryBinId}; -use radroots_event::job::{JobFeedbackStatus, JobInputType, JobPaymentRequest}; -use radroots_event::job_feedback::RadrootsJobFeedback; -use radroots_event::job_request::{RadrootsJobInput, RadrootsJobParam, RadrootsJobRequest}; -use radroots_event::job_result::RadrootsJobResult; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_ARTICLE, KIND_JOB_FEEDBACK, KIND_JOB_REQUEST_MIN, KIND_JOB_RESULT_MIN, }; -use radroots_event::list::{RadrootsList, RadrootsListEntry}; -use radroots_event::list_set::RadrootsListSet; -use radroots_event::message::{RadrootsMessage, RadrootsMessageRecipient}; -use radroots_event::message_file::RadrootsMessageFile; -use radroots_event::operational_listing::{ +use radroots_event::farm::change_set::{ + RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon, +}; +use radroots_event::farm::coop::RadrootsCoop; +use radroots_event::farm::plot::{RadrootsPlot, RadrootsPlotRef}; +use radroots_event::farm::resource_area::{ + RadrootsResourceArea, RadrootsResourceAreaLocation, RadrootsResourceAreaRef, +}; +use radroots_event::farm::resource_cap::{ + RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct, +}; +use radroots_event::farm::{RadrootsFarm, RadrootsFarmRef}; +use radroots_event::id::{RadrootsDTag, RadrootsInventoryBinId}; +use radroots_event::listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingImage, RadrootsOperationalListingImageSize, RadrootsOperationalListingProduct, RadrootsOperationalListingPublicLocation, RadrootsOperationalListingStatus, }; -use radroots_event::plot::{RadrootsPlot, RadrootsPlotRef}; -use radroots_event::reaction::RadrootsReaction; -use radroots_event::resource_area::{ - RadrootsResourceArea, RadrootsResourceAreaLocation, RadrootsResourceAreaRef, -}; -use radroots_event::resource_cap::{RadrootsResourceHarvestCap, RadrootsResourceHarvestProduct}; -use radroots_event::seal::RadrootsSeal; +use radroots_event::post::document::{RadrootsDocument, RadrootsDocumentSubject}; +use radroots_event::post::reaction::RadrootsReaction; use radroots_event::social::RadrootsSocialTarget; +use radroots_event::social::app_data::RadrootsAppData; +use radroots_event::social::follow::{RadrootsFollow, RadrootsFollowProfile}; +use radroots_event::social::geochat::RadrootsGeoChat; +use radroots_event::social::gift_wrap::{RadrootsGiftWrap, RadrootsGiftWrapRecipient}; +use radroots_event::social::job::{JobFeedbackStatus, JobInputType, JobPaymentRequest}; +use radroots_event::social::job_feedback::RadrootsJobFeedback; +use radroots_event::social::job_request::{RadrootsJobInput, RadrootsJobParam, RadrootsJobRequest}; +use radroots_event::social::job_result::RadrootsJobResult; +use radroots_event::social::list::{RadrootsList, RadrootsListEntry}; +use radroots_event::social::list_set::RadrootsListSet; +use radroots_event::social::message::{RadrootsMessage, RadrootsMessageRecipient}; +use radroots_event::social::message_file::RadrootsMessageFile; +use radroots_event::social::seal::RadrootsSeal; +use radroots_event::tag::RadrootsEventPtr; use radroots_event_codec::error::EventEncodeError; use radroots_event_codec::job::encode::JobEncodeError; use radroots_event_codec::operational_listing::encode::operational_listing_build_tags; diff --git a/crates/event_codec/tests/verified_admission_conformance.rs b/crates/event_codec/tests/verified_admission_conformance.rs @@ -2,7 +2,7 @@ use std::{borrow::Cow, fs, path::Path}; -use radroots_event::{RadrootsEventEnvelope, RadrootsNip01EventWire}; +use radroots_event::{envelope::RadrootsEventEnvelope, wire::RadrootsNip01EventWire}; use radroots_event_codec::{ admission::{RadrootsAdmittedEvent, RadrootsEventAdmissionError, admit_verified_event}, verification::verify_nip01_event, diff --git a/crates/event_codec/tests/verified_comment_conformance.rs b/crates/event_codec/tests/verified_comment_conformance.rs @@ -8,8 +8,10 @@ use std::{ }; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeLimits, RadrootsEventEnvelopeParts, - comment::{ + envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeLimits, + envelope::RadrootsEventEnvelopeParts, + post::comment::{ RadrootsAuthoredNip22Comment, RadrootsNip22AddressRootReference, RadrootsNip22CommentError, RadrootsNip22CommentParentReference, RadrootsNip22EventRootReference, }, diff --git a/crates/event_codec/tests/verified_deletion_conformance.rs b/crates/event_codec/tests/verified_deletion_conformance.rs @@ -8,8 +8,10 @@ use std::{ }; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeLimits, RadrootsEventEnvelopeParts, - deletion::{ + envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeLimits, + envelope::RadrootsEventEnvelopeParts, + post::deletion::{ RADROOTS_NIP09_DELETION_CONTENT_MAX_BYTES, RADROOTS_NIP09_DELETION_EVENT_WIRE_MAX_BYTES, RADROOTS_NIP09_DELETION_TAG_ELEMENT_MAX_BYTES, RADROOTS_NIP09_DELETION_TAG_MAX_COUNT, RADROOTS_NIP09_DELETION_TAG_TOTAL_ELEMENT_MAX_COUNT, diff --git a/crates/event_codec/tests/verified_post_conformance.rs b/crates/event_codec/tests/verified_post_conformance.rs @@ -4,13 +4,17 @@ use std::{borrow::Cow, collections::BTreeMap, fs, path::Path}; use radroots_blossom::{BlobDescriptor, BlobUrl, MediaType, Sha256}; use radroots_event::{ - RadrootsAuthoredImage, RadrootsEventEnvelope, RadrootsNip01EventWire, contract::identify_event_contract, + envelope::RadrootsEventEnvelope, + media::RadrootsAuthoredImage, + post::reply::{ + RadrootsAuthoredNip10Reply, RadrootsNip10ReplyError, RadrootsNip10ReplyReference, + }, post::{ RadrootsAuthoredAsk, RadrootsAuthoredPhotoUpdate, RadrootsAuthoredPostError, RadrootsAuthoredPostImage, RadrootsAuthoredUpdate, RadrootsPostImageDimensions, }, - reply::{RadrootsAuthoredNip10Reply, RadrootsNip10ReplyError, RadrootsNip10ReplyReference}, + wire::RadrootsNip01EventWire, wire::RadrootsNip01EventWireParts, }; use radroots_event_codec::post::{ diff --git a/crates/event_codec/tests/verified_profile_conformance.rs b/crates/event_codec/tests/verified_profile_conformance.rs @@ -2,12 +2,15 @@ use std::{borrow::Cow, fs, path::Path}; -use radroots_event::event_head::{ +use radroots_event::envelope::event_head::{ RadrootsCurrentEventHead, RadrootsEventHeadCandidate, RadrootsEventHeadCandidateResult, RadrootsEventHeadDecision, event_head_candidate_for_event, select_event_head, }; -use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts, RadrootsNip01EventWire}; -use radroots_event::{RadrootsEventWireError, ids::RadrootsIdParseError}; +use radroots_event::{ + envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts, + wire::RadrootsNip01EventWire, +}; +use radroots_event::{id::RadrootsIdParseError, wire::RadrootsEventWireError}; use radroots_event_codec::profile::admission::{ RadrootsAdmittedProfileEvent, RadrootsProfileAdmissionError, verify_and_admit_profile_event, }; diff --git a/crates/event_codec/tests/wire.rs b/crates/event_codec/tests/wire.rs @@ -1,6 +1,6 @@ use radroots_event::contract::RadrootsContractValidationError; use radroots_event::draft::{RadrootsDraftError, RadrootsEventDraft}; -use radroots_event::kinds::{KIND_GEOCHAT, KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_SOURCE}; +use radroots_event::envelope::kind::{KIND_GEOCHAT, KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_SOURCE}; use radroots_event::wire::RadrootsNip01EventWireParts; use radroots_event_codec::wire::{canonicalize_tags, empty_content}; diff --git a/crates/event_store/contracts/source_maintenance_v1.manifest.json b/crates/event_store/contracts/source_maintenance_v1.manifest.json @@ -255,31 +255,38 @@ "hash_algorithm": "sha256_bytes_v1" }, { + "role": "event_public_surface", + "path": "crates/event/src/lib.rs", + "byte_length": 1967, + "sha256": "b686e22f25e86b4cc3c5915d507b4d8681ba83026bfd350e970ee12281e94fb3", + "hash_algorithm": "sha256_bytes_v1" + }, + { "role": "event_contract_facade", "path": "crates/event/src/contract.rs", - "byte_length": 86, - "sha256": "9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10", + "byte_length": 208, + "sha256": "27466bf36461071931f391c60646a13f7781d19584583166cc54c0eece76d010", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_contract_registry_v7_authority", "path": "crates/event/src/contract/registry_v7.rs", - "byte_length": 157246, - "sha256": "87a97f782427d4036d49a3dddaf2f5f46ddf585cd2f537c01628ba817a2f94e4", + "byte_length": 157252, + "sha256": "4ae8af380fd99c4b9b011981770bb352e104b7bae1784f45b1979f972a97df35", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_envelope_authority", "path": "crates/event/src/envelope.rs", - "byte_length": 31143, - "sha256": "2478ca91b4dedaf8b8aefe653971b70c56c4ee076dcbfdf7f59f97f86c03b748", + "byte_length": 31224, + "sha256": "34c91001d301db1ac9207da41fb4ce4259bc7f758110d1debeb940670c2540ee", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_verification_typestate_authority", "path": "crates/event/src/verification.rs", - "byte_length": 9470, - "sha256": "181e17a5e45d7a01ae2d2d4057b210456072bfb260712ace71c2dd2461dda898", + "byte_length": 9469, + "sha256": "479610afcfe1f7c0c475fe2539eef9f6a0b329c6e5c6fd2dbab3d9da7d7cbcd5", "hash_algorithm": "sha256_bytes_v1" }, { @@ -292,29 +299,29 @@ { "role": "event_head_facade", "path": "crates/event/src/event_head.rs", - "byte_length": 68, - "sha256": "cb52f6006f7ecd862707d6b048f9fc407e0cd5ebcd3091b3c54e195ffa5cba64", + "byte_length": 97, + "sha256": "f761ff3e74c4f5e1e28381db00ce698c633ff048669b22984d14a587482e8e83", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_head_v1_authority", "path": "crates/event/src/event_head/v1.rs", - "byte_length": 7538, - "sha256": "fbc738b403afd3a186ab183ff5f457125a7fbfab01a51fd4b46c92a2543a0126", + "byte_length": 7566, + "sha256": "6ef7537a1188086e4f414b6c5f398a305c2eca5edd0ee188b4f890f07f3322ff", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_ids_authority", - "path": "crates/event/src/ids.rs", - "byte_length": 51007, - "sha256": "7d5d52dcbdd2ec31d914999960fa58aa279a8d4f8bd380fb6050b9a1019ad2d8", + "path": "crates/event/src/id.rs", + "byte_length": 51746, + "sha256": "a4a669b3ff02545af0625ee19c645cc41fb0a5176c000e7aecf49e37585a4123", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_trade_authority", "path": "crates/event/src/trade.rs", - "byte_length": 68514, - "sha256": "88c21633f60b84adf30ad7fe21d6d0b6844cc7186826600a83a467cc028e55dd", + "byte_length": 68665, + "sha256": "5e1aa8bd20bc13a08e4ebc7e6306365cb74f55e1cec62af135a36eb41146dd45", "hash_algorithm": "sha256_bytes_v1" }, { @@ -334,78 +341,78 @@ { "role": "event_draft_authority", "path": "crates/event/src/draft.rs", - "byte_length": 58654, - "sha256": "d0c8550caabd359e53d854cdbc5c299108003a95e43d8133637c4301646ea7a6", + "byte_length": 58672, + "sha256": "417842e7391e9a3187be20d8b936d83469148db1cbf0c61afcf88b87cf1a88be", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_calendar_authority", "path": "crates/event/src/calendar.rs", - "byte_length": 103837, - "sha256": "928e5a3df61ab08565cecf20a5045352236bc3d807127f1cd66294d60ee65621", + "byte_length": 103877, + "sha256": "1e0bb92b32198cea2f39df57c365d4a8c43dea301f452f1309df4078401df7fc", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_classified_listing_authority", "path": "crates/event/src/classified_listing.rs", - "byte_length": 8226, - "sha256": "745aa08953a6243ea1afad22aa63e44f6746f2f243ab0d6b617d6ab64fa58749", + "byte_length": 8236, + "sha256": "ee022b2aaffd1642c2c1e792c79e8fce353b9edd4d6e49afdebeb74af771187e", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_profile_authority", "path": "crates/event/src/profile.rs", - "byte_length": 18848, - "sha256": "7c7ac7f4926938f5cb5530be5450e5e23f18f216bdb222150fbdd451cec20d5c", + "byte_length": 18927, + "sha256": "a4c0afeed75beea9ba44ec6e487582dbcd1116e7e092a6d5808dc4fbdea5ac73", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_post_authority", "path": "crates/event/src/post.rs", - "byte_length": 22738, - "sha256": "7ed4a4c39bed40b134369d16e1fc35ab2c7d27ee300dd36d367025def2283b39", + "byte_length": 23129, + "sha256": "788fef2652dbb990ceca2bb5c80aa5fa1efc11d041f9bdf43998fbdff77745b6", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_comment_authority", "path": "crates/event/src/comment.rs", - "byte_length": 36434, - "sha256": "ec944bd868deb71215c915a35e79ff26715317fdb62c0fbbb5f1d0993f769c38", + "byte_length": 36453, + "sha256": "159eb5487e67e1a834072333a7f08b38ac15756c46eaeafecaa1574aade0a824", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_food_availability_authority", "path": "crates/event/src/food_availability.rs", - "byte_length": 45429, - "sha256": "b4357dfb6954631673b6cd58794015da29303cb54ce8405a57ad543870036c9e", + "byte_length": 45430, + "sha256": "389dda590888278b0bd95b4e19a597f47e0f573a24e0ac3cb92c63098191a290", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_deletion_authority", "path": "crates/event/src/deletion.rs", - "byte_length": 31177, - "sha256": "eaf5eac81cd90039dd2c8f5a1f647d7916f961841d51887f1c5a679947bc816a", + "byte_length": 31181, + "sha256": "99cf3d8e61f107602df345c6e2ac60223b9d0389537b231dd1a30a2ed0e64990", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_relay_hint_authority", "path": "crates/event/src/relay_hint.rs", - "byte_length": 14019, - "sha256": "f50a8fddd1ec9996a452f944ebc59ca4217fc8b28d90be33c2cca925dc3465d0", + "byte_length": 14016, + "sha256": "095ce5284796eac71b3aa6630718d398a67ff3836a92d80444fc45fb023b4931", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_media_authority", "path": "crates/event/src/media.rs", - "byte_length": 3521, - "sha256": "8f670e634452872a525efdad0cb9480288885c62f22a9b9915a67a7e7965651c", + "byte_length": 3574, + "sha256": "2e91f3b5624dfab990f18abd4dd6194f1205442c798381af6b648aee88de53ee", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_social_authority", "path": "crates/event/src/social.rs", - "byte_length": 5483, - "sha256": "1b89c6d0954822e7f1e778479ed43694e88929bcd5310ee066f8f4ba6505045a", + "byte_length": 6263, + "sha256": "10c4d4f7b078355c97f0b701f60a280123f2d9c335aeabfc733db468d4a9d290", "hash_algorithm": "sha256_bytes_v1" }, { @@ -418,8 +425,8 @@ { "role": "event_wire_v1_authority", "path": "crates/event/src/wire/v1.rs", - "byte_length": 22133, - "sha256": "cc28c8cbd962b32ed2efe43e84c1e0d1ea3bd89636efff2d5553714072fce1a4", + "byte_length": 22132, + "sha256": "8b18760d655c01c3cbb1d1818b486c6aeae324d262c864fc1ed1297d2ecf1196", "hash_algorithm": "sha256_bytes_v1" }, { @@ -439,8 +446,8 @@ { "role": "event_codec_registry_v7_admission_authority", "path": "crates/event_codec/src/admission/registry_v7.rs", - "byte_length": 5350, - "sha256": "755e63dd7ad1115c219e5a3ea540bef67d2770fc9f2a5aa6ba97c925c99bdced", + "byte_length": 5360, + "sha256": "81b26be497e3314564e88b9e6f21aaaf4dee44d6f37b5e127de561553a660c48", "hash_algorithm": "sha256_bytes_v1" }, { @@ -467,8 +474,8 @@ { "role": "event_codec_post_registry_v7_authority", "path": "crates/event_codec/src/post/inbound/registry_v7.rs", - "byte_length": 16016, - "sha256": "bc0bb839c28f3588f05544c846c987528ea3934c75305fef70af8e027a97cc58", + "byte_length": 16025, + "sha256": "551380f1b188fbd6ac4cba988426218863ec557eb6022153da89ace2aa40d2c7", "hash_algorithm": "sha256_bytes_v1" }, { @@ -481,8 +488,8 @@ { "role": "event_codec_reply_registry_v7_authority", "path": "crates/event_codec/src/reply/inbound/registry_v7.rs", - "byte_length": 26812, - "sha256": "a72e9721ed13addca2a63942ac9e43c1daa8f1d1457eef08ec6a3ee5eb8872c5", + "byte_length": 26825, + "sha256": "3abb33e8d20097e41d2c81f10d023c3293390718915eb5087c663676d322bfce", "hash_algorithm": "sha256_bytes_v1" }, { @@ -495,8 +502,8 @@ { "role": "event_codec_comment_registry_v7_authority", "path": "crates/event_codec/src/comment/inbound/registry_v7.rs", - "byte_length": 53783, - "sha256": "30d1b0155963b25d64685ddd042f423ef7707b111dc56ead15bd468e0433a432", + "byte_length": 53802, + "sha256": "32413b80b7472cfb024984ae0e0ea67c7a42ebc98b2257d6c9d16a87f2d84ba0", "hash_algorithm": "sha256_bytes_v1" }, { @@ -509,8 +516,22 @@ { "role": "event_codec_deletion_reconciliation_v1_authority", "path": "crates/event_codec/src/deletion/reconciliation_v1.rs", - "byte_length": 38469, - "sha256": "3e06d1fa923ca5faabb1e95338c35650b0e20b078ff5c972e35ab845d8b7476c", + "byte_length": 38345, + "sha256": "dc6c55e5af2cfab0149dbb763cafa603566772fdae378988a583162c95438496", + "hash_algorithm": "sha256_bytes_v1" + }, + { + "role": "event_codec_error_authority", + "path": "crates/event_codec/src/error.rs", + "byte_length": 3698, + "sha256": "b20b70056ea2b48a9e3a4f7697a76e87d5f3c445641bfcc7b61d72605b146ce5", + "hash_algorithm": "sha256_bytes_v1" + }, + { + "role": "event_codec_food_admission_authority", + "path": "crates/event_codec/src/food_availability/admission.rs", + "byte_length": 5815, + "sha256": "96aea4bdd6938d26f03fa9bcb94e3ce8608bf674895961f8bf237554796debba", "hash_algorithm": "sha256_bytes_v1" }, { @@ -523,15 +544,15 @@ { "role": "event_codec_food_registry_v7_authority", "path": "crates/event_codec/src/food_availability/inbound/registry_v7.rs", - "byte_length": 26764, - "sha256": "a5786cff942b7b0038f741afb5b9a19230ac58cb57a5ba747b32e1b95d414e15", + "byte_length": 26785, + "sha256": "d06807c62333d0b1b8496b51390210b0738ee92b1748bc7e31bd4b095fb62ed2", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_codec_job_traits_authority", "path": "crates/event_codec/src/job/traits.rs", - "byte_length": 5067, - "sha256": "de0b3f67177a48bd8e3c62534850103d09b7be099e80e88a9583363db705fcbb", + "byte_length": 5101, + "sha256": "bc198764f2825b4b1441781493e13fc7088e7bdd04f70690480f387604b0bd47", "hash_algorithm": "sha256_bytes_v1" }, { @@ -544,8 +565,8 @@ { "role": "event_store_error_and_limits", "path": "crates/event_store/src/error.rs", - "byte_length": 19517, - "sha256": "4bf24ee1aa6117597ab467b1379a05549b79024213dc7622a2d276bc26fffab4", + "byte_length": 19516, + "sha256": "384f81d13dd5a837dd336b1f990fd79718f05ceb9c9272d0e8cd14c9618e4c8b", "hash_algorithm": "sha256_bytes_v1" }, { @@ -572,15 +593,15 @@ { "role": "predecessor_model_public_surface", "path": "crates/event_store/src/model.rs", - "byte_length": 33596, - "sha256": "98b1742ffb517f66f8e9edefa61d1c3cf3e22be5985202c6c340310a98c72c8e", + "byte_length": 33624, + "sha256": "b155993cf03f19f392068188e14adad5b5b139996434d1076a86428e1cce4255", "hash_algorithm": "sha256_bytes_v1" }, { "role": "event_store_reconciliation_v1_model", "path": "crates/event_store/src/model/reconciliation_v1.rs", - "byte_length": 11138, - "sha256": "8a26bc373035878ef9b41767ceea7b681896e17d88bedce118de1d622125e1d6", + "byte_length": 11148, + "sha256": "37f9edd8e1b5ae3f696bc911e8a7eda0a6eac4e05d2d9e6799f041d0abf73b50", "hash_algorithm": "sha256_bytes_v1" }, { @@ -593,29 +614,36 @@ { "role": "addressable_transition_feed_model", "path": "crates/event_store/src/model/addressable_transition_feed_v1.rs", - "byte_length": 22279, - "sha256": "f8ea454a0e998a3d433bba52d1ff9759a04fcb91db286cf2a2b10ef7d0057694", + "byte_length": 22277, + "sha256": "3fbccc2ab44ceb66ad459ebb56c87aa250732b28248716128e91ca42d7c7656d", + "hash_algorithm": "sha256_bytes_v1" + }, + { + "role": "current_visibility_model", + "path": "crates/event_store/src/model/current_visibility_v1.rs", + "byte_length": 5690, + "sha256": "57a4ccd377fc314193c34125ca2ea0a235637e888c622f60ed27bb5f55805c9d", "hash_algorithm": "sha256_bytes_v1" }, { "role": "food_projection_model", "path": "crates/event_store/src/model/food_availability_projection_v1.rs", "byte_length": 17437, - "sha256": "6fdfc8c5eb3dd9c451fd47b2394af123b50f7fe6d74113f8777221a8fa31ba30", + "sha256": "28c259cdea06dd4b4a3b9103dc85a8049abee5a17f64771fd1083ae945dc009a", "hash_algorithm": "sha256_bytes_v1" }, { "role": "source_generation_rebuild_authority", "path": "crates/event_store/src/nip09/reconciliation_v1.rs", - "byte_length": 185215, - "sha256": "575c9fb25b1f728144f5fe649007be705092d9b137f51fd8d771439871bfa09a", + "byte_length": 185239, + "sha256": "fb390d682a84e054d57ec6f845d32b4c28423cb238a246e2008f2e5dd529cdd5", "hash_algorithm": "sha256_bytes_v1" }, { "role": "nip09_successor_result_vector_executor", "path": "crates/event_store/tests/support/nip09_reconciliation_v1_result_vector_v2.rs", - "byte_length": 17983, - "sha256": "a1d919aa545d7c506d7ae8740445025732c2cda302790d243a4ff3d6cee898f6", + "byte_length": 17992, + "sha256": "24a004135d4f7f4324f4a61db8384601cbcb85b9376c52e5db8ed6a1463fd045", "hash_algorithm": "sha256_bytes_v1" }, { @@ -628,57 +656,57 @@ { "role": "public_store_and_transaction_authority", "path": "crates/event_store/src/store.rs", - "byte_length": 395012, - "sha256": "5538b600fa5e457e10f23fe4e3a3c55496662098abaef2692108dc69c29aa3e6", + "byte_length": 395033, + "sha256": "9b990626ac85e70277a869bb31870f9e15e8208e1136a574f99a091632797d99", "hash_algorithm": "sha256_bytes_v1" }, { "role": "addressable_transition_feed_store", "path": "crates/event_store/src/store/addressable_transition_feed_v1.rs", - "byte_length": 40260, - "sha256": "46ea9c9786099c85150e4979c9dac6f84c1b85b8f30ec44aae6d25f9eb9bebc5", + "byte_length": 40259, + "sha256": "ebb3b502c55ad218a1551f8ba2b9cc6dca4b34a1010e21002a3165ac8f66edee", "hash_algorithm": "sha256_bytes_v1" }, { "role": "current_visibility_store", "path": "crates/event_store/src/store/current_visibility_v1.rs", - "byte_length": 15786, - "sha256": "bf03f9fc45561366cc489daa400b39d65e68cc70aea2ef4a9cd7724224ca9514", + "byte_length": 15785, + "sha256": "165086b7226189ab67600fb4b3c83abfba099e31c1018962d445437a2fe41ce5", "hash_algorithm": "sha256_bytes_v1" }, { "role": "food_projection_store", "path": "crates/event_store/src/store/food_availability_projection_v1.rs", "byte_length": 48959, - "sha256": "a01ed95983481a8f0efdcc985635efba122fdbfafc226b7e0b30325af6b4de80", + "sha256": "28197d8d308e14e91391d38d69a45e8286a1513cff4c3e65b40c915e872ad423", "hash_algorithm": "sha256_bytes_v1" }, { "role": "predecessor_post_core_v1_extension", "path": "crates/event_store/src/store/post_core_extensions_v1.rs", - "byte_length": 6923, - "sha256": "3820dad764a0575c20f3dc80a2f850651a1e41ab767cf46305377bf800558699", + "byte_length": 6922, + "sha256": "fc18d92f6f4d8cb5b8428c4bd64bcf6d0c9b013e9fbe815830b5a4ab9fe07d45", "hash_algorithm": "sha256_bytes_v1" }, { "role": "predecessor_post_core_v1_storage", "path": "crates/event_store/src/store/post_core_storage_v1.rs", - "byte_length": 16897, - "sha256": "3fb583b06dbd2e4fde96346da21e6d4516e79c8a4a3889299a7dd736c882c5df", + "byte_length": 16896, + "sha256": "8d0349a0d065708448f8e60387861a39099831142f87dd9a60ee3c6dafae031a", "hash_algorithm": "sha256_bytes_v1" }, { "role": "raw_ingest_capacity_authority", "path": "crates/event_store/src/store/protocol_reconciliation_v1.rs", - "byte_length": 30153, - "sha256": "de7c327d940d561f0818fade4dc79cabb0b5141e30e02574c702b6f109aee392", + "byte_length": 30162, + "sha256": "2934caaf352475a9d50ac79eb9f3e5053075e6a66fb71cfe367a86c212d0159a", "hash_algorithm": "sha256_bytes_v1" }, { "role": "predecessor_protocol_storage", "path": "crates/event_store/src/store/protocol_storage_v1.rs", - "byte_length": 10929, - "sha256": "20de4436945bac0d8cbeca0ae6cd95232a92da8cd6be6ae6beacba17fe50d658", + "byte_length": 10939, + "sha256": "53593f1c4ea0ff524b31a0e9c027803af051f5bd4fd5d70509508f580ee6dea6", "hash_algorithm": "sha256_bytes_v1" }, { @@ -691,8 +719,8 @@ { "role": "predecessor_food_result_vector_executor", "path": "crates/event_store/tests/food_availability_projection_v1_result_vector.rs", - "byte_length": 34061, - "sha256": "7cdbdda875a876482a061bcd8886d9ba56c10fab0fa76a07d73d0f368324b545", + "byte_length": 34062, + "sha256": "e3778e4f154845a088d32a83055b678efc1511bc7ae5bb82f4be61df2f6ef88e", "hash_algorithm": "sha256_bytes_v1" }, { @@ -705,29 +733,36 @@ { "role": "predecessor_successor_governance", "path": "tools/xtask/src/contract/food_availability_projection.rs", - "byte_length": 198638, - "sha256": "66a703e5284d0ce91a95d519eee93bd9763d4ab24b7fe8ef39672064118ed391", + "byte_length": 198719, + "sha256": "11e5628b20839fd88e28abef64d4e35a504d7bd42149691bcce67575cbc17a1c", "hash_algorithm": "sha256_bytes_v1" }, { "role": "transitive_predecessor_membership_governance", "path": "tools/xtask/src/contract/nip09_reconciliation.rs", - "byte_length": 836177, - "sha256": "0ac3b005475394432534fcb657fee34efdb8e8360231c44f94649d46e88fce94", + "byte_length": 838346, + "sha256": "506005717ab5d5785f5d6fcca54fdb1cddffa7eadebb176bf35cc0d6b3f67003", "hash_algorithm": "sha256_bytes_v1" }, { "role": "source_maintenance_governance", "path": "tools/xtask/src/contract/source_maintenance.rs", - "byte_length": 193992, - "sha256": "6c550f688224ffd5404b4f5b44780c48e95b8cf2adee730f3a178024625b7c80", + "byte_length": 196407, + "sha256": "69dc1b2530ab01ef6059e338f2ef80163d409376b0315dbacb23bab34b641074", "hash_algorithm": "sha256_bytes_v1" }, { "role": "contract_command_authority", "path": "tools/xtask/src/contract.rs", - "byte_length": 506277, - "sha256": "3a06ed79b5b342dce5b6582fc5c58311378a2dba97e5a8c74361f0186886023d", + "byte_length": 506342, + "sha256": "a506f13c9cf95fa60249f7c2aa8947ad5c9c821f82962c549dd324fd69917502", + "hash_algorithm": "sha256_bytes_v1" + }, + { + "role": "dto_root_generation_authority", + "path": "tools/xtask/src/dto_roots.rs", + "byte_length": 35940, + "sha256": "a899a5695d7533c151d03477c4bd697a6e55c47a4980549724ac42046af694f5", "hash_algorithm": "sha256_bytes_v1" }, { diff --git a/crates/event_store/contracts/source_maintenance_v1.manifest.sha256 b/crates/event_store/contracts/source_maintenance_v1.manifest.sha256 @@ -1 +1 @@ -fbcaf85876be1fd5fd5ebf383fa25a175e8c577618791d65504192c4c9975cba +a349dd1037306c7060f95d6edc0ef71306b030fbf915af7e90d7ed8c65805f27 diff --git a/crates/event_store/src/error.rs b/crates/event_store/src/error.rs @@ -1,5 +1,5 @@ use radroots_event::draft::RadrootsSignedEventError; -use radroots_event::ids::RadrootsIdParseError; +use radroots_event::id::RadrootsIdParseError; use radroots_event::wire::RadrootsEventWireError; use radroots_event_codec::verification::RadrootsNip01VerificationError; use radroots_transport::RadrootsTransportError; diff --git a/crates/event_store/src/generated/source_maintenance_manifest.rs b/crates/event_store/src/generated/source_maintenance_manifest.rs @@ -1,8 +1,8 @@ // @generated by `cargo xtask contract source-maintenance-manifest --write`; do not edit. -pub(crate) const SOURCE_MAINTENANCE_MANIFEST_JSON: &str = "{\n \"schema_version\": 1,\n \"contract_id\": \"radroots_event_store.source_maintenance_v1\",\n \"hook_id\": \"source_maintenance_v1\",\n \"manifest_schema\": {\n \"path\": \"crates/event_store/contracts/source_maintenance_v1.manifest.schema.json\",\n \"byte_length\": 12315,\n \"sha256\": \"96ea98a5abf3348b61565954cd34f2c622411d8dd34205ef04134bbe0e3d3f2b\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n \"predecessor\": {\n \"hook_id\": \"food_availability_projection_v1\",\n \"manifest\": {\n \"path\": \"crates/event_store/contracts/food_availability_projection_v1.manifest.json\",\n \"byte_length\": 17455,\n \"sha256\": \"02dfe1b450fbdac16e718888215b4dd5c85d8975440fa21e8f439fb24c2b2990\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n }\n },\n \"migration\": {\n \"version\": 4,\n \"name\": \"source_maintenance\",\n \"up\": {\n \"path\": \"crates/event_store/migrations/0004_source_maintenance.up.sql\",\n \"byte_length\": 19841,\n \"sha256\": \"ab2724188f8d08c897eebea2533a635e7c74282a25e84e4c0c37e78b08837a43\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n \"down\": {\n \"path\": \"crates/event_store/migrations/0004_source_maintenance.down.sql\",\n \"byte_length\": 5172,\n \"sha256\": \"fe44fd53c51545c08ea479b385e6781079dab70fc63da2a3c205d727a00ce860\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n \"schema_sha256\": \"074f85b663444ac150239ecd8441ea4a96ad83a798a55e22d2e5e2f7ee943a8c\",\n \"catalog\": {\n \"objects\": [\n \"radroots_event_store_source_capacity_delete_guard\",\n \"radroots_event_store_source_capacity_insert_guard\",\n \"radroots_event_store_source_capacity_marker_close_guard\",\n \"radroots_event_store_source_capacity_update_guard\",\n \"radroots_event_store_source_capacity_v1\",\n \"radroots_event_store_source_generation_capacity_advance\",\n \"radroots_event_store_source_generation_capacity_guard\"\n ],\n \"replaced_objects\": [\n \"radroots_event_store_food_availability_image_delete_guard\",\n \"radroots_event_store_food_availability_projection_delete_guard\",\n \"radroots_event_store_source_rebuild_marker_insert_guard\"\n ],\n \"tables\": [\n \"radroots_event_store_source_capacity_v1\"\n ],\n \"fts5_tables\": []\n }\n },\n \"source_maintenance\": {\n \"version\": 1,\n \"event_contract_registry_version\": 7,\n \"capacity_authority_id\": \"radroots_event_store_source_capacity_v1\",\n \"accounting\": {\n \"algorithm\": \"sqlite_cast_blob_octet_sum_v1\",\n \"raw_event_columns\": [\n \"event_id\",\n \"pubkey\",\n \"tags_json\",\n \"content\",\n \"sig\",\n \"raw_json\"\n ],\n \"raw_tag_columns\": [\n \"event_id\",\n \"tag_name\",\n \"tag_value\",\n \"tag_json\"\n ],\n \"nullable_raw_tag_columns\": [\n \"tag_value\"\n ]\n },\n \"limits\": {\n \"raw_events\": 25000,\n \"raw_tags\": 250000,\n \"raw_event_text_bytes\": 67108864,\n \"raw_tag_text_bytes\": 33554432,\n \"retained_source_generations\": 8\n },\n \"reopen_validation\": {\n \"mode\": \"bounded_full_raw_recount_v1\",\n \"raw_event_rejection_scan_bound\": 25001,\n \"raw_tag_rejection_scan_bound\": 250001,\n \"generation_history_validation\": \"bounded_count_plus_active_ordinal_v1\",\n \"retained_generation_rejection_scan_bound\": 9\n },\n \"rebuild_seal\": {\n \"nip09_hook_id\": \"nip09_reconciliation_v1\",\n \"nip09_manifest_sha256\": \"74af832420ffbaa9805e89df3c0b34f126a443e1598f757e3372f407f9003b77\",\n \"food_hook_id\": \"food_availability_projection_v1\",\n \"food_manifest_sha256\": \"02dfe1b450fbdac16e718888215b4dd5c85d8975440fa21e8f439fb24c2b2990\",\n \"food_scope_fingerprint_sha256\": \"8b63c5ddc48a2cc7db69295238b96d5f814dba50427c80b4d0079f061e6d3de0\",\n \"active_generation_authority\": \"radroots_event_store_source_state\",\n \"marker_close_authority\": \"radroots_event_store_source_capacity_marker_close_guard\"\n }\n },\n \"entry_points\": [\n {\n \"role\": \"migration_registry\",\n \"rust_path\": \"radroots_event_store::migrations::EVENT_STORE_MIGRATIONS[3]\"\n },\n {\n \"role\": \"migration_apply_hook\",\n \"rust_path\": \"radroots_event_store::schema::apply_migration_hook\"\n },\n {\n \"role\": \"migration_validation_hook\",\n \"rust_path\": \"radroots_event_store::schema::validate_migration_hook_state\"\n },\n {\n \"role\": \"capacity_query\",\n \"rust_path\": \"radroots_event_store::RadrootsEventStore::source_capacity_v1\"\n },\n {\n \"role\": \"raw_append_preflight\",\n \"rust_path\": \"radroots_event_store::source_maintenance_v1::preflight_unique_raw_source_append_v1\"\n },\n {\n \"role\": \"raw_append_advance\",\n \"rust_path\": \"radroots_event_store::source_maintenance_v1::advance_source_capacity_after_insert_v1\"\n },\n {\n \"role\": \"generation_append_preflight\",\n \"rust_path\": \"radroots_event_store::source_maintenance_v1::preflight_source_generation_append_v1\"\n },\n {\n \"role\": \"generation_rebuild_bind\",\n \"rust_path\": \"radroots_event_store::source_maintenance_v1::bind_source_capacity_to_generation_v1\"\n },\n {\n \"role\": \"sqlite_encoding_preflight\",\n \"rust_path\": \"radroots_event_store::store::validate_main_database_encoding\"\n },\n {\n \"role\": \"source_generation_history_rollback_guard\",\n \"rust_path\": \"radroots_event_store::schema::validate_rollback_preserves_source_generation_history\"\n },\n {\n \"role\": \"result_vector_executor\",\n \"rust_path\": \"source_maintenance_v1_result_vector\"\n }\n ],\n \"source_files\": [\n {\n \"role\": \"workspace_dependency_authority\",\n \"path\": \"Cargo.toml\",\n \"byte_length\": 12411,\n \"sha256\": \"cad96f080b0cc9ac7ffda703c8807540c9cf89f47a2299b141e6e7949714bf9f\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_currency_value_authority\",\n \"path\": \"crates/core/src/currency.rs\",\n \"byte_length\": 4142,\n \"sha256\": \"42e6da2d8d2fdd6955dc2d83e98dd00266e02bc910b69923b117662c05089d14\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_decimal_value_authority\",\n \"path\": \"crates/core/src/decimal.rs\",\n \"byte_length\": 7839,\n \"sha256\": \"4b1d681a92d7a9e074bee7e1f20eb1499bb05bfc6528a6c9ba69fa7d00416550\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_money_value_authority\",\n \"path\": \"crates/core/src/money.rs\",\n \"byte_length\": 8025,\n \"sha256\": \"3f30bc21e21951a62fdc5d4033736ed42a883df590e8403940775bd2edfeebc5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_percent_value_authority\",\n \"path\": \"crates/core/src/percent.rs\",\n \"byte_length\": 2652,\n \"sha256\": \"42ceab109881329f3539d06a0ee0381ab4359985fe185a18d58a9c9558c5eb7f\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_quantity_value_authority\",\n \"path\": \"crates/core/src/quantity.rs\",\n \"byte_length\": 6785,\n \"sha256\": \"d14e619da3829cdaf3ca7385fb892d330c286c1e21455c135c37518cbb588b5f\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_quantity_price_value_authority\",\n \"path\": \"crates/core/src/quantity_price.rs\",\n \"byte_length\": 7061,\n \"sha256\": \"d60f70377099470ed283f45868a5119d7bb46143cb250b5082a4c038ba7f6cdc\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_unit_value_authority\",\n \"path\": \"crates/core/src/unit.rs\",\n \"byte_length\": 10023,\n \"sha256\": \"550e9582b6a5290aac3f637b83853b21fefcbab92c432d067c83448f4b2fe3e9\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_public_surface\",\n \"path\": \"crates/blossom/src/lib.rs\",\n \"byte_length\": 510,\n \"sha256\": \"a4dfcbd193457c50c1b0fbfc91bb547981ecd3a6e23cfc6f1030edfb511dc58c\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_authorization_authority\",\n \"path\": \"crates/blossom/src/authorization.rs\",\n \"byte_length\": 39360,\n \"sha256\": \"461947b30516315a342b3b5697599f701d27050888f29f67f5d7a7ad4afa4c28\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_descriptor_authority\",\n \"path\": \"crates/blossom/src/descriptor.rs\",\n \"byte_length\": 13702,\n \"sha256\": \"b2a4ffa760256e1316f70e012d200e2b5f4afd8ede771b85a5147f96b247f599\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_error_authority\",\n \"path\": \"crates/blossom/src/error.rs\",\n \"byte_length\": 17229,\n \"sha256\": \"02af55beacf437040be17d1fc3271d6e2a62915f656ec2dbe06247deef83f95a\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_hash_authority\",\n \"path\": \"crates/blossom/src/hash.rs\",\n \"byte_length\": 11006,\n \"sha256\": \"45eca0d81ac0f46c305a32f81aafcdd90b14679d0614f72862289a6e5d4cb08f\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_media_type_authority\",\n \"path\": \"crates/blossom/src/media_type.rs\",\n \"byte_length\": 2368,\n \"sha256\": \"69db5c0f9fcdd7dbe1f22daa499f65603ae4ce198083dab2c73a36813fa18a46\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_url_authority\",\n \"path\": \"crates/blossom/src/url.rs\",\n \"byte_length\": 14580,\n \"sha256\": \"342c995fcf620e5fb32461a7d8276f5668ba2662890bd32d12780cc9121c6451\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_contract_facade\",\n \"path\": \"crates/event/src/contract.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_contract_registry_v7_authority\",\n \"path\": \"crates/event/src/contract/registry_v7.rs\",\n \"byte_length\": 157246,\n \"sha256\": \"87a97f782427d4036d49a3dddaf2f5f46ddf585cd2f537c01628ba817a2f94e4\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_envelope_authority\",\n \"path\": \"crates/event/src/envelope.rs\",\n \"byte_length\": 31143,\n \"sha256\": \"2478ca91b4dedaf8b8aefe653971b70c56c4ee076dcbfdf7f59f97f86c03b748\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_verification_typestate_authority\",\n \"path\": \"crates/event/src/verification.rs\",\n \"byte_length\": 9470,\n \"sha256\": \"181e17a5e45d7a01ae2d2d4057b210456072bfb260712ace71c2dd2461dda898\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_admission_typestate_authority\",\n \"path\": \"crates/event/src/admission.rs\",\n \"byte_length\": 5809,\n \"sha256\": \"8caf75f69994e9710b4e8f82abface29e752dd581c012e5e20452c82d21c2d01\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_head_facade\",\n \"path\": \"crates/event/src/event_head.rs\",\n \"byte_length\": 68,\n \"sha256\": \"cb52f6006f7ecd862707d6b048f9fc407e0cd5ebcd3091b3c54e195ffa5cba64\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_head_v1_authority\",\n \"path\": \"crates/event/src/event_head/v1.rs\",\n \"byte_length\": 7538,\n \"sha256\": \"fbc738b403afd3a186ab183ff5f457125a7fbfab01a51fd4b46c92a2543a0126\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_ids_authority\",\n \"path\": \"crates/event/src/ids.rs\",\n \"byte_length\": 51007,\n \"sha256\": \"7d5d52dcbdd2ec31d914999960fa58aa279a8d4f8bd380fb6050b9a1019ad2d8\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_trade_authority\",\n \"path\": \"crates/event/src/trade.rs\",\n \"byte_length\": 68514,\n \"sha256\": \"88c21633f60b84adf30ad7fe21d6d0b6844cc7186826600a83a467cc028e55dd\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_kinds_authority\",\n \"path\": \"crates/event/src/kinds.rs\",\n \"byte_length\": 34961,\n \"sha256\": \"8b3ce6193cab1f7e1587d0c1b2880a81b0aa43c77d89671b602772db37edcebf\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_tags_authority\",\n \"path\": \"crates/event/src/tags.rs\",\n \"byte_length\": 4530,\n \"sha256\": \"cb8f12a639fc72d9238e32495d9e67e928e6627fb8c94ec0a58c5d95e7373cd6\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_draft_authority\",\n \"path\": \"crates/event/src/draft.rs\",\n \"byte_length\": 58654,\n \"sha256\": \"d0c8550caabd359e53d854cdbc5c299108003a95e43d8133637c4301646ea7a6\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_calendar_authority\",\n \"path\": \"crates/event/src/calendar.rs\",\n \"byte_length\": 103837,\n \"sha256\": \"928e5a3df61ab08565cecf20a5045352236bc3d807127f1cd66294d60ee65621\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_classified_listing_authority\",\n \"path\": \"crates/event/src/classified_listing.rs\",\n \"byte_length\": 8226,\n \"sha256\": \"745aa08953a6243ea1afad22aa63e44f6746f2f243ab0d6b617d6ab64fa58749\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_profile_authority\",\n \"path\": \"crates/event/src/profile.rs\",\n \"byte_length\": 18848,\n \"sha256\": \"7c7ac7f4926938f5cb5530be5450e5e23f18f216bdb222150fbdd451cec20d5c\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_post_authority\",\n \"path\": \"crates/event/src/post.rs\",\n \"byte_length\": 22738,\n \"sha256\": \"7ed4a4c39bed40b134369d16e1fc35ab2c7d27ee300dd36d367025def2283b39\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_comment_authority\",\n \"path\": \"crates/event/src/comment.rs\",\n \"byte_length\": 36434,\n \"sha256\": \"ec944bd868deb71215c915a35e79ff26715317fdb62c0fbbb5f1d0993f769c38\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_food_availability_authority\",\n \"path\": \"crates/event/src/food_availability.rs\",\n \"byte_length\": 45429,\n \"sha256\": \"b4357dfb6954631673b6cd58794015da29303cb54ce8405a57ad543870036c9e\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_deletion_authority\",\n \"path\": \"crates/event/src/deletion.rs\",\n \"byte_length\": 31177,\n \"sha256\": \"eaf5eac81cd90039dd2c8f5a1f647d7916f961841d51887f1c5a679947bc816a\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_relay_hint_authority\",\n \"path\": \"crates/event/src/relay_hint.rs\",\n \"byte_length\": 14019,\n \"sha256\": \"f50a8fddd1ec9996a452f944ebc59ca4217fc8b28d90be33c2cca925dc3465d0\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_media_authority\",\n \"path\": \"crates/event/src/media.rs\",\n \"byte_length\": 3521,\n \"sha256\": \"8f670e634452872a525efdad0cb9480288885c62f22a9b9915a67a7e7965651c\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_social_authority\",\n \"path\": \"crates/event/src/social.rs\",\n \"byte_length\": 5483,\n \"sha256\": \"1b89c6d0954822e7f1e778479ed43694e88929bcd5310ee066f8f4ba6505045a\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_wire_facade\",\n \"path\": \"crates/event/src/wire.rs\",\n \"byte_length\": 68,\n \"sha256\": \"cb52f6006f7ecd862707d6b048f9fc407e0cd5ebcd3091b3c54e195ffa5cba64\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_wire_v1_authority\",\n \"path\": \"crates/event/src/wire/v1.rs\",\n \"byte_length\": 22133,\n \"sha256\": \"cc28c8cbd962b32ed2efe43e84c1e0d1ea3bd89636efff2d5553714072fce1a4\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_verification_facade\",\n \"path\": \"crates/event_codec/src/verification.rs\",\n \"byte_length\": 253,\n \"sha256\": \"b49a32df605035c87f295c0a151140d43d2e588c5e11b05183e5fc92993dae0e\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_verification_v1_authority\",\n \"path\": \"crates/event_codec/src/verification/v1.rs\",\n \"byte_length\": 8649,\n \"sha256\": \"1ef3d12f90eb7d35f4cafe36c2cc0bbd33731df278b58c9062fb13934e2a98c8\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_registry_v7_admission_authority\",\n \"path\": \"crates/event_codec/src/admission/registry_v7.rs\",\n \"byte_length\": 5350,\n \"sha256\": \"755e63dd7ad1115c219e5a3ea540bef67d2770fc9f2a5aa6ba97c925c99bdced\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_profile_inbound_facade\",\n \"path\": \"crates/event_codec/src/profile/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_profile_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/profile/inbound/registry_v7.rs\",\n \"byte_length\": 10394,\n \"sha256\": \"c37c225ea8153beb098a39c4a56203aa03382af12646f40cd3f8628663700702\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_post_inbound_facade\",\n \"path\": \"crates/event_codec/src/post/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_post_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/post/inbound/registry_v7.rs\",\n \"byte_length\": 16016,\n \"sha256\": \"bc0bb839c28f3588f05544c846c987528ea3934c75305fef70af8e027a97cc58\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_reply_inbound_facade\",\n \"path\": \"crates/event_codec/src/reply/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_reply_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/reply/inbound/registry_v7.rs\",\n \"byte_length\": 26812,\n \"sha256\": \"a72e9721ed13addca2a63942ac9e43c1daa8f1d1457eef08ec6a3ee5eb8872c5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_comment_inbound_facade\",\n \"path\": \"crates/event_codec/src/comment/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_comment_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/comment/inbound/registry_v7.rs\",\n \"byte_length\": 53783,\n \"sha256\": \"30d1b0155963b25d64685ddd042f423ef7707b111dc56ead15bd468e0433a432\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_deletion_facade\",\n \"path\": \"crates/event_codec/src/deletion/mod.rs\",\n \"byte_length\": 115,\n \"sha256\": \"17d56f82ddb0a86bc97abbcf3e037fe460ea31fff2548f527be4bf004dac3a95\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_deletion_reconciliation_v1_authority\",\n \"path\": \"crates/event_codec/src/deletion/reconciliation_v1.rs\",\n \"byte_length\": 38469,\n \"sha256\": \"3e06d1fa923ca5faabb1e95338c35650b0e20b078ff5c972e35ab845d8b7476c\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_food_inbound_facade\",\n \"path\": \"crates/event_codec/src/food_availability/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_food_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/food_availability/inbound/registry_v7.rs\",\n \"byte_length\": 26764,\n \"sha256\": \"a5786cff942b7b0038f741afb5b9a19230ac58cb57a5ba747b32e1b95d414e15\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_job_traits_authority\",\n \"path\": \"crates/event_codec/src/job/traits.rs\",\n \"byte_length\": 5067,\n \"sha256\": \"de0b3f67177a48bd8e3c62534850103d09b7be099e80e88a9583363db705fcbb\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_store_dependency_authority\",\n \"path\": \"crates/event_store/Cargo.toml\",\n \"byte_length\": 1567,\n \"sha256\": \"46e03d3c758e1116638021a0499dfa588b4266498e0d50cfa758f9bef9bcfeb3\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_store_error_and_limits\",\n \"path\": \"crates/event_store/src/error.rs\",\n \"byte_length\": 19517,\n \"sha256\": \"4bf24ee1aa6117597ab467b1379a05549b79024213dc7622a2d276bc26fffab4\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"generated_descriptor_registration\",\n \"path\": \"crates/event_store/src/generated.rs\",\n \"byte_length\": 144,\n \"sha256\": \"6b0a8d6f249bd4fc3f878d37cb5e418680f0f1be2d9eec2518dedf03efc47121\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"public_surface\",\n \"path\": \"crates/event_store/src/lib.rs\",\n \"byte_length\": 3844,\n \"sha256\": \"3cd9653bcb752fb3c4442d4904b98a0a6208011a9a238125b7b7073d7f4e312b\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"migration_registry\",\n \"path\": \"crates/event_store/src/migrations.rs\",\n \"byte_length\": 73585,\n \"sha256\": \"a47477d04759ec6e71d14d3d05459864eae78fce0e3c2481a1b03147f04637f7\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_model_public_surface\",\n \"path\": \"crates/event_store/src/model.rs\",\n \"byte_length\": 33596,\n \"sha256\": \"98b1742ffb517f66f8e9edefa61d1c3cf3e22be5985202c6c340310a98c72c8e\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_store_reconciliation_v1_model\",\n \"path\": \"crates/event_store/src/model/reconciliation_v1.rs\",\n \"byte_length\": 11138,\n \"sha256\": \"8a26bc373035878ef9b41767ceea7b681896e17d88bedce118de1d622125e1d6\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_store_reconciliation_v1_ingest_model\",\n \"path\": \"crates/event_store/src/model/ingest_reconciliation_v1.rs\",\n \"byte_length\": 1626,\n \"sha256\": \"47bf13b3fc0f8a913a660f7d655413de0f6b90568bc4acc510aa6bd741bab47b\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"addressable_transition_feed_model\",\n \"path\": \"crates/event_store/src/model/addressable_transition_feed_v1.rs\",\n \"byte_length\": 22279,\n \"sha256\": \"f8ea454a0e998a3d433bba52d1ff9759a04fcb91db286cf2a2b10ef7d0057694\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"food_projection_model\",\n \"path\": \"crates/event_store/src/model/food_availability_projection_v1.rs\",\n \"byte_length\": 17437,\n \"sha256\": \"6fdfc8c5eb3dd9c451fd47b2394af123b50f7fe6d74113f8777221a8fa31ba30\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"source_generation_rebuild_authority\",\n \"path\": \"crates/event_store/src/nip09/reconciliation_v1.rs\",\n \"byte_length\": 185215,\n \"sha256\": \"575c9fb25b1f728144f5fe649007be705092d9b137f51fd8d771439871bfa09a\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"nip09_successor_result_vector_executor\",\n \"path\": \"crates/event_store/tests/support/nip09_reconciliation_v1_result_vector_v2.rs\",\n \"byte_length\": 17983,\n \"sha256\": \"a1d919aa545d7c506d7ae8740445025732c2cda302790d243a4ff3d6cee898f6\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"schema_migration_and_reopen_authority\",\n \"path\": \"crates/event_store/src/schema.rs\",\n \"byte_length\": 146146,\n \"sha256\": \"93b060e80d3edd73f86208e4bf698fa9d53eaf1eeb04526c9261fb8b5726fb0d\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"public_store_and_transaction_authority\",\n \"path\": \"crates/event_store/src/store.rs\",\n \"byte_length\": 395012,\n \"sha256\": \"5538b600fa5e457e10f23fe4e3a3c55496662098abaef2692108dc69c29aa3e6\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"addressable_transition_feed_store\",\n \"path\": \"crates/event_store/src/store/addressable_transition_feed_v1.rs\",\n \"byte_length\": 40260,\n \"sha256\": \"46ea9c9786099c85150e4979c9dac6f84c1b85b8f30ec44aae6d25f9eb9bebc5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"current_visibility_store\",\n \"path\": \"crates/event_store/src/store/current_visibility_v1.rs\",\n \"byte_length\": 15786,\n \"sha256\": \"bf03f9fc45561366cc489daa400b39d65e68cc70aea2ef4a9cd7724224ca9514\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"food_projection_store\",\n \"path\": \"crates/event_store/src/store/food_availability_projection_v1.rs\",\n \"byte_length\": 48959,\n \"sha256\": \"a01ed95983481a8f0efdcc985635efba122fdbfafc226b7e0b30325af6b4de80\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_post_core_v1_extension\",\n \"path\": \"crates/event_store/src/store/post_core_extensions_v1.rs\",\n \"byte_length\": 6923,\n \"sha256\": \"3820dad764a0575c20f3dc80a2f850651a1e41ab767cf46305377bf800558699\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_post_core_v1_storage\",\n \"path\": \"crates/event_store/src/store/post_core_storage_v1.rs\",\n \"byte_length\": 16897,\n \"sha256\": \"3fb583b06dbd2e4fde96346da21e6d4516e79c8a4a3889299a7dd736c882c5df\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"raw_ingest_capacity_authority\",\n \"path\": \"crates/event_store/src/store/protocol_reconciliation_v1.rs\",\n \"byte_length\": 30153,\n \"sha256\": \"de7c327d940d561f0818fade4dc79cabb0b5141e30e02574c702b6f109aee392\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_protocol_storage\",\n \"path\": \"crates/event_store/src/store/protocol_storage_v1.rs\",\n \"byte_length\": 10929,\n \"sha256\": \"20de4436945bac0d8cbeca0ae6cd95232a92da8cd6be6ae6beacba17fe50d658\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"source_maintenance_runtime\",\n \"path\": \"crates/event_store/src/source_maintenance_v1.rs\",\n \"byte_length\": 51849,\n \"sha256\": \"db43df5849c811d767a87bfa7884ce499400d0b169734e18242542a4415b3a51\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_food_result_vector_executor\",\n \"path\": \"crates/event_store/tests/food_availability_projection_v1_result_vector.rs\",\n \"byte_length\": 34061,\n \"sha256\": \"7cdbdda875a876482a061bcd8886d9ba56c10fab0fa76a07d73d0f368324b545\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"artifact_transaction_authority\",\n \"path\": \"tools/xtask/src/contract/artifact_bundle.rs\",\n \"byte_length\": 38279,\n \"sha256\": \"f326ea57b56d40135f95b6b1e15961f66eed363337180a6d12a5ea903e1a9a29\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_successor_governance\",\n \"path\": \"tools/xtask/src/contract/food_availability_projection.rs\",\n \"byte_length\": 198638,\n \"sha256\": \"66a703e5284d0ce91a95d519eee93bd9763d4ab24b7fe8ef39672064118ed391\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"transitive_predecessor_membership_governance\",\n \"path\": \"tools/xtask/src/contract/nip09_reconciliation.rs\",\n \"byte_length\": 836177,\n \"sha256\": \"0ac3b005475394432534fcb657fee34efdb8e8360231c44f94649d46e88fce94\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"source_maintenance_governance\",\n \"path\": \"tools/xtask/src/contract/source_maintenance.rs\",\n \"byte_length\": 193992,\n \"sha256\": \"6c550f688224ffd5404b4f5b44780c48e95b8cf2adee730f3a178024625b7c80\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"contract_command_authority\",\n \"path\": \"tools/xtask/src/contract.rs\",\n \"byte_length\": 506277,\n \"sha256\": \"3a06ed79b5b342dce5b6582fc5c58311378a2dba97e5a8c74361f0186886023d\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"xtask_dispatch_and_release_preflight\",\n \"path\": \"tools/xtask/src/main.rs\",\n \"byte_length\": 16426,\n \"sha256\": \"abc24896c6c740c10811a3e003ec4be8ebdb376a7b6b01445bfa7a5889f094a7\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n }\n ],\n \"public_api\": {\n \"inherited_predecessor_symbols\": [\n \"RADROOTS_ADDRESSABLE_TRANSITION_CURSOR_JSON_MAX_BYTES_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_D_TAG_MAX_BYTES_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_FEED_VERSION_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_PAGE_LIMIT_MAX_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_PAGE_RAW_JSON_MAX_BYTES_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_PAGE_SCAN_MAX_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_SCOPE_KIND_MAX_V1\",\n \"RADROOTS_FOOD_AVAILABILITY_PROJECTION_APPLY_PAGE_LIMIT_V1\",\n \"RADROOTS_FOOD_AVAILABILITY_PROJECTION_VERSION_V1\",\n \"RADROOTS_FOOD_AVAILABILITY_SEARCH_QUERY_MAX_BYTES_V1\",\n \"RADROOTS_FOOD_AVAILABILITY_SEARCH_QUERY_MAX_TERMS_V1\",\n \"RadrootsAddressableTransitionCauseV1\",\n \"RadrootsAddressableTransitionCoordinateV1\",\n \"RadrootsAddressableTransitionCursorV1\",\n \"RadrootsAddressableTransitionEventReferenceV1\",\n \"RadrootsAddressableTransitionOriginV1\",\n \"RadrootsAddressableTransitionPageV1\",\n \"RadrootsAddressableTransitionRawHeadDecisionV1\",\n \"RadrootsAddressableTransitionScopeFingerprintV1\",\n \"RadrootsAddressableTransitionScopeV1\",\n \"RadrootsAddressableTransitionV1\",\n \"RadrootsAddressableTransitionVisibilityV1\",\n \"RadrootsCurrentEventVisibilityV1\",\n \"RadrootsCurrentVisibilityDecisionV1\",\n \"RadrootsFoodAvailabilitySearchQueryV1\",\n \"RadrootsFoodAvailabilityStatusFilterV1\",\n \"RadrootsNip09SuppressionEvidenceV1\",\n \"RadrootsNip09SuppressionOutcome\",\n \"RadrootsNip09SuppressionReason\",\n \"RadrootsStoreProducedCanonicalEventV1\",\n \"RadrootsStoredFoodAvailabilityImageV1\",\n \"RadrootsStoredFoodAvailabilityV1\"\n ],\n \"added_symbols\": [\n \"RADROOTS_EVENT_STORE_RAW_EVENT_COUNT_LIMIT_V1\",\n \"RADROOTS_EVENT_STORE_RAW_EVENT_TEXT_BYTES_LIMIT_V1\",\n \"RADROOTS_EVENT_STORE_RAW_TAG_COUNT_LIMIT_V1\",\n \"RADROOTS_EVENT_STORE_RAW_TAG_TEXT_BYTES_LIMIT_V1\",\n \"RADROOTS_EVENT_STORE_RETAINED_SOURCE_GENERATION_LIMIT_V1\",\n \"RadrootsEventStoreSourceCapacityResourceV1\",\n \"RadrootsEventStoreSourceCapacityV1\"\n ],\n \"methods\": [\n \"RadrootsEventStore::source_capacity_v1\",\n \"RadrootsEventStoreSourceCapacityResourceV1::as_str\",\n \"RadrootsEventStoreSourceCapacityV1::source_generation\",\n \"RadrootsEventStoreSourceCapacityV1::raw_event_count\",\n \"RadrootsEventStoreSourceCapacityV1::raw_tag_count\",\n \"RadrootsEventStoreSourceCapacityV1::raw_event_text_bytes\",\n \"RadrootsEventStoreSourceCapacityV1::raw_tag_text_bytes\",\n \"RadrootsEventStoreSourceCapacityV1::raw_high_water_seq\",\n \"RadrootsEventStoreSourceCapacityV1::retained_generation_count\",\n \"RadrootsEventStoreSourceCapacityV1::retained_generation_limit\"\n ],\n \"error_variants\": [\n \"SourceCapacityExceeded\",\n \"SourceGenerationHistoryLimitReached\",\n \"PersistedEphemeralRawEvent\",\n \"SourceCapacityStateDrift\",\n \"SqliteMainDatabaseEncodingNotUtf8\",\n \"RollbackWouldDiscardSourceGenerationHistory\"\n ],\n \"removed_symbols\": [\n \"RadrootsEventStoreReconciliationResource\",\n \"RadrootsEventStoreError::ReconciliationCapacityExceeded\"\n ],\n \"breaking_replacements\": [\n {\n \"removed\": \"RadrootsEventStoreReconciliationResource\",\n \"replacement\": \"RadrootsEventStoreSourceCapacityResourceV1\"\n },\n {\n \"removed\": \"RadrootsEventStoreError::ReconciliationCapacityExceeded\",\n \"replacement\": \"RadrootsEventStoreError::SourceCapacityExceeded\"\n }\n ]\n },\n \"result_vector\": {\n \"canonical_path\": \"contracts/conformance/vectors/event_store/source_maintenance.v1.json\",\n \"mirror_path\": \"crates/event_store/tests/fixtures/source_maintenance.v1.json\",\n \"byte_length\": 16253,\n \"sha256\": \"997aba2604a2b9d199fb87dc9d07942ca50d91863aeadcf3eeacf16d191dd71f\",\n \"hash_algorithm\": \"sha256_bytes_v1\",\n \"executor_id\": \"radroots_event_store.source_maintenance_v1.result_vector_executor.v1\",\n \"executor_path\": \"crates/event_store/tests/source_maintenance_v1_result_vector.rs\",\n \"executor_test\": \"source_maintenance_v1_result_vector\",\n \"executor_byte_length\": 23510,\n \"executor_sha256\": \"a7487afdfe19fc5fc794811d0f0e6035203e1aabcf0a33a1d398f6b3555d38f3\",\n \"executor_hash_algorithm\": \"sha256_bytes_v1\"\n }\n}\n"; -pub(crate) const SOURCE_MAINTENANCE_MANIFEST_BYTE_LENGTH: usize = 32509; +pub(crate) const SOURCE_MAINTENANCE_MANIFEST_JSON: &str = "{\n \"schema_version\": 1,\n \"contract_id\": \"radroots_event_store.source_maintenance_v1\",\n \"hook_id\": \"source_maintenance_v1\",\n \"manifest_schema\": {\n \"path\": \"crates/event_store/contracts/source_maintenance_v1.manifest.schema.json\",\n \"byte_length\": 12315,\n \"sha256\": \"96ea98a5abf3348b61565954cd34f2c622411d8dd34205ef04134bbe0e3d3f2b\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n \"predecessor\": {\n \"hook_id\": \"food_availability_projection_v1\",\n \"manifest\": {\n \"path\": \"crates/event_store/contracts/food_availability_projection_v1.manifest.json\",\n \"byte_length\": 17455,\n \"sha256\": \"02dfe1b450fbdac16e718888215b4dd5c85d8975440fa21e8f439fb24c2b2990\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n }\n },\n \"migration\": {\n \"version\": 4,\n \"name\": \"source_maintenance\",\n \"up\": {\n \"path\": \"crates/event_store/migrations/0004_source_maintenance.up.sql\",\n \"byte_length\": 19841,\n \"sha256\": \"ab2724188f8d08c897eebea2533a635e7c74282a25e84e4c0c37e78b08837a43\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n \"down\": {\n \"path\": \"crates/event_store/migrations/0004_source_maintenance.down.sql\",\n \"byte_length\": 5172,\n \"sha256\": \"fe44fd53c51545c08ea479b385e6781079dab70fc63da2a3c205d727a00ce860\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n \"schema_sha256\": \"074f85b663444ac150239ecd8441ea4a96ad83a798a55e22d2e5e2f7ee943a8c\",\n \"catalog\": {\n \"objects\": [\n \"radroots_event_store_source_capacity_delete_guard\",\n \"radroots_event_store_source_capacity_insert_guard\",\n \"radroots_event_store_source_capacity_marker_close_guard\",\n \"radroots_event_store_source_capacity_update_guard\",\n \"radroots_event_store_source_capacity_v1\",\n \"radroots_event_store_source_generation_capacity_advance\",\n \"radroots_event_store_source_generation_capacity_guard\"\n ],\n \"replaced_objects\": [\n \"radroots_event_store_food_availability_image_delete_guard\",\n \"radroots_event_store_food_availability_projection_delete_guard\",\n \"radroots_event_store_source_rebuild_marker_insert_guard\"\n ],\n \"tables\": [\n \"radroots_event_store_source_capacity_v1\"\n ],\n \"fts5_tables\": []\n }\n },\n \"source_maintenance\": {\n \"version\": 1,\n \"event_contract_registry_version\": 7,\n \"capacity_authority_id\": \"radroots_event_store_source_capacity_v1\",\n \"accounting\": {\n \"algorithm\": \"sqlite_cast_blob_octet_sum_v1\",\n \"raw_event_columns\": [\n \"event_id\",\n \"pubkey\",\n \"tags_json\",\n \"content\",\n \"sig\",\n \"raw_json\"\n ],\n \"raw_tag_columns\": [\n \"event_id\",\n \"tag_name\",\n \"tag_value\",\n \"tag_json\"\n ],\n \"nullable_raw_tag_columns\": [\n \"tag_value\"\n ]\n },\n \"limits\": {\n \"raw_events\": 25000,\n \"raw_tags\": 250000,\n \"raw_event_text_bytes\": 67108864,\n \"raw_tag_text_bytes\": 33554432,\n \"retained_source_generations\": 8\n },\n \"reopen_validation\": {\n \"mode\": \"bounded_full_raw_recount_v1\",\n \"raw_event_rejection_scan_bound\": 25001,\n \"raw_tag_rejection_scan_bound\": 250001,\n \"generation_history_validation\": \"bounded_count_plus_active_ordinal_v1\",\n \"retained_generation_rejection_scan_bound\": 9\n },\n \"rebuild_seal\": {\n \"nip09_hook_id\": \"nip09_reconciliation_v1\",\n \"nip09_manifest_sha256\": \"74af832420ffbaa9805e89df3c0b34f126a443e1598f757e3372f407f9003b77\",\n \"food_hook_id\": \"food_availability_projection_v1\",\n \"food_manifest_sha256\": \"02dfe1b450fbdac16e718888215b4dd5c85d8975440fa21e8f439fb24c2b2990\",\n \"food_scope_fingerprint_sha256\": \"8b63c5ddc48a2cc7db69295238b96d5f814dba50427c80b4d0079f061e6d3de0\",\n \"active_generation_authority\": \"radroots_event_store_source_state\",\n \"marker_close_authority\": \"radroots_event_store_source_capacity_marker_close_guard\"\n }\n },\n \"entry_points\": [\n {\n \"role\": \"migration_registry\",\n \"rust_path\": \"radroots_event_store::migrations::EVENT_STORE_MIGRATIONS[3]\"\n },\n {\n \"role\": \"migration_apply_hook\",\n \"rust_path\": \"radroots_event_store::schema::apply_migration_hook\"\n },\n {\n \"role\": \"migration_validation_hook\",\n \"rust_path\": \"radroots_event_store::schema::validate_migration_hook_state\"\n },\n {\n \"role\": \"capacity_query\",\n \"rust_path\": \"radroots_event_store::RadrootsEventStore::source_capacity_v1\"\n },\n {\n \"role\": \"raw_append_preflight\",\n \"rust_path\": \"radroots_event_store::source_maintenance_v1::preflight_unique_raw_source_append_v1\"\n },\n {\n \"role\": \"raw_append_advance\",\n \"rust_path\": \"radroots_event_store::source_maintenance_v1::advance_source_capacity_after_insert_v1\"\n },\n {\n \"role\": \"generation_append_preflight\",\n \"rust_path\": \"radroots_event_store::source_maintenance_v1::preflight_source_generation_append_v1\"\n },\n {\n \"role\": \"generation_rebuild_bind\",\n \"rust_path\": \"radroots_event_store::source_maintenance_v1::bind_source_capacity_to_generation_v1\"\n },\n {\n \"role\": \"sqlite_encoding_preflight\",\n \"rust_path\": \"radroots_event_store::store::validate_main_database_encoding\"\n },\n {\n \"role\": \"source_generation_history_rollback_guard\",\n \"rust_path\": \"radroots_event_store::schema::validate_rollback_preserves_source_generation_history\"\n },\n {\n \"role\": \"result_vector_executor\",\n \"rust_path\": \"source_maintenance_v1_result_vector\"\n }\n ],\n \"source_files\": [\n {\n \"role\": \"workspace_dependency_authority\",\n \"path\": \"Cargo.toml\",\n \"byte_length\": 12411,\n \"sha256\": \"cad96f080b0cc9ac7ffda703c8807540c9cf89f47a2299b141e6e7949714bf9f\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_currency_value_authority\",\n \"path\": \"crates/core/src/currency.rs\",\n \"byte_length\": 4142,\n \"sha256\": \"42e6da2d8d2fdd6955dc2d83e98dd00266e02bc910b69923b117662c05089d14\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_decimal_value_authority\",\n \"path\": \"crates/core/src/decimal.rs\",\n \"byte_length\": 7839,\n \"sha256\": \"4b1d681a92d7a9e074bee7e1f20eb1499bb05bfc6528a6c9ba69fa7d00416550\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_money_value_authority\",\n \"path\": \"crates/core/src/money.rs\",\n \"byte_length\": 8025,\n \"sha256\": \"3f30bc21e21951a62fdc5d4033736ed42a883df590e8403940775bd2edfeebc5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_percent_value_authority\",\n \"path\": \"crates/core/src/percent.rs\",\n \"byte_length\": 2652,\n \"sha256\": \"42ceab109881329f3539d06a0ee0381ab4359985fe185a18d58a9c9558c5eb7f\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_quantity_value_authority\",\n \"path\": \"crates/core/src/quantity.rs\",\n \"byte_length\": 6785,\n \"sha256\": \"d14e619da3829cdaf3ca7385fb892d330c286c1e21455c135c37518cbb588b5f\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_quantity_price_value_authority\",\n \"path\": \"crates/core/src/quantity_price.rs\",\n \"byte_length\": 7061,\n \"sha256\": \"d60f70377099470ed283f45868a5119d7bb46143cb250b5082a4c038ba7f6cdc\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"core_unit_value_authority\",\n \"path\": \"crates/core/src/unit.rs\",\n \"byte_length\": 10023,\n \"sha256\": \"550e9582b6a5290aac3f637b83853b21fefcbab92c432d067c83448f4b2fe3e9\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_public_surface\",\n \"path\": \"crates/blossom/src/lib.rs\",\n \"byte_length\": 510,\n \"sha256\": \"a4dfcbd193457c50c1b0fbfc91bb547981ecd3a6e23cfc6f1030edfb511dc58c\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_authorization_authority\",\n \"path\": \"crates/blossom/src/authorization.rs\",\n \"byte_length\": 39360,\n \"sha256\": \"461947b30516315a342b3b5697599f701d27050888f29f67f5d7a7ad4afa4c28\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_descriptor_authority\",\n \"path\": \"crates/blossom/src/descriptor.rs\",\n \"byte_length\": 13702,\n \"sha256\": \"b2a4ffa760256e1316f70e012d200e2b5f4afd8ede771b85a5147f96b247f599\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_error_authority\",\n \"path\": \"crates/blossom/src/error.rs\",\n \"byte_length\": 17229,\n \"sha256\": \"02af55beacf437040be17d1fc3271d6e2a62915f656ec2dbe06247deef83f95a\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_hash_authority\",\n \"path\": \"crates/blossom/src/hash.rs\",\n \"byte_length\": 11006,\n \"sha256\": \"45eca0d81ac0f46c305a32f81aafcdd90b14679d0614f72862289a6e5d4cb08f\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_media_type_authority\",\n \"path\": \"crates/blossom/src/media_type.rs\",\n \"byte_length\": 2368,\n \"sha256\": \"69db5c0f9fcdd7dbe1f22daa499f65603ae4ce198083dab2c73a36813fa18a46\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"blossom_url_authority\",\n \"path\": \"crates/blossom/src/url.rs\",\n \"byte_length\": 14580,\n \"sha256\": \"342c995fcf620e5fb32461a7d8276f5668ba2662890bd32d12780cc9121c6451\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_public_surface\",\n \"path\": \"crates/event/src/lib.rs\",\n \"byte_length\": 1967,\n \"sha256\": \"b686e22f25e86b4cc3c5915d507b4d8681ba83026bfd350e970ee12281e94fb3\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_contract_facade\",\n \"path\": \"crates/event/src/contract.rs\",\n \"byte_length\": 208,\n \"sha256\": \"27466bf36461071931f391c60646a13f7781d19584583166cc54c0eece76d010\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_contract_registry_v7_authority\",\n \"path\": \"crates/event/src/contract/registry_v7.rs\",\n \"byte_length\": 157252,\n \"sha256\": \"4ae8af380fd99c4b9b011981770bb352e104b7bae1784f45b1979f972a97df35\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_envelope_authority\",\n \"path\": \"crates/event/src/envelope.rs\",\n \"byte_length\": 31224,\n \"sha256\": \"34c91001d301db1ac9207da41fb4ce4259bc7f758110d1debeb940670c2540ee\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_verification_typestate_authority\",\n \"path\": \"crates/event/src/verification.rs\",\n \"byte_length\": 9469,\n \"sha256\": \"479610afcfe1f7c0c475fe2539eef9f6a0b329c6e5c6fd2dbab3d9da7d7cbcd5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_admission_typestate_authority\",\n \"path\": \"crates/event/src/admission.rs\",\n \"byte_length\": 5809,\n \"sha256\": \"8caf75f69994e9710b4e8f82abface29e752dd581c012e5e20452c82d21c2d01\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_head_facade\",\n \"path\": \"crates/event/src/event_head.rs\",\n \"byte_length\": 97,\n \"sha256\": \"f761ff3e74c4f5e1e28381db00ce698c633ff048669b22984d14a587482e8e83\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_head_v1_authority\",\n \"path\": \"crates/event/src/event_head/v1.rs\",\n \"byte_length\": 7566,\n \"sha256\": \"6ef7537a1188086e4f414b6c5f398a305c2eca5edd0ee188b4f890f07f3322ff\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_ids_authority\",\n \"path\": \"crates/event/src/id.rs\",\n \"byte_length\": 51746,\n \"sha256\": \"a4a669b3ff02545af0625ee19c645cc41fb0a5176c000e7aecf49e37585a4123\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_trade_authority\",\n \"path\": \"crates/event/src/trade.rs\",\n \"byte_length\": 68665,\n \"sha256\": \"5e1aa8bd20bc13a08e4ebc7e6306365cb74f55e1cec62af135a36eb41146dd45\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_kinds_authority\",\n \"path\": \"crates/event/src/kinds.rs\",\n \"byte_length\": 34961,\n \"sha256\": \"8b3ce6193cab1f7e1587d0c1b2880a81b0aa43c77d89671b602772db37edcebf\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_tags_authority\",\n \"path\": \"crates/event/src/tags.rs\",\n \"byte_length\": 4530,\n \"sha256\": \"cb8f12a639fc72d9238e32495d9e67e928e6627fb8c94ec0a58c5d95e7373cd6\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_draft_authority\",\n \"path\": \"crates/event/src/draft.rs\",\n \"byte_length\": 58672,\n \"sha256\": \"417842e7391e9a3187be20d8b936d83469148db1cbf0c61afcf88b87cf1a88be\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_calendar_authority\",\n \"path\": \"crates/event/src/calendar.rs\",\n \"byte_length\": 103877,\n \"sha256\": \"1e0bb92b32198cea2f39df57c365d4a8c43dea301f452f1309df4078401df7fc\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_classified_listing_authority\",\n \"path\": \"crates/event/src/classified_listing.rs\",\n \"byte_length\": 8236,\n \"sha256\": \"ee022b2aaffd1642c2c1e792c79e8fce353b9edd4d6e49afdebeb74af771187e\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_profile_authority\",\n \"path\": \"crates/event/src/profile.rs\",\n \"byte_length\": 18927,\n \"sha256\": \"a4c0afeed75beea9ba44ec6e487582dbcd1116e7e092a6d5808dc4fbdea5ac73\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_post_authority\",\n \"path\": \"crates/event/src/post.rs\",\n \"byte_length\": 23129,\n \"sha256\": \"788fef2652dbb990ceca2bb5c80aa5fa1efc11d041f9bdf43998fbdff77745b6\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_comment_authority\",\n \"path\": \"crates/event/src/comment.rs\",\n \"byte_length\": 36453,\n \"sha256\": \"159eb5487e67e1a834072333a7f08b38ac15756c46eaeafecaa1574aade0a824\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_food_availability_authority\",\n \"path\": \"crates/event/src/food_availability.rs\",\n \"byte_length\": 45430,\n \"sha256\": \"389dda590888278b0bd95b4e19a597f47e0f573a24e0ac3cb92c63098191a290\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_deletion_authority\",\n \"path\": \"crates/event/src/deletion.rs\",\n \"byte_length\": 31181,\n \"sha256\": \"99cf3d8e61f107602df345c6e2ac60223b9d0389537b231dd1a30a2ed0e64990\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_relay_hint_authority\",\n \"path\": \"crates/event/src/relay_hint.rs\",\n \"byte_length\": 14016,\n \"sha256\": \"095ce5284796eac71b3aa6630718d398a67ff3836a92d80444fc45fb023b4931\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_media_authority\",\n \"path\": \"crates/event/src/media.rs\",\n \"byte_length\": 3574,\n \"sha256\": \"2e91f3b5624dfab990f18abd4dd6194f1205442c798381af6b648aee88de53ee\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_social_authority\",\n \"path\": \"crates/event/src/social.rs\",\n \"byte_length\": 6263,\n \"sha256\": \"10c4d4f7b078355c97f0b701f60a280123f2d9c335aeabfc733db468d4a9d290\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_wire_facade\",\n \"path\": \"crates/event/src/wire.rs\",\n \"byte_length\": 68,\n \"sha256\": \"cb52f6006f7ecd862707d6b048f9fc407e0cd5ebcd3091b3c54e195ffa5cba64\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_wire_v1_authority\",\n \"path\": \"crates/event/src/wire/v1.rs\",\n \"byte_length\": 22132,\n \"sha256\": \"8b18760d655c01c3cbb1d1818b486c6aeae324d262c864fc1ed1297d2ecf1196\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_verification_facade\",\n \"path\": \"crates/event_codec/src/verification.rs\",\n \"byte_length\": 253,\n \"sha256\": \"b49a32df605035c87f295c0a151140d43d2e588c5e11b05183e5fc92993dae0e\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_verification_v1_authority\",\n \"path\": \"crates/event_codec/src/verification/v1.rs\",\n \"byte_length\": 8649,\n \"sha256\": \"1ef3d12f90eb7d35f4cafe36c2cc0bbd33731df278b58c9062fb13934e2a98c8\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_registry_v7_admission_authority\",\n \"path\": \"crates/event_codec/src/admission/registry_v7.rs\",\n \"byte_length\": 5360,\n \"sha256\": \"81b26be497e3314564e88b9e6f21aaaf4dee44d6f37b5e127de561553a660c48\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_profile_inbound_facade\",\n \"path\": \"crates/event_codec/src/profile/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_profile_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/profile/inbound/registry_v7.rs\",\n \"byte_length\": 10394,\n \"sha256\": \"c37c225ea8153beb098a39c4a56203aa03382af12646f40cd3f8628663700702\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_post_inbound_facade\",\n \"path\": \"crates/event_codec/src/post/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_post_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/post/inbound/registry_v7.rs\",\n \"byte_length\": 16025,\n \"sha256\": \"551380f1b188fbd6ac4cba988426218863ec557eb6022153da89ace2aa40d2c7\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_reply_inbound_facade\",\n \"path\": \"crates/event_codec/src/reply/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_reply_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/reply/inbound/registry_v7.rs\",\n \"byte_length\": 26825,\n \"sha256\": \"3abb33e8d20097e41d2c81f10d023c3293390718915eb5087c663676d322bfce\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_comment_inbound_facade\",\n \"path\": \"crates/event_codec/src/comment/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_comment_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/comment/inbound/registry_v7.rs\",\n \"byte_length\": 53802,\n \"sha256\": \"32413b80b7472cfb024984ae0e0ea67c7a42ebc98b2257d6c9d16a87f2d84ba0\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_deletion_facade\",\n \"path\": \"crates/event_codec/src/deletion/mod.rs\",\n \"byte_length\": 115,\n \"sha256\": \"17d56f82ddb0a86bc97abbcf3e037fe460ea31fff2548f527be4bf004dac3a95\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_deletion_reconciliation_v1_authority\",\n \"path\": \"crates/event_codec/src/deletion/reconciliation_v1.rs\",\n \"byte_length\": 38345,\n \"sha256\": \"dc6c55e5af2cfab0149dbb763cafa603566772fdae378988a583162c95438496\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_error_authority\",\n \"path\": \"crates/event_codec/src/error.rs\",\n \"byte_length\": 3698,\n \"sha256\": \"b20b70056ea2b48a9e3a4f7697a76e87d5f3c445641bfcc7b61d72605b146ce5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_food_admission_authority\",\n \"path\": \"crates/event_codec/src/food_availability/admission.rs\",\n \"byte_length\": 5815,\n \"sha256\": \"96aea4bdd6938d26f03fa9bcb94e3ce8608bf674895961f8bf237554796debba\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_food_inbound_facade\",\n \"path\": \"crates/event_codec/src/food_availability/inbound.rs\",\n \"byte_length\": 86,\n \"sha256\": \"9994cbca9dcc7450ad133b6b927e7c06bee08ef813652452cc1e56a284c1be10\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_food_registry_v7_authority\",\n \"path\": \"crates/event_codec/src/food_availability/inbound/registry_v7.rs\",\n \"byte_length\": 26785,\n \"sha256\": \"d06807c62333d0b1b8496b51390210b0738ee92b1748bc7e31bd4b095fb62ed2\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_codec_job_traits_authority\",\n \"path\": \"crates/event_codec/src/job/traits.rs\",\n \"byte_length\": 5101,\n \"sha256\": \"bc198764f2825b4b1441781493e13fc7088e7bdd04f70690480f387604b0bd47\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_store_dependency_authority\",\n \"path\": \"crates/event_store/Cargo.toml\",\n \"byte_length\": 1567,\n \"sha256\": \"46e03d3c758e1116638021a0499dfa588b4266498e0d50cfa758f9bef9bcfeb3\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_store_error_and_limits\",\n \"path\": \"crates/event_store/src/error.rs\",\n \"byte_length\": 19516,\n \"sha256\": \"384f81d13dd5a837dd336b1f990fd79718f05ceb9c9272d0e8cd14c9618e4c8b\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"generated_descriptor_registration\",\n \"path\": \"crates/event_store/src/generated.rs\",\n \"byte_length\": 144,\n \"sha256\": \"6b0a8d6f249bd4fc3f878d37cb5e418680f0f1be2d9eec2518dedf03efc47121\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"public_surface\",\n \"path\": \"crates/event_store/src/lib.rs\",\n \"byte_length\": 3844,\n \"sha256\": \"3cd9653bcb752fb3c4442d4904b98a0a6208011a9a238125b7b7073d7f4e312b\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"migration_registry\",\n \"path\": \"crates/event_store/src/migrations.rs\",\n \"byte_length\": 73585,\n \"sha256\": \"a47477d04759ec6e71d14d3d05459864eae78fce0e3c2481a1b03147f04637f7\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_model_public_surface\",\n \"path\": \"crates/event_store/src/model.rs\",\n \"byte_length\": 33624,\n \"sha256\": \"b155993cf03f19f392068188e14adad5b5b139996434d1076a86428e1cce4255\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_store_reconciliation_v1_model\",\n \"path\": \"crates/event_store/src/model/reconciliation_v1.rs\",\n \"byte_length\": 11148,\n \"sha256\": \"37f9edd8e1b5ae3f696bc911e8a7eda0a6eac4e05d2d9e6799f041d0abf73b50\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"event_store_reconciliation_v1_ingest_model\",\n \"path\": \"crates/event_store/src/model/ingest_reconciliation_v1.rs\",\n \"byte_length\": 1626,\n \"sha256\": \"47bf13b3fc0f8a913a660f7d655413de0f6b90568bc4acc510aa6bd741bab47b\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"addressable_transition_feed_model\",\n \"path\": \"crates/event_store/src/model/addressable_transition_feed_v1.rs\",\n \"byte_length\": 22277,\n \"sha256\": \"3fbccc2ab44ceb66ad459ebb56c87aa250732b28248716128e91ca42d7c7656d\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"current_visibility_model\",\n \"path\": \"crates/event_store/src/model/current_visibility_v1.rs\",\n \"byte_length\": 5690,\n \"sha256\": \"57a4ccd377fc314193c34125ca2ea0a235637e888c622f60ed27bb5f55805c9d\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"food_projection_model\",\n \"path\": \"crates/event_store/src/model/food_availability_projection_v1.rs\",\n \"byte_length\": 17437,\n \"sha256\": \"28c259cdea06dd4b4a3b9103dc85a8049abee5a17f64771fd1083ae945dc009a\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"source_generation_rebuild_authority\",\n \"path\": \"crates/event_store/src/nip09/reconciliation_v1.rs\",\n \"byte_length\": 185239,\n \"sha256\": \"fb390d682a84e054d57ec6f845d32b4c28423cb238a246e2008f2e5dd529cdd5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"nip09_successor_result_vector_executor\",\n \"path\": \"crates/event_store/tests/support/nip09_reconciliation_v1_result_vector_v2.rs\",\n \"byte_length\": 17992,\n \"sha256\": \"24a004135d4f7f4324f4a61db8384601cbcb85b9376c52e5db8ed6a1463fd045\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"schema_migration_and_reopen_authority\",\n \"path\": \"crates/event_store/src/schema.rs\",\n \"byte_length\": 146146,\n \"sha256\": \"93b060e80d3edd73f86208e4bf698fa9d53eaf1eeb04526c9261fb8b5726fb0d\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"public_store_and_transaction_authority\",\n \"path\": \"crates/event_store/src/store.rs\",\n \"byte_length\": 395033,\n \"sha256\": \"9b990626ac85e70277a869bb31870f9e15e8208e1136a574f99a091632797d99\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"addressable_transition_feed_store\",\n \"path\": \"crates/event_store/src/store/addressable_transition_feed_v1.rs\",\n \"byte_length\": 40259,\n \"sha256\": \"ebb3b502c55ad218a1551f8ba2b9cc6dca4b34a1010e21002a3165ac8f66edee\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"current_visibility_store\",\n \"path\": \"crates/event_store/src/store/current_visibility_v1.rs\",\n \"byte_length\": 15785,\n \"sha256\": \"165086b7226189ab67600fb4b3c83abfba099e31c1018962d445437a2fe41ce5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"food_projection_store\",\n \"path\": \"crates/event_store/src/store/food_availability_projection_v1.rs\",\n \"byte_length\": 48959,\n \"sha256\": \"28197d8d308e14e91391d38d69a45e8286a1513cff4c3e65b40c915e872ad423\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_post_core_v1_extension\",\n \"path\": \"crates/event_store/src/store/post_core_extensions_v1.rs\",\n \"byte_length\": 6922,\n \"sha256\": \"fc18d92f6f4d8cb5b8428c4bd64bcf6d0c9b013e9fbe815830b5a4ab9fe07d45\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_post_core_v1_storage\",\n \"path\": \"crates/event_store/src/store/post_core_storage_v1.rs\",\n \"byte_length\": 16896,\n \"sha256\": \"8d0349a0d065708448f8e60387861a39099831142f87dd9a60ee3c6dafae031a\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"raw_ingest_capacity_authority\",\n \"path\": \"crates/event_store/src/store/protocol_reconciliation_v1.rs\",\n \"byte_length\": 30162,\n \"sha256\": \"2934caaf352475a9d50ac79eb9f3e5053075e6a66fb71cfe367a86c212d0159a\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_protocol_storage\",\n \"path\": \"crates/event_store/src/store/protocol_storage_v1.rs\",\n \"byte_length\": 10939,\n \"sha256\": \"53593f1c4ea0ff524b31a0e9c027803af051f5bd4fd5d70509508f580ee6dea6\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"source_maintenance_runtime\",\n \"path\": \"crates/event_store/src/source_maintenance_v1.rs\",\n \"byte_length\": 51849,\n \"sha256\": \"db43df5849c811d767a87bfa7884ce499400d0b169734e18242542a4415b3a51\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_food_result_vector_executor\",\n \"path\": \"crates/event_store/tests/food_availability_projection_v1_result_vector.rs\",\n \"byte_length\": 34062,\n \"sha256\": \"e3778e4f154845a088d32a83055b678efc1511bc7ae5bb82f4be61df2f6ef88e\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"artifact_transaction_authority\",\n \"path\": \"tools/xtask/src/contract/artifact_bundle.rs\",\n \"byte_length\": 38279,\n \"sha256\": \"f326ea57b56d40135f95b6b1e15961f66eed363337180a6d12a5ea903e1a9a29\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"predecessor_successor_governance\",\n \"path\": \"tools/xtask/src/contract/food_availability_projection.rs\",\n \"byte_length\": 198719,\n \"sha256\": \"11e5628b20839fd88e28abef64d4e35a504d7bd42149691bcce67575cbc17a1c\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"transitive_predecessor_membership_governance\",\n \"path\": \"tools/xtask/src/contract/nip09_reconciliation.rs\",\n \"byte_length\": 838346,\n \"sha256\": \"506005717ab5d5785f5d6fcca54fdb1cddffa7eadebb176bf35cc0d6b3f67003\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"source_maintenance_governance\",\n \"path\": \"tools/xtask/src/contract/source_maintenance.rs\",\n \"byte_length\": 196407,\n \"sha256\": \"69dc1b2530ab01ef6059e338f2ef80163d409376b0315dbacb23bab34b641074\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"contract_command_authority\",\n \"path\": \"tools/xtask/src/contract.rs\",\n \"byte_length\": 506342,\n \"sha256\": \"a506f13c9cf95fa60249f7c2aa8947ad5c9c821f82962c549dd324fd69917502\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"dto_root_generation_authority\",\n \"path\": \"tools/xtask/src/dto_roots.rs\",\n \"byte_length\": 35940,\n \"sha256\": \"a899a5695d7533c151d03477c4bd697a6e55c47a4980549724ac42046af694f5\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n },\n {\n \"role\": \"xtask_dispatch_and_release_preflight\",\n \"path\": \"tools/xtask/src/main.rs\",\n \"byte_length\": 16426,\n \"sha256\": \"abc24896c6c740c10811a3e003ec4be8ebdb376a7b6b01445bfa7a5889f094a7\",\n \"hash_algorithm\": \"sha256_bytes_v1\"\n }\n ],\n \"public_api\": {\n \"inherited_predecessor_symbols\": [\n \"RADROOTS_ADDRESSABLE_TRANSITION_CURSOR_JSON_MAX_BYTES_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_D_TAG_MAX_BYTES_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_FEED_VERSION_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_PAGE_LIMIT_MAX_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_PAGE_RAW_JSON_MAX_BYTES_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_PAGE_SCAN_MAX_V1\",\n \"RADROOTS_ADDRESSABLE_TRANSITION_SCOPE_KIND_MAX_V1\",\n \"RADROOTS_FOOD_AVAILABILITY_PROJECTION_APPLY_PAGE_LIMIT_V1\",\n \"RADROOTS_FOOD_AVAILABILITY_PROJECTION_VERSION_V1\",\n \"RADROOTS_FOOD_AVAILABILITY_SEARCH_QUERY_MAX_BYTES_V1\",\n \"RADROOTS_FOOD_AVAILABILITY_SEARCH_QUERY_MAX_TERMS_V1\",\n \"RadrootsAddressableTransitionCauseV1\",\n \"RadrootsAddressableTransitionCoordinateV1\",\n \"RadrootsAddressableTransitionCursorV1\",\n \"RadrootsAddressableTransitionEventReferenceV1\",\n \"RadrootsAddressableTransitionOriginV1\",\n \"RadrootsAddressableTransitionPageV1\",\n \"RadrootsAddressableTransitionRawHeadDecisionV1\",\n \"RadrootsAddressableTransitionScopeFingerprintV1\",\n \"RadrootsAddressableTransitionScopeV1\",\n \"RadrootsAddressableTransitionV1\",\n \"RadrootsAddressableTransitionVisibilityV1\",\n \"RadrootsCurrentEventVisibilityV1\",\n \"RadrootsCurrentVisibilityDecisionV1\",\n \"RadrootsFoodAvailabilitySearchQueryV1\",\n \"RadrootsFoodAvailabilityStatusFilterV1\",\n \"RadrootsNip09SuppressionEvidenceV1\",\n \"RadrootsNip09SuppressionOutcome\",\n \"RadrootsNip09SuppressionReason\",\n \"RadrootsStoreProducedCanonicalEventV1\",\n \"RadrootsStoredFoodAvailabilityImageV1\",\n \"RadrootsStoredFoodAvailabilityV1\"\n ],\n \"added_symbols\": [\n \"RADROOTS_EVENT_STORE_RAW_EVENT_COUNT_LIMIT_V1\",\n \"RADROOTS_EVENT_STORE_RAW_EVENT_TEXT_BYTES_LIMIT_V1\",\n \"RADROOTS_EVENT_STORE_RAW_TAG_COUNT_LIMIT_V1\",\n \"RADROOTS_EVENT_STORE_RAW_TAG_TEXT_BYTES_LIMIT_V1\",\n \"RADROOTS_EVENT_STORE_RETAINED_SOURCE_GENERATION_LIMIT_V1\",\n \"RadrootsEventStoreSourceCapacityResourceV1\",\n \"RadrootsEventStoreSourceCapacityV1\"\n ],\n \"methods\": [\n \"RadrootsEventStore::source_capacity_v1\",\n \"RadrootsEventStoreSourceCapacityResourceV1::as_str\",\n \"RadrootsEventStoreSourceCapacityV1::source_generation\",\n \"RadrootsEventStoreSourceCapacityV1::raw_event_count\",\n \"RadrootsEventStoreSourceCapacityV1::raw_tag_count\",\n \"RadrootsEventStoreSourceCapacityV1::raw_event_text_bytes\",\n \"RadrootsEventStoreSourceCapacityV1::raw_tag_text_bytes\",\n \"RadrootsEventStoreSourceCapacityV1::raw_high_water_seq\",\n \"RadrootsEventStoreSourceCapacityV1::retained_generation_count\",\n \"RadrootsEventStoreSourceCapacityV1::retained_generation_limit\"\n ],\n \"error_variants\": [\n \"SourceCapacityExceeded\",\n \"SourceGenerationHistoryLimitReached\",\n \"PersistedEphemeralRawEvent\",\n \"SourceCapacityStateDrift\",\n \"SqliteMainDatabaseEncodingNotUtf8\",\n \"RollbackWouldDiscardSourceGenerationHistory\"\n ],\n \"removed_symbols\": [\n \"RadrootsEventStoreReconciliationResource\",\n \"RadrootsEventStoreError::ReconciliationCapacityExceeded\"\n ],\n \"breaking_replacements\": [\n {\n \"removed\": \"RadrootsEventStoreReconciliationResource\",\n \"replacement\": \"RadrootsEventStoreSourceCapacityResourceV1\"\n },\n {\n \"removed\": \"RadrootsEventStoreError::ReconciliationCapacityExceeded\",\n \"replacement\": \"RadrootsEventStoreError::SourceCapacityExceeded\"\n }\n ]\n },\n \"result_vector\": {\n \"canonical_path\": \"contracts/conformance/vectors/event_store/source_maintenance.v1.json\",\n \"mirror_path\": \"crates/event_store/tests/fixtures/source_maintenance.v1.json\",\n \"byte_length\": 16253,\n \"sha256\": \"997aba2604a2b9d199fb87dc9d07942ca50d91863aeadcf3eeacf16d191dd71f\",\n \"hash_algorithm\": \"sha256_bytes_v1\",\n \"executor_id\": \"radroots_event_store.source_maintenance_v1.result_vector_executor.v1\",\n \"executor_path\": \"crates/event_store/tests/source_maintenance_v1_result_vector.rs\",\n \"executor_test\": \"source_maintenance_v1_result_vector\",\n \"executor_byte_length\": 23510,\n \"executor_sha256\": \"a7487afdfe19fc5fc794811d0f0e6035203e1aabcf0a33a1d398f6b3555d38f3\",\n \"executor_hash_algorithm\": \"sha256_bytes_v1\"\n }\n}\n"; +pub(crate) const SOURCE_MAINTENANCE_MANIFEST_BYTE_LENGTH: usize = 33844; pub(crate) const SOURCE_MAINTENANCE_MANIFEST_SHA256: &str = - "fbcaf85876be1fd5fd5ebf383fa25a175e8c577618791d65504192c4c9975cba"; + "a349dd1037306c7060f95d6edc0ef71306b030fbf915af7e90d7ed8c65805f27"; pub(crate) const SOURCE_MAINTENANCE_MANIFEST_SCHEMA_VERSION: u32 = 1; pub(crate) const SOURCE_MAINTENANCE_CONTRACT_ID: &str = "radroots_event_store.source_maintenance_v1"; diff --git a/crates/event_store/src/model.rs b/crates/event_store/src/model.rs @@ -34,8 +34,8 @@ pub use food_availability_projection_v1::{ }; use crate::RadrootsEventStoreError; -use radroots_event::RadrootsEventKind; -use radroots_event::ids::{ +use radroots_event::envelope::RadrootsEventKind; +use radroots_event::id::{ RadrootsDTag, RadrootsEventId, RadrootsInventoryBinId, RadrootsTradeCandidateId, RadrootsTradeId, RadrootsTradeMutationId, }; @@ -603,12 +603,12 @@ pub struct RadrootsTradeProjectionCheckpoint { mod tests { use super::*; use crate::model::reconciliation_v1::{tag_semantic_name, tag_value_type_name}; - use radroots_event::RadrootsEventKindClass; use radroots_event::contract::{RadrootsTagSemantic, RadrootsTagValueType}; - use radroots_event::event_head::{ + use radroots_event::envelope::RadrootsEventKindClass; + use radroots_event::envelope::event_head::{ RadrootsCurrentEventHead, RadrootsEventHeadCoordinate, RadrootsEventHeadDecision, }; - use radroots_event::ids::RadrootsEventId; + use radroots_event::id::RadrootsEventId; use radroots_identity::PublicKey; #[test] diff --git a/crates/event_store/src/model/addressable_transition_feed_v1.rs b/crates/event_store/src/model/addressable_transition_feed_v1.rs @@ -3,7 +3,7 @@ use super::{ RadrootsNip09SuppressionEvidenceV1, }; use crate::RadrootsEventStoreError; -use radroots_event::ids::RadrootsEventId; +use radroots_event::id::RadrootsEventId; use radroots_identity::PublicKey; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; @@ -330,7 +330,7 @@ impl RadrootsAddressableTransitionCauseV1 { /// The exact addressable head identity retained by the event store. /// -/// This is intentionally not a [`radroots_event::ids::RadrootsNip01Coordinate`]: +/// This is intentionally not a [`radroots_event::id::RadrootsNip01Coordinate`]: /// an individually valid maximum-size `d` tag can make the combined NIP-01 /// coordinate too large for a wire tag element while still remaining valid raw /// head identity. diff --git a/crates/event_store/src/model/current_visibility_v1.rs b/crates/event_store/src/model/current_visibility_v1.rs @@ -1,7 +1,7 @@ use super::{ RadrootsEventAdmissionStatus, RadrootsEventStoreSourceGeneration, RadrootsStoredRawEvent, }; -use radroots_event::ids::RadrootsEventId; +use radroots_event::id::RadrootsEventId; pub use radroots_event_codec::deletion::reconciliation_v1::evaluator::{ RadrootsNip09SuppressionOutcome, RadrootsNip09SuppressionReason, }; diff --git a/crates/event_store/src/model/food_availability_projection_v1.rs b/crates/event_store/src/model/food_availability_projection_v1.rs @@ -4,12 +4,12 @@ use super::{ use crate::RadrootsEventStoreError; use radroots_blossom::Sha256; use radroots_event::{ - food_availability::{ + food::availability::{ RADROOTS_FOOD_IMAGE_MAX_COUNT, RadrootsFoodAvailabilityStatus, RadrootsFoodContent, RadrootsFoodIdentifier, RadrootsFoodImageDimensions, RadrootsFoodPrice, RadrootsFoodPublishedAt, RadrootsFoodQuantity, RadrootsFoodText, food_media_blossom_digest, }, - ids::RadrootsEventId, + id::RadrootsEventId, }; use radroots_event_codec::food_availability::inbound::{ RadrootsFoodAvailabilityImageDiagnostic, RadrootsInboundFoodAvailabilityImage, diff --git a/crates/event_store/src/model/reconciliation_v1.rs b/crates/event_store/src/model/reconciliation_v1.rs @@ -2,8 +2,8 @@ use super::RadrootsTransportObservation; use crate::RadrootsEventStoreError; use radroots_event::contract::registry_v7::{RadrootsTagSemantic, RadrootsTagValueType}; use radroots_event::draft::RadrootsSignedEvent; +use radroots_event::envelope::event_head::v1::RadrootsEventHeadDecision; use radroots_event::envelope::{RadrootsEventEnvelope, RadrootsEventKindClass}; -use radroots_event::event_head::v1::RadrootsEventHeadDecision; use radroots_event_codec::verification::v1::RadrootsSignatureVerifiedEvent; #[derive(Clone, Copy, Debug, PartialEq, Eq)] diff --git a/crates/event_store/src/nip09/reconciliation_v1.rs b/crates/event_store/src/nip09/reconciliation_v1.rs @@ -18,13 +18,13 @@ use crate::{ RadrootsEventStoreError, RadrootsEventStoreSourceCapacityResourceV1, }; use radroots_event::contract::registry_v7::RadrootsEventContract; -use radroots_event::envelope::{RadrootsEventEnvelope, RadrootsEventKindClass}; -use radroots_event::event_head::v1::{ +use radroots_event::envelope::event_head::v1::{ RadrootsCurrentEventHead, RadrootsEventHeadCandidate, RadrootsEventHeadCandidateResult, RadrootsEventHeadCoordinate, RadrootsEventHeadDecision, event_head_candidate_for_nip01_event_v1, select_event_head_v1, }; -use radroots_event::ids::RadrootsNip01Coordinate; +use radroots_event::envelope::{RadrootsEventEnvelope, RadrootsEventKindClass}; +use radroots_event::id::RadrootsNip01Coordinate; use radroots_event_codec::admission::registry_v7::{ RadrootsRegistryV7AdmissionDecision, admit_verified_event_registry_v7, }; @@ -3601,9 +3601,9 @@ mod tests { use nostr::{Keys, SECP256K1, secp256k1::Message}; use radroots_event::wire::v1::RadrootsNip01EventWire; use radroots_event::{ - deletion::RADROOTS_NIP09_DELETION_TAG_MAX_COUNT, envelope::RadrootsEventEnvelopeParts, - kinds::{KIND_DELETION_REQUEST, KIND_LIST_SET_RELAY, KIND_POST}, + envelope::kind::{KIND_DELETION_REQUEST, KIND_LIST_SET_RELAY, KIND_POST}, + post::deletion::RADROOTS_NIP09_DELETION_TAG_MAX_COUNT, wire::compute_canonical_nip01_event_id, }; use radroots_event_codec::verification::v1::verify_nip01_event_v1; diff --git a/crates/event_store/src/store.rs b/crates/event_store/src/store.rs @@ -63,14 +63,12 @@ use crate::schema::{ destroy_event_store_schema_for_test, rollback_event_store_schema_offline_destructive_for_migration_test, }; -use radroots_event::event_head::v1::RadrootsEventHeadCoordinate; +use radroots_event::envelope::event_head::v1::RadrootsEventHeadCoordinate; #[cfg(test)] -use radroots_event::event_head::v1::{ +use radroots_event::envelope::event_head::v1::{ RadrootsEventHeadCandidateResult, event_head_candidate_for_nip01_event_v1, }; -use radroots_event::ids::{ - RadrootsDTag, RadrootsEventId, RadrootsTradeId, RadrootsTradeMutationId, -}; +use radroots_event::id::{RadrootsDTag, RadrootsEventId, RadrootsTradeId, RadrootsTradeMutationId}; use radroots_event::trade::RadrootsTradeMutationKindV1; use radroots_transport::{ RadrootsTransportKind, RadrootsTransportTarget, RadrootsTransportTargetFingerprint, @@ -1786,14 +1784,14 @@ mod tests { TagKind as RadrootsNostrTagKind, Timestamp as RadrootsNostrTimestamp, }; use radroots_event::draft::RadrootsSignedEvent; - use radroots_event::food_availability::{ - RadrootsFoodAvailabilityStatus, RadrootsFoodIdentifier, - }; - use radroots_event::ids::{RadrootsClassifiedListingAddress, RadrootsInventoryBinId}; - use radroots_event::kinds::{ + use radroots_event::envelope::kind::{ KIND_CALENDAR_DATE_EVENT, KIND_CLASSIFIED_LISTING, KIND_DELETION_REQUEST, KIND_FARM, KIND_GEOCHAT, KIND_LIST_SET_RELAY, KIND_POST, KIND_PROFILE, KIND_RELAY_AUTH, }; + use radroots_event::food::availability::{ + RadrootsFoodAvailabilityStatus, RadrootsFoodIdentifier, + }; + use radroots_event::id::{RadrootsClassifiedListingAddress, RadrootsInventoryBinId}; use radroots_event::trade::{ RADROOTS_TRADE_DECISION_CONTRACT_ID, RADROOTS_TRADE_PROPOSAL_CONTRACT_ID, RADROOTS_TRADE_SCHEMA_VERSION, RadrootsFulfillmentProfileV1, diff --git a/crates/event_store/src/store/addressable_transition_feed_v1.rs b/crates/event_store/src/store/addressable_transition_feed_v1.rs @@ -20,7 +20,7 @@ use crate::model::{ use crate::nip09::reconciliation_v1::{ EventAdmission, ReconciliationProfile, generation_from_blob, }; -use radroots_event::ids::RadrootsEventId; +use radroots_event::id::RadrootsEventId; use radroots_identity::PublicKey; use sqlx::{QueryBuilder, Row, Sqlite, SqliteConnection}; diff --git a/crates/event_store/src/store/current_visibility_v1.rs b/crates/event_store/src/store/current_visibility_v1.rs @@ -7,7 +7,7 @@ use crate::model::{ RadrootsNip09SuppressionReason, StoredEventClass, }; use crate::nip09::reconciliation_v1::generation_from_blob; -use radroots_event::ids::RadrootsEventId; +use radroots_event::id::RadrootsEventId; use sqlx::{Row, Sqlite, Transaction}; impl RadrootsEventStore { diff --git a/crates/event_store/src/store/food_availability_projection_v1.rs b/crates/event_store/src/store/food_availability_projection_v1.rs @@ -16,8 +16,8 @@ use crate::model::{ use crate::nip09::reconciliation_v1::{ EventAdmission, ReconciliationProfile, generation_from_blob, }; -use radroots_event::food_availability::RadrootsFoodIdentifier; -use radroots_event::ids::RadrootsEventId; +use radroots_event::food::availability::RadrootsFoodIdentifier; +use radroots_event::id::RadrootsEventId; use radroots_event_codec::food_availability::inbound::{ RadrootsFoodAvailabilityImageDiagnostic, RadrootsFoodAvailabilityProjectionOutcome, project_verified_food_availability_event_registry_v7, diff --git a/crates/event_store/src/store/post_core_extensions_v1.rs b/crates/event_store/src/store/post_core_extensions_v1.rs @@ -2,7 +2,7 @@ use super::post_core_storage_v1::{PostCoreStorageV1, TradeProjectionWrite}; use super::protocol_reconciliation_v1::ProtocolReconciliationV1IngestResult; use crate::error::RadrootsEventStoreError; use crate::model::RadrootsEventIngest; -use radroots_event::ids::{RadrootsTradeCandidateId, RadrootsTradeMutationId}; +use radroots_event::id::{RadrootsTradeCandidateId, RadrootsTradeMutationId}; use radroots_event::trade::{ RADROOTS_TRADE_MUTATION_CONTRACT_IDS, RadrootsSellerReservationAssertionV1, RadrootsTradeDecisionV1, RadrootsTradeMutationBodyV1, RadrootsTradeMutationEnvelopeV1, diff --git a/crates/event_store/src/store/post_core_storage_v1.rs b/crates/event_store/src/store/post_core_storage_v1.rs @@ -5,7 +5,7 @@ use crate::error::RadrootsEventStoreError; use crate::model::RadrootsEventIngest; use crate::model::RadrootsTransportObservation; use radroots_event::envelope::RadrootsEventEnvelope; -use radroots_event::ids::{RadrootsTradeCandidateId, RadrootsTradeMutationId}; +use radroots_event::id::{RadrootsTradeCandidateId, RadrootsTradeMutationId}; use radroots_event::trade::{ RadrootsSellerReservationAssertionV1, RadrootsTradeMutationEnvelopeV1, RadrootsTradeMutationKindV1, diff --git a/crates/event_store/src/store/protocol_reconciliation_v1.rs b/crates/event_store/src/store/protocol_reconciliation_v1.rs @@ -14,13 +14,13 @@ use crate::source_maintenance_v1::{ raw_source_capacity_delta_v1, validate_source_capacity_authority_fast_v1, }; use radroots_event::contract::registry_v7::RadrootsEventContract; -use radroots_event::envelope::{RadrootsEventEnvelope, RadrootsEventKindClass}; -use radroots_event::event_head::v1::{ +use radroots_event::envelope::event_head::v1::{ RadrootsCurrentEventHead, RadrootsEventHeadCandidate, RadrootsEventHeadCandidateResult, RadrootsEventHeadCoordinate, RadrootsEventHeadDecision, event_head_candidate_for_nip01_event_v1, select_event_head_v1, }; -use radroots_event::ids::RadrootsEventId; +use radroots_event::envelope::{RadrootsEventEnvelope, RadrootsEventKindClass}; +use radroots_event::id::RadrootsEventId; use sqlx::sqlite::SqliteRow; use sqlx::{Row, Sqlite, SqliteConnection, Transaction}; diff --git a/crates/event_store/src/store/protocol_storage_v1.rs b/crates/event_store/src/store/protocol_storage_v1.rs @@ -4,7 +4,7 @@ use crate::model::reconciliation_v1::{ StoredEventClass, }; use radroots_event::envelope::RadrootsEventKind; -use radroots_event::event_head::v1::RadrootsEventHeadCoordinate; +use radroots_event::envelope::event_head::v1::RadrootsEventHeadCoordinate; use radroots_identity::PublicKey; use sqlx::sqlite::SqliteRow; use sqlx::{Row, Sqlite, Transaction}; diff --git a/crates/event_store/tests/food_availability_projection_v1_result_vector.rs b/crates/event_store/tests/food_availability_projection_v1_result_vector.rs @@ -1,7 +1,7 @@ #![forbid(unsafe_code)] use radroots_blossom::Sha256; -use radroots_event::food_availability::RadrootsFoodIdentifier; +use radroots_event::food::availability::RadrootsFoodIdentifier; use radroots_event_store::{ RADROOTS_ADDRESSABLE_TRANSITION_FEED_VERSION_V1, RADROOTS_FOOD_AVAILABILITY_PROJECTION_VERSION_V1, diff --git a/crates/event_store/tests/support/nip09_reconciliation_v1_result_vector_v2.rs b/crates/event_store/tests/support/nip09_reconciliation_v1_result_vector_v2.rs @@ -10,7 +10,7 @@ use crate::model::reconciliation_v1::{ RadrootsEventAdmissionStatus, RadrootsEventIngest, StoredEventClass, tag_semantic_name, tag_value_type_name, }; -use radroots_event::kinds::KIND_LIST_SET_FOLLOW; +use radroots_event::envelope::kind::KIND_LIST_SET_FOLLOW; use radroots_event::wire::v1::RadrootsNip01EventWire; use sha2::{Digest, Sha256}; use sqlx::sqlite::{SqliteConnectOptions, SqlitePoolOptions}; diff --git a/crates/net/src/nostr_client/events/post.rs b/crates/net/src/nostr_client/events/post.rs @@ -1,7 +1,7 @@ use crate::error::{NetError, Result}; use radroots_event::{ + post::reply::RadrootsAuthoredNip10Reply, post::{RadrootsAuthoredUpdate, RadrootsPost}, - reply::RadrootsAuthoredNip10Reply, }; use radroots_event_codec::parsed::RadrootsParsedData; use radroots_nostr::prelude::{ diff --git a/crates/nostr/src/client.rs b/crates/nostr/src/client.rs @@ -505,8 +505,9 @@ mod tests { let client = RadrootsNostrClient::new_signerless(); let raw_kind_one = RadrootsNostrKind::Custom(RadrootsNostrKind::TextNote.as_u16()); let deletion_request = - RadrootsNostrKind::Custom(radroots_event::kinds::KIND_DELETION_REQUEST as u16); - let comment = RadrootsNostrKind::Custom(radroots_event::kinds::KIND_COMMENT as u16); + RadrootsNostrKind::Custom(radroots_event::envelope::kind::KIND_DELETION_REQUEST as u16); + let comment = + RadrootsNostrKind::Custom(radroots_event::envelope::kind::KIND_COMMENT as u16); let classified_listing = RadrootsNostrKind::Custom(30_402); let builders = vec![ RadrootsNostrGenericEventBuilder::new(RadrootsNostrKind::Metadata, "{}"), @@ -593,14 +594,15 @@ mod tests { RadrootsNostrSecretKey::from_slice(&[5_u8; 32]).expect("test secret key"), ); let client = RadrootsNostrClient::new(keys); - let reference = radroots_event::reply::RadrootsNip10ReplyReference::parse( + let reference = radroots_event::post::reply::RadrootsNip10ReplyReference::parse( "a".repeat(64), FIXTURE_BOB_PUBLIC_KEY_HEX, None, ) .expect("reference"); - let reply = radroots_event::reply::RadrootsAuthoredNip10Reply::direct("Reply", reference) - .expect("reply"); + let reply = + radroots_event::post::reply::RadrootsAuthoredNip10Reply::direct("Reply", reference) + .expect("reply"); let builder = crate::events::reply::radroots_nostr_build_nip10_reply_event(&reply).expect("builder"); diff --git a/crates/nostr/src/codec_adapters.rs b/crates/nostr/src/codec_adapters.rs @@ -4,8 +4,8 @@ use alloc::{string::String, vec::Vec}; use crate::types::RadrootsNostrEvent; use radroots_event::{ - job_feedback::RadrootsJobFeedback, job_request::RadrootsJobRequest, - job_result::RadrootsJobResult, + social::job_feedback::RadrootsJobFeedback, social::job_request::RadrootsJobRequest, + social::job_result::RadrootsJobResult, }; use radroots_event_codec::job::{ error::JobParseError, feedback::decode as fb_decode, request::decode as req_decode, diff --git a/crates/nostr/src/draft_signing.rs b/crates/nostr/src/draft_signing.rs @@ -49,7 +49,7 @@ mod tests { use crate::types::{RadrootsNostrKeys, RadrootsNostrSecretKey}; use nostr::JsonUtil; use radroots_event::draft::RadrootsEventDraft; - use radroots_event::kinds::KIND_GEOCHAT; + use radroots_event::envelope::kind::KIND_GEOCHAT; fn fixture_keys(secret_key_hex: &str) -> RadrootsNostrKeys { let secret_key = RadrootsNostrSecretKey::from_hex(secret_key_hex).expect("secret key"); diff --git a/crates/nostr/src/event_convert.rs b/crates/nostr/src/event_convert.rs @@ -2,7 +2,8 @@ use crate::types::RadrootsNostrEvent as RadrootsNostrRawEvent; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeError, RadrootsEventEnvelopeParts, RadrootsEventPtr, + envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeError, + envelope::RadrootsEventEnvelopeParts, tag::RadrootsEventPtr, }; pub fn radroots_event_from_nostr( diff --git a/crates/nostr/src/event_verify.rs b/crates/nostr/src/event_verify.rs @@ -1,6 +1,6 @@ #![forbid(unsafe_code)] -use radroots_event::RadrootsEventEnvelope; +use radroots_event::envelope::RadrootsEventEnvelope; use radroots_event_codec::verification::{ RadrootsNip01VerificationError, verify_event_id, verify_nip01_event, }; @@ -59,7 +59,8 @@ mod tests { use crate::test_fixtures::FIXTURE_ALICE; use crate::types::{RadrootsNostrKeys, RadrootsNostrSecretKey, RadrootsNostrTimestamp}; use radroots_event::{ - RadrootsEventEnvelopeParts, kinds::KIND_POST, wire::compute_canonical_nip01_event_id, + envelope::RadrootsEventEnvelopeParts, envelope::kind::KIND_POST, + wire::compute_canonical_nip01_event_id, }; fn fixture_keys() -> RadrootsNostrKeys { diff --git a/crates/nostr/src/events/application_handler.rs b/crates/nostr/src/events/application_handler.rs @@ -15,7 +15,7 @@ use crate::types::{RadrootsNostrEvent, RadrootsNostrFilter, RadrootsNostrKind}; use crate::types::{RadrootsNostrGenericEventBuilder, RadrootsNostrMetadata}; #[cfg(feature = "client")] use core::time::Duration; -use radroots_event::kinds::KIND_APPLICATION_HANDLER; +use radroots_event::envelope::kind::KIND_APPLICATION_HANDLER; #[derive(Debug, Clone)] pub struct RadrootsNostrApplicationHandlerSpec { diff --git a/crates/nostr/src/events/comment.rs b/crates/nostr/src/events/comment.rs @@ -5,7 +5,9 @@ use crate::{ RadrootsNostrTimestamp, }, }; -use radroots_event::{comment::RadrootsAuthoredNip22Comment, wire::RadrootsNip01EventWireParts}; +use radroots_event::{ + post::comment::RadrootsAuthoredNip22Comment, wire::RadrootsNip01EventWireParts, +}; use radroots_event_codec::comment::authored::authored_nip22_comment_to_wire_parts; /// A sealed builder for a validated strict NIP-22 Comment. @@ -62,8 +64,8 @@ mod tests { use super::*; use crate::test_fixtures::FIXTURE_BOB_PUBLIC_KEY_HEX; use radroots_event::{ - comment::{RadrootsAuthoredNip22Comment, RadrootsNip22EventRootReference}, - kinds::{KIND_CLASSIFIED_LISTING, KIND_COMMENT}, + envelope::kind::{KIND_CLASSIFIED_LISTING, KIND_COMMENT}, + post::comment::{RadrootsAuthoredNip22Comment, RadrootsNip22EventRootReference}, }; #[test] diff --git a/crates/nostr/src/events/deletion.rs b/crates/nostr/src/events/deletion.rs @@ -6,7 +6,7 @@ use crate::{ }, }; use radroots_event::{ - deletion::RadrootsAuthoredNip09DeletionRequest, wire::RadrootsNip01EventWireParts, + post::deletion::RadrootsAuthoredNip09DeletionRequest, wire::RadrootsNip01EventWireParts, }; use radroots_event_codec::deletion::authored::authored_nip09_deletion_request_to_wire_parts; diff --git a/crates/nostr/src/events/food_availability.rs b/crates/nostr/src/events/food_availability.rs @@ -5,7 +5,7 @@ use crate::{ RadrootsNostrTimestamp, }, }; -use radroots_event::food_availability::RadrootsFoodAvailabilityDetails; +use radroots_event::food::availability::RadrootsFoodAvailabilityDetails; use radroots_event_codec::food_availability::authored::authored_food_availability_to_wire_parts; /// A sealed builder for a validated focused FoodAvailability event. diff --git a/crates/nostr/src/events/reply.rs b/crates/nostr/src/events/reply.rs @@ -5,7 +5,7 @@ use crate::{ RadrootsNostrTimestamp, }, }; -use radroots_event::{reply::RadrootsAuthoredNip10Reply, wire::RadrootsNip01EventWireParts}; +use radroots_event::{post::reply::RadrootsAuthoredNip10Reply, wire::RadrootsNip01EventWireParts}; use radroots_event_codec::reply::authored::authored_nip10_reply_to_wire_parts; /// A sealed builder for a validated strict marked NIP-10 Reply. diff --git a/crates/nostr/src/job_adapter.rs b/crates/nostr/src/job_adapter.rs @@ -1,7 +1,7 @@ #![forbid(unsafe_code)] use crate::types::{RadrootsNostrEvent, RadrootsNostrKind}; -use radroots_event::kinds::KIND_PROFILE; +use radroots_event::envelope::kind::KIND_PROFILE; use radroots_event_codec::job::traits::{JobEventBorrow, JobEventLike}; #[derive(Clone, Debug)] diff --git a/crates/nostr/src/nip11.rs b/crates/nostr/src/nip11.rs @@ -1,5 +1,5 @@ #[cfg(all(feature = "http", feature = "codec"))] -use radroots_event::relay_document::RadrootsRelayDocument; +use radroots_event::social::relay_document::RadrootsRelayDocument; #[cfg(all(feature = "http", feature = "codec"))] use crate::util::ws_to_http; diff --git a/crates/nostr/src/nip17.rs b/crates/nostr/src/nip17.rs @@ -10,9 +10,9 @@ use nostr::{ }; use thiserror::Error; -use radroots_event::kinds::{KIND_MESSAGE, KIND_MESSAGE_FILE}; -use radroots_event::message::RadrootsMessage; -use radroots_event::message_file::RadrootsMessageFile; +use radroots_event::envelope::kind::{KIND_MESSAGE, KIND_MESSAGE_FILE}; +use radroots_event::social::message::RadrootsMessage; +use radroots_event::social::message_file::RadrootsMessageFile; use radroots_event::wire::RadrootsNip01EventWireParts; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::message::decode as message_decode; @@ -93,7 +93,7 @@ fn rumor_from_parts( } fn parse_recipients( - recipients: &[radroots_event::message::RadrootsMessageRecipient], + recipients: &[radroots_event::social::message::RadrootsMessageRecipient], ) -> Result<Vec<PublicKey>, RadrootsNip17Error> { let mut out = Vec::with_capacity(recipients.len()); for recipient in recipients { @@ -210,8 +210,10 @@ mod tests { use super::*; use crate::test_fixtures::{FIXTURE_ALICE, FIXTURE_BOB}; use nostr::{Keys, SecretKey}; - use radroots_event::message::{RadrootsMessage, RadrootsMessageRecipient}; - use radroots_event::message_file::{RadrootsMessageFile, RadrootsMessageFileDimensions}; + use radroots_event::social::message::{RadrootsMessage, RadrootsMessageRecipient}; + use radroots_event::social::message_file::{ + RadrootsMessageFile, RadrootsMessageFileDimensions, + }; fn sender_keys() -> Keys { Keys::new(SecretKey::from_hex(FIXTURE_ALICE.secret_key_hex).unwrap()) diff --git a/crates/nostr/src/types.rs b/crates/nostr/src/types.rs @@ -1,7 +1,7 @@ #![forbid(unsafe_code)] use crate::error::RadrootsNostrError; -use radroots_event::classified_listing::{ +use radroots_event::listing::classified::{ RadrootsClassifiedListingPartition, classify_classified_listing_marker_names, }; @@ -242,10 +242,10 @@ impl RadrootsNostrGenericEventBuilder { let is_profile = kind == RadrootsNostrKind::Metadata.as_u16(); let is_reserved_post = kind == RadrootsNostrKind::TextNote.as_u16(); let is_reserved_deletion_request = - kind == radroots_event::kinds::KIND_DELETION_REQUEST as u16; - let is_reserved_comment = kind == radroots_event::kinds::KIND_COMMENT as u16; + kind == radroots_event::envelope::kind::KIND_DELETION_REQUEST as u16; + let is_reserved_comment = kind == radroots_event::envelope::kind::KIND_COMMENT as u16; let classified_listing_partition = - (kind == radroots_event::kinds::KIND_CLASSIFIED_LISTING as u16).then(|| { + (kind == radroots_event::envelope::kind::KIND_CLASSIFIED_LISTING as u16).then(|| { classify_classified_listing_marker_names( event .tags @@ -324,17 +324,19 @@ mod tests { ), ( RadrootsNostrGenericEventBuilder::new( - RadrootsNostrKind::Custom(radroots_event::kinds::KIND_DELETION_REQUEST as u16), + RadrootsNostrKind::Custom( + radroots_event::envelope::kind::KIND_DELETION_REQUEST as u16, + ), "Deletion request", ), - radroots_event::kinds::KIND_DELETION_REQUEST as u16, + radroots_event::envelope::kind::KIND_DELETION_REQUEST as u16, ), ( RadrootsNostrGenericEventBuilder::new( - RadrootsNostrKind::Custom(radroots_event::kinds::KIND_COMMENT as u16), + RadrootsNostrKind::Custom(radroots_event::envelope::kind::KIND_COMMENT as u16), "Comment", ), - radroots_event::kinds::KIND_COMMENT as u16, + radroots_event::envelope::kind::KIND_COMMENT as u16, ), ] { assert!(matches!( diff --git a/crates/nostr/tests/coverage.rs b/crates/nostr/tests/coverage.rs @@ -5,7 +5,7 @@ use std::borrow::Cow; use nostr::nips::nip04; #[cfg(feature = "events")] -use radroots_event::reply::{RadrootsAuthoredNip10Reply, RadrootsNip10ReplyReference}; +use radroots_event::post::reply::{RadrootsAuthoredNip10Reply, RadrootsNip10ReplyReference}; use radroots_nostr::error::RadrootsNostrTagsResolveError; use radroots_nostr::events::jobs::{ radroots_nostr_build_event_job_feedback, radroots_nostr_build_event_job_result, diff --git a/crates/nostr/tests/food_availability_profile.rs b/crates/nostr/tests/food_availability_profile.rs @@ -1,5 +1,5 @@ use radroots_blossom::{BlobDescriptor, BlobUrl, MediaType, Sha256}; -use radroots_event::food_availability::{ +use radroots_event::food::availability::{ RadrootsFoodAvailabilityDetails, RadrootsFoodAvailabilityDetailsParts, RadrootsFoodAvailabilityImage, RadrootsFoodAvailabilityStatus, RadrootsFoodContent, RadrootsFoodCurrency, RadrootsFoodIdentifier, RadrootsFoodImageDimensions, RadrootsFoodPrice, @@ -33,7 +33,7 @@ fn typed_food_builder_signs_the_exact_strict_profile() { assert_eq!( event.kind, RadrootsNostrKind::Custom( - u16::try_from(radroots_event::kinds::KIND_CLASSIFIED_LISTING) + u16::try_from(radroots_event::envelope::kind::KIND_CLASSIFIED_LISTING) .expect("classified listing kind") ) ); @@ -109,7 +109,7 @@ fn typed_food_builder_preserves_a_byte_verified_blossom_image_tuple() { fn generic_builder_reserves_focused_and_ambiguous_listing_profiles() { let keys = fixture_keys(); let kind = RadrootsNostrKind::Custom( - u16::try_from(radroots_event::kinds::KIND_CLASSIFIED_LISTING) + u16::try_from(radroots_event::envelope::kind::KIND_CLASSIFIED_LISTING) .expect("classified listing kind"), ); @@ -137,7 +137,7 @@ fn generic_builder_reserves_focused_and_ambiguous_listing_profiles() { fn generic_builder_retains_marker_free_and_operational_nip99_compatibility() { let keys = fixture_keys(); let kind = RadrootsNostrKind::Custom( - u16::try_from(radroots_event::kinds::KIND_CLASSIFIED_LISTING) + u16::try_from(radroots_event::envelope::kind::KIND_CLASSIFIED_LISTING) .expect("classified listing kind"), ); diff --git a/crates/nostr/tests/nip09_deletion_request_profile.rs b/crates/nostr/tests/nip09_deletion_request_profile.rs @@ -1,9 +1,9 @@ use radroots_event::{ - deletion::{ + envelope::kind::KIND_DELETION_REQUEST, + post::deletion::{ RadrootsAuthoredNip09DeletionRequest, RadrootsNip09DeletionAddressTarget, RadrootsNip09DeletionEventTarget, }, - kinds::KIND_DELETION_REQUEST, }; use radroots_event_codec::deletion::admission::verify_and_admit_nip09_deletion_request_event; use radroots_nostr::prelude::{ diff --git a/crates/nostr/tests/nip10_reply_profile.rs b/crates/nostr/tests/nip10_reply_profile.rs @@ -1,4 +1,4 @@ -use radroots_event::reply::{RadrootsAuthoredNip10Reply, RadrootsNip10ReplyReference}; +use radroots_event::post::reply::{RadrootsAuthoredNip10Reply, RadrootsNip10ReplyReference}; use radroots_event_codec::{ post::admission::{RadrootsPostAdmissionOutcome, verify_and_admit_post_event}, reply::{ diff --git a/crates/nostr/tests/nip22_comment_profile.rs b/crates/nostr/tests/nip22_comment_profile.rs @@ -1,11 +1,11 @@ use radroots_event::{ - comment::{ + envelope::kind::{ + KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_TIME_EVENT, KIND_CLASSIFIED_LISTING, KIND_COMMENT, + }, + post::comment::{ RadrootsAuthoredNip22Comment, RadrootsNip22AddressRootReference, RadrootsNip22CommentParentReference, RadrootsNip22EventRootReference, }, - kinds::{ - KIND_CALENDAR_DATE_EVENT, KIND_CALENDAR_TIME_EVENT, KIND_CLASSIFIED_LISTING, KIND_COMMENT, - }, }; use radroots_event_codec::comment::{ admission::verify_and_admit_nip22_comment_event, inbound::RadrootsInboundNip22CommentPosition, diff --git a/crates/nostr/tests/post_profile.rs b/crates/nostr/tests/post_profile.rs @@ -3,7 +3,7 @@ mod test_fixtures; use radroots_blossom::{BlobDescriptor, BlobUrl, MediaType, Sha256}; use radroots_event::{ - RadrootsAuthoredImage, + media::RadrootsAuthoredImage, post::{ RadrootsAuthoredAsk, RadrootsAuthoredPhotoUpdate, RadrootsAuthoredPostImage, RadrootsAuthoredUpdate, RadrootsPostImageDimensions, diff --git a/crates/outbox/src/model.rs b/crates/outbox/src/model.rs @@ -2,7 +2,7 @@ use crate::RadrootsOutboxError; use radroots_event::draft::{RadrootsEventDraft, RadrootsSignedEvent}; -use radroots_event::ids::{RadrootsTradeId, RadrootsTradeMutationId}; +use radroots_event::id::{RadrootsTradeId, RadrootsTradeMutationId}; use radroots_transport::{ RadrootsTransportKind, RadrootsTransportMeshScopeId, RadrootsTransportOutcomeKind, RadrootsTransportSatisfactionClass, RadrootsTransportSatisfactionPolicy, diff --git a/crates/outbox/src/store.rs b/crates/outbox/src/store.rs @@ -14,12 +14,12 @@ use crate::model::{ RadrootsOutboxSignedTradeMutationInput, RadrootsOutboxStatusSummary, RadrootsOutboxTradeMutationInput, }; -use radroots_event::RadrootsEventKindClass; use radroots_event::draft::{ RadrootsEventDraft, RadrootsSignedEvent, validate_signed_nostr_event_matches_draft, }; -use radroots_event::ids::{RadrootsTradeId, RadrootsTradeMutationId}; -use radroots_event::kinds::TRADE_MUTATION_EVENT_KINDS; +use radroots_event::envelope::RadrootsEventKindClass; +use radroots_event::envelope::kind::TRADE_MUTATION_EVENT_KINDS; +use radroots_event::id::{RadrootsTradeId, RadrootsTradeMutationId}; use radroots_event::trade::trade_mutation_from_canonical_content; use radroots_event::wire::RadrootsNip01EventWire; use radroots_event_store::{ @@ -3394,13 +3394,13 @@ fn u32_from_i64(field: &'static str, value: i64) -> Result<u32, RadrootsOutboxEr #[cfg_attr(coverage_nightly, coverage(off))] mod tests { use super::*; - use radroots_event::ids::{ + use radroots_event::envelope::kind::{ + KIND_CLASSIFIED_LISTING, KIND_FOLLOW, KIND_GEOCHAT, KIND_HTTP_AUTH, KIND_RELAY_AUTH, + }; + use radroots_event::id::{ RadrootsClassifiedListingAddress, RadrootsDTag, RadrootsEventId, RadrootsInventoryBinId, RadrootsTradeId, }; - use radroots_event::kinds::{ - KIND_CLASSIFIED_LISTING, KIND_FOLLOW, KIND_GEOCHAT, KIND_HTTP_AUTH, KIND_RELAY_AUTH, - }; use radroots_event::trade::{ RADROOTS_TRADE_PROPOSAL_CONTRACT_ID, RADROOTS_TRADE_SCHEMA_VERSION, RadrootsFulfillmentProfileV1, RadrootsTradeCancellationProfileV1, diff --git a/crates/replica_sync/src/emit.rs b/crates/replica_sync/src/emit.rs @@ -16,11 +16,13 @@ use crate::types::{ RADROOTS_REPLICA_TRANSFER_VERSION, RadrootsReplicaEventDraft, RadrootsReplicaFarmSelector, RadrootsReplicaSyncBundle, RadrootsReplicaSyncOptions, RadrootsReplicaSyncRequest, }; +use radroots_event::envelope::kind::{KIND_FARM, KIND_LIST_SET_GENERIC, KIND_PLOT}; +use radroots_event::farm::change_set::{ + RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon, +}; +use radroots_event::farm::location::{has_textual_locality, is_public_geohash5}; +use radroots_event::farm::plot::RadrootsPlot; use radroots_event::farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}; -use radroots_event::gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; -use radroots_event::kinds::{KIND_FARM, KIND_LIST_SET_GENERIC, KIND_PLOT}; -use radroots_event::location::{has_textual_locality, is_public_geohash5}; -use radroots_event::plot::RadrootsPlot; use radroots_event::wire::RadrootsNip01EventWireParts; use radroots_event_codec::farm::encode as farm_encode; use radroots_event_codec::farm::list_sets as farm_list_sets; @@ -503,10 +505,10 @@ fn load_farm_location( fn load_plot_location( exec: &dyn SqlExecutor, plot: &Plot, -) -> Result<Option<radroots_event::plot::RadrootsPlotLocation>, RadrootsReplicaEventsError> { +) -> Result<Option<radroots_event::farm::plot::RadrootsPlotLocation>, RadrootsReplicaEventsError> { let location = load_gcs_location_for_plot(exec, &plot.id)?; Ok( - location.map(|gcs| radroots_event::plot::RadrootsPlotLocation { + location.map(|gcs| radroots_event::farm::plot::RadrootsPlotLocation { primary: plot.location_primary.clone(), city: plot.location_city.clone(), region: plot.location_region.clone(), @@ -633,7 +635,7 @@ fn compare_relation_rows(a: &RelationRow, b: &RelationRow) -> core::cmp::Orderin } fn list_set_to_wire_parts( - list_set: &radroots_event::list_set::RadrootsListSet, + list_set: &radroots_event::social::list_set::RadrootsListSet, ) -> Result<RadrootsNip01EventWireParts, RadrootsReplicaEventsError> { #[cfg(test)] if failpoints::take_list_set_to_wire_error() { @@ -1964,7 +1966,7 @@ mod tests { super::failpoints::set_list_set_to_wire_error(); assert!(radroots_replica_list_set_events(&clean_exec, &clean_farm).is_err()); - let invalid_list_set = radroots_event::list_set::RadrootsListSet { + let invalid_list_set = radroots_event::social::list_set::RadrootsListSet { d_tag: String::new(), content: String::new(), entries: Vec::new(), @@ -2006,7 +2008,7 @@ mod tests { super::failpoints::set_list_set_to_wire_error(); assert!(radroots_replica_list_set_events(&exec, &farm_row).is_err()); - let invalid_list_set = radroots_event::list_set::RadrootsListSet { + let invalid_list_set = radroots_event::social::list_set::RadrootsListSet { d_tag: String::new(), content: String::new(), entries: Vec::new(), diff --git a/crates/replica_sync/src/geo.rs b/crates/replica_sync/src/geo.rs @@ -3,7 +3,7 @@ use alloc::vec; #[cfg(not(feature = "std"))] use alloc::{string::String, vec::Vec}; -use radroots_event::gcs::{RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; +use radroots_event::farm::change_set::{RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; const EARTH_RADIUS_M: f64 = 6_378_137.0; diff --git a/crates/replica_sync/src/ingest.rs b/crates/replica_sync/src/ingest.rs @@ -12,26 +12,26 @@ use base64::Engine; use base64::engine::general_purpose::URL_SAFE_NO_PAD; use radroots_core::Decimal; -#[cfg(test)] -use radroots_event::RadrootsEventEnvelopeParts; use radroots_event::contract::RadrootsEventClass; -use radroots_event::event_head::{ +#[cfg(test)] +use radroots_event::envelope::RadrootsEventEnvelopeParts; +use radroots_event::envelope::event_head::{ RadrootsCurrentEventHead, RadrootsEventHeadCandidateResult, RadrootsEventHeadCoordinate, RadrootsEventHeadDecision as ProtocolEventHeadDecision, event_head_candidate_for_class, event_head_candidate_for_event, select_event_head, }; -use radroots_event::ids::RadrootsEventId; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_CALENDAR, KIND_CLASSIFIED_LISTING, KIND_FARM, KIND_PLOT, KIND_PROFILE, is_nip51_list_set_kind, }; -use radroots_event::operational_listing::{ +use radroots_event::id::RadrootsEventId; +use radroots_event::listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingStatus, }; use radroots_event::{ - RadrootsEventEnvelope, - classified_listing::{RadrootsClassifiedListingPartition, classify_classified_listing_tags}, + envelope::RadrootsEventEnvelope, + listing::classified::{RadrootsClassifiedListingPartition, classify_classified_listing_tags}, }; use radroots_event_codec::farm::decode as farm_decode; use radroots_event_codec::food_availability::inbound::{ @@ -591,7 +591,7 @@ fn ingest_list_set_event( exec: &dyn SqlExecutor, event: &RadrootsEventEnvelope, ) -> Result<RadrootsReplicaIngestOutcome, RadrootsReplicaEventsError> { - if event.kind_u32() != radroots_event::kinds::KIND_LIST_SET_GENERIC { + if event.kind_u32() != radroots_event::envelope::kind::KIND_LIST_SET_GENERIC { return Ok(RadrootsReplicaIngestOutcome::Skipped); } let list_set = list_set_decode::list_set_from_tags( @@ -1241,7 +1241,7 @@ fn upsert_plot_tags( fn upsert_plot_location( exec: &dyn SqlExecutor, plot_id: &str, - location: Option<radroots_event::plot::RadrootsPlotLocation>, + location: Option<radroots_event::farm::plot::RadrootsPlotLocation>, factory: &dyn RadrootsReplicaIdFactory, ) -> Result<(), RadrootsReplicaEventsError> { clear_plot_locations(exec, plot_id)?; @@ -1318,7 +1318,7 @@ fn clear_plot_locations( fn create_gcs_location( exec: &dyn SqlExecutor, - gcs: radroots_event::gcs::RadrootsGcsLocation, + gcs: radroots_event::farm::change_set::RadrootsGcsLocation, factory: &dyn RadrootsReplicaIdFactory, ) -> Result<String, RadrootsReplicaEventsError> { let d_tag = factory.new_d_tag(); @@ -1370,7 +1370,7 @@ fn map_gcs_polygon_serialize_error(_err: serde_json::Error) -> RadrootsReplicaEv #[cfg(test)] fn serialize_gcs_point( - point: &radroots_event::gcs::RadrootsGeoJsonPoint, + point: &radroots_event::farm::change_set::RadrootsGeoJsonPoint, ) -> Result<String, serde_json::Error> { #[cfg(test)] if failpoints::take_gcs_point_serialize_error() { @@ -1380,13 +1380,13 @@ fn serialize_gcs_point( } #[cfg(not(test))] -fn serialize_gcs_point(point: &radroots_event::gcs::RadrootsGeoJsonPoint) -> String { +fn serialize_gcs_point(point: &radroots_event::farm::change_set::RadrootsGeoJsonPoint) -> String { serde_json::to_string(point).expect("gcs.point serializes") } #[cfg(test)] fn serialize_gcs_polygon( - polygon: &radroots_event::gcs::RadrootsGeoJsonPolygon, + polygon: &radroots_event::farm::change_set::RadrootsGeoJsonPolygon, ) -> Result<String, serde_json::Error> { #[cfg(test)] if failpoints::take_gcs_polygon_serialize_error() { @@ -1396,7 +1396,9 @@ fn serialize_gcs_polygon( } #[cfg(not(test))] -fn serialize_gcs_polygon(polygon: &radroots_event::gcs::RadrootsGeoJsonPolygon) -> String { +fn serialize_gcs_polygon( + polygon: &radroots_event::farm::change_set::RadrootsGeoJsonPolygon, +) -> String { serde_json::to_string(polygon).expect("gcs.polygon serializes") } @@ -1409,7 +1411,7 @@ fn upsert_farm_members( exec: &dyn SqlExecutor, farm_id: &str, role: ListSetRole, - list_set: &radroots_event::list_set::RadrootsListSet, + list_set: &radroots_event::social::list_set::RadrootsListSet, ) -> Result<(), RadrootsReplicaEventsError> { let role_value = match role { ListSetRole::Members => ROLE_MEMBER, @@ -1463,7 +1465,7 @@ fn upsert_farm_members( fn upsert_member_claims( exec: &dyn SqlExecutor, member_pubkey: &str, - list_set: &radroots_event::list_set::RadrootsListSet, + list_set: &radroots_event::social::list_set::RadrootsListSet, ) -> Result<(), RadrootsReplicaEventsError> { let existing_query = farm_member_claim::find_many( exec, @@ -1548,7 +1550,7 @@ fn unpack_farm_location_strings( } fn unpack_plot_location_strings( - location: Option<&radroots_event::plot::RadrootsPlotLocation>, + location: Option<&radroots_event::farm::plot::RadrootsPlotLocation>, ) -> ( Option<String>, Option<String>, @@ -1567,7 +1569,7 @@ fn unpack_plot_location_strings( } fn ensure_list_set_entries_tag( - list_set: &radroots_event::list_set::RadrootsListSet, + list_set: &radroots_event::social::list_set::RadrootsListSet, expected: &str, label: &str, ) -> Result<(), RadrootsReplicaEventsError> { @@ -1624,16 +1626,18 @@ mod tests { use nostr::{EventBuilder, Keys, Kind, Tag, Timestamp}; use radroots_core::{Currency, Money, Quantity, QuantityPrice, Unit}; + use radroots_event::envelope::kind::{KIND_LIST_SET_FOLLOW, KIND_LIST_SET_GENERIC}; + use radroots_event::farm::change_set::{ + RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon, + }; + use radroots_event::farm::plot::{RadrootsPlot, RadrootsPlotLocation}; use radroots_event::farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}; - use radroots_event::gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; - use radroots_event::kinds::{KIND_LIST_SET_FOLLOW, KIND_LIST_SET_GENERIC}; - use radroots_event::list::RadrootsListEntry; - use radroots_event::list_set::RadrootsListSet; - use radroots_event::operational_listing::RadrootsOperationalListingProduct; - use radroots_event::plot::{RadrootsPlot, RadrootsPlotLocation}; + use radroots_event::listing::operational::RadrootsOperationalListingProduct; use radroots_event::profile::{ RADROOTS_PROFILE_TYPE_TAG_KEY, RadrootsProfileType, radroots_profile_type_tag_value, }; + use radroots_event::social::list::RadrootsListEntry; + use radroots_event::social::list_set::RadrootsListSet; use radroots_event_codec::farm::encode as farm_encode; use radroots_event_codec::farm::list_sets as farm_list_sets; use radroots_event_codec::list_set::encode as list_set_encode; diff --git a/crates/replica_sync/src/tests.rs b/crates/replica_sync/src/tests.rs @@ -2,8 +2,8 @@ use crate::{ RADROOTS_REPLICA_TRANSFER_VERSION, RadrootsReplicaFarmSelector, RadrootsReplicaSyncRequest, radroots_replica_sync_all, }; -use radroots_event::gcs::{RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; -use radroots_event::kinds::{KIND_FARM, KIND_LIST_SET_GENERIC, KIND_PLOT}; +use radroots_event::envelope::kind::{KIND_FARM, KIND_LIST_SET_GENERIC, KIND_PLOT}; +use radroots_event::farm::change_set::{RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; use radroots_replica_schema::ReplicaSchemaError; use radroots_replica_schema::farm::IFarmFields; use radroots_replica_schema::farm_gcs_location::IFarmGcsLocationFields; diff --git a/crates/replica_sync/tests/ingest_roundtrip.rs b/crates/replica_sync/tests/ingest_roundtrip.rs @@ -1,15 +1,17 @@ -use radroots_event::farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}; -use radroots_event::gcs::{RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon}; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_FARM, KIND_LIST_SET_FOLLOW, KIND_LIST_SET_GENERIC, KIND_PLOT, KIND_PROFILE, }; -use radroots_event::list::RadrootsListEntry; -use radroots_event::list_set::RadrootsListSet; -use radroots_event::plot::{RadrootsPlot, RadrootsPlotLocation}; +use radroots_event::farm::change_set::{ + RadrootsGcsLocation, RadrootsGeoJsonPoint, RadrootsGeoJsonPolygon, +}; +use radroots_event::farm::plot::{RadrootsPlot, RadrootsPlotLocation}; +use radroots_event::farm::{RadrootsFarm, RadrootsFarmPublicLocation, RadrootsFarmRef}; use radroots_event::profile::{ RADROOTS_PROFILE_TYPE_TAG_KEY, RadrootsProfileType, radroots_profile_type_tag_value, }; -use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts}; +use radroots_event::social::list::RadrootsListEntry; +use radroots_event::social::list_set::RadrootsListSet; +use radroots_event::{envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts}; use radroots_event_codec::error::{EventEncodeError, EventParseError}; use radroots_event_codec::farm::encode as farm_encode; use radroots_event_codec::farm::list_sets as farm_list_sets; @@ -216,11 +218,11 @@ fn seed_source( }; let farm_row = unwrap_sql(farm::create(exec, &farm_fields), "farm").result; - let point = radroots_event::gcs::RadrootsGeoJsonPoint { + let point = radroots_event::farm::change_set::RadrootsGeoJsonPoint { r#type: "Point".to_string(), coordinates: [-122.4, 37.7], }; - let polygon = radroots_event::gcs::RadrootsGeoJsonPolygon { + let polygon = radroots_event::farm::change_set::RadrootsGeoJsonPolygon { r#type: "Polygon".to_string(), coordinates: vec![vec![ [-122.4, 37.7], diff --git a/crates/test_fixtures/src/knowledge.rs b/crates/test_fixtures/src/knowledge.rs @@ -1,5 +1,4 @@ -use radroots_event::RadrootsEventRef; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_CONTRIBUTION_ATTESTATION, KIND_EVIDENCE_BOUNTY, KIND_FILE_METADATA, KIND_KNOWLEDGE_CHANGE_PROPOSAL, KIND_KNOWLEDGE_CLAIM, KIND_KNOWLEDGE_FIELD_REPORT, KIND_KNOWLEDGE_RELATION, KIND_KNOWLEDGE_REVIEW, KIND_KNOWLEDGE_SOURCE, KIND_WIKI_ARTICLE, @@ -19,6 +18,7 @@ use radroots_event::knowledge::{ RadrootsKnowledgeReviewTarget, RadrootsKnowledgeSource, RadrootsWikiArticle, RadrootsWikiArticleVersionRef, RadrootsWikiMergeRequest, RadrootsWikiRedirect, }; +use radroots_event::tag::RadrootsEventRef; use radroots_identity::PublicKey; use crate::{FIXTURE_ALICE_PUBLIC_KEY_HEX, RELAY_PRIMARY_WSS}; diff --git a/crates/trade/src/identity.rs b/crates/trade/src/identity.rs @@ -2,7 +2,7 @@ use core::str::FromStr; -use radroots_event::ids::{ +use radroots_event::id::{ RadrootsClassifiedListingAddress, RadrootsEventId, RadrootsIdParseError, RadrootsOrderId, }; use radroots_identity::PublicKey; @@ -141,7 +141,7 @@ impl RadrootsTradeLocatorCandidate { #[cfg(test)] mod tests { use super::*; - use radroots_event::kinds::KIND_CLASSIFIED_LISTING; + use radroots_event::envelope::kind::KIND_CLASSIFIED_LISTING; use radroots_test_fixtures::{FIXTURE_ALICE_PUBLIC_KEY_HEX, FIXTURE_BOB_PUBLIC_KEY_HEX}; const BUYER: &str = FIXTURE_BOB_PUBLIC_KEY_HEX; diff --git a/crates/trade/src/operational_listing/draft.rs b/crates/trade/src/operational_listing/draft.rs @@ -13,10 +13,10 @@ use std::vec::Vec; use radroots_authority::RadrootsActorContext; use radroots_event::{ contract::AuthorRole, - ids::{RadrootsClassifiedListingAddress, RadrootsIdParseError, RadrootsInventoryBinId}, - kinds::KIND_CLASSIFIED_LISTING, - operational_listing::RadrootsOperationalListing, - trade_validation::RadrootsOperationalListingValidationError, + envelope::kind::KIND_CLASSIFIED_LISTING, + id::{RadrootsClassifiedListingAddress, RadrootsIdParseError, RadrootsInventoryBinId}, + listing::operational::RadrootsOperationalListing, + trade::validation::RadrootsOperationalListingValidationError, }; use radroots_identity::{Error as PublicKeyError, PublicKey}; @@ -195,16 +195,16 @@ mod tests { use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; use radroots_event::{ contract::AuthorRole, + envelope::kind::KIND_CLASSIFIED_LISTING, farm::RadrootsFarmRef, - ids::{RadrootsClassifiedListingAddress, RadrootsDTag, RadrootsInventoryBinId}, - kinds::KIND_CLASSIFIED_LISTING, - operational_listing::{ + id::{RadrootsClassifiedListingAddress, RadrootsDTag, RadrootsInventoryBinId}, + listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingDeliveryMethod, RadrootsOperationalListingProduct, RadrootsOperationalListingPublicLocation, RadrootsOperationalListingStatus, }, - trade_validation::RadrootsOperationalListingValidationError, + trade::validation::RadrootsOperationalListingValidationError, }; use radroots_identity::PublicKey; use radroots_test_fixtures::{FIXTURE_ALICE_PUBLIC_KEY_HEX, FIXTURE_BOB_PUBLIC_KEY_HEX}; diff --git a/crates/trade/src/operational_listing/mod.rs b/crates/trade/src/operational_listing/mod.rs @@ -5,12 +5,12 @@ pub mod price_ext; pub mod validation; use radroots_event::{ - RadrootsEventEnvelope, - ids::{ + envelope::RadrootsEventEnvelope, + id::{ RadrootsAddressableCoordinateParts, RadrootsClassifiedListingAddress, RadrootsDTag, RadrootsIdParseError, }, - operational_listing::{RadrootsOperationalListing, RadrootsOperationalListingParseError}, + listing::operational::{RadrootsOperationalListing, RadrootsOperationalListingParseError}, }; use radroots_event_codec::operational_listing::decode::operational_listing_from_nostr_event; use radroots_identity::PublicKey; @@ -98,10 +98,11 @@ mod tests { parse_public_classified_listing_address, }; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, - ids::RadrootsClassifiedListingAddress, - kinds::{KIND_CLASSIFIED_LISTING, KIND_PROFILE}, - operational_listing::RadrootsOperationalListingParseError, + envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeParts, + envelope::kind::{KIND_CLASSIFIED_LISTING, KIND_PROFILE}, + id::RadrootsClassifiedListingAddress, + listing::operational::RadrootsOperationalListingParseError, }; const SELLER: &str = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; @@ -209,14 +210,14 @@ mod tests { assert!(matches!( parse_classified_listing_address(&raw), - Err(radroots_event::ids::RadrootsIdParseError::UnexpectedKind { + Err(radroots_event::id::RadrootsIdParseError::UnexpectedKind { expected: KIND_CLASSIFIED_LISTING, actual: 30403, }) )); assert!(matches!( parse_public_classified_listing_address(&raw), - Err(radroots_event::ids::RadrootsIdParseError::UnexpectedKind { + Err(radroots_event::id::RadrootsIdParseError::UnexpectedKind { expected: KIND_CLASSIFIED_LISTING, actual: 30403, }) @@ -227,13 +228,13 @@ mod tests { fn parse_public_classified_listing_address_maps_invalid_listing_addresses() { assert!(matches!( parse_public_classified_listing_address("not-an-address"), - Err(radroots_event::ids::RadrootsIdParseError::InvalidFormat) + Err(radroots_event::id::RadrootsIdParseError::InvalidFormat) )); let raw = format!("{KIND_PROFILE}:{SELLER}:listing-1"); assert!(matches!( parse_public_classified_listing_address(&raw), - Err(radroots_event::ids::RadrootsIdParseError::UnexpectedKind { + Err(radroots_event::id::RadrootsIdParseError::UnexpectedKind { expected: KIND_CLASSIFIED_LISTING, actual: KIND_PROFILE, }) @@ -247,7 +248,7 @@ mod tests { assert!(matches!( parse_classified_listing_address(&raw), - Err(radroots_event::ids::RadrootsIdParseError::UnexpectedKind { + Err(radroots_event::id::RadrootsIdParseError::UnexpectedKind { expected: KIND_CLASSIFIED_LISTING, actual: KIND_PROFILE, }) diff --git a/crates/trade/src/operational_listing/mutation.rs b/crates/trade/src/operational_listing/mutation.rs @@ -10,11 +10,11 @@ use alloc::string::{String, ToString}; #[cfg(all(feature = "serde_json", feature = "std"))] use std::string::{String, ToString}; -use radroots_event::ids::RadrootsClassifiedListingAddress; +use radroots_event::id::RadrootsClassifiedListingAddress; #[cfg(feature = "serde_json")] use radroots_event::{ draft::{RadrootsDraftError, RadrootsEventDraft}, - kinds::KIND_CLASSIFIED_LISTING, + envelope::kind::KIND_CLASSIFIED_LISTING, }; #[cfg(feature = "serde_json")] use radroots_event_codec::operational_listing::encode::to_wire_parts_with_kind; @@ -172,16 +172,16 @@ mod tests { use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; use radroots_event::{ contract::validate_event_contract_shape, + envelope::kind::KIND_CLASSIFIED_LISTING, farm::RadrootsFarmRef, - ids::{RadrootsClassifiedListingAddress, RadrootsDTag, RadrootsInventoryBinId}, - kinds::KIND_CLASSIFIED_LISTING, - operational_listing::{ + farm::resource_area::RadrootsResourceAreaRef, + id::{RadrootsClassifiedListingAddress, RadrootsDTag, RadrootsInventoryBinId}, + listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingDeliveryMethod, RadrootsOperationalListingProduct, RadrootsOperationalListingPublicLocation, RadrootsOperationalListingStatus, }, - resource_area::RadrootsResourceAreaRef, }; use radroots_event_codec::verification::verify_nip01_event; use radroots_identity::PublicKey; diff --git a/crates/trade/src/operational_listing/price_ext.rs b/crates/trade/src/operational_listing/price_ext.rs @@ -3,7 +3,7 @@ use crate::operational_listing::model::{ }; use radroots_core::pricing::{Error as PricingError, QuantityPriceOps}; use radroots_core::{Decimal, Quantity}; -use radroots_event::operational_listing::RadrootsOperationalListingBin; +use radroots_event::listing::operational::RadrootsOperationalListingBin; pub trait BinPricingTryExt { fn try_subtotal_for_count( @@ -67,8 +67,8 @@ mod tests { use super::BinPricingTryExt; use radroots_core::pricing::Error as PricingError; use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; - use radroots_event::ids::RadrootsInventoryBinId; - use radroots_event::operational_listing::RadrootsOperationalListingBin; + use radroots_event::id::RadrootsInventoryBinId; + use radroots_event::listing::operational::RadrootsOperationalListingBin; fn bin_id(raw: &str) -> RadrootsInventoryBinId { RadrootsInventoryBinId::parse(raw).expect("bin id") diff --git a/crates/trade/src/operational_listing/validation.rs b/crates/trade/src/operational_listing/validation.rs @@ -8,16 +8,16 @@ use alloc::{ use radroots_core::{Decimal, Money, Quantity, Unit}; use radroots_event::{ - classified_listing::{RadrootsClassifiedListingPartition, classify_classified_listing_tags}, - ids::RadrootsClassifiedListingAddress, - kinds::{KIND_CLASSIFIED_LISTING, is_classified_listing_kind}, - location::{has_textual_locality, is_public_geohash5}, - operational_listing::{ + envelope::kind::{KIND_CLASSIFIED_LISTING, is_classified_listing_kind}, + farm::location::{has_textual_locality, is_public_geohash5}, + id::RadrootsClassifiedListingAddress, + listing::classified::{RadrootsClassifiedListingPartition, classify_classified_listing_tags}, + listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingDeliveryMethod, RadrootsOperationalListingPublicLocation, }, - trade_validation::RadrootsOperationalListingValidationError as OperationalListingValidationError, + trade::validation::RadrootsOperationalListingValidationError as OperationalListingValidationError, }; use radroots_identity::PublicKey; @@ -51,7 +51,7 @@ pub struct RadrootsOperationalListingTradeProjection { /// A plain envelope cannot cross this boundary: /// /// ```compile_fail -/// use radroots_event::RadrootsEventEnvelope; +/// use radroots_event::envelope::RadrootsEventEnvelope; /// use radroots_trade::operational_listing::validation::validate_operational_listing_event; /// /// fn validate_unverified(event: &RadrootsEventEnvelope) { @@ -237,11 +237,12 @@ mod tests { use nostr::{EventBuilder, Keys, Kind, Tag, Timestamp}; use radroots_core::{Currency, Decimal, Money, Quantity, QuantityPrice, Unit}; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, + envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeParts, + envelope::kind::KIND_CLASSIFIED_LISTING, farm::RadrootsFarmRef, - ids::{RadrootsDTag, RadrootsInventoryBinId}, - kinds::KIND_CLASSIFIED_LISTING, - operational_listing::{ + id::{RadrootsDTag, RadrootsInventoryBinId}, + listing::operational::{ RadrootsOperationalListing, RadrootsOperationalListingAvailability, RadrootsOperationalListingBin, RadrootsOperationalListingDeliveryMethod, RadrootsOperationalListingProduct, RadrootsOperationalListingPublicLocation, @@ -314,7 +315,7 @@ mod tests { inventory_available: Some(Decimal::from(5u32)), availability: Some(RadrootsOperationalListingAvailability::Status { status: - radroots_event::operational_listing::RadrootsOperationalListingStatus::Active, + radroots_event::listing::operational::RadrootsOperationalListingStatus::Active, }), delivery_method: Some(RadrootsOperationalListingDeliveryMethod::Pickup), location: Some(RadrootsOperationalListingPublicLocation { @@ -380,9 +381,9 @@ mod tests { RadrootsOperationalListingAvailability::Status { status } => tags.push(vec![ "status".into(), match status { - radroots_event::operational_listing::RadrootsOperationalListingStatus::Active => "active".into(), - radroots_event::operational_listing::RadrootsOperationalListingStatus::Sold => "sold".into(), - radroots_event::operational_listing::RadrootsOperationalListingStatus::Other { value } => { + radroots_event::listing::operational::RadrootsOperationalListingStatus::Active => "active".into(), + radroots_event::listing::operational::RadrootsOperationalListingStatus::Sold => "sold".into(), + radroots_event::listing::operational::RadrootsOperationalListingStatus::Other { value } => { value.clone() } }, @@ -777,7 +778,7 @@ mod tests { assert_validation_err( listing, OperationalListingValidationError::ParseError { - error: radroots_event::operational_listing::RadrootsOperationalListingParseError::InvalidTag("radroots:primary_bin".into()), + error: radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag("radroots:primary_bin".into()), }, ); } @@ -794,7 +795,7 @@ mod tests { assert_validation_err( listing, OperationalListingValidationError::ParseError { - error: radroots_event::operational_listing::RadrootsOperationalListingParseError::InvalidTag("radroots:primary_bin".into()), + error: radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag("radroots:primary_bin".into()), }, ); } @@ -806,7 +807,7 @@ mod tests { assert_validation_err( listing, OperationalListingValidationError::ParseError { - error: radroots_event::operational_listing::RadrootsOperationalListingParseError::InvalidTag("radroots:bin".into()), + error: radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag("radroots:bin".into()), }, ); } @@ -822,7 +823,7 @@ mod tests { assert_validation_err( listing, OperationalListingValidationError::ParseError { - error: radroots_event::operational_listing::RadrootsOperationalListingParseError::InvalidTag("radroots:price".into()), + error: radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag("radroots:price".into()), }, ); } @@ -838,7 +839,7 @@ mod tests { assert_validation_err( listing, OperationalListingValidationError::ParseError { - error: radroots_event::operational_listing::RadrootsOperationalListingParseError::InvalidTag("radroots:price".into()), + error: radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag("radroots:price".into()), }, ); } @@ -887,7 +888,7 @@ mod tests { assert_validation_err( listing, OperationalListingValidationError::ParseError { - error: radroots_event::operational_listing::RadrootsOperationalListingParseError::InvalidTag("g".to_string()), + error: radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag("g".to_string()), }, ); } @@ -899,7 +900,7 @@ mod tests { assert_validation_err( listing, OperationalListingValidationError::ParseError { - error: radroots_event::operational_listing::RadrootsOperationalListingParseError::InvalidTag("g".to_string()), + error: radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag("g".to_string()), }, ); } @@ -927,7 +928,7 @@ mod tests { listing_addr: "addr".into(), }, OperationalListingValidationError::ParseError { - error: radroots_event::operational_listing::RadrootsOperationalListingParseError::InvalidTag("d".into()), + error: radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag("d".into()), }, OperationalListingValidationError::InvalidSeller, OperationalListingValidationError::MissingFarmProfile, diff --git a/crates/trade/src/validation_receipt.rs b/crates/trade/src/validation_receipt.rs @@ -9,10 +9,10 @@ use alloc::{ use base64::Engine as _; use radroots_event::{ - RadrootsEventEnvelope, - ids::{RadrootsAddressableCoordinate, RadrootsAddressableCoordinateParts}, - kinds::{KIND_TRADE_VALIDATION_RECEIPT, KIND_VALIDATOR_SET}, - tags::{TAG_A, TAG_D}, + envelope::RadrootsEventEnvelope, + envelope::kind::{KIND_TRADE_VALIDATION_RECEIPT, KIND_VALIDATOR_SET}, + id::{RadrootsAddressableCoordinate, RadrootsAddressableCoordinateParts}, + tag::name::{TAG_A, TAG_D}, wire::RadrootsNip01EventWireParts, }; use radroots_identity::PublicKey; @@ -1146,10 +1146,11 @@ mod tests { verify_validation_receipt_event, verify_validator_set_event, }; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, - ids::RadrootsAddressableCoordinate, - kinds::{KIND_TRADE_VALIDATION_RECEIPT, KIND_VALIDATOR_SET}, - tags::TAG_D, + envelope::RadrootsEventEnvelope, + envelope::RadrootsEventEnvelopeParts, + envelope::kind::{KIND_TRADE_VALIDATION_RECEIPT, KIND_VALIDATOR_SET}, + id::RadrootsAddressableCoordinate, + tag::name::TAG_D, }; use radroots_identity::PublicKey; use radroots_test_fixtures::{ @@ -1176,7 +1177,7 @@ mod tests { PublicKey::from_hex(FIXTURE_CAROL_PUBLIC_KEY_HEX).expect("validator pubkey") } - fn validator_set_addr() -> radroots_event::ids::RadrootsAddressableCoordinate { + fn validator_set_addr() -> radroots_event::id::RadrootsAddressableCoordinate { validator_set_address(&validator_set_author(), &validator_set_id()) .expect("validator set address") } diff --git a/crates/trade/src/workflow.rs b/crates/trade/src/workflow.rs @@ -14,7 +14,7 @@ use std::{ }; use radroots_event::{ - ids::{ + id::{ RadrootsDTag, RadrootsEventId, RadrootsTradeCandidateId, RadrootsTradeId, RadrootsTradeMutationId, }, @@ -1080,7 +1080,7 @@ fn projection_digest(_projection: &RadrootsTradeProjectionV1) -> String { mod tests { use super::*; use radroots_event::{ - ids::{RadrootsClassifiedListingAddress, RadrootsInventoryBinId}, + id::{RadrootsClassifiedListingAddress, RadrootsInventoryBinId}, trade::{ RADROOTS_TRADE_DECISION_CONTRACT_ID, RADROOTS_TRADE_PROPOSAL_CONTRACT_ID, RADROOTS_TRADE_REVISION_DECISION_CONTRACT_ID, diff --git a/crates/trade/tests/operational_listing_conformance.rs b/crates/trade/tests/operational_listing_conformance.rs @@ -2,7 +2,7 @@ use nostr::secp256k1::Message; use nostr::{Event as NostrEvent, JsonUtil, Keys, SECP256K1}; -use radroots_event::{RadrootsNip01EventWire, ids::RadrootsIdParseError}; +use radroots_event::{id::RadrootsIdParseError, wire::RadrootsNip01EventWire}; use radroots_event_codec::verification::{RadrootsSignatureVerifiedEvent, verify_nip01_event}; use radroots_nostr::prelude::radroots_event_from_nostr; use radroots_trade::operational_listing::{ diff --git a/crates/trade_sp1_host/src/lib.rs b/crates/trade_sp1_host/src/lib.rs @@ -1773,7 +1773,8 @@ mod tests { }; use base64::Engine; use radroots_event::{ - RadrootsEventEnvelope, RadrootsEventEnvelopeParts, kinds::KIND_TRADE_VALIDATION_RECEIPT, + envelope::RadrootsEventEnvelope, envelope::RadrootsEventEnvelopeParts, + envelope::kind::KIND_TRADE_VALIDATION_RECEIPT, }; use radroots_trade::validation_receipt::{ RadrootsValidationReceiptExpectedBinding, RadrootsValidationReceiptProof, diff --git a/crates/transport_nostr/src/publish.rs b/crates/transport_nostr/src/publish.rs @@ -1057,7 +1057,7 @@ mod tests { use super::{RadrootsNostrEvent, ensure_raw_event_matches_signed_event}; use nostr::JsonUtil; use radroots_event::draft::{RadrootsEventDraft, RadrootsSignedEvent}; - use radroots_event::kinds::KIND_GEOCHAT; + use radroots_event::envelope::kind::KIND_GEOCHAT; use radroots_event::wire::RadrootsNip01EventWire; use radroots_nostr::prelude::{ RadrootsNostrKeys, RadrootsNostrSecretKey, radroots_nostr_sign_frozen_draft, diff --git a/crates/transport_nostr/tests/transport.rs b/crates/transport_nostr/tests/transport.rs @@ -1,7 +1,7 @@ use futures::future::BoxFuture; use nostr::{EventBuilder, JsonUtil}; use radroots_event::draft::{RadrootsEventDraft, RadrootsSignedEvent}; -use radroots_event::kinds::{ +use radroots_event::envelope::kind::{ KIND_DELETION_REQUEST, KIND_FOLLOW, KIND_GEOCHAT, KIND_POST, KIND_PROFILE, }; use radroots_event::wire::v1::DEFAULT_RAW_JSON_MAX_BYTES; diff --git a/docs/api/README.md b/docs/api/README.md @@ -34,3 +34,4 @@ expand a package beyond its charter. | `radroots_identity` | [`radroots_identity.txt`](radroots_identity.txt) | [release V1 specification](../specs/radroots_crates_release_v1.md) | | `radroots_blossom` | [`radroots_blossom.txt`](radroots_blossom.txt) | [release V1 specification](../specs/radroots_crates_release_v1.md) | | `radroots_protocol` | [`radroots_protocol.txt`](radroots_protocol.txt) | [release V1 specification](../specs/radroots_crates_release_v1.md) | +| `radroots_event` | [`radroots_event.txt`](radroots_event.txt) | [release V1 specification](../specs/radroots_crates_release_v1.md) | diff --git a/docs/api/radroots_event.txt b/docs/api/radroots_event.txt @@ -0,0 +1,4212 @@ +pub mod radroots_event +pub mod radroots_event::admission +#[non_exhaustive] pub enum radroots_event::admission::Error +pub radroots_event::admission::Error::ContractValidation(crate::contract::registry_v7::RadrootsContractValidationError) +pub radroots_event::admission::Error::IdMismatch +pub radroots_event::admission::Error::IdMismatch::actual: radroots_event::id::RadrootsEventId +pub radroots_event::admission::Error::IdMismatch::expected: radroots_event::id::RadrootsEventId +pub radroots_event::admission::Error::MalformedEnvelope +pub radroots_event::admission::Error::SignatureInvalid +pub radroots_event::admission::Error::SignatureVerificationUnavailable +impl radroots_event::Error +pub const fn radroots_event::Error::code(&self) -> &'static str +impl core::error::Error for radroots_event::Error +impl core::fmt::Display for radroots_event::Error +pub fn radroots_event::Error::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::admission::AdmittedEvent +impl radroots_event::admission::AdmittedEvent +pub const fn radroots_event::admission::AdmittedEvent::event(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::admission::AdmittedEvent::into_validated_event(self) -> radroots_event::admission::ContractValidatedEvent +pub fn radroots_event::admission::AdmittedEvent::make_visible_with<P>(self, &P) -> core::result::Result<radroots_event::admission::VisibleEvent, <P as radroots_event::admission::VisibilityPolicy>::Error> where P: radroots_event::admission::VisibilityPolicy + ?core::marker::Sized +pub const fn radroots_event::admission::AdmittedEvent::policy_id(&self) -> &'static str +pub const fn radroots_event::admission::AdmittedEvent::validated_event(&self) -> &radroots_event::admission::ContractValidatedEvent +pub struct radroots_event::admission::ContractValidatedEvent +impl radroots_event::admission::ContractValidatedEvent +pub fn radroots_event::admission::ContractValidatedEvent::admit_with<P>(self, &P) -> core::result::Result<radroots_event::admission::AdmittedEvent, <P as radroots_event::admission::AdmissionPolicy>::Error> where P: radroots_event::admission::AdmissionPolicy + ?core::marker::Sized +impl radroots_event::admission::ContractValidatedEvent +pub const fn radroots_event::admission::ContractValidatedEvent::contract(&self) -> &'static RadrootsEventContract +pub const fn radroots_event::admission::ContractValidatedEvent::contract_id(&self) -> &'static str +pub const fn radroots_event::admission::ContractValidatedEvent::event(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::admission::ContractValidatedEvent::into_event(self) -> radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::admission::ContractValidatedEvent::into_verified_event(self) -> radroots_event::VerifiedEvent +pub const fn radroots_event::admission::ContractValidatedEvent::verified_event(&self) -> &radroots_event::VerifiedEvent +pub struct radroots_event::admission::IdVerifiedEvent(_) +impl radroots_event::admission::IdVerifiedEvent +pub const fn radroots_event::admission::IdVerifiedEvent::event(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::admission::IdVerifiedEvent::into_event(self) -> radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::admission::IdVerifiedEvent::verify_signature(self) -> core::result::Result<radroots_event::VerifiedEvent, radroots_event::Error> +pub struct radroots_event::admission::RawEvent(_) +impl radroots_event::admission::RawEvent +pub const fn radroots_event::admission::RawEvent::event(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::admission::RawEvent::into_event(self) -> radroots_event::envelope::RadrootsEventEnvelope +pub const fn radroots_event::admission::RawEvent::new(radroots_event::envelope::RadrootsEventEnvelope) -> Self +pub fn radroots_event::admission::RawEvent::verify_id(self) -> core::result::Result<radroots_event::admission::IdVerifiedEvent, radroots_event::Error> +pub struct radroots_event::admission::SignatureVerifiedEvent(_) +impl radroots_event::VerifiedEvent +pub const fn radroots_event::VerifiedEvent::event(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::VerifiedEvent::into_event(self) -> radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::VerifiedEvent::validate_contract(self) -> core::result::Result<radroots_event::admission::ContractValidatedEvent, radroots_event::Error> +pub struct radroots_event::admission::VisibleEvent +impl radroots_event::admission::VisibleEvent +pub const fn radroots_event::admission::VisibleEvent::admitted_event(&self) -> &radroots_event::admission::AdmittedEvent +pub const fn radroots_event::admission::VisibleEvent::event(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::admission::VisibleEvent::into_admitted_event(self) -> radroots_event::admission::AdmittedEvent +pub const fn radroots_event::admission::VisibleEvent::policy_id(&self) -> &'static str +pub trait radroots_event::admission::AdmissionPolicy +pub type radroots_event::admission::AdmissionPolicy::Error +pub fn radroots_event::admission::AdmissionPolicy::admit(&self, &radroots_event::admission::ContractValidatedEvent) -> core::result::Result<(), Self::Error> +pub fn radroots_event::admission::AdmissionPolicy::policy_id(&self) -> &'static str +pub trait radroots_event::admission::VisibilityPolicy +pub type radroots_event::admission::VisibilityPolicy::Error +pub fn radroots_event::admission::VisibilityPolicy::make_visible(&self, &radroots_event::admission::AdmittedEvent) -> core::result::Result<(), Self::Error> +pub fn radroots_event::admission::VisibilityPolicy::policy_id(&self) -> &'static str +pub mod radroots_event::calendar +#[non_exhaustive] pub enum radroots_event::calendar::RadrootsCalendarAdmissionError +pub radroots_event::calendar::RadrootsCalendarAdmissionError::AuthorHintMismatch +pub radroots_event::calendar::RadrootsCalendarAdmissionError::CoveredDayLimitExceeded +pub radroots_event::calendar::RadrootsCalendarAdmissionError::CoveredDayLimitExceeded::actual: u64 +pub radroots_event::calendar::RadrootsCalendarAdmissionError::CoveredDayLimitExceeded::max: u64 +pub radroots_event::calendar::RadrootsCalendarAdmissionError::DuplicateEventReference +pub radroots_event::calendar::RadrootsCalendarAdmissionError::ForbiddenDateDayIndex +pub radroots_event::calendar::RadrootsCalendarAdmissionError::IncompleteDayCoverage +pub radroots_event::calendar::RadrootsCalendarAdmissionError::NonBlossomImage +pub radroots_event::calendar::RadrootsCalendarAdmissionError::NonCanonicalField(&'static str) +impl radroots_event::calendar::RadrootsCalendarAdmissionError +pub const fn radroots_event::calendar::RadrootsCalendarAdmissionError::code(&self) -> &'static str +impl core::error::Error for radroots_event::calendar::RadrootsCalendarAdmissionError +impl core::fmt::Display for radroots_event::calendar::RadrootsCalendarAdmissionError +pub fn radroots_event::calendar::RadrootsCalendarAdmissionError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +#[non_exhaustive] pub enum radroots_event::calendar::RadrootsCalendarEventError +pub radroots_event::calendar::RadrootsCalendarEventError::AuthorHintMismatch +pub radroots_event::calendar::RadrootsCalendarEventError::ContentTooLarge +pub radroots_event::calendar::RadrootsCalendarEventError::ContentTooLarge::actual: usize +pub radroots_event::calendar::RadrootsCalendarEventError::ContentTooLarge::max: usize +pub radroots_event::calendar::RadrootsCalendarEventError::CoveredDayLimitExceeded +pub radroots_event::calendar::RadrootsCalendarEventError::CoveredDayLimitExceeded::actual: u64 +pub radroots_event::calendar::RadrootsCalendarEventError::CoveredDayLimitExceeded::max: u64 +pub radroots_event::calendar::RadrootsCalendarEventError::DeclinedFreeBusyForbidden +pub radroots_event::calendar::RadrootsCalendarEventError::DuplicateEventReference +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidAuthorReference +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidCalendarUid +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidDate +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidEventReference +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidGeohash +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidIdentifier +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidParticipant +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidParticipant::index: usize +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidRange +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidRevisionReference +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidText(&'static str) +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidTimeZone +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidTitle +pub radroots_event::calendar::RadrootsCalendarEventError::InvalidUrl(&'static str) +pub radroots_event::calendar::RadrootsCalendarEventError::TagBytesExceeded +pub radroots_event::calendar::RadrootsCalendarEventError::TagBytesExceeded::actual: usize +pub radroots_event::calendar::RadrootsCalendarEventError::TagBytesExceeded::max: usize +pub radroots_event::calendar::RadrootsCalendarEventError::TagCountExceeded +pub radroots_event::calendar::RadrootsCalendarEventError::TagCountExceeded::actual: usize +pub radroots_event::calendar::RadrootsCalendarEventError::TagCountExceeded::max: usize +pub radroots_event::calendar::RadrootsCalendarEventError::TagElementTooLarge +pub radroots_event::calendar::RadrootsCalendarEventError::TagElementTooLarge::actual: usize +pub radroots_event::calendar::RadrootsCalendarEventError::TagElementTooLarge::field: &'static str +pub radroots_event::calendar::RadrootsCalendarEventError::TagElementTooLarge::max: usize +pub radroots_event::calendar::RadrootsCalendarEventError::TooManyParticipants +pub radroots_event::calendar::RadrootsCalendarEventError::TooManyParticipants::actual: usize +pub radroots_event::calendar::RadrootsCalendarEventError::TooManyParticipants::max: usize +impl radroots_event::calendar::RadrootsCalendarEventError +pub const fn radroots_event::calendar::RadrootsCalendarEventError::code(&self) -> &'static str +impl core::error::Error for radroots_event::calendar::RadrootsCalendarEventError +impl core::fmt::Display for radroots_event::calendar::RadrootsCalendarEventError +pub fn radroots_event::calendar::RadrootsCalendarEventError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::calendar::RadrootsCalendarEventFreeBusy +pub radroots_event::calendar::RadrootsCalendarEventFreeBusy::Busy +pub radroots_event::calendar::RadrootsCalendarEventFreeBusy::Free +pub enum radroots_event::calendar::RadrootsCalendarEventRsvpStatus +pub radroots_event::calendar::RadrootsCalendarEventRsvpStatus::Accepted +pub radroots_event::calendar::RadrootsCalendarEventRsvpStatus::Declined +pub radroots_event::calendar::RadrootsCalendarEventRsvpStatus::Tentative +pub struct radroots_event::calendar::RadrootsAdmittedCalendar +impl radroots_event::calendar::RadrootsAdmittedCalendar +pub fn radroots_event::calendar::RadrootsAdmittedCalendar::blossom_image(&self) -> core::option::Option<&radroots_blossom::url::BlobUrl> +pub fn radroots_event::calendar::RadrootsAdmittedCalendar::content(&self) -> &str +pub fn radroots_event::calendar::RadrootsAdmittedCalendar::event_references(&self) -> &[radroots_event::calendar::RadrootsCalendarEventReference] +pub fn radroots_event::calendar::RadrootsAdmittedCalendar::list_description(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAdmittedCalendar::parsed(&self) -> &radroots_event::calendar::RadrootsParsedNip52Calendar +pub fn radroots_event::calendar::RadrootsAdmittedCalendar::title(&self) -> &str +pub fn radroots_event::calendar::RadrootsAdmittedCalendar::try_from_parsed(radroots_event::calendar::RadrootsParsedNip52Calendar) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarAdmissionError> +pub fn radroots_event::calendar::RadrootsAdmittedCalendar::uid(&self) -> &radroots_event::calendar::RadrootsCalendarUid +pub struct radroots_event::calendar::RadrootsAdmittedCalendarDateEvent +impl radroots_event::calendar::RadrootsAdmittedCalendarDateEvent +pub fn radroots_event::calendar::RadrootsAdmittedCalendarDateEvent::blossom_image(&self) -> core::option::Option<&radroots_blossom::url::BlobUrl> +pub fn radroots_event::calendar::RadrootsAdmittedCalendarDateEvent::d_tag(&self) -> &radroots_event::id::RadrootsDTag +pub fn radroots_event::calendar::RadrootsAdmittedCalendarDateEvent::parsed(&self) -> &radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent +pub fn radroots_event::calendar::RadrootsAdmittedCalendarDateEvent::try_from_parsed(radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarAdmissionError> +pub struct radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp +impl radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::author_hint(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventAuthorReference> +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::effective_free_busy(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventFreeBusy> +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::event_reference(&self) -> &radroots_event::calendar::RadrootsCalendarEventReference +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::note(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::observed_free_busy(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventFreeBusy> +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::parsed(&self) -> &radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::revision_reference(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventRevisionReference> +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::status(&self) -> &radroots_event::calendar::RadrootsCalendarEventRsvpStatus +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::try_from_parsed(radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarAdmissionError> +pub fn radroots_event::calendar::RadrootsAdmittedCalendarEventRsvp::uid(&self) -> &radroots_event::calendar::RadrootsCalendarUid +pub struct radroots_event::calendar::RadrootsAdmittedCalendarTimeEvent +impl radroots_event::calendar::RadrootsAdmittedCalendarTimeEvent +pub fn radroots_event::calendar::RadrootsAdmittedCalendarTimeEvent::blossom_image(&self) -> core::option::Option<&radroots_blossom::url::BlobUrl> +pub fn radroots_event::calendar::RadrootsAdmittedCalendarTimeEvent::covered_utc_days(&self) -> &[u64] +pub fn radroots_event::calendar::RadrootsAdmittedCalendarTimeEvent::d_tag(&self) -> &radroots_event::id::RadrootsDTag +pub fn radroots_event::calendar::RadrootsAdmittedCalendarTimeEvent::parsed(&self) -> &radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent +pub fn radroots_event::calendar::RadrootsAdmittedCalendarTimeEvent::try_from_parsed(radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarAdmissionError> +pub struct radroots_event::calendar::RadrootsAuthoredCalendar +impl radroots_event::calendar::RadrootsAuthoredCalendar +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::content(&self) -> &str +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::event_references(&self) -> &[radroots_event::calendar::RadrootsCalendarEventReference] +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::image(&self) -> core::option::Option<&radroots_event::media::RadrootsAuthoredImage> +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::list_description(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::new(radroots_event::calendar::RadrootsCalendarUid, impl core::convert::Into<alloc::string::String>, impl core::convert::Into<alloc::string::String>, alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarEventReference>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::title(&self) -> &str +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::uid(&self) -> &radroots_event::calendar::RadrootsCalendarUid +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::with_image(self, radroots_event::media::RadrootsAuthoredImage) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendar::with_list_description(self, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub struct radroots_event::calendar::RadrootsAuthoredCalendarDateEvent +impl radroots_event::calendar::RadrootsAuthoredCalendarDateEvent +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::calendar_requests(&self) -> &[radroots_event::calendar::RadrootsCalendarRequest] +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::categories(&self) -> &[alloc::string::String] +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::d_tag(&self) -> &radroots_event::id::RadrootsDTag +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::description(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::end(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarDate> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::geohash(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::image(&self) -> core::option::Option<&radroots_event::media::RadrootsAuthoredImage> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::locations(&self) -> &[alloc::string::String] +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::new(impl core::convert::AsRef<str>, impl core::convert::Into<alloc::string::String>, radroots_event::calendar::RadrootsCalendarDate) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::participants(&self) -> core::option::Option<&alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarParticipant>> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::references(&self) -> &[radroots_event::calendar::RadrootsCalendarUri] +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::start(&self) -> &radroots_event::calendar::RadrootsCalendarDate +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::summary(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::title(&self) -> &str +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_calendar_requests(self, alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarRequest>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_categories(self, alloc::vec::Vec<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_description(self, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_end(self, radroots_event::calendar::RadrootsCalendarDate) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_geohash(self, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_image(self, radroots_event::media::RadrootsAuthoredImage) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_locations(self, alloc::vec::Vec<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_participants(self, alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarParticipant>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_references(self, alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarUri>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarDateEvent::with_summary(self, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub struct radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp +impl radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::author_hint(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventAuthorReference> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::effective_free_busy(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventFreeBusy> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::event_reference(&self) -> &radroots_event::calendar::RadrootsCalendarEventReference +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::new(radroots_event::calendar::RadrootsCalendarUid, radroots_event::calendar::RadrootsCalendarEventReference, radroots_event::calendar::RadrootsCalendarEventRsvpStatus) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::note(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::observed_free_busy(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventFreeBusy> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::revision_reference(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventRevisionReference> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::status(&self) -> &radroots_event::calendar::RadrootsCalendarEventRsvpStatus +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::uid(&self) -> &radroots_event::calendar::RadrootsCalendarUid +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::with_author_hint(self, radroots_event::calendar::RadrootsCalendarEventAuthorReference) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::with_free_busy(self, radroots_event::calendar::RadrootsCalendarEventFreeBusy) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::with_note(self, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarEventRsvp::with_revision_reference(self, radroots_event::calendar::RadrootsCalendarEventRevisionReference) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub struct radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent +impl radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::calendar_requests(&self) -> &[radroots_event::calendar::RadrootsCalendarRequest] +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::categories(&self) -> &[alloc::string::String] +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::d_tag(&self) -> &radroots_event::id::RadrootsDTag +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::description(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::effective_end_tzid(&self) -> core::option::Option<&radroots_event::calendar::RadrootsIanaTimeZoneId> +pub const fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::end(&self) -> core::option::Option<u64> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::end_tzid(&self) -> core::option::Option<&radroots_event::calendar::RadrootsIanaTimeZoneId> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::geohash(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::image(&self) -> core::option::Option<&radroots_event::media::RadrootsAuthoredImage> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::locations(&self) -> &[alloc::string::String] +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::new(impl core::convert::AsRef<str>, impl core::convert::Into<alloc::string::String>, u64) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::participants(&self) -> core::option::Option<&alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarParticipant>> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::references(&self) -> &[radroots_event::calendar::RadrootsCalendarUri] +pub const fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::start(&self) -> u64 +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::start_tzid(&self) -> core::option::Option<&radroots_event::calendar::RadrootsIanaTimeZoneId> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::summary(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::title(&self) -> &str +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_calendar_requests(self, alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarRequest>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_categories(self, alloc::vec::Vec<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_description(self, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_end(self, u64) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_end_tzid(self, impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_geohash(self, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_image(self, radroots_event::media::RadrootsAuthoredImage) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_locations(self, alloc::vec::Vec<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_participants(self, alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarParticipant>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_references(self, alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarUri>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_start_tzid(self, impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsAuthoredCalendarTimeEvent::with_summary(self, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub struct radroots_event::calendar::RadrootsCalendarDate(_) +impl radroots_event::calendar::RadrootsCalendarDate +pub fn radroots_event::calendar::RadrootsCalendarDate::as_str(&self) -> &str +pub fn radroots_event::calendar::RadrootsCalendarDate::parse(&str) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +impl core::convert::AsRef<str> for radroots_event::calendar::RadrootsCalendarDate +pub fn radroots_event::calendar::RadrootsCalendarDate::as_ref(&self) -> &str +impl core::fmt::Display for radroots_event::calendar::RadrootsCalendarDate +pub fn radroots_event::calendar::RadrootsCalendarDate::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::calendar::RadrootsCalendarDate +pub type radroots_event::calendar::RadrootsCalendarDate::Err = radroots_event::calendar::RadrootsCalendarEventError +pub fn radroots_event::calendar::RadrootsCalendarDate::from_str(&str) -> core::result::Result<Self, Self::Err> +impl serde_core::ser::Serialize for radroots_event::calendar::RadrootsCalendarDate +pub fn radroots_event::calendar::RadrootsCalendarDate::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::calendar::RadrootsCalendarDate +pub fn radroots_event::calendar::RadrootsCalendarDate::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::calendar::RadrootsCalendarEventAuthorReference +impl radroots_event::calendar::RadrootsCalendarEventAuthorReference +pub fn radroots_event::calendar::RadrootsCalendarEventAuthorReference::is_canonical(&self) -> bool +pub fn radroots_event::calendar::RadrootsCalendarEventAuthorReference::parse(impl core::convert::AsRef<str>, core::option::Option<&str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsCalendarEventAuthorReference::pubkey(&self) -> &radroots_identity::key::PublicKey +pub fn radroots_event::calendar::RadrootsCalendarEventAuthorReference::raw_pubkey(&self) -> &str +pub fn radroots_event::calendar::RadrootsCalendarEventAuthorReference::relay(&self) -> core::option::Option<&str> +pub struct radroots_event::calendar::RadrootsCalendarEventReference +impl radroots_event::calendar::RadrootsCalendarEventReference +pub fn radroots_event::calendar::RadrootsCalendarEventReference::author(&self) -> &radroots_identity::key::PublicKey +pub fn radroots_event::calendar::RadrootsCalendarEventReference::coordinate(&self) -> &radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::calendar::RadrootsCalendarEventReference::d_tag(&self) -> &radroots_event::id::RadrootsDTag +pub fn radroots_event::calendar::RadrootsCalendarEventReference::is_canonical(&self) -> bool +pub const fn radroots_event::calendar::RadrootsCalendarEventReference::kind(&self) -> u32 +pub fn radroots_event::calendar::RadrootsCalendarEventReference::parse(impl core::convert::AsRef<str>, core::option::Option<&str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsCalendarEventReference::relay(&self) -> core::option::Option<&str> +pub struct radroots_event::calendar::RadrootsCalendarEventRevisionReference +impl radroots_event::calendar::RadrootsCalendarEventRevisionReference +pub fn radroots_event::calendar::RadrootsCalendarEventRevisionReference::event_id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::calendar::RadrootsCalendarEventRevisionReference::is_canonical(&self) -> bool +pub fn radroots_event::calendar::RadrootsCalendarEventRevisionReference::parse(impl core::convert::AsRef<str>, core::option::Option<&str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsCalendarEventRevisionReference::raw_event_id(&self) -> &str +pub fn radroots_event::calendar::RadrootsCalendarEventRevisionReference::relay(&self) -> core::option::Option<&str> +pub struct radroots_event::calendar::RadrootsCalendarParticipant +pub radroots_event::calendar::RadrootsCalendarParticipant::pubkey: alloc::string::String +pub radroots_event::calendar::RadrootsCalendarParticipant::relay: core::option::Option<alloc::string::String> +pub radroots_event::calendar::RadrootsCalendarParticipant::role: core::option::Option<alloc::string::String> +pub struct radroots_event::calendar::RadrootsCalendarRequest +impl radroots_event::calendar::RadrootsCalendarRequest +pub fn radroots_event::calendar::RadrootsCalendarRequest::calendar(&self) -> &radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::calendar::RadrootsCalendarRequest::is_canonical(&self) -> bool +pub fn radroots_event::calendar::RadrootsCalendarRequest::new(impl core::convert::AsRef<str>, core::option::Option<&str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsCalendarRequest::relay(&self) -> core::option::Option<&str> +pub struct radroots_event::calendar::RadrootsCalendarUid(_) +impl radroots_event::calendar::RadrootsCalendarUid +pub fn radroots_event::calendar::RadrootsCalendarUid::as_str(&self) -> &str +pub fn radroots_event::calendar::RadrootsCalendarUid::into_string(self) -> alloc::string::String +pub fn radroots_event::calendar::RadrootsCalendarUid::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +impl core::convert::AsRef<str> for radroots_event::calendar::RadrootsCalendarUid +pub fn radroots_event::calendar::RadrootsCalendarUid::as_ref(&self) -> &str +impl core::convert::TryFrom<&str> for radroots_event::calendar::RadrootsCalendarUid +pub type radroots_event::calendar::RadrootsCalendarUid::Error = radroots_event::calendar::RadrootsCalendarEventError +pub fn radroots_event::calendar::RadrootsCalendarUid::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::calendar::RadrootsCalendarUid +pub type radroots_event::calendar::RadrootsCalendarUid::Error = radroots_event::calendar::RadrootsCalendarEventError +pub fn radroots_event::calendar::RadrootsCalendarUid::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::calendar::RadrootsCalendarUid +pub fn radroots_event::calendar::RadrootsCalendarUid::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::calendar::RadrootsCalendarUid +pub type radroots_event::calendar::RadrootsCalendarUid::Err = radroots_event::calendar::RadrootsCalendarEventError +pub fn radroots_event::calendar::RadrootsCalendarUid::from_str(&str) -> core::result::Result<Self, Self::Err> +impl serde_core::ser::Serialize for radroots_event::calendar::RadrootsCalendarUid +pub fn radroots_event::calendar::RadrootsCalendarUid::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +pub struct radroots_event::calendar::RadrootsCalendarUri(_) +impl radroots_event::calendar::RadrootsCalendarUri +pub fn radroots_event::calendar::RadrootsCalendarUri::as_str(&self) -> &str +pub fn radroots_event::calendar::RadrootsCalendarUri::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +impl core::convert::AsRef<str> for radroots_event::calendar::RadrootsCalendarUri +pub fn radroots_event::calendar::RadrootsCalendarUri::as_ref(&self) -> &str +impl core::fmt::Display for radroots_event::calendar::RadrootsCalendarUri +pub fn radroots_event::calendar::RadrootsCalendarUri::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::calendar::RadrootsCalendarUri +pub type radroots_event::calendar::RadrootsCalendarUri::Err = radroots_event::calendar::RadrootsCalendarEventError +pub fn radroots_event::calendar::RadrootsCalendarUri::from_str(&str) -> core::result::Result<Self, Self::Err> +impl serde_core::ser::Serialize for radroots_event::calendar::RadrootsCalendarUri +pub fn radroots_event::calendar::RadrootsCalendarUri::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::calendar::RadrootsCalendarUri +pub fn radroots_event::calendar::RadrootsCalendarUri::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::calendar::RadrootsIanaTimeZoneId(_) +impl radroots_event::calendar::RadrootsIanaTimeZoneId +pub fn radroots_event::calendar::RadrootsIanaTimeZoneId::as_str(&self) -> &str +pub fn radroots_event::calendar::RadrootsIanaTimeZoneId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +impl core::convert::AsRef<str> for radroots_event::calendar::RadrootsIanaTimeZoneId +pub fn radroots_event::calendar::RadrootsIanaTimeZoneId::as_ref(&self) -> &str +impl core::fmt::Display for radroots_event::calendar::RadrootsIanaTimeZoneId +pub fn radroots_event::calendar::RadrootsIanaTimeZoneId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::calendar::RadrootsIanaTimeZoneId +pub type radroots_event::calendar::RadrootsIanaTimeZoneId::Err = radroots_event::calendar::RadrootsCalendarEventError +pub fn radroots_event::calendar::RadrootsIanaTimeZoneId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl serde_core::ser::Serialize for radroots_event::calendar::RadrootsIanaTimeZoneId +pub fn radroots_event::calendar::RadrootsIanaTimeZoneId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::calendar::RadrootsIanaTimeZoneId +pub fn radroots_event::calendar::RadrootsIanaTimeZoneId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::calendar::RadrootsObservedUtcDay +impl radroots_event::calendar::RadrootsObservedUtcDay +pub const fn radroots_event::calendar::RadrootsObservedUtcDay::index(&self) -> u64 +pub fn radroots_event::calendar::RadrootsObservedUtcDay::is_canonical(&self) -> bool +pub fn radroots_event::calendar::RadrootsObservedUtcDay::parse(impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub fn radroots_event::calendar::RadrootsObservedUtcDay::wire_value(&self) -> &str +pub struct radroots_event::calendar::RadrootsParsedNip52Calendar +impl radroots_event::calendar::RadrootsParsedNip52Calendar +pub fn radroots_event::calendar::RadrootsParsedNip52Calendar::content(&self) -> &str +pub fn radroots_event::calendar::RadrootsParsedNip52Calendar::d_tag(&self) -> &str +pub fn radroots_event::calendar::RadrootsParsedNip52Calendar::event_references(&self) -> &[radroots_event::calendar::RadrootsCalendarEventReference] +pub fn radroots_event::calendar::RadrootsParsedNip52Calendar::image(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarUri> +pub fn radroots_event::calendar::RadrootsParsedNip52Calendar::list_description(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsParsedNip52Calendar::title(&self) -> &str +pub fn radroots_event::calendar::RadrootsParsedNip52Calendar::try_new(radroots_event::calendar::RadrootsParsedNip52CalendarParts) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub struct radroots_event::calendar::RadrootsParsedNip52CalendarCommon +impl radroots_event::calendar::RadrootsParsedNip52CalendarCommon +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::calendar_requests(&self) -> &[radroots_event::calendar::RadrootsCalendarRequest] +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::categories(&self) -> &[alloc::string::String] +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::d_tag(&self) -> &str +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::description(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::geohash(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::image(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarUri> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::legacy_name(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::locations(&self) -> &[alloc::string::String] +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::participants(&self) -> &[radroots_event::calendar::RadrootsCalendarParticipant] +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::references(&self) -> &[radroots_event::calendar::RadrootsCalendarUri] +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::summary(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::title(&self) -> &str +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarCommon::try_new(radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub struct radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::calendar_requests: alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarRequest> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::categories: alloc::vec::Vec<alloc::string::String> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::d_tag: alloc::string::String +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::description: core::option::Option<alloc::string::String> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::geohash: core::option::Option<alloc::string::String> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::image: core::option::Option<radroots_event::calendar::RadrootsCalendarUri> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::legacy_name: core::option::Option<alloc::string::String> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::locations: alloc::vec::Vec<alloc::string::String> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::participants: alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarParticipant> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::references: alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarUri> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::summary: core::option::Option<alloc::string::String> +pub radroots_event::calendar::RadrootsParsedNip52CalendarCommonParts::title: alloc::string::String +pub struct radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent +impl radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent::common(&self) -> &radroots_event::calendar::RadrootsParsedNip52CalendarCommon +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent::end(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarDate> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent::extension_day_tags(&self) -> &[alloc::vec::Vec<alloc::string::String>] +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent::start(&self) -> &radroots_event::calendar::RadrootsCalendarDate +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarDateEvent::try_new(radroots_event::calendar::RadrootsParsedNip52CalendarCommon, radroots_event::calendar::RadrootsCalendarDate, core::option::Option<radroots_event::calendar::RadrootsCalendarDate>, alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub struct radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp +impl radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::author_hint(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventAuthorReference> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::d_tag(&self) -> &str +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::effective_free_busy(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventFreeBusy> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::event_reference(&self) -> &radroots_event::calendar::RadrootsCalendarEventReference +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::note(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::observed_free_busy(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventFreeBusy> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::revision_reference(&self) -> core::option::Option<&radroots_event::calendar::RadrootsCalendarEventRevisionReference> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::status(&self) -> &radroots_event::calendar::RadrootsCalendarEventRsvpStatus +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvp::try_new(radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub struct radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts +pub radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts::author_hint: core::option::Option<radroots_event::calendar::RadrootsCalendarEventAuthorReference> +pub radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts::d_tag: alloc::string::String +pub radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts::event_reference: radroots_event::calendar::RadrootsCalendarEventReference +pub radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts::note: core::option::Option<alloc::string::String> +pub radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts::observed_free_busy: core::option::Option<radroots_event::calendar::RadrootsCalendarEventFreeBusy> +pub radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts::revision_reference: core::option::Option<radroots_event::calendar::RadrootsCalendarEventRevisionReference> +pub radroots_event::calendar::RadrootsParsedNip52CalendarEventRsvpParts::status: radroots_event::calendar::RadrootsCalendarEventRsvpStatus +pub struct radroots_event::calendar::RadrootsParsedNip52CalendarParts +pub radroots_event::calendar::RadrootsParsedNip52CalendarParts::content: alloc::string::String +pub radroots_event::calendar::RadrootsParsedNip52CalendarParts::d_tag: alloc::string::String +pub radroots_event::calendar::RadrootsParsedNip52CalendarParts::event_references: alloc::vec::Vec<radroots_event::calendar::RadrootsCalendarEventReference> +pub radroots_event::calendar::RadrootsParsedNip52CalendarParts::image: core::option::Option<radroots_event::calendar::RadrootsCalendarUri> +pub radroots_event::calendar::RadrootsParsedNip52CalendarParts::list_description: core::option::Option<alloc::string::String> +pub radroots_event::calendar::RadrootsParsedNip52CalendarParts::title: alloc::string::String +pub struct radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent +impl radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::common(&self) -> &radroots_event::calendar::RadrootsParsedNip52CalendarCommon +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::effective_end_tzid(&self) -> core::option::Option<&radroots_event::calendar::RadrootsIanaTimeZoneId> +pub const fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::end(&self) -> core::option::Option<u64> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::end_tzid(&self) -> core::option::Option<&radroots_event::calendar::RadrootsIanaTimeZoneId> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::end_wire(&self) -> core::option::Option<&str> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::observed_day_indices(&self) -> &[radroots_event::calendar::RadrootsObservedUtcDay] +pub const fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::start(&self) -> u64 +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::start_tzid(&self) -> core::option::Option<&radroots_event::calendar::RadrootsIanaTimeZoneId> +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::start_wire(&self) -> &str +pub fn radroots_event::calendar::RadrootsParsedNip52CalendarTimeEvent::try_new(radroots_event::calendar::RadrootsParsedNip52CalendarCommon, alloc::string::String, u64, core::option::Option<alloc::string::String>, core::option::Option<u64>, alloc::vec::Vec<radroots_event::calendar::RadrootsObservedUtcDay>, core::option::Option<radroots_event::calendar::RadrootsIanaTimeZoneId>, core::option::Option<radroots_event::calendar::RadrootsIanaTimeZoneId>) -> core::result::Result<Self, radroots_event::calendar::RadrootsCalendarEventError> +pub const radroots_event::calendar::RADROOTS_CALENDAR_MAX_COVERED_UTC_DAYS: u64 +pub const radroots_event::calendar::RADROOTS_CALENDAR_MAX_PARTICIPANTS: usize +pub const radroots_event::calendar::RADROOTS_CALENDAR_SECONDS_PER_DAY: u64 +pub fn radroots_event::calendar::calendar_geohash_is_valid(&str) -> bool +pub fn radroots_event::calendar::calendar_relay_url_is_valid(&str) -> bool +pub fn radroots_event::calendar::calendar_tag_text_is_valid(&str) -> bool +pub fn radroots_event::calendar::canonical_calendar_geohash_is_valid(&str) -> bool +pub fn radroots_event::calendar::canonical_calendar_tag_text_is_valid(&str) -> bool +pub fn radroots_event::calendar::covered_utc_days(u64, core::option::Option<u64>) -> core::result::Result<core::ops::range::RangeInclusive<u64>, radroots_event::calendar::RadrootsCalendarEventError> +pub mod radroots_event::contract +pub const radroots_event::contract::VERSION: &str +pub mod radroots_event::draft +pub enum radroots_event::draft::RadrootsDraftError +pub radroots_event::draft::RadrootsDraftError::CanonicalEventId(crate::wire::v1::RadrootsCanonicalEventIdError) +pub radroots_event::draft::RadrootsDraftError::ContractKindMismatch +pub radroots_event::draft::RadrootsDraftError::ContractKindMismatch::actual_kind: u32 +pub radroots_event::draft::RadrootsDraftError::ContractKindMismatch::contract_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::ContractKindMismatch::expected_kind: u32 +pub radroots_event::draft::RadrootsDraftError::ContractNotDraftAuthorable +pub radroots_event::draft::RadrootsDraftError::ContractNotDraftAuthorable::contract_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::ContractRegistryVersionMismatch +pub radroots_event::draft::RadrootsDraftError::ContractRegistryVersionMismatch::actual: u32 +pub radroots_event::draft::RadrootsDraftError::ContractRegistryVersionMismatch::expected: u32 +pub radroots_event::draft::RadrootsDraftError::ContractShape +pub radroots_event::draft::RadrootsDraftError::ContractShape::contract_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::ContractShape::error: crate::contract::registry_v7::RadrootsContractValidationError +pub radroots_event::draft::RadrootsDraftError::DraftExpectedEventIdMismatch +pub radroots_event::draft::RadrootsDraftError::DraftExpectedEventIdMismatch::actual_event_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::DraftExpectedEventIdMismatch::expected_event_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::Envelope(radroots_event::envelope::RadrootsEventEnvelopeError) +pub radroots_event::draft::RadrootsDraftError::IdParse(radroots_event::id::RadrootsIdParseError) +pub radroots_event::draft::RadrootsDraftError::SignedEvent(radroots_event::draft::RadrootsSignedEventError) +pub radroots_event::draft::RadrootsDraftError::SignedEventComputedIdMismatch +pub radroots_event::draft::RadrootsDraftError::SignedEventComputedIdMismatch::computed_event_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::SignedEventComputedIdMismatch::expected_event_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::SignedEventContentMismatch +pub radroots_event::draft::RadrootsDraftError::SignedEventContentMismatch::actual_len: usize +pub radroots_event::draft::RadrootsDraftError::SignedEventContentMismatch::expected_len: usize +pub radroots_event::draft::RadrootsDraftError::SignedEventCreatedAtMismatch +pub radroots_event::draft::RadrootsDraftError::SignedEventCreatedAtMismatch::actual_created_at: u64 +pub radroots_event::draft::RadrootsDraftError::SignedEventCreatedAtMismatch::expected_created_at: u64 +pub radroots_event::draft::RadrootsDraftError::SignedEventIdMismatch +pub radroots_event::draft::RadrootsDraftError::SignedEventIdMismatch::actual_event_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::SignedEventIdMismatch::expected_event_id: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::SignedEventKindMismatch +pub radroots_event::draft::RadrootsDraftError::SignedEventKindMismatch::actual_kind: u32 +pub radroots_event::draft::RadrootsDraftError::SignedEventKindMismatch::expected_kind: u32 +pub radroots_event::draft::RadrootsDraftError::SignedEventPubkeyMismatch +pub radroots_event::draft::RadrootsDraftError::SignedEventPubkeyMismatch::actual_pubkey: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::SignedEventPubkeyMismatch::expected_pubkey: alloc::string::String +pub radroots_event::draft::RadrootsDraftError::SignedEventTagsMismatch +pub radroots_event::draft::RadrootsDraftError::SignedEventTagsMismatch::actual_len: usize +pub radroots_event::draft::RadrootsDraftError::SignedEventTagsMismatch::expected_len: usize +pub radroots_event::draft::RadrootsDraftError::UnknownContract(alloc::string::String) +impl core::convert::From<radroots_event::draft::RadrootsSignedEventError> for radroots_event::draft::RadrootsDraftError +pub fn radroots_event::draft::RadrootsDraftError::from(radroots_event::draft::RadrootsSignedEventError) -> Self +impl core::convert::From<radroots_event::envelope::RadrootsEventEnvelopeError> for radroots_event::draft::RadrootsDraftError +pub fn radroots_event::draft::RadrootsDraftError::from(radroots_event::envelope::RadrootsEventEnvelopeError) -> Self +impl core::convert::From<radroots_event::id::RadrootsIdParseError> for radroots_event::draft::RadrootsDraftError +pub fn radroots_event::draft::RadrootsDraftError::from(radroots_event::id::RadrootsIdParseError) -> Self +impl core::error::Error for radroots_event::draft::RadrootsDraftError +impl core::fmt::Display for radroots_event::draft::RadrootsDraftError +pub fn radroots_event::draft::RadrootsDraftError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::draft::RadrootsSignatureVerificationError +pub radroots_event::draft::RadrootsSignatureVerificationError::InvalidEventId +pub radroots_event::draft::RadrootsSignatureVerificationError::InvalidPubkey +pub radroots_event::draft::RadrootsSignatureVerificationError::InvalidSignature +pub radroots_event::draft::RadrootsSignatureVerificationError::VerificationFailed +impl core::error::Error for radroots_event::draft::RadrootsSignatureVerificationError +impl core::fmt::Display for radroots_event::draft::RadrootsSignatureVerificationError +pub fn radroots_event::draft::RadrootsSignatureVerificationError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::draft::RadrootsSignedEventError +pub radroots_event::draft::RadrootsSignedEventError::Envelope(radroots_event::envelope::RadrootsEventEnvelopeError) +pub radroots_event::draft::RadrootsSignedEventError::RawJson(crate::wire::v1::RadrootsEventWireError) +pub radroots_event::draft::RadrootsSignedEventError::RawJsonMismatch +pub radroots_event::draft::RadrootsSignedEventError::Wire(crate::wire::v1::RadrootsEventWireError) +impl core::convert::From<radroots_event::draft::RadrootsSignedEventError> for radroots_event::draft::RadrootsDraftError +pub fn radroots_event::draft::RadrootsDraftError::from(radroots_event::draft::RadrootsSignedEventError) -> Self +impl core::convert::From<radroots_event::envelope::RadrootsEventEnvelopeError> for radroots_event::draft::RadrootsSignedEventError +pub fn radroots_event::draft::RadrootsSignedEventError::from(radroots_event::envelope::RadrootsEventEnvelopeError) -> Self +impl core::error::Error for radroots_event::draft::RadrootsSignedEventError +impl core::fmt::Display for radroots_event::draft::RadrootsSignedEventError +pub fn radroots_event::draft::RadrootsSignedEventError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::draft::RadrootsEventDraft +impl radroots_event::draft::RadrootsEventDraft +pub fn radroots_event::draft::RadrootsEventDraft::content(&self) -> &str +pub fn radroots_event::draft::RadrootsEventDraft::contract_id(&self) -> &str +pub fn radroots_event::draft::RadrootsEventDraft::contract_registry_version(&self) -> u32 +pub fn radroots_event::draft::RadrootsEventDraft::created_at(&self) -> radroots_event::envelope::RadrootsEventTimestamp +pub fn radroots_event::draft::RadrootsEventDraft::created_at_u64(&self) -> u64 +pub fn radroots_event::draft::RadrootsEventDraft::expected_event_id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::draft::RadrootsEventDraft::expected_event_id_hex(&self) -> alloc::string::String +pub fn radroots_event::draft::RadrootsEventDraft::expected_pubkey(&self) -> &radroots_identity::key::PublicKey +pub fn radroots_event::draft::RadrootsEventDraft::kind(&self) -> radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::draft::RadrootsEventDraft::kind_u32(&self) -> u32 +pub fn radroots_event::draft::RadrootsEventDraft::new(impl core::convert::Into<alloc::string::String>, u32, u64, alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>>, impl core::convert::Into<alloc::string::String>, impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::draft::RadrootsDraftError> +pub fn radroots_event::draft::RadrootsEventDraft::nip01_preimage(&self) -> core::result::Result<alloc::string::String, radroots_event::draft::RadrootsDraftError> +pub fn radroots_event::draft::RadrootsEventDraft::tags(&self) -> &radroots_event::envelope::RadrootsEventTags +pub fn radroots_event::draft::RadrootsEventDraft::tags_as_vec(&self) -> alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub fn radroots_event::draft::RadrootsEventDraft::validate_for_signing(&self) -> core::result::Result<(), radroots_event::draft::RadrootsDraftError> +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::draft::RadrootsEventDraft +pub fn radroots_event::draft::RadrootsEventDraft::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::draft::RadrootsSignedEvent +impl radroots_event::draft::RadrootsSignedEvent +pub fn radroots_event::draft::RadrootsSignedEvent::content(&self) -> &str +pub fn radroots_event::draft::RadrootsSignedEvent::created_at(&self) -> u64 +pub fn radroots_event::draft::RadrootsSignedEvent::envelope(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::draft::RadrootsSignedEvent::from_wire_verified_id(RadrootsNip01EventWire, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::draft::RadrootsSignedEventError> +pub fn radroots_event::draft::RadrootsSignedEvent::id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::draft::RadrootsSignedEvent::id_hex(&self) -> alloc::string::String +pub fn radroots_event::draft::RadrootsSignedEvent::id_str(&self) -> &str +pub fn radroots_event::draft::RadrootsSignedEvent::kind(&self) -> u32 +pub fn radroots_event::draft::RadrootsSignedEvent::new(radroots_event::draft::RadrootsSignedEventParts) -> core::result::Result<Self, radroots_event::draft::RadrootsSignedEventError> +pub fn radroots_event::draft::RadrootsSignedEvent::pubkey(&self) -> &radroots_identity::key::PublicKey +pub fn radroots_event::draft::RadrootsSignedEvent::raw_json(&self) -> &str +pub fn radroots_event::draft::RadrootsSignedEvent::sig(&self) -> &radroots_event::id::RadrootsEventSignature +pub fn radroots_event::draft::RadrootsSignedEvent::sig_str(&self) -> &str +pub fn radroots_event::draft::RadrootsSignedEvent::signature_hex(&self) -> alloc::string::String +pub fn radroots_event::draft::RadrootsSignedEvent::tags_as_vec(&self) -> alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub fn radroots_event::draft::RadrootsSignedEvent::verify_signature(self) -> core::result::Result<radroots_event::draft::RadrootsVerifiedSignedEvent, radroots_event::draft::RadrootsSignatureVerificationError> +pub fn radroots_event::draft::RadrootsSignedEvent::wire(&self) -> &RadrootsNip01EventWire +impl serde_core::ser::Serialize for radroots_event::draft::RadrootsSignedEvent +pub fn radroots_event::draft::RadrootsSignedEvent::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::draft::RadrootsSignedEvent +pub fn radroots_event::draft::RadrootsSignedEvent::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::draft::RadrootsSignedEventParts +pub radroots_event::draft::RadrootsSignedEventParts::content: alloc::string::String +pub radroots_event::draft::RadrootsSignedEventParts::created_at: u64 +pub radroots_event::draft::RadrootsSignedEventParts::id: alloc::string::String +pub radroots_event::draft::RadrootsSignedEventParts::kind: u32 +pub radroots_event::draft::RadrootsSignedEventParts::pubkey: alloc::string::String +pub radroots_event::draft::RadrootsSignedEventParts::raw_json: alloc::string::String +pub radroots_event::draft::RadrootsSignedEventParts::sig: alloc::string::String +pub radroots_event::draft::RadrootsSignedEventParts::tags: alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub struct radroots_event::draft::RadrootsVerifiedSignedEvent +impl radroots_event::draft::RadrootsVerifiedSignedEvent +pub fn radroots_event::draft::RadrootsVerifiedSignedEvent::into_signed_event(self) -> radroots_event::draft::RadrootsSignedEvent +pub fn radroots_event::draft::RadrootsVerifiedSignedEvent::signed_event(&self) -> &radroots_event::draft::RadrootsSignedEvent +pub fn radroots_event::draft::compute_nip01_event_id(&str, u64, u32, &[alloc::vec::Vec<alloc::string::String>], &str) -> core::result::Result<radroots_event::id::RadrootsEventId, radroots_event::draft::RadrootsDraftError> +pub fn radroots_event::draft::nip01_event_id_preimage(&str, u64, u32, &[alloc::vec::Vec<alloc::string::String>], &str) -> core::result::Result<alloc::string::String, radroots_event::draft::RadrootsDraftError> +pub fn radroots_event::draft::validate_signed_nostr_event_matches_draft(&radroots_event::draft::RadrootsSignedEvent, &radroots_event::draft::RadrootsEventDraft) -> core::result::Result<(), radroots_event::draft::RadrootsDraftError> +pub mod radroots_event::envelope +pub mod radroots_event::envelope::event_head +pub mod radroots_event::envelope::kind +pub const radroots_event::envelope::kind::CLASSIFIED_LISTING_EVENT_KINDS: [u32; 1] +pub const radroots_event::envelope::kind::COMMERCIAL_EVENT_KINDS: [u32; 7] +pub const radroots_event::envelope::kind::EVENTS_CANDIDATE_KINDS: [u32; 4] +pub const radroots_event::envelope::kind::HOME_FEED_CANDIDATE_KINDS: [u32; 9] +pub const radroots_event::envelope::kind::KIND_ACCOUNT_CLAIM: u32 +pub const radroots_event::envelope::kind::KIND_APPLICATION_HANDLER: u32 +pub const radroots_event::envelope::kind::KIND_APP_CUSTOM_DATA: u32 +pub const radroots_event::envelope::kind::KIND_APP_DATA: u32 +pub const radroots_event::envelope::kind::KIND_ARTICLE: u32 +pub const radroots_event::envelope::kind::KIND_CALENDAR: u32 +pub const radroots_event::envelope::kind::KIND_CALENDAR_DATE_EVENT: u32 +pub const radroots_event::envelope::kind::KIND_CALENDAR_EVENT_RSVP: u32 +pub const radroots_event::envelope::kind::KIND_CALENDAR_TIME_EVENT: u32 +pub const radroots_event::envelope::kind::KIND_CLASSIFIED_LISTING: u32 +pub const radroots_event::envelope::kind::KIND_COMMENT: u32 +pub const radroots_event::envelope::kind::KIND_CONTRIBUTION_ATTESTATION: u32 +pub const radroots_event::envelope::kind::KIND_COOP: u32 +pub const radroots_event::envelope::kind::KIND_DELETION_REQUEST: u32 +pub const radroots_event::envelope::kind::KIND_DOCUMENT: u32 +pub const radroots_event::envelope::kind::KIND_EVIDENCE_BOUNTY: u32 +pub const radroots_event::envelope::kind::KIND_FARM: u32 +pub const radroots_event::envelope::kind::KIND_FARM_CRDT_CHANGE: u32 +pub const radroots_event::envelope::kind::KIND_FARM_FILE_METADATA: u32 +pub const radroots_event::envelope::kind::KIND_FARM_WORKSPACE_MANIFEST: u32 +pub const radroots_event::envelope::kind::KIND_FILE_METADATA: u32 +pub const radroots_event::envelope::kind::KIND_FOLLOW: u32 +pub const radroots_event::envelope::kind::KIND_GENERIC_REPOST: u32 +pub const radroots_event::envelope::kind::KIND_GEOCHAT: u32 +pub const radroots_event::envelope::kind::KIND_GIFT_WRAP: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_ADMINS: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_CREATE_GROUP: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_CREATE_INVITE: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_DELETE_EVENT: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_DELETE_GROUP: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_EDIT_METADATA: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_JOIN_REQUEST: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_LEAVE_REQUEST: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_MEMBERS: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_METADATA: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_PUT_USER: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_REMOVE_USER: u32 +pub const radroots_event::envelope::kind::KIND_GROUP_ROLES: u32 +pub const radroots_event::envelope::kind::KIND_HTTP_AUTH: u32 +pub const radroots_event::envelope::kind::KIND_JOB_FEEDBACK: u32 +pub const radroots_event::envelope::kind::KIND_JOB_REQUEST_MAX: u32 +pub const radroots_event::envelope::kind::KIND_JOB_REQUEST_MIN: u32 +pub const radroots_event::envelope::kind::KIND_JOB_RESULT_MAX: u32 +pub const radroots_event::envelope::kind::KIND_JOB_RESULT_MIN: u32 +pub const radroots_event::envelope::kind::KIND_KNOWLEDGE_CHANGE_PROPOSAL: u32 +pub const radroots_event::envelope::kind::KIND_KNOWLEDGE_CLAIM: u32 +pub const radroots_event::envelope::kind::KIND_KNOWLEDGE_FIELD_REPORT: u32 +pub const radroots_event::envelope::kind::KIND_KNOWLEDGE_RELATION: u32 +pub const radroots_event::envelope::kind::KIND_KNOWLEDGE_REVIEW: u32 +pub const radroots_event::envelope::kind::KIND_KNOWLEDGE_SOURCE: u32 +pub const radroots_event::envelope::kind::KIND_LIST_BLOCKED_RELAYS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_BOOKMARKS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_COMMUNITIES: u32 +pub const radroots_event::envelope::kind::KIND_LIST_DM_RELAYS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_EMOJIS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_GOOD_WIKI_AUTHORS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_GOOD_WIKI_RELAYS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_INTERESTS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_MEDIA_FOLLOWS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_MUTE: u32 +pub const radroots_event::envelope::kind::KIND_LIST_PINNED_NOTES: u32 +pub const radroots_event::envelope::kind::KIND_LIST_PUBLIC_CHATS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_READ_WRITE_RELAYS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_RELAY_FEEDS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SEARCH_RELAYS: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_APP_CURATION: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_BOOKMARK: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_CALENDAR: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_CURATION: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_EMOJI: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_FOLLOW: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_GENERIC: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_INTEREST: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_KIND_MUTE: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_MEDIA_STARTER_PACK: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_PICTURE: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_RELAY: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_RELEASE_ARTIFACT: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_STARTER_PACK: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SET_VIDEO: u32 +pub const radroots_event::envelope::kind::KIND_LIST_SIMPLE_GROUPS: u32 +pub const radroots_event::envelope::kind::KIND_MESSAGE: u32 +pub const radroots_event::envelope::kind::KIND_MESSAGE_FILE: u32 +pub const radroots_event::envelope::kind::KIND_ORDER_CANCELLATION: u32 +pub const radroots_event::envelope::kind::KIND_ORDER_DECISION: u32 +pub const radroots_event::envelope::kind::KIND_ORDER_REQUEST: u32 +pub const radroots_event::envelope::kind::KIND_PLOT: u32 +pub const radroots_event::envelope::kind::KIND_POST: u32 +pub const radroots_event::envelope::kind::KIND_PROFILE: u32 +pub const radroots_event::envelope::kind::KIND_PUBLIC_FILE_METADATA: u32 +pub const radroots_event::envelope::kind::KIND_REACTION: u32 +pub const radroots_event::envelope::kind::KIND_RELAY_AUTH: u32 +pub const radroots_event::envelope::kind::KIND_REPORT: u32 +pub const radroots_event::envelope::kind::KIND_REPOST: u32 +pub const radroots_event::envelope::kind::KIND_RESOURCE_AREA: u32 +pub const radroots_event::envelope::kind::KIND_RESOURCE_HARVEST_CAP: u32 +pub const radroots_event::envelope::kind::KIND_SEAL: u32 +pub const radroots_event::envelope::kind::KIND_TRADE_CANCELLATION: u32 +pub const radroots_event::envelope::kind::KIND_TRADE_DECISION: u32 +pub const radroots_event::envelope::kind::KIND_TRADE_FORBIDDEN_3431: u32 +pub const radroots_event::envelope::kind::KIND_TRADE_PROPOSAL: u32 +pub const radroots_event::envelope::kind::KIND_TRADE_REVISION_DECISION: u32 +pub const radroots_event::envelope::kind::KIND_TRADE_REVISION_PROPOSAL: u32 +pub const radroots_event::envelope::kind::KIND_TRADE_SELLER_RESERVATION_ASSERTION: u32 +pub const radroots_event::envelope::kind::KIND_TRADE_VALIDATION_RECEIPT: u32 +pub const radroots_event::envelope::kind::KIND_VALIDATOR_SET: u32 +pub const radroots_event::envelope::kind::KIND_WIKI_ARTICLE: u32 +pub const radroots_event::envelope::kind::KIND_WIKI_MERGE_REQUEST: u32 +pub const radroots_event::envelope::kind::KIND_WIKI_REDIRECT: u32 +pub const radroots_event::envelope::kind::KNOWLEDGE_ADDRESSABLE_EVENT_KINDS: [u32; 4] +pub const radroots_event::envelope::kind::KNOWLEDGE_BETA_EVENT_KINDS: [u32; 3] +pub const radroots_event::envelope::kind::KNOWLEDGE_EVENT_KINDS: [u32; 11] +pub const radroots_event::envelope::kind::KNOWLEDGE_MVP_EVENT_KINDS: [u32; 8] +pub const radroots_event::envelope::kind::KNOWLEDGE_REGULAR_EVENT_KINDS: [u32; 7] +pub const radroots_event::envelope::kind::MAP_CANDIDATE_KINDS: [u32; 7] +pub const radroots_event::envelope::kind::MARKET_CANDIDATE_KINDS: [u32; 3] +pub const radroots_event::envelope::kind::MODERATION_ADMIN_CANDIDATE_KINDS: [u32; 1] +pub const radroots_event::envelope::kind::MVP_SOCIAL_KINDS: [u32; 7] +pub const radroots_event::envelope::kind::NIP29_GROUP_KINDS: [u32; 13] +pub const radroots_event::envelope::kind::ORDER_EVENT_KINDS: [u32; 3] +pub const radroots_event::envelope::kind::PRIVATE_FARM_OPS_KINDS: [u32; 16] +pub const radroots_event::envelope::kind::PRODUCTION_SOCIAL_KINDS: [u32; 4] +pub const radroots_event::envelope::kind::PROFILE_PUBLIC_CONTENT_KINDS: [u32; 8] +pub const radroots_event::envelope::kind::PUBLIC_SOCIAL_KINDS: [u32; 12] +pub const radroots_event::envelope::kind::TRADE_MUTATION_EVENT_KINDS: [u32; 5] +pub const radroots_event::envelope::kind::TRADE_VALIDATION_EVENT_KINDS: [u32; 1] +pub const radroots_event::envelope::kind::UNAMBIGUOUS_PUBLIC_SOCIAL_KINDS: [u32; 11] +pub const radroots_event::envelope::kind::WIKI_EVENT_KINDS: [u32; 3] +pub const fn radroots_event::envelope::kind::is_ambiguous_public_social_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_classified_listing_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_commercial_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_events_candidate_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_home_feed_candidate_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_knowledge_addressable_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_knowledge_beta_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_knowledge_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_knowledge_mvp_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_knowledge_regular_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_map_candidate_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_market_candidate_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_moderation_admin_candidate_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_mvp_social_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_nip29_group_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_nip51_list_set_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_nip51_standard_list_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_order_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_private_farm_ops_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_production_social_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_profile_public_content_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_public_file_metadata_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_public_social_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_request_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_result_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_trade_mutation_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_trade_validation_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_trade_validation_receipt_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_trade_validation_service_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_trade_validation_service_request_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_trade_validation_service_result_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_unambiguous_public_social_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::is_wiki_event_kind(u32) -> bool +pub const fn radroots_event::envelope::kind::request_kind_for_result_kind(u32) -> core::option::Option<u32> +pub const fn radroots_event::envelope::kind::result_kind_for_request_kind(u32) -> core::option::Option<u32> +pub const fn radroots_event::envelope::kind::trade_validation_service_request_kind_for_result(u32) -> core::option::Option<u32> +pub const fn radroots_event::envelope::kind::trade_validation_service_result_kind_for_request(u32) -> core::option::Option<u32> +pub enum radroots_event::envelope::RadrootsEventEnvelopeError +pub radroots_event::envelope::RadrootsEventEnvelopeError::ContentTooLarge +pub radroots_event::envelope::RadrootsEventEnvelopeError::ContentTooLarge::actual: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::ContentTooLarge::max: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::ControlCharacterTagKey +pub radroots_event::envelope::RadrootsEventEnvelopeError::ControlCharacterTagKey::index: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::EmptyTag +pub radroots_event::envelope::RadrootsEventEnvelopeError::EmptyTag::index: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::EmptyTagKey +pub radroots_event::envelope::RadrootsEventEnvelopeError::EmptyTagKey::index: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::InvalidAuthor(radroots_event::id::RadrootsIdParseError) +pub radroots_event::envelope::RadrootsEventEnvelopeError::InvalidId(radroots_event::id::RadrootsIdParseError) +pub radroots_event::envelope::RadrootsEventEnvelopeError::InvalidSignature(radroots_event::id::RadrootsIdParseError) +pub radroots_event::envelope::RadrootsEventEnvelopeError::NonCanonicalAuthor +pub radroots_event::envelope::RadrootsEventEnvelopeError::NonCanonicalId +pub radroots_event::envelope::RadrootsEventEnvelopeError::NonCanonicalSignature +pub radroots_event::envelope::RadrootsEventEnvelopeError::TagElementTooLarge +pub radroots_event::envelope::RadrootsEventEnvelopeError::TagElementTooLarge::actual: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TagElementTooLarge::element_index: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TagElementTooLarge::max: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TagElementTooLarge::tag_index: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TagsTooLarge +pub radroots_event::envelope::RadrootsEventEnvelopeError::TagsTooLarge::actual: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TagsTooLarge::max: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TooManyTagElements +pub radroots_event::envelope::RadrootsEventEnvelopeError::TooManyTagElements::actual: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TooManyTagElements::max: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TooManyTags +pub radroots_event::envelope::RadrootsEventEnvelopeError::TooManyTags::actual: usize +pub radroots_event::envelope::RadrootsEventEnvelopeError::TooManyTags::max: usize +impl core::convert::From<radroots_event::envelope::RadrootsEventEnvelopeError> for radroots_event::draft::RadrootsDraftError +pub fn radroots_event::draft::RadrootsDraftError::from(radroots_event::envelope::RadrootsEventEnvelopeError) -> Self +impl core::convert::From<radroots_event::envelope::RadrootsEventEnvelopeError> for radroots_event::draft::RadrootsSignedEventError +pub fn radroots_event::draft::RadrootsSignedEventError::from(radroots_event::envelope::RadrootsEventEnvelopeError) -> Self +impl core::error::Error for radroots_event::envelope::RadrootsEventEnvelopeError +impl core::fmt::Display for radroots_event::envelope::RadrootsEventEnvelopeError +pub fn radroots_event::envelope::RadrootsEventEnvelopeError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::envelope::RadrootsEventKindClass +pub radroots_event::envelope::RadrootsEventKindClass::Addressable +pub radroots_event::envelope::RadrootsEventKindClass::Ephemeral +pub radroots_event::envelope::RadrootsEventKindClass::Regular +pub radroots_event::envelope::RadrootsEventKindClass::Replaceable +pub struct radroots_event::envelope::RadrootsEventEnvelope +impl radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::envelope::RadrootsEventEnvelope::author(&self) -> &radroots_identity::key::PublicKey +pub fn radroots_event::envelope::RadrootsEventEnvelope::content(&self) -> &str +pub fn radroots_event::envelope::RadrootsEventEnvelope::created_at(&self) -> radroots_event::envelope::RadrootsEventTimestamp +pub fn radroots_event::envelope::RadrootsEventEnvelope::created_at_u64(&self) -> u64 +pub fn radroots_event::envelope::RadrootsEventEnvelope::id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::envelope::RadrootsEventEnvelope::id_hex(&self) -> alloc::string::String +pub fn radroots_event::envelope::RadrootsEventEnvelope::kind(&self) -> radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventEnvelope::kind_class(&self) -> radroots_event::envelope::RadrootsEventKindClass +pub fn radroots_event::envelope::RadrootsEventEnvelope::kind_u32(&self) -> u32 +pub fn radroots_event::envelope::RadrootsEventEnvelope::new(radroots_event::envelope::RadrootsEventEnvelopeParts) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +pub fn radroots_event::envelope::RadrootsEventEnvelope::new_with_limits(radroots_event::envelope::RadrootsEventEnvelopeParts, radroots_event::envelope::RadrootsEventEnvelopeLimits) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +pub fn radroots_event::envelope::RadrootsEventEnvelope::sig(&self) -> &radroots_event::id::RadrootsEventSignature +pub fn radroots_event::envelope::RadrootsEventEnvelope::signature_hex(&self) -> alloc::string::String +pub fn radroots_event::envelope::RadrootsEventEnvelope::tag_slices(&self) -> &[radroots_event::envelope::RadrootsEventTag] +pub fn radroots_event::envelope::RadrootsEventEnvelope::tags(&self) -> &radroots_event::envelope::RadrootsEventTags +pub fn radroots_event::envelope::RadrootsEventEnvelope::tags_as_vec(&self) -> alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub fn radroots_event::envelope::RadrootsEventEnvelope::to_nip01_wire(&self) -> RadrootsNip01EventWire +impl dto_bindgen_core::descriptor::Dto for radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::envelope::RadrootsEventEnvelope::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::envelope::RadrootsEventEnvelopeLimits +pub radroots_event::envelope::RadrootsEventEnvelopeLimits::max_content_bytes: usize +pub radroots_event::envelope::RadrootsEventEnvelopeLimits::max_tag_count: usize +pub radroots_event::envelope::RadrootsEventEnvelopeLimits::max_tag_element_bytes: usize +pub radroots_event::envelope::RadrootsEventEnvelopeLimits::max_total_tag_bytes: usize +pub radroots_event::envelope::RadrootsEventEnvelopeLimits::max_total_tag_elements: usize +impl core::default::Default for radroots_event::envelope::RadrootsEventEnvelopeLimits +pub fn radroots_event::envelope::RadrootsEventEnvelopeLimits::default() -> Self +pub struct radroots_event::envelope::RadrootsEventEnvelopeParts +pub radroots_event::envelope::RadrootsEventEnvelopeParts::author: alloc::string::String +pub radroots_event::envelope::RadrootsEventEnvelopeParts::content: alloc::string::String +pub radroots_event::envelope::RadrootsEventEnvelopeParts::created_at: u64 +pub radroots_event::envelope::RadrootsEventEnvelopeParts::id: alloc::string::String +pub radroots_event::envelope::RadrootsEventEnvelopeParts::kind: u32 +pub radroots_event::envelope::RadrootsEventEnvelopeParts::sig: alloc::string::String +pub radroots_event::envelope::RadrootsEventEnvelopeParts::tags: alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub struct radroots_event::envelope::RadrootsEventKind(_) +impl radroots_event::envelope::RadrootsEventKind +pub const fn radroots_event::envelope::RadrootsEventKind::as_u32(self) -> u32 +pub const fn radroots_event::envelope::RadrootsEventKind::class(self) -> radroots_event::envelope::RadrootsEventKindClass +pub const fn radroots_event::envelope::RadrootsEventKind::new(u32) -> Self +impl core::convert::From<u32> for radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventKind::from(u32) -> Self +impl dto_bindgen_core::descriptor::Dto for radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventKind::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventKind::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventKind::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::envelope::RadrootsEventTag(_) +impl radroots_event::envelope::RadrootsEventTag +pub fn radroots_event::envelope::RadrootsEventTag::as_slice(&self) -> &[alloc::string::String] +pub fn radroots_event::envelope::RadrootsEventTag::into_vec(self) -> alloc::vec::Vec<alloc::string::String> +pub fn radroots_event::envelope::RadrootsEventTag::new(usize, alloc::vec::Vec<alloc::string::String>) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +pub fn radroots_event::envelope::RadrootsEventTag::new_with_limits(usize, alloc::vec::Vec<alloc::string::String>, radroots_event::envelope::RadrootsEventEnvelopeLimits) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +impl serde_core::ser::Serialize for radroots_event::envelope::RadrootsEventTag +pub fn radroots_event::envelope::RadrootsEventTag::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::envelope::RadrootsEventTag +pub fn radroots_event::envelope::RadrootsEventTag::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::envelope::RadrootsEventTags(_) +impl radroots_event::envelope::RadrootsEventTags +pub fn radroots_event::envelope::RadrootsEventTags::as_slice(&self) -> &[radroots_event::envelope::RadrootsEventTag] +pub fn radroots_event::envelope::RadrootsEventTags::into_vec(self) -> alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub fn radroots_event::envelope::RadrootsEventTags::is_empty(&self) -> bool +pub fn radroots_event::envelope::RadrootsEventTags::len(&self) -> usize +pub fn radroots_event::envelope::RadrootsEventTags::new(alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>>) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +pub fn radroots_event::envelope::RadrootsEventTags::new_with_limits(alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>>, radroots_event::envelope::RadrootsEventEnvelopeLimits) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +pub fn radroots_event::envelope::RadrootsEventTags::to_vec(&self) -> alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +impl dto_bindgen_core::descriptor::Dto for radroots_event::envelope::RadrootsEventTags +pub fn radroots_event::envelope::RadrootsEventTags::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::envelope::RadrootsEventTags +pub fn radroots_event::envelope::RadrootsEventTags::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::envelope::RadrootsEventTags +pub fn radroots_event::envelope::RadrootsEventTags::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::envelope::RadrootsEventTimestamp(_) +impl radroots_event::envelope::RadrootsEventTimestamp +pub const fn radroots_event::envelope::RadrootsEventTimestamp::as_u64(self) -> u64 +pub const fn radroots_event::envelope::RadrootsEventTimestamp::new(u64) -> Self +impl core::convert::From<u64> for radroots_event::envelope::RadrootsEventTimestamp +pub fn radroots_event::envelope::RadrootsEventTimestamp::from(u64) -> Self +impl dto_bindgen_core::descriptor::Dto for radroots_event::envelope::RadrootsEventTimestamp +pub fn radroots_event::envelope::RadrootsEventTimestamp::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::envelope::RadrootsEventTimestamp +pub fn radroots_event::envelope::RadrootsEventTimestamp::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::envelope::RadrootsEventTimestamp +pub fn radroots_event::envelope::RadrootsEventTimestamp::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub mod radroots_event::farm +pub mod radroots_event::farm::change_set +pub struct radroots_event::farm::change_set::RadrootsGcsLocation +pub radroots_event::farm::change_set::RadrootsGcsLocation::accuracy: core::option::Option<f64> +pub radroots_event::farm::change_set::RadrootsGcsLocation::altitude: core::option::Option<f64> +pub radroots_event::farm::change_set::RadrootsGcsLocation::area: core::option::Option<f64> +pub radroots_event::farm::change_set::RadrootsGcsLocation::climate: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::elevation: core::option::Option<u32> +pub radroots_event::farm::change_set::RadrootsGcsLocation::gc_admin1_id: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::gc_admin1_name: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::gc_country_id: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::gc_country_name: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::gc_id: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::gc_name: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::geohash: alloc::string::String +pub radroots_event::farm::change_set::RadrootsGcsLocation::label: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::lat: f64 +pub radroots_event::farm::change_set::RadrootsGcsLocation::lng: f64 +pub radroots_event::farm::change_set::RadrootsGcsLocation::point: radroots_event::farm::change_set::RadrootsGeoJsonPoint +pub radroots_event::farm::change_set::RadrootsGcsLocation::polygon: radroots_event::farm::change_set::RadrootsGeoJsonPolygon +pub radroots_event::farm::change_set::RadrootsGcsLocation::soil: core::option::Option<alloc::string::String> +pub radroots_event::farm::change_set::RadrootsGcsLocation::tag_0: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::change_set::RadrootsGcsLocation +pub fn radroots_event::farm::change_set::RadrootsGcsLocation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::change_set::RadrootsGeoJsonPoint +pub radroots_event::farm::change_set::RadrootsGeoJsonPoint::coordinates: [f64; 2] +pub radroots_event::farm::change_set::RadrootsGeoJsonPoint::type: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::change_set::RadrootsGeoJsonPoint +pub fn radroots_event::farm::change_set::RadrootsGeoJsonPoint::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::change_set::RadrootsGeoJsonPolygon +pub radroots_event::farm::change_set::RadrootsGeoJsonPolygon::coordinates: alloc::vec::Vec<alloc::vec::Vec<[f64; 2]>> +pub radroots_event::farm::change_set::RadrootsGeoJsonPolygon::type: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::change_set::RadrootsGeoJsonPolygon +pub fn radroots_event::farm::change_set::RadrootsGeoJsonPolygon::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::farm::coop +pub struct radroots_event::farm::coop::RadrootsCoop +pub radroots_event::farm::coop::RadrootsCoop::about: core::option::Option<alloc::string::String> +pub radroots_event::farm::coop::RadrootsCoop::banner: core::option::Option<alloc::string::String> +pub radroots_event::farm::coop::RadrootsCoop::d_tag: alloc::string::String +pub radroots_event::farm::coop::RadrootsCoop::location: core::option::Option<radroots_event::farm::coop::RadrootsCoopLocation> +pub radroots_event::farm::coop::RadrootsCoop::name: alloc::string::String +pub radroots_event::farm::coop::RadrootsCoop::picture: core::option::Option<alloc::string::String> +pub radroots_event::farm::coop::RadrootsCoop::tags: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::farm::coop::RadrootsCoop::website: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::coop::RadrootsCoop +pub fn radroots_event::farm::coop::RadrootsCoop::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::coop::RadrootsCoopLocation +pub radroots_event::farm::coop::RadrootsCoopLocation::city: core::option::Option<alloc::string::String> +pub radroots_event::farm::coop::RadrootsCoopLocation::country: core::option::Option<alloc::string::String> +pub radroots_event::farm::coop::RadrootsCoopLocation::gcs: radroots_event::farm::change_set::RadrootsGcsLocation +pub radroots_event::farm::coop::RadrootsCoopLocation::primary: core::option::Option<alloc::string::String> +pub radroots_event::farm::coop::RadrootsCoopLocation::region: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::coop::RadrootsCoopLocation +pub fn radroots_event::farm::coop::RadrootsCoopLocation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::coop::RadrootsCoopRef +pub radroots_event::farm::coop::RadrootsCoopRef::d_tag: alloc::string::String +pub radroots_event::farm::coop::RadrootsCoopRef::pubkey: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::coop::RadrootsCoopRef +pub fn radroots_event::farm::coop::RadrootsCoopRef::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::farm::crdt +pub enum radroots_event::farm::crdt::RadrootsCrdtBackend +pub radroots_event::farm::crdt::RadrootsCrdtBackend::Automerge +pub radroots_event::farm::crdt::RadrootsCrdtBackend::Loro +pub radroots_event::farm::crdt::RadrootsCrdtBackend::Yjs +pub enum radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmActivity +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmAttachment +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmCrop +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmCropCycle +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmCropVariety +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmHarvestRecord +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmInventoryItem +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmLocation +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmMediaAsset +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmMembership +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmObservation +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmPayPeriod +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmRolePolicy +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmTask +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::FarmWorkSession +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::Other +pub radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::Other::value: alloc::string::String +impl radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind +pub fn radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::as_str(&self) -> &str +impl core::convert::From<alloc::string::String> for radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind +pub fn radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind::from(alloc::string::String) -> Self +impl core::convert::From<radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind) -> Self +pub enum radroots_event::farm::crdt::RadrootsFarmSemanticKind +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmActivityCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmCropCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmCropCycleCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmCropVarietyCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmHarvestAttachmentAttach +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmHarvestLineAdd +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmHarvestLineCorrect +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmHarvestLineVoid +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmHarvestRecordCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmHarvestRecordUpdate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmInventoryItemUpdate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmLocationCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmMediaAssetAttach +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmMemberApprove +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmMemberDeactivate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmMemberInviteCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmMemberRoleSet +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmNoteCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmObservationCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmPayPeriodClose +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmPayPeriodOpen +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmReportExportMark +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskAssign +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskAttachmentAttach +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskChecklistItemAdd +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskCommentAdd +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskComplete +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskFollowUpCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskJoin +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskStatusSet +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmTaskUpdate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionApprove +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionCorrect +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionEnd +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionManualEntryCreate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionReject +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionStart +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionStop +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionSubmit +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkSessionUpdate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::FarmWorkspaceUpdate +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::Other +pub radroots_event::farm::crdt::RadrootsFarmSemanticKind::Other::value: alloc::string::String +impl radroots_event::farm::crdt::RadrootsFarmSemanticKind +pub fn radroots_event::farm::crdt::RadrootsFarmSemanticKind::as_str(&self) -> &str +impl core::convert::From<alloc::string::String> for radroots_event::farm::crdt::RadrootsFarmSemanticKind +pub fn radroots_event::farm::crdt::RadrootsFarmSemanticKind::from(alloc::string::String) -> Self +impl core::convert::From<radroots_event::farm::crdt::RadrootsFarmSemanticKind> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::farm::crdt::RadrootsFarmSemanticKind) -> Self +pub struct radroots_event::farm::crdt::RadrootsFarmCrdtChange +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::actor_id: alloc::string::String +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::app_version: core::option::Option<alloc::string::String> +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::author_member_id: core::option::Option<alloc::string::String> +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::business_time_ms: u64 +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::change_hash: alloc::string::String +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::crdt_backend: radroots_event::farm::crdt::RadrootsCrdtBackend +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::crdt_backend_version: core::option::Option<alloc::string::String> +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::dependencies: alloc::vec::Vec<alloc::string::String> +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::document_id: alloc::string::String +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::document_kind: radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::encoded_change: alloc::string::String +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::farm_group_id: alloc::string::String +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::schema: alloc::string::String +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::semantic_kind: radroots_event::farm::crdt::RadrootsFarmSemanticKind +pub radroots_event::farm::crdt::RadrootsFarmCrdtChange::workspace: radroots_event::farm::workspace::RadrootsFarmWorkspaceRef +pub const radroots_event::farm::crdt::KIND_FARM_CRDT_CHANGE: u32 +pub const radroots_event::farm::crdt::RADROOTS_FARM_CRDT_CHANGE_SCHEMA: &str +pub const radroots_event::farm::crdt::RADROOTS_FARM_CRDT_TAG: &str +pub mod radroots_event::farm::file +pub struct radroots_event::farm::file::RadrootsFarmFileDimensions +pub radroots_event::farm::file::RadrootsFarmFileDimensions::h: u32 +pub radroots_event::farm::file::RadrootsFarmFileDimensions::w: u32 +pub struct radroots_event::farm::file::RadrootsFarmFileMetadata +pub radroots_event::farm::file::RadrootsFarmFileMetadata::alt: core::option::Option<alloc::string::String> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::blurhash: core::option::Option<alloc::string::String> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::caption: core::option::Option<alloc::string::String> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::d_tag: alloc::string::String +pub radroots_event::farm::file::RadrootsFarmFileMetadata::dimensions: core::option::Option<radroots_event::farm::file::RadrootsFarmFileDimensions> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::fallbacks: alloc::vec::Vec<alloc::string::String> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::farm_group_id: alloc::string::String +pub radroots_event::farm::file::RadrootsFarmFileMetadata::image: core::option::Option<radroots_event::farm::file::RadrootsFarmFileSource> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::mime_type: alloc::string::String +pub radroots_event::farm::file::RadrootsFarmFileMetadata::original_sha256: core::option::Option<alloc::string::String> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::owner_document_id: alloc::string::String +pub radroots_event::farm::file::RadrootsFarmFileMetadata::owner_document_kind: radroots_event::farm::crdt::RadrootsFarmCrdtDocumentKind +pub radroots_event::farm::file::RadrootsFarmFileMetadata::sha256: alloc::string::String +pub radroots_event::farm::file::RadrootsFarmFileMetadata::size_bytes: core::option::Option<u64> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::thumb: core::option::Option<radroots_event::farm::file::RadrootsFarmFileSource> +pub radroots_event::farm::file::RadrootsFarmFileMetadata::url: alloc::string::String +pub radroots_event::farm::file::RadrootsFarmFileMetadata::workspace: radroots_event::farm::workspace::RadrootsFarmWorkspaceRef +pub struct radroots_event::farm::file::RadrootsFarmFileSource +pub radroots_event::farm::file::RadrootsFarmFileSource::dimensions: core::option::Option<radroots_event::farm::file::RadrootsFarmFileDimensions> +pub radroots_event::farm::file::RadrootsFarmFileSource::mime_type: core::option::Option<alloc::string::String> +pub radroots_event::farm::file::RadrootsFarmFileSource::url: alloc::string::String +pub const radroots_event::farm::file::KIND_FARM_FILE_METADATA: u32 +pub mod radroots_event::farm::location +pub const radroots_event::farm::location::RADROOTS_PUBLIC_GEOHASH_BASE32: &str +pub const radroots_event::farm::location::RADROOTS_PUBLIC_GEOHASH_PRECISION: usize +pub fn radroots_event::farm::location::has_textual_locality(&str, core::option::Option<&str>, core::option::Option<&str>, core::option::Option<&str>) -> bool +pub fn radroots_event::farm::location::is_public_geohash5(&str) -> bool +pub mod radroots_event::farm::plot +pub struct radroots_event::farm::plot::RadrootsPlot +pub radroots_event::farm::plot::RadrootsPlot::about: core::option::Option<alloc::string::String> +pub radroots_event::farm::plot::RadrootsPlot::d_tag: alloc::string::String +pub radroots_event::farm::plot::RadrootsPlot::farm: radroots_event::farm::RadrootsFarmRef +pub radroots_event::farm::plot::RadrootsPlot::location: core::option::Option<radroots_event::farm::plot::RadrootsPlotLocation> +pub radroots_event::farm::plot::RadrootsPlot::name: alloc::string::String +pub radroots_event::farm::plot::RadrootsPlot::tags: core::option::Option<alloc::vec::Vec<alloc::string::String>> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::plot::RadrootsPlot +pub fn radroots_event::farm::plot::RadrootsPlot::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::plot::RadrootsPlotLocation +pub radroots_event::farm::plot::RadrootsPlotLocation::city: core::option::Option<alloc::string::String> +pub radroots_event::farm::plot::RadrootsPlotLocation::country: core::option::Option<alloc::string::String> +pub radroots_event::farm::plot::RadrootsPlotLocation::gcs: radroots_event::farm::change_set::RadrootsGcsLocation +pub radroots_event::farm::plot::RadrootsPlotLocation::primary: core::option::Option<alloc::string::String> +pub radroots_event::farm::plot::RadrootsPlotLocation::region: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::plot::RadrootsPlotLocation +pub fn radroots_event::farm::plot::RadrootsPlotLocation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::plot::RadrootsPlotRef +pub radroots_event::farm::plot::RadrootsPlotRef::d_tag: alloc::string::String +pub radroots_event::farm::plot::RadrootsPlotRef::pubkey: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::plot::RadrootsPlotRef +pub fn radroots_event::farm::plot::RadrootsPlotRef::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::farm::resource_area +pub struct radroots_event::farm::resource_area::RadrootsResourceArea +pub radroots_event::farm::resource_area::RadrootsResourceArea::about: core::option::Option<alloc::string::String> +pub radroots_event::farm::resource_area::RadrootsResourceArea::d_tag: alloc::string::String +pub radroots_event::farm::resource_area::RadrootsResourceArea::location: radroots_event::farm::resource_area::RadrootsResourceAreaLocation +pub radroots_event::farm::resource_area::RadrootsResourceArea::name: alloc::string::String +pub radroots_event::farm::resource_area::RadrootsResourceArea::tags: core::option::Option<alloc::vec::Vec<alloc::string::String>> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::resource_area::RadrootsResourceArea +pub fn radroots_event::farm::resource_area::RadrootsResourceArea::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::resource_area::RadrootsResourceAreaLocation +pub radroots_event::farm::resource_area::RadrootsResourceAreaLocation::city: core::option::Option<alloc::string::String> +pub radroots_event::farm::resource_area::RadrootsResourceAreaLocation::country: core::option::Option<alloc::string::String> +pub radroots_event::farm::resource_area::RadrootsResourceAreaLocation::gcs: radroots_event::farm::change_set::RadrootsGcsLocation +pub radroots_event::farm::resource_area::RadrootsResourceAreaLocation::primary: core::option::Option<alloc::string::String> +pub radroots_event::farm::resource_area::RadrootsResourceAreaLocation::region: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::resource_area::RadrootsResourceAreaLocation +pub fn radroots_event::farm::resource_area::RadrootsResourceAreaLocation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::resource_area::RadrootsResourceAreaRef +pub radroots_event::farm::resource_area::RadrootsResourceAreaRef::d_tag: alloc::string::String +pub radroots_event::farm::resource_area::RadrootsResourceAreaRef::pubkey: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::resource_area::RadrootsResourceAreaRef +pub fn radroots_event::farm::resource_area::RadrootsResourceAreaRef::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::farm::resource_cap +pub struct radroots_event::farm::resource_cap::RadrootsResourceHarvestCap +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::cap_quantity: radroots_core::quantity::Quantity +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::d_tag: alloc::string::String +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::display_amount: core::option::Option<radroots_core::decimal::Decimal> +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::display_label: core::option::Option<alloc::string::String> +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::display_unit: core::option::Option<radroots_core::unit::Unit> +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::end: u64 +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::product: radroots_event::farm::resource_cap::RadrootsResourceHarvestProduct +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::resource_area: radroots_event::farm::resource_area::RadrootsResourceAreaRef +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::start: u64 +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::tags: core::option::Option<alloc::vec::Vec<alloc::string::String>> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::resource_cap::RadrootsResourceHarvestCap +pub fn radroots_event::farm::resource_cap::RadrootsResourceHarvestCap::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::resource_cap::RadrootsResourceHarvestProduct +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestProduct::category: core::option::Option<alloc::string::String> +pub radroots_event::farm::resource_cap::RadrootsResourceHarvestProduct::key: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::resource_cap::RadrootsResourceHarvestProduct +pub fn radroots_event::farm::resource_cap::RadrootsResourceHarvestProduct::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::farm::workspace +pub enum radroots_event::farm::workspace::RadrootsFarmWorkspaceRelayMode +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceRelayMode::Read +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceRelayMode::ReadWrite +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceRelayMode::Write +pub struct radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::created_at_ms: u64 +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::d_tag: alloc::string::String +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::farm: core::option::Option<radroots_event::farm::RadrootsFarmRef> +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::farm_group_id: alloc::string::String +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::media_servers: alloc::vec::Vec<radroots_event::farm::workspace::RadrootsFarmWorkspaceMediaServer> +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::name: alloc::string::String +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::owner_pubkey: alloc::string::String +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::protocol_version: alloc::string::String +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::relays: alloc::vec::Vec<radroots_event::farm::workspace::RadrootsFarmWorkspaceRelay> +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::schema: alloc::string::String +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::supported_kinds: alloc::vec::Vec<u32> +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceManifest::updated_at_ms: core::option::Option<u64> +pub struct radroots_event::farm::workspace::RadrootsFarmWorkspaceMediaServer +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceMediaServer::service: alloc::string::String +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceMediaServer::url: alloc::string::String +pub struct radroots_event::farm::workspace::RadrootsFarmWorkspaceRef +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceRef::d_tag: alloc::string::String +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceRef::pubkey: alloc::string::String +pub struct radroots_event::farm::workspace::RadrootsFarmWorkspaceRelay +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceRelay::mode: radroots_event::farm::workspace::RadrootsFarmWorkspaceRelayMode +pub radroots_event::farm::workspace::RadrootsFarmWorkspaceRelay::url: alloc::string::String +pub const radroots_event::farm::workspace::KIND_FARM_WORKSPACE_MANIFEST: u32 +pub const radroots_event::farm::workspace::RADROOTS_FARM_WORKSPACE_PROTOCOL_VERSION: &str +pub const radroots_event::farm::workspace::RADROOTS_FARM_WORKSPACE_SCHEMA: &str +pub const radroots_event::farm::workspace::RADROOTS_FARM_WORKSPACE_TAG: &str +pub struct radroots_event::farm::RadrootsFarm +pub radroots_event::farm::RadrootsFarm::about: core::option::Option<alloc::string::String> +pub radroots_event::farm::RadrootsFarm::banner: core::option::Option<alloc::string::String> +pub radroots_event::farm::RadrootsFarm::d_tag: alloc::string::String +pub radroots_event::farm::RadrootsFarm::location: core::option::Option<radroots_event::farm::RadrootsFarmPublicLocation> +pub radroots_event::farm::RadrootsFarm::name: alloc::string::String +pub radroots_event::farm::RadrootsFarm::picture: core::option::Option<alloc::string::String> +pub radroots_event::farm::RadrootsFarm::tags: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::farm::RadrootsFarm::website: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::RadrootsFarm +pub fn radroots_event::farm::RadrootsFarm::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::RadrootsFarmPublicLocation +pub radroots_event::farm::RadrootsFarmPublicLocation::city: core::option::Option<alloc::string::String> +pub radroots_event::farm::RadrootsFarmPublicLocation::country: core::option::Option<alloc::string::String> +pub radroots_event::farm::RadrootsFarmPublicLocation::geohash: alloc::string::String +pub radroots_event::farm::RadrootsFarmPublicLocation::primary: alloc::string::String +pub radroots_event::farm::RadrootsFarmPublicLocation::region: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::RadrootsFarmPublicLocation +pub fn radroots_event::farm::RadrootsFarmPublicLocation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::farm::RadrootsFarmRef +pub radroots_event::farm::RadrootsFarmRef::d_tag: alloc::string::String +pub radroots_event::farm::RadrootsFarmRef::pubkey: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::farm::RadrootsFarmRef +pub fn radroots_event::farm::RadrootsFarmRef::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::food +pub mod radroots_event::food::availability +#[non_exhaustive] pub enum radroots_event::food::availability::RadrootsFoodAvailabilityError +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ContentMissing +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ContentTooLarge +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ContentTooLarge::actual: usize +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ContentTooLarge::max: usize +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::IdentifierInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::IdentifierTooLarge +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::IdentifierTooLarge::actual: usize +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::IdentifierTooLarge::max: usize +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ImageCountExceeded +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ImageCountExceeded::actual: usize +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ImageCountExceeded::max: usize +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ImageDimensionsInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ImageDuplicateDigest +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::ImageDuplicateUrl +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::PriceCurrencyInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::PriceInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::PriceUnitInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::PublishedAtFuture +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::PublishedAtFuture::created_at: u64 +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::PublishedAtFuture::published_at: u64 +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::PublishedAtInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::QuantityInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::QuantityZero +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::StatusInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::TextInvalid +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::TextTooLarge +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::TextTooLarge::actual: usize +pub radroots_event::food::availability::RadrootsFoodAvailabilityError::TextTooLarge::max: usize +impl radroots_event::food::availability::RadrootsFoodAvailabilityError +pub const fn radroots_event::food::availability::RadrootsFoodAvailabilityError::code(&self) -> &'static str +impl core::error::Error for radroots_event::food::availability::RadrootsFoodAvailabilityError +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodAvailabilityError +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::food::availability::RadrootsFoodAvailabilityStatus +pub radroots_event::food::availability::RadrootsFoodAvailabilityStatus::Active +pub radroots_event::food::availability::RadrootsFoodAvailabilityStatus::Sold +impl radroots_event::food::availability::RadrootsFoodAvailabilityStatus +pub const fn radroots_event::food::availability::RadrootsFoodAvailabilityStatus::as_str(self) -> &'static str +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityStatus::parse(&str) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodAvailabilityStatus +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityStatus::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::food::availability::RadrootsFoodAvailabilityStatus +pub type radroots_event::food::availability::RadrootsFoodAvailabilityStatus::Err = radroots_event::food::availability::RadrootsFoodAvailabilityError +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityStatus::from_str(&str) -> core::result::Result<Self, Self::Err> +pub enum radroots_event::food::availability::RadrootsFoodUnit +pub radroots_event::food::availability::RadrootsFoodUnit::Bag +pub radroots_event::food::availability::RadrootsFoodUnit::Basket +pub radroots_event::food::availability::RadrootsFoodUnit::Bunch +pub radroots_event::food::availability::RadrootsFoodUnit::Dozen +pub radroots_event::food::availability::RadrootsFoodUnit::Each +pub radroots_event::food::availability::RadrootsFoodUnit::Gram +pub radroots_event::food::availability::RadrootsFoodUnit::Kilogram +pub radroots_event::food::availability::RadrootsFoodUnit::Ounce +pub radroots_event::food::availability::RadrootsFoodUnit::Pound +pub radroots_event::food::availability::RadrootsFoodUnit::Punnet +impl radroots_event::food::availability::RadrootsFoodUnit +pub const fn radroots_event::food::availability::RadrootsFoodUnit::as_str(self) -> &'static str +pub fn radroots_event::food::availability::RadrootsFoodUnit::parse(&str) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodUnit +pub fn radroots_event::food::availability::RadrootsFoodUnit::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::food::availability::RadrootsFoodUnit +pub type radroots_event::food::availability::RadrootsFoodUnit::Err = radroots_event::food::availability::RadrootsFoodAvailabilityError +pub fn radroots_event::food::availability::RadrootsFoodUnit::from_str(&str) -> core::result::Result<Self, Self::Err> +pub struct radroots_event::food::availability::RadrootsFoodAvailabilityDetails +impl radroots_event::food::availability::RadrootsFoodAvailabilityDetails +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::content(&self) -> &radroots_event::food::availability::RadrootsFoodContent +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::identifier(&self) -> &radroots_event::food::availability::RadrootsFoodIdentifier +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::images(&self) -> &[radroots_event::food::availability::RadrootsFoodAvailabilityImage] +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::location(&self) -> &radroots_event::food::availability::RadrootsFoodText +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::new(radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::price(&self) -> &radroots_event::food::availability::RadrootsFoodPrice +pub const fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::published_at(&self) -> radroots_event::food::availability::RadrootsFoodPublishedAt +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::quantity(&self) -> core::option::Option<&radroots_event::food::availability::RadrootsFoodQuantity> +pub const fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::status(&self) -> radroots_event::food::availability::RadrootsFoodAvailabilityStatus +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::summary(&self) -> &radroots_event::food::availability::RadrootsFoodText +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::title(&self) -> &radroots_event::food::availability::RadrootsFoodText +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityDetails::validate_created_at(&self, u64) -> core::result::Result<(), radroots_event::food::availability::RadrootsFoodAvailabilityError> +pub struct radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::content: radroots_event::food::availability::RadrootsFoodContent +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::identifier: radroots_event::food::availability::RadrootsFoodIdentifier +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::images: alloc::vec::Vec<radroots_event::food::availability::RadrootsFoodAvailabilityImage> +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::location: radroots_event::food::availability::RadrootsFoodText +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::price: radroots_event::food::availability::RadrootsFoodPrice +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::published_at: radroots_event::food::availability::RadrootsFoodPublishedAt +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::quantity: core::option::Option<radroots_event::food::availability::RadrootsFoodQuantity> +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::status: radroots_event::food::availability::RadrootsFoodAvailabilityStatus +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::summary: radroots_event::food::availability::RadrootsFoodText +pub radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts::title: radroots_event::food::availability::RadrootsFoodText +pub struct radroots_event::food::availability::RadrootsFoodAvailabilityImage +impl radroots_event::food::availability::RadrootsFoodAvailabilityImage +pub const fn radroots_event::food::availability::RadrootsFoodAvailabilityImage::dimensions(&self) -> radroots_event::food::availability::RadrootsFoodImageDimensions +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityImage::image(&self) -> &radroots_event::media::RadrootsAuthoredImage +pub const fn radroots_event::food::availability::RadrootsFoodAvailabilityImage::new(radroots_event::media::RadrootsAuthoredImage, radroots_event::food::availability::RadrootsFoodImageDimensions) -> Self +pub fn radroots_event::food::availability::RadrootsFoodAvailabilityImage::url(&self) -> &str +pub struct radroots_event::food::availability::RadrootsFoodContent(_) +impl radroots_event::food::availability::RadrootsFoodContent +pub fn radroots_event::food::availability::RadrootsFoodContent::as_str(&self) -> &str +pub fn radroots_event::food::availability::RadrootsFoodContent::into_string(self) -> alloc::string::String +pub fn radroots_event::food::availability::RadrootsFoodContent::new(impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +impl core::convert::AsRef<str> for radroots_event::food::availability::RadrootsFoodContent +pub fn radroots_event::food::availability::RadrootsFoodContent::as_ref(&self) -> &str +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodContent +pub fn radroots_event::food::availability::RadrootsFoodContent::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::food::availability::RadrootsFoodCurrency(_) +impl radroots_event::food::availability::RadrootsFoodCurrency +pub fn radroots_event::food::availability::RadrootsFoodCurrency::as_str(&self) -> &str +pub fn radroots_event::food::availability::RadrootsFoodCurrency::into_string(self) -> alloc::string::String +pub fn radroots_event::food::availability::RadrootsFoodCurrency::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +impl core::convert::AsRef<str> for radroots_event::food::availability::RadrootsFoodCurrency +pub fn radroots_event::food::availability::RadrootsFoodCurrency::as_ref(&self) -> &str +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodCurrency +pub fn radroots_event::food::availability::RadrootsFoodCurrency::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::food::availability::RadrootsFoodCurrency +pub type radroots_event::food::availability::RadrootsFoodCurrency::Err = radroots_event::food::availability::RadrootsFoodAvailabilityError +pub fn radroots_event::food::availability::RadrootsFoodCurrency::from_str(&str) -> core::result::Result<Self, Self::Err> +pub struct radroots_event::food::availability::RadrootsFoodIdentifier(_) +impl radroots_event::food::availability::RadrootsFoodIdentifier +pub fn radroots_event::food::availability::RadrootsFoodIdentifier::as_str(&self) -> &str +pub fn radroots_event::food::availability::RadrootsFoodIdentifier::into_string(self) -> alloc::string::String +pub fn radroots_event::food::availability::RadrootsFoodIdentifier::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +impl core::convert::AsRef<str> for radroots_event::food::availability::RadrootsFoodIdentifier +pub fn radroots_event::food::availability::RadrootsFoodIdentifier::as_ref(&self) -> &str +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodIdentifier +pub fn radroots_event::food::availability::RadrootsFoodIdentifier::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::food::availability::RadrootsFoodIdentifier +pub type radroots_event::food::availability::RadrootsFoodIdentifier::Err = radroots_event::food::availability::RadrootsFoodAvailabilityError +pub fn radroots_event::food::availability::RadrootsFoodIdentifier::from_str(&str) -> core::result::Result<Self, Self::Err> +pub struct radroots_event::food::availability::RadrootsFoodImageDimensions +impl radroots_event::food::availability::RadrootsFoodImageDimensions +pub const fn radroots_event::food::availability::RadrootsFoodImageDimensions::height(self) -> u32 +pub const fn radroots_event::food::availability::RadrootsFoodImageDimensions::new(u32, u32) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +pub fn radroots_event::food::availability::RadrootsFoodImageDimensions::parse(&str) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +pub const fn radroots_event::food::availability::RadrootsFoodImageDimensions::width(self) -> u32 +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodImageDimensions +pub fn radroots_event::food::availability::RadrootsFoodImageDimensions::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::food::availability::RadrootsFoodImageDimensions +pub type radroots_event::food::availability::RadrootsFoodImageDimensions::Err = radroots_event::food::availability::RadrootsFoodAvailabilityError +pub fn radroots_event::food::availability::RadrootsFoodImageDimensions::from_str(&str) -> core::result::Result<Self, Self::Err> +pub struct radroots_event::food::availability::RadrootsFoodPrice +impl radroots_event::food::availability::RadrootsFoodPrice +pub fn radroots_event::food::availability::RadrootsFoodPrice::amount(&self) -> &str +pub fn radroots_event::food::availability::RadrootsFoodPrice::currency(&self) -> &radroots_event::food::availability::RadrootsFoodCurrency +pub fn radroots_event::food::availability::RadrootsFoodPrice::new(impl core::convert::Into<alloc::string::String>, radroots_event::food::availability::RadrootsFoodCurrency, radroots_event::food::availability::RadrootsFoodUnit) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +pub const fn radroots_event::food::availability::RadrootsFoodPrice::unit(&self) -> radroots_event::food::availability::RadrootsFoodUnit +pub struct radroots_event::food::availability::RadrootsFoodPublishedAt(_) +impl radroots_event::food::availability::RadrootsFoodPublishedAt +pub const fn radroots_event::food::availability::RadrootsFoodPublishedAt::as_u64(self) -> u64 +pub const fn radroots_event::food::availability::RadrootsFoodPublishedAt::new(u64) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +pub fn radroots_event::food::availability::RadrootsFoodPublishedAt::parse(&str) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +pub const fn radroots_event::food::availability::RadrootsFoodPublishedAt::validate_created_at(self, u64) -> core::result::Result<(), radroots_event::food::availability::RadrootsFoodAvailabilityError> +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodPublishedAt +pub fn radroots_event::food::availability::RadrootsFoodPublishedAt::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::food::availability::RadrootsFoodPublishedAt +pub type radroots_event::food::availability::RadrootsFoodPublishedAt::Err = radroots_event::food::availability::RadrootsFoodAvailabilityError +pub fn radroots_event::food::availability::RadrootsFoodPublishedAt::from_str(&str) -> core::result::Result<Self, Self::Err> +pub struct radroots_event::food::availability::RadrootsFoodQuantity +impl radroots_event::food::availability::RadrootsFoodQuantity +pub fn radroots_event::food::availability::RadrootsFoodQuantity::amount(&self) -> &str +pub fn radroots_event::food::availability::RadrootsFoodQuantity::new(impl core::convert::Into<alloc::string::String>, radroots_event::food::availability::RadrootsFoodUnit) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +pub const fn radroots_event::food::availability::RadrootsFoodQuantity::unit(&self) -> radroots_event::food::availability::RadrootsFoodUnit +pub struct radroots_event::food::availability::RadrootsFoodText(_) +impl radroots_event::food::availability::RadrootsFoodText +pub fn radroots_event::food::availability::RadrootsFoodText::as_str(&self) -> &str +pub fn radroots_event::food::availability::RadrootsFoodText::into_string(self) -> alloc::string::String +pub fn radroots_event::food::availability::RadrootsFoodText::new(impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::food::availability::RadrootsFoodAvailabilityError> +impl core::convert::AsRef<str> for radroots_event::food::availability::RadrootsFoodText +pub fn radroots_event::food::availability::RadrootsFoodText::as_ref(&self) -> &str +impl core::fmt::Display for radroots_event::food::availability::RadrootsFoodText +pub fn radroots_event::food::availability::RadrootsFoodText::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub const radroots_event::food::availability::RADROOTS_FOOD_AVAILABILITY_CONTRACT_ID: &str +pub const radroots_event::food::availability::RADROOTS_FOOD_CONTENT_MAX_BYTES: usize +pub const radroots_event::food::availability::RADROOTS_FOOD_DECIMAL_MAX_DIGITS: usize +pub const radroots_event::food::availability::RADROOTS_FOOD_IDENTIFIER_MAX_BYTES: usize +pub const radroots_event::food::availability::RADROOTS_FOOD_IMAGE_MAX_COUNT: usize +pub const radroots_event::food::availability::RADROOTS_FOOD_TEXT_MAX_BYTES: usize +pub fn radroots_event::food::availability::food_media_blossom_digest(&str) -> core::option::Option<radroots_blossom::hash::Sha256> +pub fn radroots_event::food::availability::food_media_http_url_is_valid(&str) -> bool +pub mod radroots_event::id +#[non_exhaustive] pub enum radroots_event::id::Nip01CoordinateParseError +pub radroots_event::id::Nip01CoordinateParseError::Empty +pub radroots_event::id::Nip01CoordinateParseError::IdentifierMustBeEmpty +pub radroots_event::id::Nip01CoordinateParseError::IdentifierMustBeEmpty::kind: u32 +pub radroots_event::id::Nip01CoordinateParseError::InvalidFormat +pub radroots_event::id::Nip01CoordinateParseError::Pubkey(radroots_event::id::RadrootsIdParseError) +pub radroots_event::id::Nip01CoordinateParseError::TooLong +pub radroots_event::id::Nip01CoordinateParseError::TooLong::actual: usize +pub radroots_event::id::Nip01CoordinateParseError::TooLong::max: usize +pub radroots_event::id::Nip01CoordinateParseError::UnsupportedKind +pub radroots_event::id::Nip01CoordinateParseError::UnsupportedKind::actual: u32 +impl core::error::Error for radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01CoordinateParseError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +impl core::fmt::Display for radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01CoordinateParseError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::id::ParseError +pub radroots_event::id::ParseError::Empty +pub radroots_event::id::ParseError::InvalidCharacter +pub radroots_event::id::ParseError::InvalidFormat +pub radroots_event::id::ParseError::InvalidLength +pub radroots_event::id::ParseError::InvalidLength::actual: usize +pub radroots_event::id::ParseError::InvalidLength::expected: usize +pub radroots_event::id::ParseError::InvalidPublicKey +pub radroots_event::id::ParseError::TooLong +pub radroots_event::id::ParseError::TooLong::actual: usize +pub radroots_event::id::ParseError::TooLong::max: usize +pub radroots_event::id::ParseError::UnexpectedKind +pub radroots_event::id::ParseError::UnexpectedKind::actual: u32 +pub radroots_event::id::ParseError::UnexpectedKind::expected: u32 +impl core::convert::From<radroots_event::id::RadrootsIdParseError> for radroots_event::draft::RadrootsDraftError +pub fn radroots_event::draft::RadrootsDraftError::from(radroots_event::id::RadrootsIdParseError) -> Self +impl core::error::Error for radroots_event::id::RadrootsIdParseError +impl core::fmt::Display for radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsIdParseError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::id::RadrootsIdParseError +pub radroots_event::id::RadrootsIdParseError::Empty +pub radroots_event::id::RadrootsIdParseError::InvalidCharacter +pub radroots_event::id::RadrootsIdParseError::InvalidFormat +pub radroots_event::id::RadrootsIdParseError::InvalidLength +pub radroots_event::id::RadrootsIdParseError::InvalidLength::actual: usize +pub radroots_event::id::RadrootsIdParseError::InvalidLength::expected: usize +pub radroots_event::id::RadrootsIdParseError::InvalidPublicKey +pub radroots_event::id::RadrootsIdParseError::TooLong +pub radroots_event::id::RadrootsIdParseError::TooLong::actual: usize +pub radroots_event::id::RadrootsIdParseError::TooLong::max: usize +pub radroots_event::id::RadrootsIdParseError::UnexpectedKind +pub radroots_event::id::RadrootsIdParseError::UnexpectedKind::actual: u32 +pub radroots_event::id::RadrootsIdParseError::UnexpectedKind::expected: u32 +impl core::convert::From<radroots_event::id::RadrootsIdParseError> for radroots_event::draft::RadrootsDraftError +pub fn radroots_event::draft::RadrootsDraftError::from(radroots_event::id::RadrootsIdParseError) -> Self +impl core::error::Error for radroots_event::id::RadrootsIdParseError +impl core::fmt::Display for radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsIdParseError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +#[non_exhaustive] pub enum radroots_event::id::RadrootsNip01CoordinateParseError +pub radroots_event::id::RadrootsNip01CoordinateParseError::Empty +pub radroots_event::id::RadrootsNip01CoordinateParseError::IdentifierMustBeEmpty +pub radroots_event::id::RadrootsNip01CoordinateParseError::IdentifierMustBeEmpty::kind: u32 +pub radroots_event::id::RadrootsNip01CoordinateParseError::InvalidFormat +pub radroots_event::id::RadrootsNip01CoordinateParseError::Pubkey(radroots_event::id::RadrootsIdParseError) +pub radroots_event::id::RadrootsNip01CoordinateParseError::TooLong +pub radroots_event::id::RadrootsNip01CoordinateParseError::TooLong::actual: usize +pub radroots_event::id::RadrootsNip01CoordinateParseError::TooLong::max: usize +pub radroots_event::id::RadrootsNip01CoordinateParseError::UnsupportedKind +pub radroots_event::id::RadrootsNip01CoordinateParseError::UnsupportedKind::actual: u32 +impl core::error::Error for radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01CoordinateParseError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +impl core::fmt::Display for radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01CoordinateParseError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::id::AddressableCoordinate(_) +impl radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsAddressableCoordinate::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsAddressableCoordinate::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsAddressableCoordinate> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsAddressableCoordinate) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsAddressableCoordinate +pub type radroots_event::id::RadrootsAddressableCoordinate::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsAddressableCoordinate::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsAddressableCoordinate +pub type radroots_event::id::RadrootsAddressableCoordinate::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsAddressableCoordinate::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsAddressableCoordinate +pub type radroots_event::id::RadrootsAddressableCoordinate::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsAddressableCoordinate::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::AddressableCoordinateParts +pub radroots_event::id::AddressableCoordinateParts::d_tag: radroots_event::id::RadrootsDTag +pub radroots_event::id::AddressableCoordinateParts::kind: u32 +pub radroots_event::id::AddressableCoordinateParts::pubkey: radroots_identity::key::PublicKey +impl radroots_event::id::RadrootsAddressableCoordinateParts +pub fn radroots_event::id::RadrootsAddressableCoordinateParts::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub struct radroots_event::id::CandidateId(_) +impl radroots_event::id::RadrootsTradeCandidateId +pub const fn radroots_event::id::RadrootsTradeCandidateId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsTradeCandidateId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsTradeCandidateId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsTradeCandidateId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeCandidateId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeCandidateId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeCandidateId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsTradeCandidateId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::ClassifiedListingAddress(_) +impl radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsClassifiedListingAddress::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsClassifiedListingAddress::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsClassifiedListingAddress> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsClassifiedListingAddress) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsClassifiedListingAddress +pub type radroots_event::id::RadrootsClassifiedListingAddress::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsClassifiedListingAddress::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsClassifiedListingAddress +pub type radroots_event::id::RadrootsClassifiedListingAddress::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsClassifiedListingAddress::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsClassifiedListingAddress +pub type radroots_event::id::RadrootsClassifiedListingAddress::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsClassifiedListingAddress::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::DTag(_) +impl radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsDTag::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsDTag::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsDTag> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsDTag) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsDTag +pub type radroots_event::id::RadrootsDTag::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsDTag::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsDTag +pub type radroots_event::id::RadrootsDTag::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsDTag::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsDTag +pub type radroots_event::id::RadrootsDTag::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsDTag::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::EventEnvelopePointer +pub radroots_event::id::EventEnvelopePointer::event_id: radroots_event::id::RadrootsEventId +pub radroots_event::id::EventEnvelopePointer::relays: alloc::vec::Vec<alloc::string::String> +impl radroots_event::id::RadrootsEventEnvelopePointer +pub fn radroots_event::id::RadrootsEventEnvelopePointer::new<I, S>(radroots_event::id::RadrootsEventId, I) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> where I: core::iter::traits::collect::IntoIterator<Item = S>, S: core::convert::Into<alloc::string::String> +pub struct radroots_event::id::EventId(_) +impl radroots_event::id::RadrootsEventId +pub const fn radroots_event::id::RadrootsEventId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsEventId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsEventId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsEventId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsEventId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsEventId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsEventId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsEventId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::EventPointer(_) +impl radroots_event::id::RadrootsEventPointer +pub const fn radroots_event::id::RadrootsEventPointer::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsEventPointer::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsEventPointer::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsEventPointer::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsEventPointer::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsEventPointer::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsEventPointer> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsEventPointer) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsEventPointer +pub type radroots_event::id::RadrootsEventPointer::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventPointer::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsEventPointer +pub type radroots_event::id::RadrootsEventPointer::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventPointer::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsEventPointer +pub type radroots_event::id::RadrootsEventPointer::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventPointer::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::EventSignature(_) +impl radroots_event::id::RadrootsEventSignature +pub const fn radroots_event::id::RadrootsEventSignature::as_bytes(&self) -> &[u8; 64] +pub const fn radroots_event::id::RadrootsEventSignature::from_bytes([u8; 64]) -> Self +pub const fn radroots_event::id::RadrootsEventSignature::into_bytes(self) -> [u8; 64] +pub fn radroots_event::id::RadrootsEventSignature::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsEventSignature::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsEventSignature::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 64]> for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::from([u8; 64]) -> Self +impl core::convert::From<radroots_event::id::RadrootsEventSignature> for [u8; 64] +pub fn [u8; 64]::from(radroots_event::id::RadrootsEventSignature) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsEventSignature +pub type radroots_event::id::RadrootsEventSignature::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventSignature::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsEventSignature +pub type radroots_event::id::RadrootsEventSignature::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventSignature::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsEventSignature +pub type radroots_event::id::RadrootsEventSignature::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventSignature::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::MutationId(_) +impl radroots_event::id::RadrootsTradeMutationId +pub const fn radroots_event::id::RadrootsTradeMutationId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsTradeMutationId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsTradeMutationId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsTradeMutationId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeMutationId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeMutationId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeMutationId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsTradeMutationId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::Nip01Coordinate +impl radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsNip01Coordinate::identifier(&self) -> &str +pub fn radroots_event::id::RadrootsNip01Coordinate::into_parts(self) -> radroots_event::id::RadrootsNip01CoordinateParts +pub fn radroots_event::id::RadrootsNip01Coordinate::into_string(self) -> alloc::string::String +pub const fn radroots_event::id::RadrootsNip01Coordinate::kind(&self) -> u32 +pub fn radroots_event::id::RadrootsNip01Coordinate::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsNip01CoordinateParseError> +pub fn radroots_event::id::RadrootsNip01Coordinate::parts(&self) -> radroots_event::id::RadrootsNip01CoordinateParts +pub const fn radroots_event::id::RadrootsNip01Coordinate::pubkey(&self) -> &radroots_identity::key::PublicKey +impl core::convert::AsRef<str> for radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsNip01Coordinate> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsNip01Coordinate) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsNip01Coordinate +pub type radroots_event::id::RadrootsNip01Coordinate::Error = radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01Coordinate::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsNip01Coordinate +pub type radroots_event::id::RadrootsNip01Coordinate::Error = radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01Coordinate::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsNip01Coordinate +pub type radroots_event::id::RadrootsNip01Coordinate::Err = radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01Coordinate::from_str(&str) -> core::result::Result<Self, Self::Err> +impl serde_core::ser::Serialize for radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::Nip01CoordinateParts +pub radroots_event::id::Nip01CoordinateParts::identifier: alloc::string::String +pub radroots_event::id::Nip01CoordinateParts::kind: u32 +pub radroots_event::id::Nip01CoordinateParts::pubkey: radroots_identity::key::PublicKey +impl radroots_event::id::RadrootsNip01CoordinateParts +pub fn radroots_event::id::RadrootsNip01CoordinateParts::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsNip01CoordinateParseError> +pub struct radroots_event::id::RadrootsAddressableCoordinate(_) +impl radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsAddressableCoordinate::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsAddressableCoordinate::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsAddressableCoordinate> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsAddressableCoordinate) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsAddressableCoordinate +pub type radroots_event::id::RadrootsAddressableCoordinate::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsAddressableCoordinate::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsAddressableCoordinate +pub type radroots_event::id::RadrootsAddressableCoordinate::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsAddressableCoordinate::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsAddressableCoordinate +pub type radroots_event::id::RadrootsAddressableCoordinate::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsAddressableCoordinate::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsAddressableCoordinate +pub fn radroots_event::id::RadrootsAddressableCoordinate::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsAddressableCoordinateParts +pub radroots_event::id::RadrootsAddressableCoordinateParts::d_tag: radroots_event::id::RadrootsDTag +pub radroots_event::id::RadrootsAddressableCoordinateParts::kind: u32 +pub radroots_event::id::RadrootsAddressableCoordinateParts::pubkey: radroots_identity::key::PublicKey +impl radroots_event::id::RadrootsAddressableCoordinateParts +pub fn radroots_event::id::RadrootsAddressableCoordinateParts::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub struct radroots_event::id::RadrootsClassifiedListingAddress(_) +impl radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsClassifiedListingAddress::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsClassifiedListingAddress::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsClassifiedListingAddress> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsClassifiedListingAddress) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsClassifiedListingAddress +pub type radroots_event::id::RadrootsClassifiedListingAddress::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsClassifiedListingAddress::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsClassifiedListingAddress +pub type radroots_event::id::RadrootsClassifiedListingAddress::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsClassifiedListingAddress::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsClassifiedListingAddress +pub type radroots_event::id::RadrootsClassifiedListingAddress::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsClassifiedListingAddress::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsClassifiedListingAddress +pub fn radroots_event::id::RadrootsClassifiedListingAddress::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsDTag(_) +impl radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsDTag::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsDTag::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsDTag> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsDTag) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsDTag +pub type radroots_event::id::RadrootsDTag::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsDTag::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsDTag +pub type radroots_event::id::RadrootsDTag::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsDTag::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsDTag +pub type radroots_event::id::RadrootsDTag::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsDTag::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsDTag +pub fn radroots_event::id::RadrootsDTag::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsEconomicsDigest(_) +impl radroots_event::id::RadrootsEconomicsDigest +pub fn radroots_event::id::RadrootsEconomicsDigest::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsEconomicsDigest::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsEconomicsDigest::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsEconomicsDigest +pub fn radroots_event::id::RadrootsEconomicsDigest::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsEconomicsDigest> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsEconomicsDigest) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsEconomicsDigest +pub type radroots_event::id::RadrootsEconomicsDigest::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEconomicsDigest::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsEconomicsDigest +pub type radroots_event::id::RadrootsEconomicsDigest::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEconomicsDigest::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsEconomicsDigest +pub fn radroots_event::id::RadrootsEconomicsDigest::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsEconomicsDigest +pub type radroots_event::id::RadrootsEconomicsDigest::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEconomicsDigest::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsEconomicsDigest +pub fn radroots_event::id::RadrootsEconomicsDigest::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsEconomicsDigest +pub fn radroots_event::id::RadrootsEconomicsDigest::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsEconomicsDigest +pub fn radroots_event::id::RadrootsEconomicsDigest::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsEventEnvelopePointer +pub radroots_event::id::RadrootsEventEnvelopePointer::event_id: radroots_event::id::RadrootsEventId +pub radroots_event::id::RadrootsEventEnvelopePointer::relays: alloc::vec::Vec<alloc::string::String> +impl radroots_event::id::RadrootsEventEnvelopePointer +pub fn radroots_event::id::RadrootsEventEnvelopePointer::new<I, S>(radroots_event::id::RadrootsEventId, I) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> where I: core::iter::traits::collect::IntoIterator<Item = S>, S: core::convert::Into<alloc::string::String> +pub struct radroots_event::id::RadrootsEventId(_) +impl radroots_event::id::RadrootsEventId +pub const fn radroots_event::id::RadrootsEventId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsEventId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsEventId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsEventId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsEventId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsEventId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsEventId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsEventId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsEventPointer(_) +impl radroots_event::id::RadrootsEventPointer +pub const fn radroots_event::id::RadrootsEventPointer::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsEventPointer::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsEventPointer::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsEventPointer::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsEventPointer::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsEventPointer::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsEventPointer> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsEventPointer) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsEventPointer +pub type radroots_event::id::RadrootsEventPointer::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventPointer::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsEventPointer +pub type radroots_event::id::RadrootsEventPointer::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventPointer::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsEventPointer +pub type radroots_event::id::RadrootsEventPointer::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventPointer::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsEventPointer +pub fn radroots_event::id::RadrootsEventPointer::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsEventSignature(_) +impl radroots_event::id::RadrootsEventSignature +pub const fn radroots_event::id::RadrootsEventSignature::as_bytes(&self) -> &[u8; 64] +pub const fn radroots_event::id::RadrootsEventSignature::from_bytes([u8; 64]) -> Self +pub const fn radroots_event::id::RadrootsEventSignature::into_bytes(self) -> [u8; 64] +pub fn radroots_event::id::RadrootsEventSignature::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsEventSignature::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsEventSignature::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 64]> for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::from([u8; 64]) -> Self +impl core::convert::From<radroots_event::id::RadrootsEventSignature> for [u8; 64] +pub fn [u8; 64]::from(radroots_event::id::RadrootsEventSignature) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsEventSignature +pub type radroots_event::id::RadrootsEventSignature::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventSignature::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsEventSignature +pub type radroots_event::id::RadrootsEventSignature::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventSignature::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsEventSignature +pub type radroots_event::id::RadrootsEventSignature::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventSignature::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsEventSignature +pub fn radroots_event::id::RadrootsEventSignature::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsInventoryBinId(_) +impl radroots_event::id::RadrootsInventoryBinId +pub fn radroots_event::id::RadrootsInventoryBinId::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsInventoryBinId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsInventoryBinId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsInventoryBinId +pub fn radroots_event::id::RadrootsInventoryBinId::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsInventoryBinId> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsInventoryBinId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsInventoryBinId +pub type radroots_event::id::RadrootsInventoryBinId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsInventoryBinId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsInventoryBinId +pub type radroots_event::id::RadrootsInventoryBinId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsInventoryBinId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsInventoryBinId +pub fn radroots_event::id::RadrootsInventoryBinId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsInventoryBinId +pub type radroots_event::id::RadrootsInventoryBinId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsInventoryBinId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsInventoryBinId +pub fn radroots_event::id::RadrootsInventoryBinId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsInventoryBinId +pub fn radroots_event::id::RadrootsInventoryBinId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsInventoryBinId +pub fn radroots_event::id::RadrootsInventoryBinId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsNip01Coordinate +impl radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsNip01Coordinate::identifier(&self) -> &str +pub fn radroots_event::id::RadrootsNip01Coordinate::into_parts(self) -> radroots_event::id::RadrootsNip01CoordinateParts +pub fn radroots_event::id::RadrootsNip01Coordinate::into_string(self) -> alloc::string::String +pub const fn radroots_event::id::RadrootsNip01Coordinate::kind(&self) -> u32 +pub fn radroots_event::id::RadrootsNip01Coordinate::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsNip01CoordinateParseError> +pub fn radroots_event::id::RadrootsNip01Coordinate::parts(&self) -> radroots_event::id::RadrootsNip01CoordinateParts +pub const fn radroots_event::id::RadrootsNip01Coordinate::pubkey(&self) -> &radroots_identity::key::PublicKey +impl core::convert::AsRef<str> for radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsNip01Coordinate> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsNip01Coordinate) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsNip01Coordinate +pub type radroots_event::id::RadrootsNip01Coordinate::Error = radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01Coordinate::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsNip01Coordinate +pub type radroots_event::id::RadrootsNip01Coordinate::Error = radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01Coordinate::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsNip01Coordinate +pub type radroots_event::id::RadrootsNip01Coordinate::Err = radroots_event::id::RadrootsNip01CoordinateParseError +pub fn radroots_event::id::RadrootsNip01Coordinate::from_str(&str) -> core::result::Result<Self, Self::Err> +impl serde_core::ser::Serialize for radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsNip01Coordinate +pub fn radroots_event::id::RadrootsNip01Coordinate::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsNip01CoordinateParts +pub radroots_event::id::RadrootsNip01CoordinateParts::identifier: alloc::string::String +pub radroots_event::id::RadrootsNip01CoordinateParts::kind: u32 +pub radroots_event::id::RadrootsNip01CoordinateParts::pubkey: radroots_identity::key::PublicKey +impl radroots_event::id::RadrootsNip01CoordinateParts +pub fn radroots_event::id::RadrootsNip01CoordinateParts::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsNip01CoordinateParseError> +pub struct radroots_event::id::RadrootsOrderId(_) +impl radroots_event::id::RadrootsOrderId +pub fn radroots_event::id::RadrootsOrderId::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsOrderId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsOrderId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsOrderId +pub fn radroots_event::id::RadrootsOrderId::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsOrderId> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsOrderId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsOrderId +pub type radroots_event::id::RadrootsOrderId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsOrderId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsOrderId +pub type radroots_event::id::RadrootsOrderId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsOrderId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsOrderId +pub fn radroots_event::id::RadrootsOrderId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsOrderId +pub type radroots_event::id::RadrootsOrderId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsOrderId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsOrderId +pub fn radroots_event::id::RadrootsOrderId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsOrderId +pub fn radroots_event::id::RadrootsOrderId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsOrderId +pub fn radroots_event::id::RadrootsOrderId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsOrderQuoteId(_) +impl radroots_event::id::RadrootsOrderQuoteId +pub fn radroots_event::id::RadrootsOrderQuoteId::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsOrderQuoteId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsOrderQuoteId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsOrderQuoteId +pub fn radroots_event::id::RadrootsOrderQuoteId::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsOrderQuoteId> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsOrderQuoteId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsOrderQuoteId +pub type radroots_event::id::RadrootsOrderQuoteId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsOrderQuoteId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsOrderQuoteId +pub type radroots_event::id::RadrootsOrderQuoteId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsOrderQuoteId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsOrderQuoteId +pub fn radroots_event::id::RadrootsOrderQuoteId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsOrderQuoteId +pub type radroots_event::id::RadrootsOrderQuoteId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsOrderQuoteId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsOrderQuoteId +pub fn radroots_event::id::RadrootsOrderQuoteId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsOrderQuoteId +pub fn radroots_event::id::RadrootsOrderQuoteId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsOrderQuoteId +pub fn radroots_event::id::RadrootsOrderQuoteId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsRelayUrl(_) +impl radroots_event::id::RadrootsRelayUrl +pub fn radroots_event::id::RadrootsRelayUrl::as_str(&self) -> &str +pub fn radroots_event::id::RadrootsRelayUrl::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsRelayUrl::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::id::RadrootsRelayUrl +pub fn radroots_event::id::RadrootsRelayUrl::as_ref(&self) -> &str +impl core::convert::From<radroots_event::id::RadrootsRelayUrl> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::id::RadrootsRelayUrl) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsRelayUrl +pub type radroots_event::id::RadrootsRelayUrl::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsRelayUrl::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsRelayUrl +pub type radroots_event::id::RadrootsRelayUrl::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsRelayUrl::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsRelayUrl +pub fn radroots_event::id::RadrootsRelayUrl::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsRelayUrl +pub type radroots_event::id::RadrootsRelayUrl::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsRelayUrl::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsRelayUrl +pub fn radroots_event::id::RadrootsRelayUrl::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsRelayUrl +pub fn radroots_event::id::RadrootsRelayUrl::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsRelayUrl +pub fn radroots_event::id::RadrootsRelayUrl::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsTradeCandidateId(_) +impl radroots_event::id::RadrootsTradeCandidateId +pub const fn radroots_event::id::RadrootsTradeCandidateId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsTradeCandidateId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsTradeCandidateId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsTradeCandidateId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeCandidateId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeCandidateId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeCandidateId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsTradeCandidateId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsTradeId(_) +impl radroots_event::id::RadrootsTradeId +pub const fn radroots_event::id::RadrootsTradeId::as_bytes(&self) -> &[u8; 16] +pub const fn radroots_event::id::RadrootsTradeId::from_bytes([u8; 16]) -> Self +pub const fn radroots_event::id::RadrootsTradeId::into_bytes(self) -> [u8; 16] +pub fn radroots_event::id::RadrootsTradeId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 16]> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::from([u8; 16]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeId> for [u8; 16] +pub fn [u8; 16]::from(radroots_event::id::RadrootsTradeId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::RadrootsTradeMutationId(_) +impl radroots_event::id::RadrootsTradeMutationId +pub const fn radroots_event::id::RadrootsTradeMutationId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsTradeMutationId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsTradeMutationId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsTradeMutationId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeMutationId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeMutationId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeMutationId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsTradeMutationId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::id::TradeId(_) +impl radroots_event::id::RadrootsTradeId +pub const fn radroots_event::id::RadrootsTradeId::as_bytes(&self) -> &[u8; 16] +pub const fn radroots_event::id::RadrootsTradeId::from_bytes([u8; 16]) -> Self +pub const fn radroots_event::id::RadrootsTradeId::into_bytes(self) -> [u8; 16] +pub fn radroots_event::id::RadrootsTradeId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 16]> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::from([u8; 16]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeId> for [u8; 16] +pub fn [u8; 16]::from(radroots_event::id::RadrootsTradeId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub const radroots_event::id::RADROOTS_NIP01_COORDINATE_MAX_BYTES: usize +pub fn radroots_event::id::relay_url_is_valid(&str) -> bool +pub mod radroots_event::knowledge +pub enum radroots_event::knowledge::RadrootsKnowledgeLocationPrecision +pub radroots_event::knowledge::RadrootsKnowledgeLocationPrecision::CoarseGeohash +pub radroots_event::knowledge::RadrootsKnowledgeLocationPrecision::ExactPrivateReference +pub radroots_event::knowledge::RadrootsKnowledgeLocationPrecision::ExactPublic +pub radroots_event::knowledge::RadrootsKnowledgeLocationPrecision::Locality +pub radroots_event::knowledge::RadrootsKnowledgeLocationPrecision::None +pub radroots_event::knowledge::RadrootsKnowledgeLocationPrecision::Region +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeLocationPrecision +pub fn radroots_event::knowledge::RadrootsKnowledgeLocationPrecision::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::knowledge::RadrootsKnowledgeReviewScope +pub radroots_event::knowledge::RadrootsKnowledgeReviewScope::AddressableCoordinateAtPublishedAt +pub radroots_event::knowledge::RadrootsKnowledgeReviewScope::PolicyLatest +pub radroots_event::knowledge::RadrootsKnowledgeReviewScope::SpecificVersion +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeReviewScope +pub fn radroots_event::knowledge::RadrootsKnowledgeReviewScope::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::knowledge::RadrootsKnowledgeValidationError +pub radroots_event::knowledge::RadrootsKnowledgeValidationError::EmptyField(&'static str) +pub radroots_event::knowledge::RadrootsKnowledgeValidationError::InvalidField(&'static str) +impl radroots_event::knowledge::RadrootsKnowledgeValidationError +pub const fn radroots_event::knowledge::RadrootsKnowledgeValidationError::code(self) -> &'static str +pub const fn radroots_event::knowledge::RadrootsKnowledgeValidationError::field(self) -> &'static str +impl core::error::Error for radroots_event::knowledge::RadrootsKnowledgeValidationError +impl core::fmt::Display for radroots_event::knowledge::RadrootsKnowledgeValidationError +pub fn radroots_event::knowledge::RadrootsKnowledgeValidationError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::knowledge::RadrootsWikiDTagError +pub radroots_event::knowledge::RadrootsWikiDTagError::Empty +pub radroots_event::knowledge::RadrootsWikiDTagError::NotNormalized +pub radroots_event::knowledge::RadrootsWikiDTagError::NotNormalized::normalized: alloc::string::String +pub radroots_event::knowledge::RadrootsWikiDTagError::TooLong +pub radroots_event::knowledge::RadrootsWikiDTagError::TooLong::actual: usize +pub radroots_event::knowledge::RadrootsWikiDTagError::TooLong::max: usize +impl radroots_event::knowledge::RadrootsWikiDTagError +pub const fn radroots_event::knowledge::RadrootsWikiDTagError::code(&self) -> &'static str +impl core::error::Error for radroots_event::knowledge::RadrootsWikiDTagError +impl core::fmt::Display for radroots_event::knowledge::RadrootsWikiDTagError +pub fn radroots_event::knowledge::RadrootsWikiDTagError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::knowledge::RadrootsAddressableRef +pub radroots_event::knowledge::RadrootsAddressableRef::d_tag: alloc::string::String +pub radroots_event::knowledge::RadrootsAddressableRef::kind: u32 +pub radroots_event::knowledge::RadrootsAddressableRef::pubkey: alloc::string::String +pub radroots_event::knowledge::RadrootsAddressableRef::relays: alloc::vec::Vec<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsAddressableRef +pub fn radroots_event::knowledge::RadrootsAddressableRef::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsContributionAttestation +pub radroots_event::knowledge::RadrootsContributionAttestation::contribution_type: alloc::string::String +pub radroots_event::knowledge::RadrootsContributionAttestation::contributor_pubkey: alloc::string::String +pub radroots_event::knowledge::RadrootsContributionAttestation::evidence_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsContributionAttestation::schema: alloc::string::String +pub radroots_event::knowledge::RadrootsContributionAttestation::schema_version: u16 +pub radroots_event::knowledge::RadrootsContributionAttestation::subject_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsContributionAttestation::summary: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsContributionAttestation +pub fn radroots_event::knowledge::RadrootsContributionAttestation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsEvidenceBounty +pub radroots_event::knowledge::RadrootsEvidenceBounty::closes_at: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsEvidenceBounty::d_tag: alloc::string::String +pub radroots_event::knowledge::RadrootsEvidenceBounty::reward_note: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsEvidenceBounty::schema: alloc::string::String +pub radroots_event::knowledge::RadrootsEvidenceBounty::schema_version: u16 +pub radroots_event::knowledge::RadrootsEvidenceBounty::summary: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsEvidenceBounty::target_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsEvidenceBounty::title: alloc::string::String +pub radroots_event::knowledge::RadrootsEvidenceBounty::topics: alloc::vec::Vec<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsEvidenceBounty +pub fn radroots_event::knowledge::RadrootsEvidenceBounty::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeChangeProposal +pub radroots_event::knowledge::RadrootsKnowledgeChangeProposal::evidence_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeChangeProposal::proposal_type: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeChangeProposal::rationale: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeChangeProposal::schema: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeChangeProposal::schema_version: u16 +pub radroots_event::knowledge::RadrootsKnowledgeChangeProposal::summary: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeChangeProposal::supersedes: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeChangeProposal::target: radroots_event::tag::RadrootsEventRef +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeChangeProposal +pub fn radroots_event::knowledge::RadrootsKnowledgeChangeProposal::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeCitationSpan +pub radroots_event::knowledge::RadrootsKnowledgeCitationSpan::artifact_ref: core::option::Option<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeCitationSpan::chunk_id: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeCitationSpan::page_end: core::option::Option<u32> +pub radroots_event::knowledge::RadrootsKnowledgeCitationSpan::page_start: core::option::Option<u32> +pub radroots_event::knowledge::RadrootsKnowledgeCitationSpan::quote_hash: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeCitationSpan::section_path: alloc::vec::Vec<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeCitationSpan::source_ref: radroots_event::tag::RadrootsEventRef +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeCitationSpan +pub fn radroots_event::knowledge::RadrootsKnowledgeCitationSpan::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeClaim +pub radroots_event::knowledge::RadrootsKnowledgeClaim::applies_to: alloc::vec::Vec<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeClaim::author_asserted_confidence: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeClaim::citation_spans: alloc::vec::Vec<radroots_event::knowledge::RadrootsKnowledgeCitationSpan> +pub radroots_event::knowledge::RadrootsKnowledgeClaim::claim_type: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeClaim::schema: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeClaim::schema_version: u16 +pub radroots_event::knowledge::RadrootsKnowledgeClaim::supersedes: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeClaim::text: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeClaim::topics: alloc::vec::Vec<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeClaim +pub fn radroots_event::knowledge::RadrootsKnowledgeClaim::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeFieldContext +pub radroots_event::knowledge::RadrootsKnowledgeFieldContext::context_tags: alloc::vec::Vec<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeFieldContext::location_precision: radroots_event::knowledge::RadrootsKnowledgeLocationPrecision +pub radroots_event::knowledge::RadrootsKnowledgeFieldContext::private_location_ref: core::option::Option<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeFieldContext::public_location: core::option::Option<radroots_event::knowledge::RadrootsKnowledgeLocation> +pub radroots_event::knowledge::RadrootsKnowledgeFieldContext::topics: alloc::vec::Vec<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeFieldContext +pub fn radroots_event::knowledge::RadrootsKnowledgeFieldContext::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeFieldReport +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::artifact_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::context: radroots_event::knowledge::RadrootsKnowledgeFieldContext +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::limitations: alloc::vec::Vec<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::observations: alloc::vec::Vec<radroots_event::knowledge::RadrootsKnowledgeObservation> +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::related_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::report_type: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::schema: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::schema_version: u16 +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::summary: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeFieldReport::title: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeFieldReport +pub fn radroots_event::knowledge::RadrootsKnowledgeFieldReport::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeLocation +pub radroots_event::knowledge::RadrootsKnowledgeLocation::geohash: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeLocation::label: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeLocation::locality: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeLocation::region: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeLocation +pub fn radroots_event::knowledge::RadrootsKnowledgeLocation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeNodeRef +pub radroots_event::knowledge::RadrootsKnowledgeNodeRef::address_ref: core::option::Option<radroots_event::knowledge::RadrootsAddressableRef> +pub radroots_event::knowledge::RadrootsKnowledgeNodeRef::event_ref: core::option::Option<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeNodeRef::external_id: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeNodeRef::label: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeNodeRef::node_type: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeNodeRef +pub fn radroots_event::knowledge::RadrootsKnowledgeNodeRef::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeObservation +pub radroots_event::knowledge::RadrootsKnowledgeObservation::observation_type: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeObservation::observed_at: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeObservation::text: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeObservation::values: alloc::vec::Vec<radroots_event::knowledge::RadrootsKnowledgeObservationValue> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeObservation +pub fn radroots_event::knowledge::RadrootsKnowledgeObservation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeObservationValue +pub radroots_event::knowledge::RadrootsKnowledgeObservationValue::key: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeObservationValue::unit: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeObservationValue::value: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeObservationValue +pub fn radroots_event::knowledge::RadrootsKnowledgeObservationValue::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeRelation +pub radroots_event::knowledge::RadrootsKnowledgeRelation::author_asserted_confidence: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeRelation::object: radroots_event::knowledge::RadrootsKnowledgeNodeRef +pub radroots_event::knowledge::RadrootsKnowledgeRelation::predicate: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeRelation::schema: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeRelation::schema_version: u16 +pub radroots_event::knowledge::RadrootsKnowledgeRelation::subject: radroots_event::knowledge::RadrootsKnowledgeNodeRef +pub radroots_event::knowledge::RadrootsKnowledgeRelation::supersedes: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeRelation::support_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeRelation +pub fn radroots_event::knowledge::RadrootsKnowledgeRelation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeReview +pub radroots_event::knowledge::RadrootsKnowledgeReview::evidence_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeReview::notes: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeReview::reviewer_role: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeReview::schema: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeReview::schema_version: u16 +pub radroots_event::knowledge::RadrootsKnowledgeReview::scores: alloc::vec::Vec<radroots_event::knowledge::RadrootsKnowledgeReviewScore> +pub radroots_event::knowledge::RadrootsKnowledgeReview::target: radroots_event::knowledge::RadrootsKnowledgeReviewTarget +pub radroots_event::knowledge::RadrootsKnowledgeReview::verdict: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeReview +pub fn radroots_event::knowledge::RadrootsKnowledgeReview::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeReviewScore +pub radroots_event::knowledge::RadrootsKnowledgeReviewScore::dimension: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeReviewScore::note: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeReviewScore::value: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeReviewScore +pub fn radroots_event::knowledge::RadrootsKnowledgeReviewScore::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeReviewTarget +pub radroots_event::knowledge::RadrootsKnowledgeReviewTarget::address: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeReviewTarget::author_pubkey: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeReviewTarget::event_id: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeReviewTarget::kind: u32 +pub radroots_event::knowledge::RadrootsKnowledgeReviewTarget::relays: alloc::vec::Vec<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeReviewTarget::review_scope: radroots_event::knowledge::RadrootsKnowledgeReviewScope +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeReviewTarget +pub fn radroots_event::knowledge::RadrootsKnowledgeReviewTarget::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsKnowledgeSource +pub radroots_event::knowledge::RadrootsKnowledgeSource::artifact_refs: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsKnowledgeSource::author_asserted_rights: core::option::Option<radroots_event::knowledge::RadrootsRightsAssertion> +pub radroots_event::knowledge::RadrootsKnowledgeSource::authors: alloc::vec::Vec<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeSource::canonical_url: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeSource::d_tag: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeSource::edition: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeSource::publication_year: core::option::Option<u16> +pub radroots_event::knowledge::RadrootsKnowledgeSource::publisher: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeSource::schema: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeSource::schema_version: u16 +pub radroots_event::knowledge::RadrootsKnowledgeSource::source_type: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeSource::summary: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsKnowledgeSource::title: alloc::string::String +pub radroots_event::knowledge::RadrootsKnowledgeSource::topics: alloc::vec::Vec<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsKnowledgeSource +pub fn radroots_event::knowledge::RadrootsKnowledgeSource::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsRightsAssertion +pub radroots_event::knowledge::RadrootsRightsAssertion::assertion: alloc::string::String +pub radroots_event::knowledge::RadrootsRightsAssertion::holder: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsRightsAssertion::license: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsRightsAssertion::url: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsRightsAssertion +pub fn radroots_event::knowledge::RadrootsRightsAssertion::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsWikiArticle +pub radroots_event::knowledge::RadrootsWikiArticle::content_djot: alloc::string::String +pub radroots_event::knowledge::RadrootsWikiArticle::d_tag: alloc::string::String +pub radroots_event::knowledge::RadrootsWikiArticle::deferred_to: core::option::Option<radroots_event::knowledge::RadrootsWikiArticleVersionRef> +pub radroots_event::knowledge::RadrootsWikiArticle::forked_from: alloc::vec::Vec<radroots_event::knowledge::RadrootsWikiArticleVersionRef> +pub radroots_event::knowledge::RadrootsWikiArticle::references: alloc::vec::Vec<radroots_event::tag::RadrootsEventRef> +pub radroots_event::knowledge::RadrootsWikiArticle::summary: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsWikiArticle::title: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsWikiArticle::topics: alloc::vec::Vec<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsWikiArticle +pub fn radroots_event::knowledge::RadrootsWikiArticle::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsWikiArticleVersionRef +pub radroots_event::knowledge::RadrootsWikiArticleVersionRef::address_ref: radroots_event::knowledge::RadrootsAddressableRef +pub radroots_event::knowledge::RadrootsWikiArticleVersionRef::event_id: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsWikiArticleVersionRef +pub fn radroots_event::knowledge::RadrootsWikiArticleVersionRef::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsWikiMergeRequest +pub radroots_event::knowledge::RadrootsWikiMergeRequest::base_version_event_id: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsWikiMergeRequest::destination_pubkey: alloc::string::String +pub radroots_event::knowledge::RadrootsWikiMergeRequest::explanation: core::option::Option<alloc::string::String> +pub radroots_event::knowledge::RadrootsWikiMergeRequest::source_version_event_id: alloc::string::String +pub radroots_event::knowledge::RadrootsWikiMergeRequest::target_article: radroots_event::knowledge::RadrootsAddressableRef +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsWikiMergeRequest +pub fn radroots_event::knowledge::RadrootsWikiMergeRequest::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::knowledge::RadrootsWikiRedirect +pub radroots_event::knowledge::RadrootsWikiRedirect::d_tag: alloc::string::String +pub radroots_event::knowledge::RadrootsWikiRedirect::target: radroots_event::knowledge::RadrootsAddressableRef +impl dto_bindgen_core::descriptor::Dto for radroots_event::knowledge::RadrootsWikiRedirect +pub fn radroots_event::knowledge::RadrootsWikiRedirect::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub const radroots_event::knowledge::RADROOTS_CONTRIBUTION_ATTESTATION_SCHEMA: &str +pub const radroots_event::knowledge::RADROOTS_EVIDENCE_BOUNTY_SCHEMA: &str +pub const radroots_event::knowledge::RADROOTS_KNOWLEDGE_CHANGE_PROPOSAL_SCHEMA: &str +pub const radroots_event::knowledge::RADROOTS_KNOWLEDGE_CLAIM_SCHEMA: &str +pub const radroots_event::knowledge::RADROOTS_KNOWLEDGE_FIELD_REPORT_SCHEMA: &str +pub const radroots_event::knowledge::RADROOTS_KNOWLEDGE_RELATION_SCHEMA: &str +pub const radroots_event::knowledge::RADROOTS_KNOWLEDGE_REVIEW_SCHEMA: &str +pub const radroots_event::knowledge::RADROOTS_KNOWLEDGE_SCHEMA_VERSION: u16 +pub const radroots_event::knowledge::RADROOTS_KNOWLEDGE_SOURCE_SCHEMA: &str +pub const radroots_event::knowledge::RADROOTS_WIKI_D_TAG_MAX_LEN: usize +pub fn radroots_event::knowledge::is_uncited_knowledge_claim_type(&str) -> bool +pub fn radroots_event::knowledge::normalize_wiki_d_tag(&str) -> alloc::string::String +pub fn radroots_event::knowledge::validate_contribution_attestation(&radroots_event::knowledge::RadrootsContributionAttestation) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_evidence_bounty(&radroots_event::knowledge::RadrootsEvidenceBounty) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_knowledge_change_proposal(&radroots_event::knowledge::RadrootsKnowledgeChangeProposal) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_knowledge_claim(&radroots_event::knowledge::RadrootsKnowledgeClaim) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_knowledge_field_report(&radroots_event::knowledge::RadrootsKnowledgeFieldReport) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_knowledge_relation(&radroots_event::knowledge::RadrootsKnowledgeRelation) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_knowledge_review(&radroots_event::knowledge::RadrootsKnowledgeReview) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_knowledge_source(&radroots_event::knowledge::RadrootsKnowledgeSource) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_wiki_article(&radroots_event::knowledge::RadrootsWikiArticle) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_wiki_d_tag(&str) -> core::result::Result<(), radroots_event::knowledge::RadrootsWikiDTagError> +pub fn radroots_event::knowledge::validate_wiki_merge_request(&radroots_event::knowledge::RadrootsWikiMergeRequest) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub fn radroots_event::knowledge::validate_wiki_redirect(&radroots_event::knowledge::RadrootsWikiRedirect) -> core::result::Result<(), radroots_event::knowledge::RadrootsKnowledgeValidationError> +pub mod radroots_event::listing +pub mod radroots_event::listing::classified +pub enum radroots_event::listing::classified::RadrootsClassifiedListingPartition +pub radroots_event::listing::classified::RadrootsClassifiedListingPartition::Ambiguous +pub radroots_event::listing::classified::RadrootsClassifiedListingPartition::FocusedFoodAvailability +pub radroots_event::listing::classified::RadrootsClassifiedListingPartition::GenericNip99 +pub radroots_event::listing::classified::RadrootsClassifiedListingPartition::OperationalListing +pub const radroots_event::listing::classified::TAG_RADROOTS_BIN: &str +pub const radroots_event::listing::classified::TAG_RADROOTS_PRICE: &str +pub const radroots_event::listing::classified::TAG_RADROOTS_PRICE_UNIT: &str +pub const radroots_event::listing::classified::TAG_RADROOTS_PRIMARY_BIN: &str +pub const radroots_event::listing::classified::TAG_RADROOTS_QUANTITY: &str +pub fn radroots_event::listing::classified::classify_classified_listing_marker_names<'a>(impl core::iter::traits::collect::IntoIterator<Item = core::option::Option<&'a str>>) -> radroots_event::listing::classified::RadrootsClassifiedListingPartition +pub fn radroots_event::listing::classified::classify_classified_listing_tag_slice(&[radroots_event::envelope::RadrootsEventTag]) -> radroots_event::listing::classified::RadrootsClassifiedListingPartition +pub fn radroots_event::listing::classified::classify_classified_listing_tags(&radroots_event::envelope::RadrootsEventTags) -> radroots_event::listing::classified::RadrootsClassifiedListingPartition +pub mod radroots_event::listing::operational +pub enum radroots_event::listing::operational::RadrootsOperationalListingAvailability +pub radroots_event::listing::operational::RadrootsOperationalListingAvailability::Status +pub radroots_event::listing::operational::RadrootsOperationalListingAvailability::Status::status: radroots_event::listing::operational::RadrootsOperationalListingStatus +pub radroots_event::listing::operational::RadrootsOperationalListingAvailability::Window +pub radroots_event::listing::operational::RadrootsOperationalListingAvailability::Window::end: core::option::Option<u64> +pub radroots_event::listing::operational::RadrootsOperationalListingAvailability::Window::start: core::option::Option<u64> +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingAvailability +pub fn radroots_event::listing::operational::RadrootsOperationalListingAvailability::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod +pub radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod::LocalDelivery +pub radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod::Other +pub radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod::Other::method: alloc::string::String +pub radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod::Pickup +pub radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod::Shipping +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod +pub fn radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::listing::operational::RadrootsOperationalListingParseError +pub radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidCurrency +pub radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidDiscount(alloc::string::String) +pub radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidJson(alloc::string::String) +pub radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidKind(u32) +pub radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidNumber(alloc::string::String) +pub radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidTag(alloc::string::String) +pub radroots_event::listing::operational::RadrootsOperationalListingParseError::InvalidUnit +pub radroots_event::listing::operational::RadrootsOperationalListingParseError::MissingTag(alloc::string::String) +impl core::error::Error for radroots_event::listing::operational::RadrootsOperationalListingParseError +impl core::fmt::Display for radroots_event::listing::operational::RadrootsOperationalListingParseError +pub fn radroots_event::listing::operational::RadrootsOperationalListingParseError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingParseError +pub fn radroots_event::listing::operational::RadrootsOperationalListingParseError::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::listing::operational::RadrootsOperationalListingStatus +pub radroots_event::listing::operational::RadrootsOperationalListingStatus::Active +pub radroots_event::listing::operational::RadrootsOperationalListingStatus::Other +pub radroots_event::listing::operational::RadrootsOperationalListingStatus::Other::value: alloc::string::String +pub radroots_event::listing::operational::RadrootsOperationalListingStatus::Sold +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingStatus +pub fn radroots_event::listing::operational::RadrootsOperationalListingStatus::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::listing::operational::RadrootsOperationalListing +pub radroots_event::listing::operational::RadrootsOperationalListing::availability: core::option::Option<radroots_event::listing::operational::RadrootsOperationalListingAvailability> +pub radroots_event::listing::operational::RadrootsOperationalListing::bins: alloc::vec::Vec<radroots_event::listing::operational::RadrootsOperationalListingBin> +pub radroots_event::listing::operational::RadrootsOperationalListing::d_tag: radroots_event::id::RadrootsDTag +pub radroots_event::listing::operational::RadrootsOperationalListing::delivery_method: core::option::Option<radroots_event::listing::operational::RadrootsOperationalListingDeliveryMethod> +pub radroots_event::listing::operational::RadrootsOperationalListing::discounts: core::option::Option<alloc::vec::Vec<radroots_core::discount::Discount>> +pub radroots_event::listing::operational::RadrootsOperationalListing::farm: radroots_event::farm::RadrootsFarmRef +pub radroots_event::listing::operational::RadrootsOperationalListing::images: core::option::Option<alloc::vec::Vec<radroots_event::listing::operational::RadrootsOperationalListingImage>> +pub radroots_event::listing::operational::RadrootsOperationalListing::inventory_available: core::option::Option<radroots_core::decimal::Decimal> +pub radroots_event::listing::operational::RadrootsOperationalListing::location: core::option::Option<radroots_event::listing::operational::RadrootsOperationalListingPublicLocation> +pub radroots_event::listing::operational::RadrootsOperationalListing::plot: core::option::Option<radroots_event::farm::plot::RadrootsPlotRef> +pub radroots_event::listing::operational::RadrootsOperationalListing::primary_bin_id: radroots_event::id::RadrootsInventoryBinId +pub radroots_event::listing::operational::RadrootsOperationalListing::product: radroots_event::listing::operational::RadrootsOperationalListingProduct +pub radroots_event::listing::operational::RadrootsOperationalListing::published_at: core::option::Option<u64> +pub radroots_event::listing::operational::RadrootsOperationalListing::resource_area: core::option::Option<radroots_event::farm::resource_area::RadrootsResourceAreaRef> +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListing +pub fn radroots_event::listing::operational::RadrootsOperationalListing::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::listing::operational::RadrootsOperationalListingBin +pub radroots_event::listing::operational::RadrootsOperationalListingBin::bin_id: radroots_event::id::RadrootsInventoryBinId +pub radroots_event::listing::operational::RadrootsOperationalListingBin::display_amount: core::option::Option<radroots_core::decimal::Decimal> +pub radroots_event::listing::operational::RadrootsOperationalListingBin::display_label: core::option::Option<alloc::string::String> +pub radroots_event::listing::operational::RadrootsOperationalListingBin::display_price: core::option::Option<radroots_core::money::Money> +pub radroots_event::listing::operational::RadrootsOperationalListingBin::display_price_unit: core::option::Option<radroots_core::unit::Unit> +pub radroots_event::listing::operational::RadrootsOperationalListingBin::display_unit: core::option::Option<radroots_core::unit::Unit> +pub radroots_event::listing::operational::RadrootsOperationalListingBin::price_per_canonical_unit: radroots_core::quantity_price::QuantityPrice +pub radroots_event::listing::operational::RadrootsOperationalListingBin::quantity: radroots_core::quantity::Quantity +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingBin +pub fn radroots_event::listing::operational::RadrootsOperationalListingBin::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::listing::operational::RadrootsOperationalListingImage +pub radroots_event::listing::operational::RadrootsOperationalListingImage::size: core::option::Option<radroots_event::listing::operational::RadrootsOperationalListingImageSize> +pub radroots_event::listing::operational::RadrootsOperationalListingImage::url: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingImage +pub fn radroots_event::listing::operational::RadrootsOperationalListingImage::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::listing::operational::RadrootsOperationalListingImageSize +pub radroots_event::listing::operational::RadrootsOperationalListingImageSize::h: u32 +pub radroots_event::listing::operational::RadrootsOperationalListingImageSize::w: u32 +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingImageSize +pub fn radroots_event::listing::operational::RadrootsOperationalListingImageSize::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::listing::operational::RadrootsOperationalListingProduct +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::category: alloc::string::String +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::key: alloc::string::String +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::location: core::option::Option<alloc::string::String> +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::lot: core::option::Option<alloc::string::String> +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::process: core::option::Option<alloc::string::String> +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::profile: core::option::Option<alloc::string::String> +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::summary: core::option::Option<alloc::string::String> +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::title: alloc::string::String +pub radroots_event::listing::operational::RadrootsOperationalListingProduct::year: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingProduct +pub fn radroots_event::listing::operational::RadrootsOperationalListingProduct::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::listing::operational::RadrootsOperationalListingProductTagKeys +pub struct radroots_event::listing::operational::RadrootsOperationalListingPublicLocation +pub radroots_event::listing::operational::RadrootsOperationalListingPublicLocation::city: core::option::Option<alloc::string::String> +pub radroots_event::listing::operational::RadrootsOperationalListingPublicLocation::country: core::option::Option<alloc::string::String> +pub radroots_event::listing::operational::RadrootsOperationalListingPublicLocation::geohash: alloc::string::String +pub radroots_event::listing::operational::RadrootsOperationalListingPublicLocation::primary: alloc::string::String +pub radroots_event::listing::operational::RadrootsOperationalListingPublicLocation::region: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::listing::operational::RadrootsOperationalListingPublicLocation +pub fn radroots_event::listing::operational::RadrootsOperationalListingPublicLocation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub const radroots_event::listing::operational::RADROOTS_OPERATIONAL_LISTING_PRODUCT_TAG_KEYS: [&str; 9] +pub mod radroots_event::media +pub mod radroots_event::media::file_metadata +pub struct radroots_event::media::file_metadata::RadrootsFileMetadata +pub radroots_event::media::file_metadata::RadrootsFileMetadata::alt: core::option::Option<alloc::string::String> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::blurhash: core::option::Option<alloc::string::String> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::content: core::option::Option<alloc::string::String> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::content_hashes: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::dimensions: core::option::Option<radroots_event::social::RadrootsSocialMediaDimensions> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::fallback: core::option::Option<alloc::string::String> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::magnet: core::option::Option<alloc::string::String> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::mime_type: alloc::string::String +pub radroots_event::media::file_metadata::RadrootsFileMetadata::original_sha256: core::option::Option<alloc::string::String> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::services: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::sha256: alloc::string::String +pub radroots_event::media::file_metadata::RadrootsFileMetadata::size: core::option::Option<u64> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::summary: core::option::Option<alloc::string::String> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::thumbnails: core::option::Option<alloc::vec::Vec<radroots_event::social::RadrootsSocialMediaThumbnail>> +pub radroots_event::media::file_metadata::RadrootsFileMetadata::url: alloc::string::String +#[non_exhaustive] pub enum radroots_event::media::RadrootsAuthoredImageError +pub radroots_event::media::RadrootsAuthoredImageError::MediaTypeNotImage +impl radroots_event::media::RadrootsAuthoredImageError +pub const fn radroots_event::media::RadrootsAuthoredImageError::code(&self) -> &'static str +impl core::error::Error for radroots_event::media::RadrootsAuthoredImageError +impl core::fmt::Display for radroots_event::media::RadrootsAuthoredImageError +pub fn radroots_event::media::RadrootsAuthoredImageError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::media::RadrootsAuthoredImage(_) +impl radroots_event::media::RadrootsAuthoredImage +pub fn radroots_event::media::RadrootsAuthoredImage::descriptor(&self) -> &radroots_blossom::descriptor::ByteVerifiedDescriptor +pub fn radroots_event::media::RadrootsAuthoredImage::try_from_verified_descriptor(radroots_blossom::descriptor::ByteVerifiedDescriptor) -> core::result::Result<Self, radroots_event::media::RadrootsAuthoredImageError> +impl core::convert::TryFrom<radroots_blossom::descriptor::ByteVerifiedDescriptor> for radroots_event::media::RadrootsAuthoredImage +pub type radroots_event::media::RadrootsAuthoredImage::Error = radroots_event::media::RadrootsAuthoredImageError +pub fn radroots_event::media::RadrootsAuthoredImage::try_from(radroots_blossom::descriptor::ByteVerifiedDescriptor) -> core::result::Result<Self, Self::Error> +pub mod radroots_event::post +pub mod radroots_event::post::article +pub struct radroots_event::post::article::RadrootsArticle +pub radroots_event::post::article::RadrootsArticle::content: alloc::string::String +pub radroots_event::post::article::RadrootsArticle::d_tag: alloc::string::String +pub radroots_event::post::article::RadrootsArticle::farm: core::option::Option<radroots_event::social::RadrootsSocialFarmAnchor> +pub radroots_event::post::article::RadrootsArticle::image: core::option::Option<alloc::string::String> +pub radroots_event::post::article::RadrootsArticle::location: core::option::Option<radroots_event::social::RadrootsSocialLocation> +pub radroots_event::post::article::RadrootsArticle::published_at: core::option::Option<u64> +pub radroots_event::post::article::RadrootsArticle::summary: core::option::Option<alloc::string::String> +pub radroots_event::post::article::RadrootsArticle::title: alloc::string::String +pub radroots_event::post::article::RadrootsArticle::topics: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub mod radroots_event::post::comment +#[non_exhaustive] pub enum radroots_event::post::comment::RadrootsNip22CommentError +pub radroots_event::post::comment::RadrootsNip22CommentError::ContentMissing +pub radroots_event::post::comment::RadrootsNip22CommentError::ContentTooLarge +pub radroots_event::post::comment::RadrootsNip22CommentError::ContentTooLarge::actual: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::ContentTooLarge::max: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::EventWireTooLarge +pub radroots_event::post::comment::RadrootsNip22CommentError::EventWireTooLarge::actual: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::EventWireTooLarge::max: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::ParentAuthorInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::comment::RadrootsNip22CommentError::ParentEventIdInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::comment::RadrootsNip22CommentError::ParentReferenceMismatch +pub radroots_event::post::comment::RadrootsNip22CommentError::RelayInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::comment::RadrootsNip22CommentError::RevisionEventIdInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::comment::RadrootsNip22CommentError::RootAuthorInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::comment::RadrootsNip22CommentError::RootCoordinateInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::comment::RadrootsNip22CommentError::RootEventIdInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::comment::RadrootsNip22CommentError::RootKindUnsupported +pub radroots_event::post::comment::RadrootsNip22CommentError::RootKindUnsupported::actual: u32 +pub radroots_event::post::comment::RadrootsNip22CommentError::TagBytesExceeded +pub radroots_event::post::comment::RadrootsNip22CommentError::TagBytesExceeded::actual: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::TagBytesExceeded::max: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::TagCountExceeded +pub radroots_event::post::comment::RadrootsNip22CommentError::TagCountExceeded::actual: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::TagCountExceeded::max: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::TagElementCountExceeded +pub radroots_event::post::comment::RadrootsNip22CommentError::TagElementCountExceeded::actual: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::TagElementCountExceeded::max: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::TagElementTooLarge +pub radroots_event::post::comment::RadrootsNip22CommentError::TagElementTooLarge::actual: usize +pub radroots_event::post::comment::RadrootsNip22CommentError::TagElementTooLarge::max: usize +impl radroots_event::post::comment::RadrootsNip22CommentError +pub const fn radroots_event::post::comment::RadrootsNip22CommentError::code(&self) -> &'static str +impl core::error::Error for radroots_event::post::comment::RadrootsNip22CommentError +pub fn radroots_event::post::comment::RadrootsNip22CommentError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +impl core::fmt::Display for radroots_event::post::comment::RadrootsNip22CommentError +pub fn radroots_event::post::comment::RadrootsNip22CommentError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::post::comment::RadrootsNip22CommentPosition +pub radroots_event::post::comment::RadrootsNip22CommentPosition::Nested +pub radroots_event::post::comment::RadrootsNip22CommentPosition::Nested::parent: radroots_event::post::comment::RadrootsNip22CommentParentReference +pub radroots_event::post::comment::RadrootsNip22CommentPosition::TopLevelAddress +pub radroots_event::post::comment::RadrootsNip22CommentPosition::TopLevelAddress::current_revision: radroots_event::id::RadrootsEventId +pub radroots_event::post::comment::RadrootsNip22CommentPosition::TopLevelEvent +pub enum radroots_event::post::comment::RadrootsNip22CommentRoot +pub radroots_event::post::comment::RadrootsNip22CommentRoot::Address(radroots_event::post::comment::RadrootsNip22AddressRootReference) +pub radroots_event::post::comment::RadrootsNip22CommentRoot::Event(radroots_event::post::comment::RadrootsNip22EventRootReference) +impl radroots_event::post::comment::RadrootsNip22CommentRoot +pub const fn radroots_event::post::comment::RadrootsNip22CommentRoot::author(&self) -> &radroots_identity::key::PublicKey +pub const fn radroots_event::post::comment::RadrootsNip22CommentRoot::kind(&self) -> radroots_event::post::comment::RadrootsNip22CommentRootKind +pub const fn radroots_event::post::comment::RadrootsNip22CommentRoot::relay(&self) -> core::option::Option<&radroots_event::tag::relay_hint::RadrootsNostrRelayHint> +impl core::convert::From<radroots_event::post::comment::RadrootsNip22AddressRootReference> for radroots_event::post::comment::RadrootsNip22CommentRoot +pub fn radroots_event::post::comment::RadrootsNip22CommentRoot::from(radroots_event::post::comment::RadrootsNip22AddressRootReference) -> Self +impl core::convert::From<radroots_event::post::comment::RadrootsNip22EventRootReference> for radroots_event::post::comment::RadrootsNip22CommentRoot +pub fn radroots_event::post::comment::RadrootsNip22CommentRoot::from(radroots_event::post::comment::RadrootsNip22EventRootReference) -> Self +pub enum radroots_event::post::comment::RadrootsNip22CommentRootKind +pub radroots_event::post::comment::RadrootsNip22CommentRootKind::CalendarDateEvent +pub radroots_event::post::comment::RadrootsNip22CommentRootKind::CalendarTimeEvent +pub radroots_event::post::comment::RadrootsNip22CommentRootKind::ClassifiedListing +impl radroots_event::post::comment::RadrootsNip22CommentRootKind +pub const fn radroots_event::post::comment::RadrootsNip22CommentRootKind::as_u32(self) -> u32 +pub const fn radroots_event::post::comment::RadrootsNip22CommentRootKind::parse(u32) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +impl core::convert::From<radroots_event::post::comment::RadrootsNip22CommentRootKind> for u32 +pub fn u32::from(radroots_event::post::comment::RadrootsNip22CommentRootKind) -> Self +impl core::convert::TryFrom<u32> for radroots_event::post::comment::RadrootsNip22CommentRootKind +pub type radroots_event::post::comment::RadrootsNip22CommentRootKind::Error = radroots_event::post::comment::RadrootsNip22CommentError +pub fn radroots_event::post::comment::RadrootsNip22CommentRootKind::try_from(u32) -> core::result::Result<Self, Self::Error> +pub struct radroots_event::post::comment::RadrootsAuthoredNip22Comment +impl radroots_event::post::comment::RadrootsAuthoredNip22Comment +pub fn radroots_event::post::comment::RadrootsAuthoredNip22Comment::content(&self) -> &str +pub fn radroots_event::post::comment::RadrootsAuthoredNip22Comment::nested(impl core::convert::Into<alloc::string::String>, impl core::convert::Into<radroots_event::post::comment::RadrootsNip22CommentRoot>, radroots_event::post::comment::RadrootsNip22CommentParentReference) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub fn radroots_event::post::comment::RadrootsAuthoredNip22Comment::parse_top_level_address(impl core::convert::Into<alloc::string::String>, radroots_event::post::comment::RadrootsNip22AddressRootReference, impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub const fn radroots_event::post::comment::RadrootsAuthoredNip22Comment::position(&self) -> &radroots_event::post::comment::RadrootsNip22CommentPosition +pub const fn radroots_event::post::comment::RadrootsAuthoredNip22Comment::root(&self) -> &radroots_event::post::comment::RadrootsNip22CommentRoot +pub fn radroots_event::post::comment::RadrootsAuthoredNip22Comment::top_level_address(impl core::convert::Into<alloc::string::String>, radroots_event::post::comment::RadrootsNip22AddressRootReference, radroots_event::id::RadrootsEventId) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub fn radroots_event::post::comment::RadrootsAuthoredNip22Comment::top_level_event(impl core::convert::Into<alloc::string::String>, radroots_event::post::comment::RadrootsNip22EventRootReference) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub struct radroots_event::post::comment::RadrootsNip22AddressRootReference +impl radroots_event::post::comment::RadrootsNip22AddressRootReference +pub const fn radroots_event::post::comment::RadrootsNip22AddressRootReference::author(&self) -> &radroots_identity::key::PublicKey +pub const fn radroots_event::post::comment::RadrootsNip22AddressRootReference::coordinate(&self) -> &radroots_event::id::RadrootsAddressableCoordinate +pub const fn radroots_event::post::comment::RadrootsNip22AddressRootReference::kind(&self) -> radroots_event::post::comment::RadrootsNip22CommentRootKind +pub fn radroots_event::post::comment::RadrootsNip22AddressRootReference::new(radroots_event::id::RadrootsAddressableCoordinate, core::option::Option<radroots_event::tag::relay_hint::RadrootsNostrRelayHint>) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub fn radroots_event::post::comment::RadrootsNip22AddressRootReference::parse(impl core::convert::AsRef<str>, core::option::Option<&str>) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub const fn radroots_event::post::comment::RadrootsNip22AddressRootReference::relay(&self) -> core::option::Option<&radroots_event::tag::relay_hint::RadrootsNostrRelayHint> +pub fn radroots_event::post::comment::RadrootsNip22AddressRootReference::relay_or_empty(&self) -> &str +impl core::convert::From<radroots_event::post::comment::RadrootsNip22AddressRootReference> for radroots_event::post::comment::RadrootsNip22CommentRoot +pub fn radroots_event::post::comment::RadrootsNip22CommentRoot::from(radroots_event::post::comment::RadrootsNip22AddressRootReference) -> Self +pub struct radroots_event::post::comment::RadrootsNip22CommentParentReference +impl radroots_event::post::comment::RadrootsNip22CommentParentReference +pub const fn radroots_event::post::comment::RadrootsNip22CommentParentReference::author(&self) -> &radroots_identity::key::PublicKey +pub const fn radroots_event::post::comment::RadrootsNip22CommentParentReference::event_id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::post::comment::RadrootsNip22CommentParentReference::new(radroots_event::id::RadrootsEventId, radroots_identity::key::PublicKey, core::option::Option<radroots_event::tag::relay_hint::RadrootsNostrRelayHint>) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub fn radroots_event::post::comment::RadrootsNip22CommentParentReference::parse(impl core::convert::AsRef<str>, impl core::convert::AsRef<str>, core::option::Option<&str>) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub const fn radroots_event::post::comment::RadrootsNip22CommentParentReference::relay(&self) -> core::option::Option<&radroots_event::tag::relay_hint::RadrootsNostrRelayHint> +pub fn radroots_event::post::comment::RadrootsNip22CommentParentReference::relay_or_empty(&self) -> &str +pub struct radroots_event::post::comment::RadrootsNip22EventRootReference +impl radroots_event::post::comment::RadrootsNip22EventRootReference +pub const fn radroots_event::post::comment::RadrootsNip22EventRootReference::author(&self) -> &radroots_identity::key::PublicKey +pub const fn radroots_event::post::comment::RadrootsNip22EventRootReference::event_id(&self) -> &radroots_event::id::RadrootsEventId +pub const fn radroots_event::post::comment::RadrootsNip22EventRootReference::kind(&self) -> radroots_event::post::comment::RadrootsNip22CommentRootKind +pub fn radroots_event::post::comment::RadrootsNip22EventRootReference::new(radroots_event::id::RadrootsEventId, radroots_identity::key::PublicKey, radroots_event::post::comment::RadrootsNip22CommentRootKind, core::option::Option<radroots_event::tag::relay_hint::RadrootsNostrRelayHint>) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub fn radroots_event::post::comment::RadrootsNip22EventRootReference::parse(impl core::convert::AsRef<str>, impl core::convert::AsRef<str>, u32, core::option::Option<&str>) -> core::result::Result<Self, radroots_event::post::comment::RadrootsNip22CommentError> +pub const fn radroots_event::post::comment::RadrootsNip22EventRootReference::relay(&self) -> core::option::Option<&radroots_event::tag::relay_hint::RadrootsNostrRelayHint> +pub fn radroots_event::post::comment::RadrootsNip22EventRootReference::relay_or_empty(&self) -> &str +impl core::convert::From<radroots_event::post::comment::RadrootsNip22EventRootReference> for radroots_event::post::comment::RadrootsNip22CommentRoot +pub fn radroots_event::post::comment::RadrootsNip22CommentRoot::from(radroots_event::post::comment::RadrootsNip22EventRootReference) -> Self +pub const radroots_event::post::comment::RADROOTS_NIP22_COMMENT_CONTENT_MAX_BYTES: usize +pub const radroots_event::post::comment::RADROOTS_NIP22_COMMENT_EVENT_WIRE_MAX_BYTES: usize +pub const radroots_event::post::comment::RADROOTS_NIP22_COMMENT_TAG_ELEMENT_MAX_BYTES: usize +pub const radroots_event::post::comment::RADROOTS_NIP22_COMMENT_TAG_MAX_COUNT: usize +pub const radroots_event::post::comment::RADROOTS_NIP22_COMMENT_TAG_TOTAL_ELEMENT_MAX_COUNT: usize +pub const radroots_event::post::comment::RADROOTS_NIP22_COMMENT_TAG_TOTAL_MAX_BYTES: usize +pub mod radroots_event::post::deletion +#[non_exhaustive] pub enum radroots_event::post::deletion::RadrootsNip09DeletionError +pub radroots_event::post::deletion::RadrootsNip09DeletionError::ContentTooLarge +pub radroots_event::post::deletion::RadrootsNip09DeletionError::ContentTooLarge::actual: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::ContentTooLarge::max: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::CoordinateInvalid(radroots_event::id::RadrootsNip01CoordinateParseError) +pub radroots_event::post::deletion::RadrootsNip09DeletionError::DuplicateAddressTarget +pub radroots_event::post::deletion::RadrootsNip09DeletionError::DuplicateAddressTarget::coordinate: alloc::string::String +pub radroots_event::post::deletion::RadrootsNip09DeletionError::DuplicateEventTarget +pub radroots_event::post::deletion::RadrootsNip09DeletionError::DuplicateEventTarget::event_id: alloc::string::String +pub radroots_event::post::deletion::RadrootsNip09DeletionError::EventIdInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::deletion::RadrootsNip09DeletionError::EventWireTooLarge +pub radroots_event::post::deletion::RadrootsNip09DeletionError::EventWireTooLarge::actual: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::EventWireTooLarge::max: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagBytesExceeded +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagBytesExceeded::actual: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagBytesExceeded::max: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagCountExceeded +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagCountExceeded::actual: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagCountExceeded::max: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagElementTooLarge +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagElementTooLarge::actual: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TagElementTooLarge::max: usize +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TargetKindOutOfRange +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TargetKindOutOfRange::actual: u32 +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TargetKindOutOfRange::max: u32 +pub radroots_event::post::deletion::RadrootsNip09DeletionError::TargetMissing +impl radroots_event::post::deletion::RadrootsNip09DeletionError +pub const fn radroots_event::post::deletion::RadrootsNip09DeletionError::code(&self) -> &'static str +impl core::error::Error for radroots_event::post::deletion::RadrootsNip09DeletionError +pub fn radroots_event::post::deletion::RadrootsNip09DeletionError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +impl core::fmt::Display for radroots_event::post::deletion::RadrootsNip09DeletionError +pub fn radroots_event::post::deletion::RadrootsNip09DeletionError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest +impl radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest +pub fn radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest::address_targets(&self) -> &[radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget] +pub fn radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest::content(&self) -> &str +pub fn radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest::event_targets(&self) -> &[radroots_event::post::deletion::RadrootsNip09DeletionEventTarget] +pub fn radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest::kind_hints(&self) -> &[u32] +pub const fn radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest::maximum_signed_event_wire_bytes(&self) -> usize +pub fn radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest::new(impl core::convert::Into<alloc::string::String>, alloc::vec::Vec<radroots_event::post::deletion::RadrootsNip09DeletionEventTarget>, alloc::vec::Vec<radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget>) -> core::result::Result<Self, radroots_event::post::deletion::RadrootsNip09DeletionError> +pub fn radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest::target_count(&self) -> usize +pub struct radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget +impl radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget +pub const fn radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget::coordinate(&self) -> &radroots_event::id::RadrootsNip01Coordinate +pub const fn radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget::kind_hint(&self) -> u32 +pub const fn radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget::new(radroots_event::id::RadrootsNip01Coordinate) -> Self +pub fn radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::post::deletion::RadrootsNip09DeletionError> +pub struct radroots_event::post::deletion::RadrootsNip09DeletionEventTarget +impl radroots_event::post::deletion::RadrootsNip09DeletionEventTarget +pub const fn radroots_event::post::deletion::RadrootsNip09DeletionEventTarget::event_id(&self) -> &radroots_event::id::RadrootsEventId +pub const fn radroots_event::post::deletion::RadrootsNip09DeletionEventTarget::kind_hint(&self) -> u32 +pub fn radroots_event::post::deletion::RadrootsNip09DeletionEventTarget::new(radroots_event::id::RadrootsEventId, u32) -> core::result::Result<Self, radroots_event::post::deletion::RadrootsNip09DeletionError> +pub fn radroots_event::post::deletion::RadrootsNip09DeletionEventTarget::parse(impl core::convert::AsRef<str>, u32) -> core::result::Result<Self, radroots_event::post::deletion::RadrootsNip09DeletionError> +pub const radroots_event::post::deletion::RADROOTS_NIP09_DELETION_CONTENT_MAX_BYTES: usize +pub const radroots_event::post::deletion::RADROOTS_NIP09_DELETION_EVENT_WIRE_MAX_BYTES: usize +pub const radroots_event::post::deletion::RADROOTS_NIP09_DELETION_TAG_ELEMENT_MAX_BYTES: usize +pub const radroots_event::post::deletion::RADROOTS_NIP09_DELETION_TAG_MAX_COUNT: usize +pub const radroots_event::post::deletion::RADROOTS_NIP09_DELETION_TAG_TOTAL_ELEMENT_MAX_COUNT: usize +pub const radroots_event::post::deletion::RADROOTS_NIP09_DELETION_TAG_TOTAL_MAX_BYTES: usize +pub const radroots_event::post::deletion::RADROOTS_NIP09_DELETION_TARGET_KIND_MAX: u32 +pub mod radroots_event::post::document +pub struct radroots_event::post::document::RadrootsDocument +pub radroots_event::post::document::RadrootsDocument::body_markdown: core::option::Option<alloc::string::String> +pub radroots_event::post::document::RadrootsDocument::d_tag: alloc::string::String +pub radroots_event::post::document::RadrootsDocument::doc_type: alloc::string::String +pub radroots_event::post::document::RadrootsDocument::effective_at: core::option::Option<u32> +pub radroots_event::post::document::RadrootsDocument::subject: radroots_event::post::document::RadrootsDocumentSubject +pub radroots_event::post::document::RadrootsDocument::summary: core::option::Option<alloc::string::String> +pub radroots_event::post::document::RadrootsDocument::tags: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::post::document::RadrootsDocument::title: alloc::string::String +pub radroots_event::post::document::RadrootsDocument::version: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::post::document::RadrootsDocument +pub fn radroots_event::post::document::RadrootsDocument::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::post::document::RadrootsDocumentSubject +pub radroots_event::post::document::RadrootsDocumentSubject::address: core::option::Option<alloc::string::String> +pub radroots_event::post::document::RadrootsDocumentSubject::pubkey: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::post::document::RadrootsDocumentSubject +pub fn radroots_event::post::document::RadrootsDocumentSubject::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::post::reaction +pub struct radroots_event::post::reaction::RadrootsReaction +pub radroots_event::post::reaction::RadrootsReaction::content: alloc::string::String +pub radroots_event::post::reaction::RadrootsReaction::target: radroots_event::social::RadrootsSocialTarget +impl dto_bindgen_core::descriptor::Dto for radroots_event::post::reaction::RadrootsReaction +pub fn radroots_event::post::reaction::RadrootsReaction::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::post::reply +#[non_exhaustive] pub enum radroots_event::post::reply::RadrootsNip10ReplyError +pub radroots_event::post::reply::RadrootsNip10ReplyError::AuthorInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::reply::RadrootsNip10ReplyError::ContentMissing +pub radroots_event::post::reply::RadrootsNip10ReplyError::ContentTooLarge +pub radroots_event::post::reply::RadrootsNip10ReplyError::ContentTooLarge::actual: usize +pub radroots_event::post::reply::RadrootsNip10ReplyError::ContentTooLarge::max: usize +pub radroots_event::post::reply::RadrootsNip10ReplyError::EventIdInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::reply::RadrootsNip10ReplyError::EventWireTooLarge +pub radroots_event::post::reply::RadrootsNip10ReplyError::EventWireTooLarge::actual: usize +pub radroots_event::post::reply::RadrootsNip10ReplyError::EventWireTooLarge::max: usize +pub radroots_event::post::reply::RadrootsNip10ReplyError::NestedParentMatchesRoot +pub radroots_event::post::reply::RadrootsNip10ReplyError::RelayInvalid(radroots_event::id::RadrootsIdParseError) +pub radroots_event::post::reply::RadrootsNip10ReplyError::TagBytesExceeded +pub radroots_event::post::reply::RadrootsNip10ReplyError::TagBytesExceeded::actual: usize +pub radroots_event::post::reply::RadrootsNip10ReplyError::TagBytesExceeded::max: usize +pub radroots_event::post::reply::RadrootsNip10ReplyError::TagElementTooLarge +pub radroots_event::post::reply::RadrootsNip10ReplyError::TagElementTooLarge::actual: usize +pub radroots_event::post::reply::RadrootsNip10ReplyError::TagElementTooLarge::max: usize +impl radroots_event::post::reply::RadrootsNip10ReplyError +pub const fn radroots_event::post::reply::RadrootsNip10ReplyError::code(&self) -> &'static str +impl core::error::Error for radroots_event::post::reply::RadrootsNip10ReplyError +pub fn radroots_event::post::reply::RadrootsNip10ReplyError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)> +impl core::fmt::Display for radroots_event::post::reply::RadrootsNip10ReplyError +pub fn radroots_event::post::reply::RadrootsNip10ReplyError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::post::reply::RadrootsAuthoredNip10Reply +impl radroots_event::post::reply::RadrootsAuthoredNip10Reply +pub fn radroots_event::post::reply::RadrootsAuthoredNip10Reply::content(&self) -> &str +pub fn radroots_event::post::reply::RadrootsAuthoredNip10Reply::direct(impl core::convert::Into<alloc::string::String>, radroots_event::post::reply::RadrootsNip10ReplyReference) -> core::result::Result<Self, radroots_event::post::reply::RadrootsNip10ReplyError> +pub const fn radroots_event::post::reply::RadrootsAuthoredNip10Reply::is_direct(&self) -> bool +pub fn radroots_event::post::reply::RadrootsAuthoredNip10Reply::nested(impl core::convert::Into<alloc::string::String>, radroots_event::post::reply::RadrootsNip10ReplyReference, radroots_event::post::reply::RadrootsNip10ReplyReference) -> core::result::Result<Self, radroots_event::post::reply::RadrootsNip10ReplyError> +pub const fn radroots_event::post::reply::RadrootsAuthoredNip10Reply::parent(&self) -> core::option::Option<&radroots_event::post::reply::RadrootsNip10ReplyReference> +pub const fn radroots_event::post::reply::RadrootsAuthoredNip10Reply::root(&self) -> &radroots_event::post::reply::RadrootsNip10ReplyReference +pub struct radroots_event::post::reply::RadrootsNip10ReplyReference +impl radroots_event::post::reply::RadrootsNip10ReplyReference +pub const fn radroots_event::post::reply::RadrootsNip10ReplyReference::author(&self) -> &radroots_identity::key::PublicKey +pub const fn radroots_event::post::reply::RadrootsNip10ReplyReference::event_id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::post::reply::RadrootsNip10ReplyReference::new(radroots_event::id::RadrootsEventId, radroots_identity::key::PublicKey, core::option::Option<radroots_event::tag::relay_hint::RadrootsNostrRelayHint>) -> core::result::Result<Self, radroots_event::post::reply::RadrootsNip10ReplyError> +pub fn radroots_event::post::reply::RadrootsNip10ReplyReference::parse(impl core::convert::AsRef<str>, impl core::convert::AsRef<str>, core::option::Option<&str>) -> core::result::Result<Self, radroots_event::post::reply::RadrootsNip10ReplyError> +pub const fn radroots_event::post::reply::RadrootsNip10ReplyReference::relay(&self) -> core::option::Option<&radroots_event::tag::relay_hint::RadrootsNostrRelayHint> +pub fn radroots_event::post::reply::RadrootsNip10ReplyReference::relay_or_empty(&self) -> &str +pub mod radroots_event::post::report +pub struct radroots_event::post::report::RadrootsReport +pub radroots_event::post::report::RadrootsReport::content: core::option::Option<alloc::string::String> +pub radroots_event::post::report::RadrootsReport::event: core::option::Option<radroots_event::social::RadrootsSocialTarget> +pub radroots_event::post::report::RadrootsReport::file: core::option::Option<radroots_event::social::RadrootsReportFileTarget> +pub radroots_event::post::report::RadrootsReport::report_type: radroots_event::social::RadrootsReportType +pub radroots_event::post::report::RadrootsReport::reported_pubkey: alloc::string::String +pub mod radroots_event::post::repost +pub struct radroots_event::post::repost::RadrootsGenericRepost +pub radroots_event::post::repost::RadrootsGenericRepost::content: core::option::Option<alloc::string::String> +pub radroots_event::post::repost::RadrootsGenericRepost::target: radroots_event::social::RadrootsSocialTarget +pub radroots_event::post::repost::RadrootsGenericRepost::target_kind: u32 +pub struct radroots_event::post::repost::RadrootsRepost +pub radroots_event::post::repost::RadrootsRepost::content: core::option::Option<alloc::string::String> +pub radroots_event::post::repost::RadrootsRepost::target: radroots_event::social::RadrootsSocialTarget +#[non_exhaustive] pub enum radroots_event::post::RadrootsAuthoredPostError +pub radroots_event::post::RadrootsAuthoredPostError::ContentMissing +pub radroots_event::post::RadrootsAuthoredPostError::ContentTooLarge +pub radroots_event::post::RadrootsAuthoredPostError::ContentTooLarge::actual: usize +pub radroots_event::post::RadrootsAuthoredPostError::ContentTooLarge::max: usize +pub radroots_event::post::RadrootsAuthoredPostError::DuplicateImageUrl +pub radroots_event::post::RadrootsAuthoredPostError::EventWireTooLarge +pub radroots_event::post::RadrootsAuthoredPostError::EventWireTooLarge::actual: usize +pub radroots_event::post::RadrootsAuthoredPostError::EventWireTooLarge::max: usize +pub radroots_event::post::RadrootsAuthoredPostError::ImageAltInvalid +pub radroots_event::post::RadrootsAuthoredPostError::ImageAltTooLarge +pub radroots_event::post::RadrootsAuthoredPostError::ImageAltTooLarge::actual: usize +pub radroots_event::post::RadrootsAuthoredPostError::ImageAltTooLarge::max: usize +pub radroots_event::post::RadrootsAuthoredPostError::ImageCountExceeded +pub radroots_event::post::RadrootsAuthoredPostError::ImageCountExceeded::actual: usize +pub radroots_event::post::RadrootsAuthoredPostError::ImageCountExceeded::max: usize +pub radroots_event::post::RadrootsAuthoredPostError::ImageDimensionsInvalid +pub radroots_event::post::RadrootsAuthoredPostError::ImageFallbackHashMismatch +pub radroots_event::post::RadrootsAuthoredPostError::ImageMediaTypeInvalid +pub radroots_event::post::RadrootsAuthoredPostError::ImageMissing +pub radroots_event::post::RadrootsAuthoredPostError::ImageSizeInvalid +pub radroots_event::post::RadrootsAuthoredPostError::ImageUrlMissingFromContent +pub radroots_event::post::RadrootsAuthoredPostError::TagBytesExceeded +pub radroots_event::post::RadrootsAuthoredPostError::TagBytesExceeded::actual: usize +pub radroots_event::post::RadrootsAuthoredPostError::TagBytesExceeded::max: usize +pub radroots_event::post::RadrootsAuthoredPostError::TagElementTooLarge +pub radroots_event::post::RadrootsAuthoredPostError::TagElementTooLarge::actual: usize +pub radroots_event::post::RadrootsAuthoredPostError::TagElementTooLarge::max: usize +impl radroots_event::post::RadrootsAuthoredPostError +pub const fn radroots_event::post::RadrootsAuthoredPostError::code(&self) -> &'static str +impl core::error::Error for radroots_event::post::RadrootsAuthoredPostError +impl core::fmt::Display for radroots_event::post::RadrootsAuthoredPostError +pub fn radroots_event::post::RadrootsAuthoredPostError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::post::RadrootsAuthoredAsk +impl radroots_event::post::RadrootsAuthoredAsk +pub fn radroots_event::post::RadrootsAuthoredAsk::content(&self) -> &str +pub fn radroots_event::post::RadrootsAuthoredAsk::images(&self) -> &[radroots_event::post::RadrootsAuthoredPostImage] +pub fn radroots_event::post::RadrootsAuthoredAsk::new(impl core::convert::Into<alloc::string::String>, alloc::vec::Vec<radroots_event::post::RadrootsAuthoredPostImage>) -> core::result::Result<Self, radroots_event::post::RadrootsAuthoredPostError> +pub struct radroots_event::post::RadrootsAuthoredPhotoUpdate +impl radroots_event::post::RadrootsAuthoredPhotoUpdate +pub fn radroots_event::post::RadrootsAuthoredPhotoUpdate::content(&self) -> &str +pub fn radroots_event::post::RadrootsAuthoredPhotoUpdate::images(&self) -> &[radroots_event::post::RadrootsAuthoredPostImage] +pub fn radroots_event::post::RadrootsAuthoredPhotoUpdate::new(impl core::convert::Into<alloc::string::String>, alloc::vec::Vec<radroots_event::post::RadrootsAuthoredPostImage>) -> core::result::Result<Self, radroots_event::post::RadrootsAuthoredPostError> +pub struct radroots_event::post::RadrootsAuthoredPostImage +impl radroots_event::post::RadrootsAuthoredPostImage +pub fn radroots_event::post::RadrootsAuthoredPostImage::alt(&self) -> &str +pub const fn radroots_event::post::RadrootsAuthoredPostImage::dimensions(&self) -> radroots_event::post::RadrootsPostImageDimensions +pub fn radroots_event::post::RadrootsAuthoredPostImage::fallbacks(&self) -> &[radroots_blossom::url::ApprovedBlobUrl] +pub fn radroots_event::post::RadrootsAuthoredPostImage::image(&self) -> &radroots_event::media::RadrootsAuthoredImage +pub fn radroots_event::post::RadrootsAuthoredPostImage::imeta_tag(&self) -> &[alloc::string::String] +pub fn radroots_event::post::RadrootsAuthoredPostImage::new(radroots_event::media::RadrootsAuthoredImage, radroots_event::post::RadrootsPostImageDimensions, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::post::RadrootsAuthoredPostError> +pub fn radroots_event::post::RadrootsAuthoredPostImage::try_with_fallback(self, radroots_blossom::url::ApprovedBlobUrl) -> core::result::Result<Self, radroots_event::post::RadrootsAuthoredPostError> +pub fn radroots_event::post::RadrootsAuthoredPostImage::url(&self) -> &str +pub struct radroots_event::post::RadrootsAuthoredUpdate +impl radroots_event::post::RadrootsAuthoredUpdate +pub fn radroots_event::post::RadrootsAuthoredUpdate::content(&self) -> &str +pub fn radroots_event::post::RadrootsAuthoredUpdate::new(impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::post::RadrootsAuthoredPostError> +pub struct radroots_event::post::RadrootsPost +pub radroots_event::post::RadrootsPost::address_refs: core::option::Option<alloc::vec::Vec<radroots_event::social::RadrootsSocialTarget>> +pub radroots_event::post::RadrootsPost::content: alloc::string::String +pub radroots_event::post::RadrootsPost::farm: core::option::Option<radroots_event::social::RadrootsSocialFarmAnchor> +pub radroots_event::post::RadrootsPost::location: core::option::Option<radroots_event::social::RadrootsSocialLocation> +pub radroots_event::post::RadrootsPost::media: core::option::Option<alloc::vec::Vec<radroots_event::social::RadrootsSocialMediaMetadata>> +pub radroots_event::post::RadrootsPost::quote_refs: core::option::Option<alloc::vec::Vec<radroots_event::social::RadrootsSocialTarget>> +pub radroots_event::post::RadrootsPost::topics: core::option::Option<alloc::vec::Vec<alloc::string::String>> +impl dto_bindgen_core::descriptor::Dto for radroots_event::post::RadrootsPost +pub fn radroots_event::post::RadrootsPost::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::post::RadrootsPostImageDimensions +impl radroots_event::post::RadrootsPostImageDimensions +pub const fn radroots_event::post::RadrootsPostImageDimensions::height(self) -> u32 +pub const fn radroots_event::post::RadrootsPostImageDimensions::new(u32, u32) -> core::result::Result<Self, radroots_event::post::RadrootsAuthoredPostError> +pub const fn radroots_event::post::RadrootsPostImageDimensions::width(self) -> u32 +pub const radroots_event::post::RADROOTS_ASK_MARKER_TAG_KEY: &str +pub const radroots_event::post::RADROOTS_ASK_MARKER_TAG_VALUE: &str +pub const radroots_event::post::RADROOTS_POST_ALT_MAX_BYTES: usize +pub const radroots_event::post::RADROOTS_POST_CONTENT_MAX_BYTES: usize +pub const radroots_event::post::RADROOTS_POST_EVENT_WIRE_MAX_BYTES: usize +pub const radroots_event::post::RADROOTS_POST_IMETA_MAX_COUNT: usize +pub const radroots_event::post::RADROOTS_POST_TAG_ELEMENT_MAX_BYTES: usize +pub const radroots_event::post::RADROOTS_POST_TAG_TOTAL_MAX_BYTES: usize +pub fn radroots_event::post::post_image_media_type_is_valid(&str) -> bool +pub fn radroots_event::post::post_media_http_url_is_valid(&str) -> bool +pub mod radroots_event::profile +pub mod radroots_event::profile::account +pub struct radroots_event::profile::account::RadrootsAccountClaim +pub radroots_event::profile::account::RadrootsAccountClaim::nip05: core::option::Option<alloc::string::String> +pub radroots_event::profile::account::RadrootsAccountClaim::pubkey: alloc::string::String +pub radroots_event::profile::account::RadrootsAccountClaim::username: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::profile::account::RadrootsAccountClaim +pub fn radroots_event::profile::account::RadrootsAccountClaim::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub const radroots_event::profile::account::KIND_ACCOUNT_CLAIM: u32 +#[non_exhaustive] pub enum radroots_event::profile::RadrootsAuthoredProfileError +pub radroots_event::profile::RadrootsAuthoredProfileError::InvalidName +impl radroots_event::profile::RadrootsAuthoredProfileError +pub const fn radroots_event::profile::RadrootsAuthoredProfileError::code(&self) -> &'static str +impl core::error::Error for radroots_event::profile::RadrootsAuthoredProfileError +impl core::fmt::Display for radroots_event::profile::RadrootsAuthoredProfileError +pub fn radroots_event::profile::RadrootsAuthoredProfileError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +#[non_exhaustive] pub enum radroots_event::profile::RadrootsNip05IdentifierError +pub radroots_event::profile::RadrootsNip05IdentifierError::InvalidDomain +pub radroots_event::profile::RadrootsNip05IdentifierError::InvalidLocalPart +pub radroots_event::profile::RadrootsNip05IdentifierError::MissingSeparator +pub radroots_event::profile::RadrootsNip05IdentifierError::MultipleSeparators +impl radroots_event::profile::RadrootsNip05IdentifierError +pub const fn radroots_event::profile::RadrootsNip05IdentifierError::code(&self) -> &'static str +impl core::error::Error for radroots_event::profile::RadrootsNip05IdentifierError +impl core::fmt::Display for radroots_event::profile::RadrootsNip05IdentifierError +pub fn radroots_event::profile::RadrootsNip05IdentifierError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::profile::RadrootsProfileType +pub radroots_event::profile::RadrootsProfileType::Any +pub radroots_event::profile::RadrootsProfileType::Coop +pub radroots_event::profile::RadrootsProfileType::Farm +pub radroots_event::profile::RadrootsProfileType::Individual +pub radroots_event::profile::RadrootsProfileType::Radrootsd +impl dto_bindgen_core::descriptor::Dto for radroots_event::profile::RadrootsProfileType +pub fn radroots_event::profile::RadrootsProfileType::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::profile::RadrootsAuthoredProfile +impl radroots_event::profile::RadrootsAuthoredProfile +pub fn radroots_event::profile::RadrootsAuthoredProfile::about(&self) -> core::option::Option<&str> +pub fn radroots_event::profile::RadrootsAuthoredProfile::banner(&self) -> core::option::Option<&radroots_event::media::RadrootsAuthoredImage> +pub const fn radroots_event::profile::RadrootsAuthoredProfile::bot(&self) -> core::option::Option<bool> +pub fn radroots_event::profile::RadrootsAuthoredProfile::display_name(&self) -> core::option::Option<&str> +pub fn radroots_event::profile::RadrootsAuthoredProfile::name(&self) -> &str +pub fn radroots_event::profile::RadrootsAuthoredProfile::new(impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::profile::RadrootsAuthoredProfileError> +pub fn radroots_event::profile::RadrootsAuthoredProfile::nip05(&self) -> core::option::Option<&radroots_event::profile::RadrootsNip05Identifier> +pub fn radroots_event::profile::RadrootsAuthoredProfile::picture(&self) -> core::option::Option<&radroots_event::media::RadrootsAuthoredImage> +pub fn radroots_event::profile::RadrootsAuthoredProfile::with_about(self, impl core::convert::Into<alloc::string::String>) -> Self +pub fn radroots_event::profile::RadrootsAuthoredProfile::with_banner(self, radroots_event::media::RadrootsAuthoredImage) -> Self +pub const fn radroots_event::profile::RadrootsAuthoredProfile::with_bot(self, bool) -> Self +pub fn radroots_event::profile::RadrootsAuthoredProfile::with_display_name(self, impl core::convert::Into<alloc::string::String>) -> Self +pub fn radroots_event::profile::RadrootsAuthoredProfile::with_nip05(self, radroots_event::profile::RadrootsNip05Identifier) -> Self +pub fn radroots_event::profile::RadrootsAuthoredProfile::with_picture(self, radroots_event::media::RadrootsAuthoredImage) -> Self +pub struct radroots_event::profile::RadrootsNip05Identifier(_) +impl radroots_event::profile::RadrootsNip05Identifier +pub fn radroots_event::profile::RadrootsNip05Identifier::as_str(&self) -> &str +pub fn radroots_event::profile::RadrootsNip05Identifier::domain(&self) -> &str +pub fn radroots_event::profile::RadrootsNip05Identifier::local_part(&self) -> &str +pub fn radroots_event::profile::RadrootsNip05Identifier::parse(&str) -> core::result::Result<Self, radroots_event::profile::RadrootsNip05IdentifierError> +impl core::fmt::Display for radroots_event::profile::RadrootsNip05Identifier +pub fn radroots_event::profile::RadrootsNip05Identifier::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::profile::RadrootsNip05Identifier +pub type radroots_event::profile::RadrootsNip05Identifier::Err = radroots_event::profile::RadrootsNip05IdentifierError +pub fn radroots_event::profile::RadrootsNip05Identifier::from_str(&str) -> core::result::Result<Self, Self::Err> +pub struct radroots_event::profile::RadrootsProfile +pub radroots_event::profile::RadrootsProfile::about: core::option::Option<alloc::string::String> +pub radroots_event::profile::RadrootsProfile::banner: core::option::Option<alloc::string::String> +pub radroots_event::profile::RadrootsProfile::bot: core::option::Option<alloc::string::String> +pub radroots_event::profile::RadrootsProfile::display_name: core::option::Option<alloc::string::String> +pub radroots_event::profile::RadrootsProfile::lud06: core::option::Option<alloc::string::String> +pub radroots_event::profile::RadrootsProfile::lud16: core::option::Option<alloc::string::String> +pub radroots_event::profile::RadrootsProfile::name: alloc::string::String +pub radroots_event::profile::RadrootsProfile::nip05: core::option::Option<alloc::string::String> +pub radroots_event::profile::RadrootsProfile::picture: core::option::Option<alloc::string::String> +pub radroots_event::profile::RadrootsProfile::website: core::option::Option<alloc::string::String> +pub const radroots_event::profile::RADROOTS_PROFILE_METADATA_MAX_CONTENT_BYTES: usize +pub const radroots_event::profile::RADROOTS_PROFILE_TYPE_TAG_ANY: &str +pub const radroots_event::profile::RADROOTS_PROFILE_TYPE_TAG_COOP: &str +pub const radroots_event::profile::RADROOTS_PROFILE_TYPE_TAG_FARM: &str +pub const radroots_event::profile::RADROOTS_PROFILE_TYPE_TAG_INDIVIDUAL: &str +pub const radroots_event::profile::RADROOTS_PROFILE_TYPE_TAG_KEY: &str +pub const radroots_event::profile::RADROOTS_PROFILE_TYPE_TAG_RADROOTSD: &str +pub fn radroots_event::profile::radroots_profile_type_from_tag_value(&str) -> core::option::Option<radroots_event::profile::RadrootsProfileType> +pub fn radroots_event::profile::radroots_profile_type_tag_value(radroots_event::profile::RadrootsProfileType) -> &'static str +pub mod radroots_event::social +pub mod radroots_event::social::app_data +pub struct radroots_event::social::app_data::RadrootsAppData +pub radroots_event::social::app_data::RadrootsAppData::content: alloc::string::String +pub radroots_event::social::app_data::RadrootsAppData::d_tag: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::app_data::RadrootsAppData +pub fn radroots_event::social::app_data::RadrootsAppData::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub const radroots_event::social::app_data::KIND_APP_DATA: u32 +pub mod radroots_event::social::follow +pub struct radroots_event::social::follow::RadrootsFollow +pub radroots_event::social::follow::RadrootsFollow::list: alloc::vec::Vec<radroots_event::social::follow::RadrootsFollowProfile> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::follow::RadrootsFollow +pub fn radroots_event::social::follow::RadrootsFollow::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::follow::RadrootsFollowProfile +pub radroots_event::social::follow::RadrootsFollowProfile::contact_name: core::option::Option<alloc::string::String> +pub radroots_event::social::follow::RadrootsFollowProfile::public_key: alloc::string::String +pub radroots_event::social::follow::RadrootsFollowProfile::published_at: u64 +pub radroots_event::social::follow::RadrootsFollowProfile::relay_url: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::follow::RadrootsFollowProfile +pub fn radroots_event::social::follow::RadrootsFollowProfile::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::geochat +pub struct radroots_event::social::geochat::RadrootsGeoChat +pub radroots_event::social::geochat::RadrootsGeoChat::content: alloc::string::String +pub radroots_event::social::geochat::RadrootsGeoChat::geohash: alloc::string::String +pub radroots_event::social::geochat::RadrootsGeoChat::nickname: core::option::Option<alloc::string::String> +pub radroots_event::social::geochat::RadrootsGeoChat::teleported: bool +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::geochat::RadrootsGeoChat +pub fn radroots_event::social::geochat::RadrootsGeoChat::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::gift_wrap +pub struct radroots_event::social::gift_wrap::RadrootsGiftWrap +pub radroots_event::social::gift_wrap::RadrootsGiftWrap::content: alloc::string::String +pub radroots_event::social::gift_wrap::RadrootsGiftWrap::expiration: core::option::Option<u32> +pub radroots_event::social::gift_wrap::RadrootsGiftWrap::recipient: radroots_event::social::gift_wrap::RadrootsGiftWrapRecipient +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::gift_wrap::RadrootsGiftWrap +pub fn radroots_event::social::gift_wrap::RadrootsGiftWrap::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::gift_wrap::RadrootsGiftWrapRecipient +pub radroots_event::social::gift_wrap::RadrootsGiftWrapRecipient::public_key: alloc::string::String +pub radroots_event::social::gift_wrap::RadrootsGiftWrapRecipient::relay_url: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::gift_wrap::RadrootsGiftWrapRecipient +pub fn radroots_event::social::gift_wrap::RadrootsGiftWrapRecipient::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::group +pub struct radroots_event::social::group::RadrootsGroupAdmins +pub radroots_event::social::group::RadrootsGroupAdmins::admins: alloc::vec::Vec<radroots_event::social::group::RadrootsGroupUserRef> +pub radroots_event::social::group::RadrootsGroupAdmins::d_tag: alloc::string::String +pub radroots_event::social::group::RadrootsGroupAdmins::description: core::option::Option<alloc::string::String> +pub struct radroots_event::social::group::RadrootsGroupCreateGroup +pub radroots_event::social::group::RadrootsGroupCreateGroup::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupCreateGroup::message: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupCreateGroup::metadata: radroots_event::social::group::RadrootsGroupEditableMetadata +pub struct radroots_event::social::group::RadrootsGroupCreateInvite +pub radroots_event::social::group::RadrootsGroupCreateInvite::code: alloc::string::String +pub radroots_event::social::group::RadrootsGroupCreateInvite::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupCreateInvite::message: core::option::Option<alloc::string::String> +pub struct radroots_event::social::group::RadrootsGroupDeleteEvent +pub radroots_event::social::group::RadrootsGroupDeleteEvent::event_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupDeleteEvent::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupDeleteEvent::message: core::option::Option<alloc::string::String> +pub struct radroots_event::social::group::RadrootsGroupDeleteGroup +pub radroots_event::social::group::RadrootsGroupDeleteGroup::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupDeleteGroup::message: core::option::Option<alloc::string::String> +pub struct radroots_event::social::group::RadrootsGroupEditMetadata +pub radroots_event::social::group::RadrootsGroupEditMetadata::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupEditMetadata::message: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupEditMetadata::metadata: radroots_event::social::group::RadrootsGroupEditableMetadata +pub struct radroots_event::social::group::RadrootsGroupEditableMetadata +pub radroots_event::social::group::RadrootsGroupEditableMetadata::about: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupEditableMetadata::is_closed: bool +pub radroots_event::social::group::RadrootsGroupEditableMetadata::is_hidden: bool +pub radroots_event::social::group::RadrootsGroupEditableMetadata::is_private: bool +pub radroots_event::social::group::RadrootsGroupEditableMetadata::is_restricted: bool +pub radroots_event::social::group::RadrootsGroupEditableMetadata::name: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupEditableMetadata::picture: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupEditableMetadata::supported_kinds: core::option::Option<alloc::vec::Vec<u32>> +pub struct radroots_event::social::group::RadrootsGroupJoinRequest +pub radroots_event::social::group::RadrootsGroupJoinRequest::code: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupJoinRequest::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupJoinRequest::message: core::option::Option<alloc::string::String> +pub struct radroots_event::social::group::RadrootsGroupLeaveRequest +pub radroots_event::social::group::RadrootsGroupLeaveRequest::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupLeaveRequest::message: core::option::Option<alloc::string::String> +pub struct radroots_event::social::group::RadrootsGroupMembers +pub radroots_event::social::group::RadrootsGroupMembers::d_tag: alloc::string::String +pub radroots_event::social::group::RadrootsGroupMembers::description: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupMembers::members: alloc::vec::Vec<radroots_event::social::group::RadrootsGroupUserRef> +pub struct radroots_event::social::group::RadrootsGroupMetadata +pub radroots_event::social::group::RadrootsGroupMetadata::d_tag: alloc::string::String +pub radroots_event::social::group::RadrootsGroupMetadata::metadata: radroots_event::social::group::RadrootsGroupEditableMetadata +pub struct radroots_event::social::group::RadrootsGroupPutUser +pub radroots_event::social::group::RadrootsGroupPutUser::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupPutUser::message: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupPutUser::pubkey: alloc::string::String +pub radroots_event::social::group::RadrootsGroupPutUser::roles: alloc::vec::Vec<alloc::string::String> +pub struct radroots_event::social::group::RadrootsGroupRemoveUser +pub radroots_event::social::group::RadrootsGroupRemoveUser::group_id: alloc::string::String +pub radroots_event::social::group::RadrootsGroupRemoveUser::message: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupRemoveUser::pubkey: alloc::string::String +pub struct radroots_event::social::group::RadrootsGroupRole +pub radroots_event::social::group::RadrootsGroupRole::description: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupRole::name: alloc::string::String +pub radroots_event::social::group::RadrootsGroupRole::permissions: alloc::vec::Vec<alloc::string::String> +pub struct radroots_event::social::group::RadrootsGroupRoles +pub radroots_event::social::group::RadrootsGroupRoles::d_tag: alloc::string::String +pub radroots_event::social::group::RadrootsGroupRoles::description: core::option::Option<alloc::string::String> +pub radroots_event::social::group::RadrootsGroupRoles::roles: alloc::vec::Vec<radroots_event::social::group::RadrootsGroupRole> +pub struct radroots_event::social::group::RadrootsGroupUserRef +pub radroots_event::social::group::RadrootsGroupUserRef::pubkey: alloc::string::String +pub radroots_event::social::group::RadrootsGroupUserRef::roles: alloc::vec::Vec<alloc::string::String> +pub const radroots_event::social::group::KIND_GROUP_ADMINS: u32 +pub const radroots_event::social::group::KIND_GROUP_CREATE_GROUP: u32 +pub const radroots_event::social::group::KIND_GROUP_CREATE_INVITE: u32 +pub const radroots_event::social::group::KIND_GROUP_DELETE_EVENT: u32 +pub const radroots_event::social::group::KIND_GROUP_DELETE_GROUP: u32 +pub const radroots_event::social::group::KIND_GROUP_EDIT_METADATA: u32 +pub const radroots_event::social::group::KIND_GROUP_JOIN_REQUEST: u32 +pub const radroots_event::social::group::KIND_GROUP_LEAVE_REQUEST: u32 +pub const radroots_event::social::group::KIND_GROUP_MEMBERS: u32 +pub const radroots_event::social::group::KIND_GROUP_METADATA: u32 +pub const radroots_event::social::group::KIND_GROUP_PUT_USER: u32 +pub const radroots_event::social::group::KIND_GROUP_REMOVE_USER: u32 +pub const radroots_event::social::group::KIND_GROUP_ROLES: u32 +pub mod radroots_event::social::http_auth +pub struct radroots_event::social::http_auth::RadrootsHttpAuth +pub radroots_event::social::http_auth::RadrootsHttpAuth::method: alloc::string::String +pub radroots_event::social::http_auth::RadrootsHttpAuth::payload_sha256: core::option::Option<alloc::string::String> +pub radroots_event::social::http_auth::RadrootsHttpAuth::url: alloc::string::String +pub const radroots_event::social::http_auth::KIND_HTTP_AUTH: u32 +pub mod radroots_event::social::job +pub enum radroots_event::social::job::JobFeedbackStatus +pub radroots_event::social::job::JobFeedbackStatus::Error +pub radroots_event::social::job::JobFeedbackStatus::Partial +pub radroots_event::social::job::JobFeedbackStatus::PaymentRequired +pub radroots_event::social::job::JobFeedbackStatus::Processing +pub radroots_event::social::job::JobFeedbackStatus::Success +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::job::JobFeedbackStatus +pub fn radroots_event::social::job::JobFeedbackStatus::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::social::job::JobInputType +pub radroots_event::social::job::JobInputType::Event +pub radroots_event::social::job::JobInputType::Job +pub radroots_event::social::job::JobInputType::Text +pub radroots_event::social::job::JobInputType::Url +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::job::JobInputType +pub fn radroots_event::social::job::JobInputType::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::job::JobPaymentRequest +pub radroots_event::social::job::JobPaymentRequest::amount_sat: u32 +pub radroots_event::social::job::JobPaymentRequest::bolt11: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::job::JobPaymentRequest +pub fn radroots_event::social::job::JobPaymentRequest::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::job_feedback +pub struct radroots_event::social::job_feedback::RadrootsJobFeedback +pub radroots_event::social::job_feedback::RadrootsJobFeedback::content: core::option::Option<alloc::string::String> +pub radroots_event::social::job_feedback::RadrootsJobFeedback::customer_pubkey: core::option::Option<alloc::string::String> +pub radroots_event::social::job_feedback::RadrootsJobFeedback::encrypted: bool +pub radroots_event::social::job_feedback::RadrootsJobFeedback::extra_info: core::option::Option<alloc::string::String> +pub radroots_event::social::job_feedback::RadrootsJobFeedback::kind: u16 +pub radroots_event::social::job_feedback::RadrootsJobFeedback::payment: core::option::Option<radroots_event::social::job::JobPaymentRequest> +pub radroots_event::social::job_feedback::RadrootsJobFeedback::request_event: radroots_event::tag::RadrootsEventPtr +pub radroots_event::social::job_feedback::RadrootsJobFeedback::status: radroots_event::social::job::JobFeedbackStatus +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::job_feedback::RadrootsJobFeedback +pub fn radroots_event::social::job_feedback::RadrootsJobFeedback::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::job_request +pub struct radroots_event::social::job_request::RadrootsJobInput +pub radroots_event::social::job_request::RadrootsJobInput::data: alloc::string::String +pub radroots_event::social::job_request::RadrootsJobInput::input_type: radroots_event::social::job::JobInputType +pub radroots_event::social::job_request::RadrootsJobInput::marker: core::option::Option<alloc::string::String> +pub radroots_event::social::job_request::RadrootsJobInput::relay: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::job_request::RadrootsJobInput +pub fn radroots_event::social::job_request::RadrootsJobInput::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::job_request::RadrootsJobParam +pub radroots_event::social::job_request::RadrootsJobParam::key: alloc::string::String +pub radroots_event::social::job_request::RadrootsJobParam::value: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::job_request::RadrootsJobParam +pub fn radroots_event::social::job_request::RadrootsJobParam::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::job_request::RadrootsJobRequest +pub radroots_event::social::job_request::RadrootsJobRequest::bid_sat: core::option::Option<u32> +pub radroots_event::social::job_request::RadrootsJobRequest::encrypted: bool +pub radroots_event::social::job_request::RadrootsJobRequest::inputs: alloc::vec::Vec<radroots_event::social::job_request::RadrootsJobInput> +pub radroots_event::social::job_request::RadrootsJobRequest::kind: u16 +pub radroots_event::social::job_request::RadrootsJobRequest::output: core::option::Option<alloc::string::String> +pub radroots_event::social::job_request::RadrootsJobRequest::params: alloc::vec::Vec<radroots_event::social::job_request::RadrootsJobParam> +pub radroots_event::social::job_request::RadrootsJobRequest::providers: alloc::vec::Vec<alloc::string::String> +pub radroots_event::social::job_request::RadrootsJobRequest::relays: alloc::vec::Vec<alloc::string::String> +pub radroots_event::social::job_request::RadrootsJobRequest::topics: alloc::vec::Vec<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::job_request::RadrootsJobRequest +pub fn radroots_event::social::job_request::RadrootsJobRequest::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::job_result +pub struct radroots_event::social::job_result::RadrootsJobResult +pub radroots_event::social::job_result::RadrootsJobResult::content: core::option::Option<alloc::string::String> +pub radroots_event::social::job_result::RadrootsJobResult::customer_pubkey: core::option::Option<alloc::string::String> +pub radroots_event::social::job_result::RadrootsJobResult::encrypted: bool +pub radroots_event::social::job_result::RadrootsJobResult::inputs: alloc::vec::Vec<radroots_event::social::job_request::RadrootsJobInput> +pub radroots_event::social::job_result::RadrootsJobResult::kind: u16 +pub radroots_event::social::job_result::RadrootsJobResult::payment: core::option::Option<radroots_event::social::job::JobPaymentRequest> +pub radroots_event::social::job_result::RadrootsJobResult::request_event: radroots_event::tag::RadrootsEventPtr +pub radroots_event::social::job_result::RadrootsJobResult::request_json: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::job_result::RadrootsJobResult +pub fn radroots_event::social::job_result::RadrootsJobResult::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::list +pub struct radroots_event::social::list::RadrootsList +pub radroots_event::social::list::RadrootsList::content: alloc::string::String +pub radroots_event::social::list::RadrootsList::entries: alloc::vec::Vec<radroots_event::social::list::RadrootsListEntry> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::list::RadrootsList +pub fn radroots_event::social::list::RadrootsList::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::list::RadrootsListEntry +pub radroots_event::social::list::RadrootsListEntry::tag: alloc::string::String +pub radroots_event::social::list::RadrootsListEntry::values: alloc::vec::Vec<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::list::RadrootsListEntry +pub fn radroots_event::social::list::RadrootsListEntry::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::list_set +pub struct radroots_event::social::list_set::RadrootsListSet +pub radroots_event::social::list_set::RadrootsListSet::content: alloc::string::String +pub radroots_event::social::list_set::RadrootsListSet::d_tag: alloc::string::String +pub radroots_event::social::list_set::RadrootsListSet::description: core::option::Option<alloc::string::String> +pub radroots_event::social::list_set::RadrootsListSet::entries: alloc::vec::Vec<radroots_event::social::list::RadrootsListEntry> +pub radroots_event::social::list_set::RadrootsListSet::image: core::option::Option<alloc::string::String> +pub radroots_event::social::list_set::RadrootsListSet::title: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::list_set::RadrootsListSet +pub fn radroots_event::social::list_set::RadrootsListSet::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::message +pub struct radroots_event::social::message::RadrootsMessage +pub radroots_event::social::message::RadrootsMessage::content: alloc::string::String +pub radroots_event::social::message::RadrootsMessage::recipients: alloc::vec::Vec<radroots_event::social::message::RadrootsMessageRecipient> +pub radroots_event::social::message::RadrootsMessage::reply_to: core::option::Option<radroots_event::tag::RadrootsEventPtr> +pub radroots_event::social::message::RadrootsMessage::subject: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::message::RadrootsMessage +pub fn radroots_event::social::message::RadrootsMessage::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::message::RadrootsMessageRecipient +pub radroots_event::social::message::RadrootsMessageRecipient::public_key: alloc::string::String +pub radroots_event::social::message::RadrootsMessageRecipient::relay_url: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::message::RadrootsMessageRecipient +pub fn radroots_event::social::message::RadrootsMessageRecipient::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::message_file +pub struct radroots_event::social::message_file::RadrootsMessageFile +pub radroots_event::social::message_file::RadrootsMessageFile::blurhash: core::option::Option<alloc::string::String> +pub radroots_event::social::message_file::RadrootsMessageFile::decryption_key: alloc::string::String +pub radroots_event::social::message_file::RadrootsMessageFile::decryption_nonce: alloc::string::String +pub radroots_event::social::message_file::RadrootsMessageFile::dimensions: core::option::Option<radroots_event::social::message_file::RadrootsMessageFileDimensions> +pub radroots_event::social::message_file::RadrootsMessageFile::encrypted_hash: alloc::string::String +pub radroots_event::social::message_file::RadrootsMessageFile::encryption_algorithm: alloc::string::String +pub radroots_event::social::message_file::RadrootsMessageFile::fallbacks: alloc::vec::Vec<alloc::string::String> +pub radroots_event::social::message_file::RadrootsMessageFile::file_type: alloc::string::String +pub radroots_event::social::message_file::RadrootsMessageFile::file_url: alloc::string::String +pub radroots_event::social::message_file::RadrootsMessageFile::original_hash: core::option::Option<alloc::string::String> +pub radroots_event::social::message_file::RadrootsMessageFile::recipients: alloc::vec::Vec<radroots_event::social::message::RadrootsMessageRecipient> +pub radroots_event::social::message_file::RadrootsMessageFile::reply_to: core::option::Option<radroots_event::tag::RadrootsEventPtr> +pub radroots_event::social::message_file::RadrootsMessageFile::size: core::option::Option<u64> +pub radroots_event::social::message_file::RadrootsMessageFile::subject: core::option::Option<alloc::string::String> +pub radroots_event::social::message_file::RadrootsMessageFile::thumb: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::message_file::RadrootsMessageFile +pub fn radroots_event::social::message_file::RadrootsMessageFile::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::message_file::RadrootsMessageFileDimensions +pub radroots_event::social::message_file::RadrootsMessageFileDimensions::h: u32 +pub radroots_event::social::message_file::RadrootsMessageFileDimensions::w: u32 +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::message_file::RadrootsMessageFileDimensions +pub fn radroots_event::social::message_file::RadrootsMessageFileDimensions::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::relay_auth +pub struct radroots_event::social::relay_auth::RadrootsRelayAuth +pub radroots_event::social::relay_auth::RadrootsRelayAuth::challenge: alloc::string::String +pub radroots_event::social::relay_auth::RadrootsRelayAuth::relay: alloc::string::String +pub const radroots_event::social::relay_auth::KIND_RELAY_AUTH: u32 +pub mod radroots_event::social::relay_document +pub struct radroots_event::social::relay_document::RadrootsRelayDocument +pub radroots_event::social::relay_document::RadrootsRelayDocument::contact: core::option::Option<alloc::string::String> +pub radroots_event::social::relay_document::RadrootsRelayDocument::description: core::option::Option<alloc::string::String> +pub radroots_event::social::relay_document::RadrootsRelayDocument::name: core::option::Option<alloc::string::String> +pub radroots_event::social::relay_document::RadrootsRelayDocument::pubkey: core::option::Option<alloc::string::String> +pub radroots_event::social::relay_document::RadrootsRelayDocument::software: core::option::Option<alloc::string::String> +pub radroots_event::social::relay_document::RadrootsRelayDocument::supported_nips: core::option::Option<alloc::vec::Vec<u16>> +pub radroots_event::social::relay_document::RadrootsRelayDocument::version: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::relay_document::RadrootsRelayDocument +pub fn radroots_event::social::relay_document::RadrootsRelayDocument::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::social::seal +pub struct radroots_event::social::seal::RadrootsSeal +pub radroots_event::social::seal::RadrootsSeal::content: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::seal::RadrootsSeal +pub fn radroots_event::social::seal::RadrootsSeal::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::social::RadrootsReportType +pub radroots_event::social::RadrootsReportType::Illegal +pub radroots_event::social::RadrootsReportType::Impersonation +pub radroots_event::social::RadrootsReportType::Malware +pub radroots_event::social::RadrootsReportType::Nudity +pub radroots_event::social::RadrootsReportType::Other +pub radroots_event::social::RadrootsReportType::Profanity +pub radroots_event::social::RadrootsReportType::Spam +pub enum radroots_event::social::RadrootsSocialTarget +pub radroots_event::social::RadrootsSocialTarget::Address +pub radroots_event::social::RadrootsSocialTarget::Address::address: alloc::string::String +pub radroots_event::social::RadrootsSocialTarget::Address::author: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialTarget::Address::event_kind: core::option::Option<u32> +pub radroots_event::social::RadrootsSocialTarget::Address::relays: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::social::RadrootsSocialTarget::Event +pub radroots_event::social::RadrootsSocialTarget::Event::author: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialTarget::Event::event_kind: core::option::Option<u32> +pub radroots_event::social::RadrootsSocialTarget::Event::id: alloc::string::String +pub radroots_event::social::RadrootsSocialTarget::Event::relays: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::social::RadrootsSocialTarget::External +pub radroots_event::social::RadrootsSocialTarget::External::external_kind: alloc::string::String +pub radroots_event::social::RadrootsSocialTarget::External::hint: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialTarget::External::id: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::RadrootsSocialTarget +pub fn radroots_event::social::RadrootsSocialTarget::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::RadrootsReportFileTarget +pub radroots_event::social::RadrootsReportFileTarget::magnet: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsReportFileTarget::sha256: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsReportFileTarget::url: core::option::Option<alloc::string::String> +pub struct radroots_event::social::RadrootsReportTarget +pub radroots_event::social::RadrootsReportTarget::event: core::option::Option<radroots_event::social::RadrootsSocialTarget> +pub radroots_event::social::RadrootsReportTarget::file: core::option::Option<radroots_event::social::RadrootsReportFileTarget> +pub radroots_event::social::RadrootsReportTarget::reported_pubkey: alloc::string::String +pub struct radroots_event::social::RadrootsSocialFarmAnchor +pub radroots_event::social::RadrootsSocialFarmAnchor::farm: radroots_event::farm::RadrootsFarmRef +pub radroots_event::social::RadrootsSocialFarmAnchor::relays: core::option::Option<alloc::vec::Vec<alloc::string::String>> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::RadrootsSocialFarmAnchor +pub fn radroots_event::social::RadrootsSocialFarmAnchor::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::RadrootsSocialLocation +pub radroots_event::social::RadrootsSocialLocation::geohash: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialLocation::name: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::RadrootsSocialLocation +pub fn radroots_event::social::RadrootsSocialLocation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::RadrootsSocialMediaDimensions +pub radroots_event::social::RadrootsSocialMediaDimensions::height: u32 +pub radroots_event::social::RadrootsSocialMediaDimensions::width: u32 +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::RadrootsSocialMediaDimensions +pub fn radroots_event::social::RadrootsSocialMediaDimensions::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::RadrootsSocialMediaMetadata +pub radroots_event::social::RadrootsSocialMediaMetadata::alt: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::blurhash: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::content_hashes: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::social::RadrootsSocialMediaMetadata::dimensions: core::option::Option<radroots_event::social::RadrootsSocialMediaDimensions> +pub radroots_event::social::RadrootsSocialMediaMetadata::fallback: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::image: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::imeta: core::option::Option<alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>>> +pub radroots_event::social::RadrootsSocialMediaMetadata::magnet: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::mime_type: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::original_sha256: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::services: core::option::Option<alloc::vec::Vec<alloc::string::String>> +pub radroots_event::social::RadrootsSocialMediaMetadata::sha256: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::size: core::option::Option<u64> +pub radroots_event::social::RadrootsSocialMediaMetadata::summary: core::option::Option<alloc::string::String> +pub radroots_event::social::RadrootsSocialMediaMetadata::thumbnails: core::option::Option<alloc::vec::Vec<radroots_event::social::RadrootsSocialMediaThumbnail>> +pub radroots_event::social::RadrootsSocialMediaMetadata::url: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::RadrootsSocialMediaMetadata +pub fn radroots_event::social::RadrootsSocialMediaMetadata::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::social::RadrootsSocialMediaThumbnail +pub radroots_event::social::RadrootsSocialMediaThumbnail::dimensions: core::option::Option<radroots_event::social::RadrootsSocialMediaDimensions> +pub radroots_event::social::RadrootsSocialMediaThumbnail::url: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::social::RadrootsSocialMediaThumbnail +pub fn radroots_event::social::RadrootsSocialMediaThumbnail::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::tag +pub mod radroots_event::tag::name +pub const radroots_event::tag::name::TAG_A: &str +pub const radroots_event::tag::name::TAG_ALT: &str +pub const radroots_event::tag::name::TAG_AMOUNT: &str +pub const radroots_event::tag::name::TAG_A_ROOT: &str +pub const radroots_event::tag::name::TAG_BLURHASH: &str +pub const radroots_event::tag::name::TAG_CHALLENGE: &str +pub const radroots_event::tag::name::TAG_CONTRACT: &str +pub const radroots_event::tag::name::TAG_CURRENCY: &str +pub const radroots_event::tag::name::TAG_D: &str +pub const radroots_event::tag::name::TAG_DESCRIPTION: &str +pub const radroots_event::tag::name::TAG_DIMENSIONS: &str +pub const radroots_event::tag::name::TAG_D_DAY: &str +pub const radroots_event::tag::name::TAG_E: &str +pub const radroots_event::tag::name::TAG_END: &str +pub const radroots_event::tag::name::TAG_END_TZID: &str +pub const radroots_event::tag::name::TAG_E_PREV: &str +pub const radroots_event::tag::name::TAG_E_ROOT: &str +pub const radroots_event::tag::name::TAG_E_ROOT_NIP22: &str +pub const radroots_event::tag::name::TAG_FALLBACK: &str +pub const radroots_event::tag::name::TAG_FREE_BUSY: &str +pub const radroots_event::tag::name::TAG_G: &str +pub const radroots_event::tag::name::TAG_H: &str +pub const radroots_event::tag::name::TAG_I: &str +pub const radroots_event::tag::name::TAG_IMAGE: &str +pub const radroots_event::tag::name::TAG_IMETA: &str +pub const radroots_event::tag::name::TAG_I_ROOT: &str +pub const radroots_event::tag::name::TAG_K: &str +pub const radroots_event::tag::name::TAG_K_ROOT: &str +pub const radroots_event::tag::name::TAG_LOCATION: &str +pub const radroots_event::tag::name::TAG_MAGNET: &str +pub const radroots_event::tag::name::TAG_METHOD: &str +pub const radroots_event::tag::name::TAG_MIME: &str +pub const radroots_event::tag::name::TAG_ORIGINAL_SHA256: &str +pub const radroots_event::tag::name::TAG_P: &str +pub const radroots_event::tag::name::TAG_PAYLOAD: &str +pub const radroots_event::tag::name::TAG_PRICE: &str +pub const radroots_event::tag::name::TAG_PUBLISHED_AT: &str +pub const radroots_event::tag::name::TAG_P_ROOT: &str +pub const radroots_event::tag::name::TAG_Q: &str +pub const radroots_event::tag::name::TAG_R: &str +pub const radroots_event::tag::name::TAG_RELAY: &str +pub const radroots_event::tag::name::TAG_SERVER: &str +pub const radroots_event::tag::name::TAG_SERVICE: &str +pub const radroots_event::tag::name::TAG_SHA256: &str +pub const radroots_event::tag::name::TAG_SIZE: &str +pub const radroots_event::tag::name::TAG_START: &str +pub const radroots_event::tag::name::TAG_START_TZID: &str +pub const radroots_event::tag::name::TAG_STATUS: &str +pub const radroots_event::tag::name::TAG_SUBJECT: &str +pub const radroots_event::tag::name::TAG_SUMMARY: &str +pub const radroots_event::tag::name::TAG_T: &str +pub const radroots_event::tag::name::TAG_THUMB: &str +pub const radroots_event::tag::name::TAG_THUMBNAIL: &str +pub const radroots_event::tag::name::TAG_TITLE: &str +pub const radroots_event::tag::name::TAG_U: &str +pub const radroots_event::tag::name::TAG_URL: &str +pub const radroots_event::tag::name::TAG_URL_AUTH: &str +pub mod radroots_event::tag::relay_hint +pub struct radroots_event::tag::relay_hint::RadrootsNostrRelayHint(_) +impl radroots_event::tag::relay_hint::RadrootsNostrRelayHint +pub fn radroots_event::tag::relay_hint::RadrootsNostrRelayHint::as_str(&self) -> &str +pub fn radroots_event::tag::relay_hint::RadrootsNostrRelayHint::into_string(self) -> alloc::string::String +pub fn radroots_event::tag::relay_hint::RadrootsNostrRelayHint::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +impl core::convert::AsRef<str> for radroots_event::tag::relay_hint::RadrootsNostrRelayHint +pub fn radroots_event::tag::relay_hint::RadrootsNostrRelayHint::as_ref(&self) -> &str +impl core::convert::From<radroots_event::tag::relay_hint::RadrootsNostrRelayHint> for alloc::string::String +pub fn alloc::string::String::from(radroots_event::tag::relay_hint::RadrootsNostrRelayHint) -> Self +impl core::convert::TryFrom<&str> for radroots_event::tag::relay_hint::RadrootsNostrRelayHint +pub type radroots_event::tag::relay_hint::RadrootsNostrRelayHint::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::tag::relay_hint::RadrootsNostrRelayHint::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::tag::relay_hint::RadrootsNostrRelayHint +pub type radroots_event::tag::relay_hint::RadrootsNostrRelayHint::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::tag::relay_hint::RadrootsNostrRelayHint::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::tag::relay_hint::RadrootsNostrRelayHint +pub fn radroots_event::tag::relay_hint::RadrootsNostrRelayHint::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::tag::relay_hint::RadrootsNostrRelayHint +pub type radroots_event::tag::relay_hint::RadrootsNostrRelayHint::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::tag::relay_hint::RadrootsNostrRelayHint::from_str(&str) -> core::result::Result<Self, Self::Err> +pub struct radroots_event::tag::RadrootsEventPtr +pub radroots_event::tag::RadrootsEventPtr::id: alloc::string::String +pub radroots_event::tag::RadrootsEventPtr::relays: core::option::Option<alloc::string::String> +impl dto_bindgen_core::descriptor::Dto for radroots_event::tag::RadrootsEventPtr +pub fn radroots_event::tag::RadrootsEventPtr::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::tag::RadrootsEventRef +pub radroots_event::tag::RadrootsEventRef::author: radroots_identity::key::PublicKey +pub radroots_event::tag::RadrootsEventRef::d_tag: core::option::Option<alloc::string::String> +pub radroots_event::tag::RadrootsEventRef::id: alloc::string::String +pub radroots_event::tag::RadrootsEventRef::kind: u32 +pub radroots_event::tag::RadrootsEventRef::relays: core::option::Option<alloc::vec::Vec<alloc::string::String>> +impl dto_bindgen_core::descriptor::Dto for radroots_event::tag::RadrootsEventRef +pub fn radroots_event::tag::RadrootsEventRef::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::trade +pub mod radroots_event::trade::order +pub enum radroots_event::trade::order::RadrootsCommercialDomain +pub radroots_event::trade::order::RadrootsCommercialDomain::Listing +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsCommercialDomain +pub fn radroots_event::trade::order::RadrootsCommercialDomain::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order::RadrootsOrderDecisionOutcome +pub radroots_event::trade::order::RadrootsOrderDecisionOutcome::Accepted +pub radroots_event::trade::order::RadrootsOrderDecisionOutcome::Accepted::inventory_commitments: alloc::vec::Vec<radroots_event::trade::order::RadrootsOrderInventoryCommitment> +pub radroots_event::trade::order::RadrootsOrderDecisionOutcome::Declined +pub radroots_event::trade::order::RadrootsOrderDecisionOutcome::Declined::reason: alloc::string::String +impl radroots_event::trade::order::RadrootsOrderDecisionOutcome +pub fn radroots_event::trade::order::RadrootsOrderDecisionOutcome::validate(&self) -> core::result::Result<(), radroots_event::trade::order::RadrootsOrderPayloadError> +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderDecisionOutcome +pub fn radroots_event::trade::order::RadrootsOrderDecisionOutcome::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order::RadrootsOrderEconomicActor +pub radroots_event::trade::order::RadrootsOrderEconomicActor::Buyer +pub radroots_event::trade::order::RadrootsOrderEconomicActor::Seller +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicActor +pub fn radroots_event::trade::order::RadrootsOrderEconomicActor::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order::RadrootsOrderEconomicEffect +pub radroots_event::trade::order::RadrootsOrderEconomicEffect::Decrease +pub radroots_event::trade::order::RadrootsOrderEconomicEffect::Increase +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicEffect +pub fn radroots_event::trade::order::RadrootsOrderEconomicEffect::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order::RadrootsOrderEconomicLineKind +pub radroots_event::trade::order::RadrootsOrderEconomicLineKind::BasketAdjustment +pub radroots_event::trade::order::RadrootsOrderEconomicLineKind::ListingDiscount +pub radroots_event::trade::order::RadrootsOrderEconomicLineKind::RevisionAdjustment +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicLineKind +pub fn radroots_event::trade::order::RadrootsOrderEconomicLineKind::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order::RadrootsOrderEnvelopeError +pub radroots_event::trade::order::RadrootsOrderEnvelopeError::InvalidVersion +pub radroots_event::trade::order::RadrootsOrderEnvelopeError::InvalidVersion::expected: u16 +pub radroots_event::trade::order::RadrootsOrderEnvelopeError::InvalidVersion::got: u16 +pub radroots_event::trade::order::RadrootsOrderEnvelopeError::MissingListingAddr +pub radroots_event::trade::order::RadrootsOrderEnvelopeError::MissingOrderId +impl core::error::Error for radroots_event::trade::order::RadrootsOrderEnvelopeError +impl core::fmt::Display for radroots_event::trade::order::RadrootsOrderEnvelopeError +pub fn radroots_event::trade::order::RadrootsOrderEnvelopeError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::trade::order::RadrootsOrderEventType +pub radroots_event::trade::order::RadrootsOrderEventType::OrderCancelled +pub radroots_event::trade::order::RadrootsOrderEventType::OrderDecision +pub radroots_event::trade::order::RadrootsOrderEventType::OrderRequested +impl radroots_event::trade::order::RadrootsOrderEventType +pub const fn radroots_event::trade::order::RadrootsOrderEventType::from_kind(u32) -> core::option::Option<Self> +pub const fn radroots_event::trade::order::RadrootsOrderEventType::kind(self) -> u32 +pub const fn radroots_event::trade::order::RadrootsOrderEventType::name(self) -> &'static str +pub const fn radroots_event::trade::order::RadrootsOrderEventType::requires_listing_snapshot(self) -> bool +pub const fn radroots_event::trade::order::RadrootsOrderEventType::requires_order_chain(self) -> bool +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEventType +pub fn radroots_event::trade::order::RadrootsOrderEventType::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order::RadrootsOrderPayloadError +pub radroots_event::trade::order::RadrootsOrderPayloadError::EmptyField(&'static str) +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicCurrency +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicCurrency::field: &'static str +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicItemBinCount +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicItemBinCount::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicItemPrice +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicItemPrice::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicItemQuantity +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicItemQuantity::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicItemSubtotal +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicItemSubtotal::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineAmount +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineAmount::field: &'static str +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineAmount::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineEffect +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineEffect::field: &'static str +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineEffect::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineKind +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineKind::field: &'static str +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicLineKind::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicOrdering +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicOrdering::field: &'static str +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicTotal +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidEconomicTotal::field: &'static str +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidInventoryCommitmentCount +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidInventoryCommitmentCount::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidItemBinCount +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidItemBinCount::index: usize +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidOrderEconomicsBinding +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidOrderEconomicsBinding::field: &'static str +pub radroots_event::trade::order::RadrootsOrderPayloadError::InvalidQuoteVersion +pub radroots_event::trade::order::RadrootsOrderPayloadError::MissingEconomicItems +pub radroots_event::trade::order::RadrootsOrderPayloadError::MissingInventoryCommitments +pub radroots_event::trade::order::RadrootsOrderPayloadError::MissingItems +impl core::error::Error for radroots_event::trade::order::RadrootsOrderPayloadError +impl core::fmt::Display for radroots_event::trade::order::RadrootsOrderPayloadError +pub fn radroots_event::trade::order::RadrootsOrderPayloadError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub enum radroots_event::trade::order::RadrootsOrderPricingBasis +pub radroots_event::trade::order::RadrootsOrderPricingBasis::ListingEvent +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderPricingBasis +pub fn radroots_event::trade::order::RadrootsOrderPricingBasis::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderCancellation +pub radroots_event::trade::order::RadrootsOrderCancellation::buyer_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::order::RadrootsOrderCancellation::listing_addr: radroots_event::id::RadrootsClassifiedListingAddress +pub radroots_event::trade::order::RadrootsOrderCancellation::order_id: radroots_event::id::RadrootsOrderId +pub radroots_event::trade::order::RadrootsOrderCancellation::reason: alloc::string::String +pub radroots_event::trade::order::RadrootsOrderCancellation::seller_pubkey: radroots_identity::key::PublicKey +impl radroots_event::trade::order::RadrootsOrderCancellation +pub fn radroots_event::trade::order::RadrootsOrderCancellation::validate(&self) -> core::result::Result<(), radroots_event::trade::order::RadrootsOrderPayloadError> +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderCancellation +pub fn radroots_event::trade::order::RadrootsOrderCancellation::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderDecision +pub radroots_event::trade::order::RadrootsOrderDecision::buyer_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::order::RadrootsOrderDecision::decision: radroots_event::trade::order::RadrootsOrderDecisionOutcome +pub radroots_event::trade::order::RadrootsOrderDecision::listing_addr: radroots_event::id::RadrootsClassifiedListingAddress +pub radroots_event::trade::order::RadrootsOrderDecision::order_id: radroots_event::id::RadrootsOrderId +pub radroots_event::trade::order::RadrootsOrderDecision::seller_pubkey: radroots_identity::key::PublicKey +impl radroots_event::trade::order::RadrootsOrderDecision +pub fn radroots_event::trade::order::RadrootsOrderDecision::validate(&self) -> core::result::Result<(), radroots_event::trade::order::RadrootsOrderPayloadError> +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderDecision +pub fn radroots_event::trade::order::RadrootsOrderDecision::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderEconomicItem +pub radroots_event::trade::order::RadrootsOrderEconomicItem::bin_count: u32 +pub radroots_event::trade::order::RadrootsOrderEconomicItem::bin_id: radroots_event::id::RadrootsInventoryBinId +pub radroots_event::trade::order::RadrootsOrderEconomicItem::line_subtotal: radroots_core::money::Money +pub radroots_event::trade::order::RadrootsOrderEconomicItem::quantity_amount: radroots_core::decimal::Decimal +pub radroots_event::trade::order::RadrootsOrderEconomicItem::quantity_unit: radroots_core::unit::Unit +pub radroots_event::trade::order::RadrootsOrderEconomicItem::unit_price_amount: radroots_core::decimal::Decimal +pub radroots_event::trade::order::RadrootsOrderEconomicItem::unit_price_currency: radroots_core::currency::Currency +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicItem +pub fn radroots_event::trade::order::RadrootsOrderEconomicItem::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderEconomicLine +pub radroots_event::trade::order::RadrootsOrderEconomicLine::actor: radroots_event::trade::order::RadrootsOrderEconomicActor +pub radroots_event::trade::order::RadrootsOrderEconomicLine::amount: radroots_core::money::Money +pub radroots_event::trade::order::RadrootsOrderEconomicLine::effect: radroots_event::trade::order::RadrootsOrderEconomicEffect +pub radroots_event::trade::order::RadrootsOrderEconomicLine::id: alloc::string::String +pub radroots_event::trade::order::RadrootsOrderEconomicLine::kind: radroots_event::trade::order::RadrootsOrderEconomicLineKind +pub radroots_event::trade::order::RadrootsOrderEconomicLine::reason: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicLine +pub fn radroots_event::trade::order::RadrootsOrderEconomicLine::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderEconomicTotals +pub radroots_event::trade::order::RadrootsOrderEconomicTotals::adjustment_total: radroots_core::money::Money +pub radroots_event::trade::order::RadrootsOrderEconomicTotals::discount_total: radroots_core::money::Money +pub radroots_event::trade::order::RadrootsOrderEconomicTotals::subtotal: radroots_core::money::Money +pub radroots_event::trade::order::RadrootsOrderEconomicTotals::total: radroots_core::money::Money +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicTotals +pub fn radroots_event::trade::order::RadrootsOrderEconomicTotals::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderEconomics +pub radroots_event::trade::order::RadrootsOrderEconomics::adjustment_total: radroots_core::money::Money +pub radroots_event::trade::order::RadrootsOrderEconomics::adjustments: alloc::vec::Vec<radroots_event::trade::order::RadrootsOrderEconomicLine> +pub radroots_event::trade::order::RadrootsOrderEconomics::currency: radroots_core::currency::Currency +pub radroots_event::trade::order::RadrootsOrderEconomics::discount_total: radroots_core::money::Money +pub radroots_event::trade::order::RadrootsOrderEconomics::discounts: alloc::vec::Vec<radroots_event::trade::order::RadrootsOrderEconomicLine> +pub radroots_event::trade::order::RadrootsOrderEconomics::items: alloc::vec::Vec<radroots_event::trade::order::RadrootsOrderEconomicItem> +pub radroots_event::trade::order::RadrootsOrderEconomics::pricing_basis: radroots_event::trade::order::RadrootsOrderPricingBasis +pub radroots_event::trade::order::RadrootsOrderEconomics::quote_id: radroots_event::id::RadrootsOrderQuoteId +pub radroots_event::trade::order::RadrootsOrderEconomics::quote_version: u32 +pub radroots_event::trade::order::RadrootsOrderEconomics::subtotal: radroots_core::money::Money +pub radroots_event::trade::order::RadrootsOrderEconomics::total: radroots_core::money::Money +impl radroots_event::trade::order::RadrootsOrderEconomics +pub fn radroots_event::trade::order::RadrootsOrderEconomics::canonicalize(&mut self) +pub fn radroots_event::trade::order::RadrootsOrderEconomics::canonicalized(&self) -> Self +pub fn radroots_event::trade::order::RadrootsOrderEconomics::derived_totals(&self) -> core::result::Result<radroots_event::trade::order::RadrootsOrderEconomicTotals, radroots_event::trade::order::RadrootsOrderPayloadError> +pub fn radroots_event::trade::order::RadrootsOrderEconomics::validate(&self) -> core::result::Result<(), radroots_event::trade::order::RadrootsOrderPayloadError> +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomics +pub fn radroots_event::trade::order::RadrootsOrderEconomics::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderEnvelope<T> +pub radroots_event::trade::order::RadrootsOrderEnvelope::domain: radroots_event::trade::order::RadrootsCommercialDomain +pub radroots_event::trade::order::RadrootsOrderEnvelope::listing_addr: alloc::string::String +pub radroots_event::trade::order::RadrootsOrderEnvelope::message_type: radroots_event::trade::order::RadrootsOrderEventType +pub radroots_event::trade::order::RadrootsOrderEnvelope::order_id: alloc::string::String +pub radroots_event::trade::order::RadrootsOrderEnvelope::payload: T +pub radroots_event::trade::order::RadrootsOrderEnvelope::version: u16 +impl<T> radroots_event::trade::order::RadrootsOrderEnvelope<T> +pub fn radroots_event::trade::order::RadrootsOrderEnvelope<T>::new(radroots_event::trade::order::RadrootsOrderEventType, impl core::convert::Into<alloc::string::String>, impl core::convert::Into<alloc::string::String>, T) -> Self +pub fn radroots_event::trade::order::RadrootsOrderEnvelope<T>::validate(&self) -> core::result::Result<(), radroots_event::trade::order::RadrootsOrderEnvelopeError> +pub struct radroots_event::trade::order::RadrootsOrderInventoryCommitment +pub radroots_event::trade::order::RadrootsOrderInventoryCommitment::bin_count: u32 +pub radroots_event::trade::order::RadrootsOrderInventoryCommitment::bin_id: radroots_event::id::RadrootsInventoryBinId +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderInventoryCommitment +pub fn radroots_event::trade::order::RadrootsOrderInventoryCommitment::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderItem +pub radroots_event::trade::order::RadrootsOrderItem::bin_count: u32 +pub radroots_event::trade::order::RadrootsOrderItem::bin_id: radroots_event::id::RadrootsInventoryBinId +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderItem +pub fn radroots_event::trade::order::RadrootsOrderItem::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order::RadrootsOrderRequest +pub radroots_event::trade::order::RadrootsOrderRequest::buyer_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::order::RadrootsOrderRequest::economics: radroots_event::trade::order::RadrootsOrderEconomics +pub radroots_event::trade::order::RadrootsOrderRequest::items: alloc::vec::Vec<radroots_event::trade::order::RadrootsOrderItem> +pub radroots_event::trade::order::RadrootsOrderRequest::listing_addr: radroots_event::id::RadrootsClassifiedListingAddress +pub radroots_event::trade::order::RadrootsOrderRequest::order_id: radroots_event::id::RadrootsOrderId +pub radroots_event::trade::order::RadrootsOrderRequest::seller_pubkey: radroots_identity::key::PublicKey +impl radroots_event::trade::order::RadrootsOrderRequest +pub fn radroots_event::trade::order::RadrootsOrderRequest::validate(&self) -> core::result::Result<(), radroots_event::trade::order::RadrootsOrderPayloadError> +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderRequest +pub fn radroots_event::trade::order::RadrootsOrderRequest::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub const radroots_event::trade::order::RADROOTS_COMMERCIAL_LISTING_DOMAIN: &str +pub const radroots_event::trade::order::RADROOTS_ORDER_ENVELOPE_VERSION: u16 +pub mod radroots_event::trade::order_economics +pub enum radroots_event::trade::order_economics::RadrootsOrderEconomicActor +pub radroots_event::trade::order_economics::RadrootsOrderEconomicActor::Buyer +pub radroots_event::trade::order_economics::RadrootsOrderEconomicActor::Seller +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicActor +pub fn radroots_event::trade::order::RadrootsOrderEconomicActor::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order_economics::RadrootsOrderEconomicEffect +pub radroots_event::trade::order_economics::RadrootsOrderEconomicEffect::Decrease +pub radroots_event::trade::order_economics::RadrootsOrderEconomicEffect::Increase +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicEffect +pub fn radroots_event::trade::order::RadrootsOrderEconomicEffect::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order_economics::RadrootsOrderEconomicLineKind +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLineKind::BasketAdjustment +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLineKind::ListingDiscount +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLineKind::RevisionAdjustment +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicLineKind +pub fn radroots_event::trade::order::RadrootsOrderEconomicLineKind::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::order_economics::RadrootsOrderPricingBasis +pub radroots_event::trade::order_economics::RadrootsOrderPricingBasis::ListingEvent +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderPricingBasis +pub fn radroots_event::trade::order::RadrootsOrderPricingBasis::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order_economics::RadrootsOrderEconomicItem +pub radroots_event::trade::order_economics::RadrootsOrderEconomicItem::bin_count: u32 +pub radroots_event::trade::order_economics::RadrootsOrderEconomicItem::bin_id: radroots_event::id::RadrootsInventoryBinId +pub radroots_event::trade::order_economics::RadrootsOrderEconomicItem::line_subtotal: radroots_core::money::Money +pub radroots_event::trade::order_economics::RadrootsOrderEconomicItem::quantity_amount: radroots_core::decimal::Decimal +pub radroots_event::trade::order_economics::RadrootsOrderEconomicItem::quantity_unit: radroots_core::unit::Unit +pub radroots_event::trade::order_economics::RadrootsOrderEconomicItem::unit_price_amount: radroots_core::decimal::Decimal +pub radroots_event::trade::order_economics::RadrootsOrderEconomicItem::unit_price_currency: radroots_core::currency::Currency +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicItem +pub fn radroots_event::trade::order::RadrootsOrderEconomicItem::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order_economics::RadrootsOrderEconomicLine +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLine::actor: radroots_event::trade::order::RadrootsOrderEconomicActor +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLine::amount: radroots_core::money::Money +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLine::effect: radroots_event::trade::order::RadrootsOrderEconomicEffect +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLine::id: alloc::string::String +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLine::kind: radroots_event::trade::order::RadrootsOrderEconomicLineKind +pub radroots_event::trade::order_economics::RadrootsOrderEconomicLine::reason: alloc::string::String +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicLine +pub fn radroots_event::trade::order::RadrootsOrderEconomicLine::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order_economics::RadrootsOrderEconomicTotals +pub radroots_event::trade::order_economics::RadrootsOrderEconomicTotals::adjustment_total: radroots_core::money::Money +pub radroots_event::trade::order_economics::RadrootsOrderEconomicTotals::discount_total: radroots_core::money::Money +pub radroots_event::trade::order_economics::RadrootsOrderEconomicTotals::subtotal: radroots_core::money::Money +pub radroots_event::trade::order_economics::RadrootsOrderEconomicTotals::total: radroots_core::money::Money +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomicTotals +pub fn radroots_event::trade::order::RadrootsOrderEconomicTotals::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order_economics::RadrootsOrderEconomics +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::adjustment_total: radroots_core::money::Money +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::adjustments: alloc::vec::Vec<radroots_event::trade::order::RadrootsOrderEconomicLine> +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::currency: radroots_core::currency::Currency +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::discount_total: radroots_core::money::Money +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::discounts: alloc::vec::Vec<radroots_event::trade::order::RadrootsOrderEconomicLine> +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::items: alloc::vec::Vec<radroots_event::trade::order::RadrootsOrderEconomicItem> +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::pricing_basis: radroots_event::trade::order::RadrootsOrderPricingBasis +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::quote_id: radroots_event::id::RadrootsOrderQuoteId +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::quote_version: u32 +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::subtotal: radroots_core::money::Money +pub radroots_event::trade::order_economics::RadrootsOrderEconomics::total: radroots_core::money::Money +impl radroots_event::trade::order::RadrootsOrderEconomics +pub fn radroots_event::trade::order::RadrootsOrderEconomics::canonicalize(&mut self) +pub fn radroots_event::trade::order::RadrootsOrderEconomics::canonicalized(&self) -> Self +pub fn radroots_event::trade::order::RadrootsOrderEconomics::derived_totals(&self) -> core::result::Result<radroots_event::trade::order::RadrootsOrderEconomicTotals, radroots_event::trade::order::RadrootsOrderPayloadError> +pub fn radroots_event::trade::order::RadrootsOrderEconomics::validate(&self) -> core::result::Result<(), radroots_event::trade::order::RadrootsOrderPayloadError> +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderEconomics +pub fn radroots_event::trade::order::RadrootsOrderEconomics::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::trade::order_economics::RadrootsOrderItem +pub radroots_event::trade::order_economics::RadrootsOrderItem::bin_count: u32 +pub radroots_event::trade::order_economics::RadrootsOrderItem::bin_id: radroots_event::id::RadrootsInventoryBinId +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::order::RadrootsOrderItem +pub fn radroots_event::trade::order::RadrootsOrderItem::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub mod radroots_event::trade::validation +pub enum radroots_event::trade::validation::RadrootsOperationalListingValidationError +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::InvalidBin +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::InvalidInventory +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::InvalidKind +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::InvalidKind::kind: u32 +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::InvalidLocationGeohash +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::InvalidPrice +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::InvalidProfile +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::InvalidSeller +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::ListingEventFetchFailed +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::ListingEventFetchFailed::listing_addr: alloc::string::String +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::ListingEventNotFound +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::ListingEventNotFound::listing_addr: alloc::string::String +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingAvailability +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingBins +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingDeliveryMethod +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingDescription +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingFarmProfile +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingFarmRecord +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingInventory +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingListingId +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingLocation +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingLocationGeohash +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingLocationLocality +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingPrice +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingPrimaryBin +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingProductType +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::MissingTitle +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::ParseError +pub radroots_event::trade::validation::RadrootsOperationalListingValidationError::ParseError::error: radroots_event::listing::operational::RadrootsOperationalListingParseError +impl core::error::Error for radroots_event::trade::validation::RadrootsOperationalListingValidationError +impl core::fmt::Display for radroots_event::trade::validation::RadrootsOperationalListingValidationError +pub fn radroots_event::trade::validation::RadrootsOperationalListingValidationError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl dto_bindgen_core::descriptor::Dto for radroots_event::trade::validation::RadrootsOperationalListingValidationError +pub fn radroots_event::trade::validation::RadrootsOperationalListingValidationError::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub enum radroots_event::trade::RadrootsTradeDecisionV1 +pub radroots_event::trade::RadrootsTradeDecisionV1::Accepted +pub radroots_event::trade::RadrootsTradeDecisionV1::Accepted::reservation_assertion: core::option::Option<radroots_event::trade::RadrootsSellerReservationAssertionV1> +pub radroots_event::trade::RadrootsTradeDecisionV1::Declined +pub radroots_event::trade::RadrootsTradeDecisionV1::Declined::reason: alloc::string::String +impl radroots_event::trade::RadrootsTradeDecisionV1 +pub fn radroots_event::trade::RadrootsTradeDecisionV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub enum radroots_event::trade::RadrootsTradeMutationBodyV1 +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Cancellation +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Cancellation::reason: alloc::string::String +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Cancellation::target_candidate_id: core::option::Option<radroots_event::id::RadrootsTradeCandidateId> +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Cancellation::target_claim_mutation_id: core::option::Option<radroots_event::id::RadrootsTradeMutationId> +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Decision +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Decision::candidate_id: radroots_event::id::RadrootsTradeCandidateId +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Decision::decision: radroots_event::trade::RadrootsTradeDecisionV1 +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Decision::proposal_mutation_id: radroots_event::id::RadrootsTradeMutationId +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Proposal +pub radroots_event::trade::RadrootsTradeMutationBodyV1::Proposal::candidate: radroots_event::trade::RadrootsTradeCandidateTermsV1 +pub radroots_event::trade::RadrootsTradeMutationBodyV1::RevisionDecision +pub radroots_event::trade::RadrootsTradeMutationBodyV1::RevisionDecision::candidate_id: radroots_event::id::RadrootsTradeCandidateId +pub radroots_event::trade::RadrootsTradeMutationBodyV1::RevisionDecision::decision: radroots_event::trade::RadrootsTradeDecisionV1 +pub radroots_event::trade::RadrootsTradeMutationBodyV1::RevisionDecision::proposal_mutation_id: radroots_event::id::RadrootsTradeMutationId +pub radroots_event::trade::RadrootsTradeMutationBodyV1::RevisionProposal +pub radroots_event::trade::RadrootsTradeMutationBodyV1::RevisionProposal::candidate: radroots_event::trade::RadrootsTradeCandidateTermsV1 +impl radroots_event::trade::RadrootsTradeMutationBodyV1 +pub const fn radroots_event::trade::RadrootsTradeMutationBodyV1::mutation_kind(&self) -> radroots_event::trade::RadrootsTradeMutationKindV1 +pub fn radroots_event::trade::RadrootsTradeMutationBodyV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub enum radroots_event::trade::RadrootsTradeMutationKindV1 +pub radroots_event::trade::RadrootsTradeMutationKindV1::Cancellation +pub radroots_event::trade::RadrootsTradeMutationKindV1::Decision +pub radroots_event::trade::RadrootsTradeMutationKindV1::Proposal +pub radroots_event::trade::RadrootsTradeMutationKindV1::RevisionDecision +pub radroots_event::trade::RadrootsTradeMutationKindV1::RevisionProposal +impl radroots_event::trade::RadrootsTradeMutationKindV1 +pub const fn radroots_event::trade::RadrootsTradeMutationKindV1::contract_id(self) -> &'static str +pub const fn radroots_event::trade::RadrootsTradeMutationKindV1::nostr_kind(self) -> u32 +pub enum radroots_event::trade::RadrootsTradeProtocolError +pub radroots_event::trade::RadrootsTradeProtocolError::CandidateIdMismatch +pub radroots_event::trade::RadrootsTradeProtocolError::CandidateIdMismatch::computed: alloc::string::String +pub radroots_event::trade::RadrootsTradeProtocolError::CandidateIdMismatch::declared: alloc::string::String +pub radroots_event::trade::RadrootsTradeProtocolError::ContentTooLarge +pub radroots_event::trade::RadrootsTradeProtocolError::ContentTooLarge::actual: usize +pub radroots_event::trade::RadrootsTradeProtocolError::ContentTooLarge::max: usize +pub radroots_event::trade::RadrootsTradeProtocolError::ContractMismatch +pub radroots_event::trade::RadrootsTradeProtocolError::ContractMismatch::actual: alloc::string::String +pub radroots_event::trade::RadrootsTradeProtocolError::ContractMismatch::expected: &'static str +pub radroots_event::trade::RadrootsTradeProtocolError::DuplicateKey(alloc::string::String) +pub radroots_event::trade::RadrootsTradeProtocolError::DuplicateParent +pub radroots_event::trade::RadrootsTradeProtocolError::EmptyField(&'static str) +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidField(&'static str) +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidIdentifier +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidIdentifier::error: radroots_event::id::RadrootsIdParseError +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidIdentifier::field: &'static str +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidInitialParents +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidJson(alloc::string::String) +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidSchemaVersion +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidSchemaVersion::actual: u16 +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidSchemaVersion::expected: u16 +pub radroots_event::trade::RadrootsTradeProtocolError::InvalidTimeRange +pub radroots_event::trade::RadrootsTradeProtocolError::MissingCancellationTarget +pub radroots_event::trade::RadrootsTradeProtocolError::MissingLines +pub radroots_event::trade::RadrootsTradeProtocolError::MissingParentMutation +pub radroots_event::trade::RadrootsTradeProtocolError::MissingReservationCommitments +pub radroots_event::trade::RadrootsTradeProtocolError::MutationIdMismatch +pub radroots_event::trade::RadrootsTradeProtocolError::MutationIdMismatch::computed: alloc::string::String +pub radroots_event::trade::RadrootsTradeProtocolError::MutationIdMismatch::declared: alloc::string::String +pub radroots_event::trade::RadrootsTradeProtocolError::NonCanonicalJson +pub radroots_event::trade::RadrootsTradeProtocolError::SelfParent +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyAdjustments +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyAdjustments::actual: usize +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyAdjustments::max: usize +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyLines +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyLines::actual: usize +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyLines::max: usize +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyParents +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyParents::actual: usize +pub radroots_event::trade::RadrootsTradeProtocolError::TooManyParents::max: usize +pub radroots_event::trade::RadrootsTradeProtocolError::UnsortedParents +pub radroots_event::trade::RadrootsTradeProtocolError::UnsupportedNumber +impl core::error::Error for radroots_event::trade::RadrootsTradeProtocolError +impl core::fmt::Display for radroots_event::trade::RadrootsTradeProtocolError +pub fn radroots_event::trade::RadrootsTradeProtocolError::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::trade::CandidateId(_) +impl radroots_event::id::RadrootsTradeCandidateId +pub const fn radroots_event::id::RadrootsTradeCandidateId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsTradeCandidateId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsTradeCandidateId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsTradeCandidateId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeCandidateId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeCandidateId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeCandidateId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsTradeCandidateId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeCandidateId +pub type radroots_event::id::RadrootsTradeCandidateId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeCandidateId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeCandidateId +pub fn radroots_event::id::RadrootsTradeCandidateId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::trade::MutationId(_) +impl radroots_event::id::RadrootsTradeMutationId +pub const fn radroots_event::id::RadrootsTradeMutationId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsTradeMutationId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsTradeMutationId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsTradeMutationId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeMutationId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeMutationId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeMutationId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsTradeMutationId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeMutationId +pub type radroots_event::id::RadrootsTradeMutationId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeMutationId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeMutationId +pub fn radroots_event::id::RadrootsTradeMutationId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::trade::RadrootsFulfillmentProfileV1 +pub radroots_event::trade::RadrootsFulfillmentProfileV1::ends_at_unix_s: u64 +pub radroots_event::trade::RadrootsFulfillmentProfileV1::fold: u8 +pub radroots_event::trade::RadrootsFulfillmentProfileV1::location_class: alloc::string::String +pub radroots_event::trade::RadrootsFulfillmentProfileV1::method: alloc::string::String +pub radroots_event::trade::RadrootsFulfillmentProfileV1::profile_id: alloc::string::String +pub radroots_event::trade::RadrootsFulfillmentProfileV1::requires_private_terms: bool +pub radroots_event::trade::RadrootsFulfillmentProfileV1::starts_at_unix_s: u64 +pub radroots_event::trade::RadrootsFulfillmentProfileV1::timezone: alloc::string::String +pub radroots_event::trade::RadrootsFulfillmentProfileV1::utc_offset_seconds: i32 +impl radroots_event::trade::RadrootsFulfillmentProfileV1 +pub fn radroots_event::trade::RadrootsFulfillmentProfileV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsSellerReservationAssertionV1 +pub radroots_event::trade::RadrootsSellerReservationAssertionV1::assertion_commitment: alloc::string::String +pub radroots_event::trade::RadrootsSellerReservationAssertionV1::candidate_id: radroots_event::id::RadrootsTradeCandidateId +pub radroots_event::trade::RadrootsSellerReservationAssertionV1::commitments: alloc::vec::Vec<radroots_event::trade::RadrootsSellerReservationLineV1> +pub radroots_event::trade::RadrootsSellerReservationAssertionV1::inventory_authority_id: radroots_identity::key::PublicKey +pub radroots_event::trade::RadrootsSellerReservationAssertionV1::inventory_epoch: u64 +pub radroots_event::trade::RadrootsSellerReservationAssertionV1::reservation_expires_at_unix_s: u64 +pub radroots_event::trade::RadrootsSellerReservationAssertionV1::reservation_id: radroots_event::id::RadrootsDTag +impl radroots_event::trade::RadrootsSellerReservationAssertionV1 +pub fn radroots_event::trade::RadrootsSellerReservationAssertionV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsSellerReservationLineV1 +pub radroots_event::trade::RadrootsSellerReservationLineV1::bin_id: radroots_event::id::RadrootsInventoryBinId +pub radroots_event::trade::RadrootsSellerReservationLineV1::line_id: radroots_event::id::RadrootsDTag +pub radroots_event::trade::RadrootsSellerReservationLineV1::quantity_mantissa: alloc::string::String +pub radroots_event::trade::RadrootsSellerReservationLineV1::quantity_scale: u8 +pub radroots_event::trade::RadrootsSellerReservationLineV1::unit_code: alloc::string::String +impl radroots_event::trade::RadrootsSellerReservationLineV1 +pub fn radroots_event::trade::RadrootsSellerReservationLineV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsTradeCancellationProfileV1 +pub radroots_event::trade::RadrootsTradeCancellationProfileV1::buyer_pre_agreement: bool +pub radroots_event::trade::RadrootsTradeCancellationProfileV1::post_agreement_cutoff_unix_s: core::option::Option<u64> +pub radroots_event::trade::RadrootsTradeCancellationProfileV1::profile_id: alloc::string::String +impl radroots_event::trade::RadrootsTradeCancellationProfileV1 +pub fn radroots_event::trade::RadrootsTradeCancellationProfileV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsTradeCandidateLineV1 +pub radroots_event::trade::RadrootsTradeCandidateLineV1::bin_id: radroots_event::id::RadrootsInventoryBinId +pub radroots_event::trade::RadrootsTradeCandidateLineV1::currency_code: alloc::string::String +pub radroots_event::trade::RadrootsTradeCandidateLineV1::line_id: radroots_event::id::RadrootsDTag +pub radroots_event::trade::RadrootsTradeCandidateLineV1::line_subtotal_mantissa: alloc::string::String +pub radroots_event::trade::RadrootsTradeCandidateLineV1::listing_addr: radroots_event::id::RadrootsClassifiedListingAddress +pub radroots_event::trade::RadrootsTradeCandidateLineV1::listing_event_id: radroots_event::id::RadrootsEventId +pub radroots_event::trade::RadrootsTradeCandidateLineV1::listing_snapshot_sha256: alloc::string::String +pub radroots_event::trade::RadrootsTradeCandidateLineV1::option_id: core::option::Option<alloc::string::String> +pub radroots_event::trade::RadrootsTradeCandidateLineV1::product_id: alloc::string::String +pub radroots_event::trade::RadrootsTradeCandidateLineV1::quantity_mantissa: alloc::string::String +pub radroots_event::trade::RadrootsTradeCandidateLineV1::quantity_scale: u8 +pub radroots_event::trade::RadrootsTradeCandidateLineV1::replaces_line_id: core::option::Option<radroots_event::id::RadrootsDTag> +pub radroots_event::trade::RadrootsTradeCandidateLineV1::unit_code: alloc::string::String +pub radroots_event::trade::RadrootsTradeCandidateLineV1::unit_price_mantissa: alloc::string::String +pub radroots_event::trade::RadrootsTradeCandidateLineV1::unit_profile: alloc::string::String +impl radroots_event::trade::RadrootsTradeCandidateLineV1 +pub fn radroots_event::trade::RadrootsTradeCandidateLineV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsTradeCandidateTermsV1 +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::base_candidate_id: core::option::Option<radroots_event::id::RadrootsTradeCandidateId> +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::buyer_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::cancellation: radroots_event::trade::RadrootsTradeCancellationProfileV1 +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::candidate_id: core::option::Option<radroots_event::id::RadrootsTradeCandidateId> +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::economics: radroots_event::trade::RadrootsTradeEconomicsProfileV1 +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::farm_id: radroots_event::id::RadrootsDTag +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::fulfillment: radroots_event::trade::RadrootsFulfillmentProfileV1 +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::line_tombstones: alloc::vec::Vec<radroots_event::trade::RadrootsTradeLineTombstoneV1> +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::lines: alloc::vec::Vec<radroots_event::trade::RadrootsTradeCandidateLineV1> +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::private_terms: core::option::Option<radroots_event::trade::RadrootsTradePrivateTermsRefV1> +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::proposal_expires_at_unix_s: u64 +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::schema_version: u16 +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::seller_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::RadrootsTradeCandidateTermsV1::supersession_intent: core::option::Option<alloc::string::String> +impl radroots_event::trade::RadrootsTradeCandidateTermsV1 +pub fn radroots_event::trade::RadrootsTradeCandidateTermsV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsTradeCanonicalMutationV1 +pub radroots_event::trade::RadrootsTradeCanonicalMutationV1::content: alloc::string::String +pub radroots_event::trade::RadrootsTradeCanonicalMutationV1::envelope: radroots_event::trade::RadrootsTradeMutationEnvelopeV1 +pub radroots_event::trade::RadrootsTradeCanonicalMutationV1::mutation_id: radroots_event::id::RadrootsTradeMutationId +pub struct radroots_event::trade::RadrootsTradeEconomicAdjustmentV1 +pub radroots_event::trade::RadrootsTradeEconomicAdjustmentV1::actor: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicAdjustmentV1::adjustment_id: radroots_event::id::RadrootsDTag +pub radroots_event::trade::RadrootsTradeEconomicAdjustmentV1::amount_mantissa: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicAdjustmentV1::effect: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicAdjustmentV1::reason: alloc::string::String +impl radroots_event::trade::RadrootsTradeEconomicAdjustmentV1 +pub fn radroots_event::trade::RadrootsTradeEconomicAdjustmentV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsTradeEconomicsProfileV1 +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::adjustment_total_mantissa: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::adjustments: alloc::vec::Vec<radroots_event::trade::RadrootsTradeEconomicAdjustmentV1> +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::currency_code: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::currency_exponent: u8 +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::discount_total_mantissa: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::profile_id: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::rounding_profile: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::subtotal_mantissa: alloc::string::String +pub radroots_event::trade::RadrootsTradeEconomicsProfileV1::total_mantissa: alloc::string::String +impl radroots_event::trade::RadrootsTradeEconomicsProfileV1 +pub fn radroots_event::trade::RadrootsTradeEconomicsProfileV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsTradeLineTombstoneV1 +pub radroots_event::trade::RadrootsTradeLineTombstoneV1::line_id: radroots_event::id::RadrootsDTag +pub radroots_event::trade::RadrootsTradeLineTombstoneV1::reason: alloc::string::String +impl radroots_event::trade::RadrootsTradeLineTombstoneV1 +pub fn radroots_event::trade::RadrootsTradeLineTombstoneV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsTradeMutationEnvelopeV1 +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::author_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::authored_at_unix_s: u64 +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::body: radroots_event::trade::RadrootsTradeMutationBodyV1 +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::buyer_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::contract_id: alloc::string::String +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::counterparty_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::farm_id: radroots_event::id::RadrootsDTag +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::mutation_id: core::option::Option<radroots_event::id::RadrootsTradeMutationId> +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::parent_mutation_ids: alloc::vec::Vec<radroots_event::id::RadrootsTradeMutationId> +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::root_mutation_id: core::option::Option<radroots_event::id::RadrootsTradeMutationId> +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::schema_version: u16 +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::seller_pubkey: radroots_identity::key::PublicKey +pub radroots_event::trade::RadrootsTradeMutationEnvelopeV1::trade_id: radroots_event::id::RadrootsTradeId +impl radroots_event::trade::RadrootsTradeMutationEnvelopeV1 +pub fn radroots_event::trade::RadrootsTradeMutationEnvelopeV1::mutation_kind(&self) -> radroots_event::trade::RadrootsTradeMutationKindV1 +pub fn radroots_event::trade::RadrootsTradeMutationEnvelopeV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::RadrootsTradePrivateTermsRefV1 +pub radroots_event::trade::RadrootsTradePrivateTermsRefV1::artifact_id: alloc::string::String +pub radroots_event::trade::RadrootsTradePrivateTermsRefV1::ciphertext_commitment: alloc::string::String +pub radroots_event::trade::RadrootsTradePrivateTermsRefV1::required_acknowledgement: bool +pub radroots_event::trade::RadrootsTradePrivateTermsRefV1::schema_id: alloc::string::String +impl radroots_event::trade::RadrootsTradePrivateTermsRefV1 +pub fn radroots_event::trade::RadrootsTradePrivateTermsRefV1::validate(&self) -> core::result::Result<(), radroots_event::trade::RadrootsTradeProtocolError> +pub struct radroots_event::trade::TradeId(_) +impl radroots_event::id::RadrootsTradeId +pub const fn radroots_event::id::RadrootsTradeId::as_bytes(&self) -> &[u8; 16] +pub const fn radroots_event::id::RadrootsTradeId::from_bytes([u8; 16]) -> Self +pub const fn radroots_event::id::RadrootsTradeId::into_bytes(self) -> [u8; 16] +pub fn radroots_event::id::RadrootsTradeId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsTradeId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsTradeId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 16]> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::from([u8; 16]) -> Self +impl core::convert::From<radroots_event::id::RadrootsTradeId> for [u8; 16] +pub fn [u8; 16]::from(radroots_event::id::RadrootsTradeId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsTradeId +pub type radroots_event::id::RadrootsTradeId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsTradeId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsTradeId +pub fn radroots_event::id::RadrootsTradeId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub const radroots_event::trade::RADROOTS_TRADE_CANCELLATION_CONTRACT_ID: &str +pub const radroots_event::trade::RADROOTS_TRADE_CANDIDATE_DOMAIN: &[u8] +pub const radroots_event::trade::RADROOTS_TRADE_DECISION_CONTRACT_ID: &str +pub const radroots_event::trade::RADROOTS_TRADE_MAX_ACTIVE_LINES: usize +pub const radroots_event::trade::RADROOTS_TRADE_MAX_ADJUSTMENTS: usize +pub const radroots_event::trade::RADROOTS_TRADE_MAX_PARENT_MUTATIONS: usize +pub const radroots_event::trade::RADROOTS_TRADE_MAX_PRIVATE_ARTIFACT_BYTES: usize +pub const radroots_event::trade::RADROOTS_TRADE_MAX_PUBLIC_CONTENT_BYTES: usize +pub const radroots_event::trade::RADROOTS_TRADE_MUTATION_CONTRACT_IDS: [&str; 5] +pub const radroots_event::trade::RADROOTS_TRADE_MUTATION_DOMAIN: &[u8] +pub const radroots_event::trade::RADROOTS_TRADE_PROPOSAL_CONTRACT_ID: &str +pub const radroots_event::trade::RADROOTS_TRADE_REVISION_DECISION_CONTRACT_ID: &str +pub const radroots_event::trade::RADROOTS_TRADE_REVISION_PROPOSAL_CONTRACT_ID: &str +pub const radroots_event::trade::RADROOTS_TRADE_SCHEMA_VERSION: u16 +pub const radroots_event::trade::RADROOTS_TRADE_SELLER_RESERVATION_ASSERTION_CONTRACT_ID: &str +pub fn radroots_event::trade::canonical_jcs_from_str(&str) -> core::result::Result<alloc::string::String, radroots_event::trade::RadrootsTradeProtocolError> +pub fn radroots_event::trade::canonical_jcs_value(&serde_json::value::Value) -> core::result::Result<alloc::string::String, radroots_event::trade::RadrootsTradeProtocolError> +pub fn radroots_event::trade::canonical_trade_candidate_id(&radroots_event::trade::RadrootsTradeCandidateTermsV1) -> core::result::Result<radroots_event::id::RadrootsTradeCandidateId, radroots_event::trade::RadrootsTradeProtocolError> +pub fn radroots_event::trade::canonical_trade_mutation_content(radroots_event::trade::RadrootsTradeMutationEnvelopeV1) -> core::result::Result<radroots_event::trade::RadrootsTradeCanonicalMutationV1, radroots_event::trade::RadrootsTradeProtocolError> +pub fn radroots_event::trade::canonical_trade_mutation_id(&radroots_event::trade::RadrootsTradeMutationEnvelopeV1) -> core::result::Result<radroots_event::id::RadrootsTradeMutationId, radroots_event::trade::RadrootsTradeProtocolError> +pub fn radroots_event::trade::trade_mutation_from_canonical_content(&str) -> core::result::Result<radroots_event::trade::RadrootsTradeMutationEnvelopeV1, radroots_event::trade::RadrootsTradeProtocolError> +pub mod radroots_event::wire +#[non_exhaustive] pub enum radroots_event::Error +pub radroots_event::Error::ContractValidation(crate::contract::registry_v7::RadrootsContractValidationError) +pub radroots_event::Error::IdMismatch +pub radroots_event::Error::IdMismatch::actual: radroots_event::id::RadrootsEventId +pub radroots_event::Error::IdMismatch::expected: radroots_event::id::RadrootsEventId +pub radroots_event::Error::MalformedEnvelope +pub radroots_event::Error::SignatureInvalid +pub radroots_event::Error::SignatureVerificationUnavailable +impl radroots_event::Error +pub const fn radroots_event::Error::code(&self) -> &'static str +impl core::error::Error for radroots_event::Error +impl core::fmt::Display for radroots_event::Error +pub fn radroots_event::Error::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +pub struct radroots_event::Event +impl radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::envelope::RadrootsEventEnvelope::author(&self) -> &radroots_identity::key::PublicKey +pub fn radroots_event::envelope::RadrootsEventEnvelope::content(&self) -> &str +pub fn radroots_event::envelope::RadrootsEventEnvelope::created_at(&self) -> radroots_event::envelope::RadrootsEventTimestamp +pub fn radroots_event::envelope::RadrootsEventEnvelope::created_at_u64(&self) -> u64 +pub fn radroots_event::envelope::RadrootsEventEnvelope::id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::envelope::RadrootsEventEnvelope::id_hex(&self) -> alloc::string::String +pub fn radroots_event::envelope::RadrootsEventEnvelope::kind(&self) -> radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventEnvelope::kind_class(&self) -> radroots_event::envelope::RadrootsEventKindClass +pub fn radroots_event::envelope::RadrootsEventEnvelope::kind_u32(&self) -> u32 +pub fn radroots_event::envelope::RadrootsEventEnvelope::new(radroots_event::envelope::RadrootsEventEnvelopeParts) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +pub fn radroots_event::envelope::RadrootsEventEnvelope::new_with_limits(radroots_event::envelope::RadrootsEventEnvelopeParts, radroots_event::envelope::RadrootsEventEnvelopeLimits) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +pub fn radroots_event::envelope::RadrootsEventEnvelope::sig(&self) -> &radroots_event::id::RadrootsEventSignature +pub fn radroots_event::envelope::RadrootsEventEnvelope::signature_hex(&self) -> alloc::string::String +pub fn radroots_event::envelope::RadrootsEventEnvelope::tag_slices(&self) -> &[radroots_event::envelope::RadrootsEventTag] +pub fn radroots_event::envelope::RadrootsEventEnvelope::tags(&self) -> &radroots_event::envelope::RadrootsEventTags +pub fn radroots_event::envelope::RadrootsEventEnvelope::tags_as_vec(&self) -> alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub fn radroots_event::envelope::RadrootsEventEnvelope::to_nip01_wire(&self) -> RadrootsNip01EventWire +impl dto_bindgen_core::descriptor::Dto for radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::envelope::RadrootsEventEnvelope::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +pub struct radroots_event::EventDraft +impl radroots_event::draft::RadrootsEventDraft +pub fn radroots_event::draft::RadrootsEventDraft::content(&self) -> &str +pub fn radroots_event::draft::RadrootsEventDraft::contract_id(&self) -> &str +pub fn radroots_event::draft::RadrootsEventDraft::contract_registry_version(&self) -> u32 +pub fn radroots_event::draft::RadrootsEventDraft::created_at(&self) -> radroots_event::envelope::RadrootsEventTimestamp +pub fn radroots_event::draft::RadrootsEventDraft::created_at_u64(&self) -> u64 +pub fn radroots_event::draft::RadrootsEventDraft::expected_event_id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::draft::RadrootsEventDraft::expected_event_id_hex(&self) -> alloc::string::String +pub fn radroots_event::draft::RadrootsEventDraft::expected_pubkey(&self) -> &radroots_identity::key::PublicKey +pub fn radroots_event::draft::RadrootsEventDraft::kind(&self) -> radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::draft::RadrootsEventDraft::kind_u32(&self) -> u32 +pub fn radroots_event::draft::RadrootsEventDraft::new(impl core::convert::Into<alloc::string::String>, u32, u64, alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>>, impl core::convert::Into<alloc::string::String>, impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::draft::RadrootsDraftError> +pub fn radroots_event::draft::RadrootsEventDraft::nip01_preimage(&self) -> core::result::Result<alloc::string::String, radroots_event::draft::RadrootsDraftError> +pub fn radroots_event::draft::RadrootsEventDraft::tags(&self) -> &radroots_event::envelope::RadrootsEventTags +pub fn radroots_event::draft::RadrootsEventDraft::tags_as_vec(&self) -> alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub fn radroots_event::draft::RadrootsEventDraft::validate_for_signing(&self) -> core::result::Result<(), radroots_event::draft::RadrootsDraftError> +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::draft::RadrootsEventDraft +pub fn radroots_event::draft::RadrootsEventDraft::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::EventId(_) +impl radroots_event::id::RadrootsEventId +pub const fn radroots_event::id::RadrootsEventId::as_bytes(&self) -> &[u8; 32] +pub const fn radroots_event::id::RadrootsEventId::from_bytes([u8; 32]) -> Self +pub const fn radroots_event::id::RadrootsEventId::into_bytes(self) -> [u8; 32] +pub fn radroots_event::id::RadrootsEventId::into_string(self) -> alloc::string::String +pub fn radroots_event::id::RadrootsEventId::parse(impl core::convert::AsRef<str>) -> core::result::Result<Self, radroots_event::id::RadrootsIdParseError> +pub fn radroots_event::id::RadrootsEventId::to_hex(&self) -> alloc::string::String +impl core::convert::AsRef<[u8]> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::as_ref(&self) -> &[u8] +impl core::convert::From<[u8; 32]> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::from([u8; 32]) -> Self +impl core::convert::From<radroots_event::id::RadrootsEventId> for [u8; 32] +pub fn [u8; 32]::from(radroots_event::id::RadrootsEventId) -> Self +impl core::convert::TryFrom<&str> for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::try_from(&str) -> core::result::Result<Self, Self::Error> +impl core::convert::TryFrom<alloc::string::String> for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Error = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::try_from(alloc::string::String) -> core::result::Result<Self, Self::Error> +impl core::fmt::Display for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::str::traits::FromStr for radroots_event::id::RadrootsEventId +pub type radroots_event::id::RadrootsEventId::Err = radroots_event::id::RadrootsIdParseError +pub fn radroots_event::id::RadrootsEventId::from_str(&str) -> core::result::Result<Self, Self::Err> +impl dto_bindgen_core::descriptor::Dto for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::id::RadrootsEventId +pub fn radroots_event::id::RadrootsEventId::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::EventKind(_) +impl radroots_event::envelope::RadrootsEventKind +pub const fn radroots_event::envelope::RadrootsEventKind::as_u32(self) -> u32 +pub const fn radroots_event::envelope::RadrootsEventKind::class(self) -> radroots_event::envelope::RadrootsEventKindClass +pub const fn radroots_event::envelope::RadrootsEventKind::new(u32) -> Self +impl core::convert::From<u32> for radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventKind::from(u32) -> Self +impl dto_bindgen_core::descriptor::Dto for radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventKind::describe(&mut dto_bindgen_core::descriptor::DescribeCtx) -> dto_bindgen_core::types::TypeRef +impl serde_core::ser::Serialize for radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventKind::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::envelope::RadrootsEventKind +pub fn radroots_event::envelope::RadrootsEventKind::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::EventTag(_) +impl radroots_event::envelope::RadrootsEventTag +pub fn radroots_event::envelope::RadrootsEventTag::as_slice(&self) -> &[alloc::string::String] +pub fn radroots_event::envelope::RadrootsEventTag::into_vec(self) -> alloc::vec::Vec<alloc::string::String> +pub fn radroots_event::envelope::RadrootsEventTag::new(usize, alloc::vec::Vec<alloc::string::String>) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +pub fn radroots_event::envelope::RadrootsEventTag::new_with_limits(usize, alloc::vec::Vec<alloc::string::String>, radroots_event::envelope::RadrootsEventEnvelopeLimits) -> core::result::Result<Self, radroots_event::envelope::RadrootsEventEnvelopeError> +impl serde_core::ser::Serialize for radroots_event::envelope::RadrootsEventTag +pub fn radroots_event::envelope::RadrootsEventTag::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::envelope::RadrootsEventTag +pub fn radroots_event::envelope::RadrootsEventTag::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::SignedEvent +impl radroots_event::draft::RadrootsSignedEvent +pub fn radroots_event::draft::RadrootsSignedEvent::content(&self) -> &str +pub fn radroots_event::draft::RadrootsSignedEvent::created_at(&self) -> u64 +pub fn radroots_event::draft::RadrootsSignedEvent::envelope(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::draft::RadrootsSignedEvent::from_wire_verified_id(RadrootsNip01EventWire, impl core::convert::Into<alloc::string::String>) -> core::result::Result<Self, radroots_event::draft::RadrootsSignedEventError> +pub fn radroots_event::draft::RadrootsSignedEvent::id(&self) -> &radroots_event::id::RadrootsEventId +pub fn radroots_event::draft::RadrootsSignedEvent::id_hex(&self) -> alloc::string::String +pub fn radroots_event::draft::RadrootsSignedEvent::id_str(&self) -> &str +pub fn radroots_event::draft::RadrootsSignedEvent::kind(&self) -> u32 +pub fn radroots_event::draft::RadrootsSignedEvent::new(radroots_event::draft::RadrootsSignedEventParts) -> core::result::Result<Self, radroots_event::draft::RadrootsSignedEventError> +pub fn radroots_event::draft::RadrootsSignedEvent::pubkey(&self) -> &radroots_identity::key::PublicKey +pub fn radroots_event::draft::RadrootsSignedEvent::raw_json(&self) -> &str +pub fn radroots_event::draft::RadrootsSignedEvent::sig(&self) -> &radroots_event::id::RadrootsEventSignature +pub fn radroots_event::draft::RadrootsSignedEvent::sig_str(&self) -> &str +pub fn radroots_event::draft::RadrootsSignedEvent::signature_hex(&self) -> alloc::string::String +pub fn radroots_event::draft::RadrootsSignedEvent::tags_as_vec(&self) -> alloc::vec::Vec<alloc::vec::Vec<alloc::string::String>> +pub fn radroots_event::draft::RadrootsSignedEvent::verify_signature(self) -> core::result::Result<radroots_event::draft::RadrootsVerifiedSignedEvent, radroots_event::draft::RadrootsSignatureVerificationError> +pub fn radroots_event::draft::RadrootsSignedEvent::wire(&self) -> &RadrootsNip01EventWire +impl serde_core::ser::Serialize for radroots_event::draft::RadrootsSignedEvent +pub fn radroots_event::draft::RadrootsSignedEvent::serialize<S>(&self, S) -> core::result::Result<<S as serde_core::ser::Serializer>::Ok, <S as serde_core::ser::Serializer>::Error> where S: serde_core::ser::Serializer +impl<'de> serde_core::de::Deserialize<'de> for radroots_event::draft::RadrootsSignedEvent +pub fn radroots_event::draft::RadrootsSignedEvent::deserialize<D>(D) -> core::result::Result<Self, <D as serde_core::de::Deserializer>::Error> where D: serde_core::de::Deserializer<'de> +pub struct radroots_event::VerifiedEvent(_) +impl radroots_event::VerifiedEvent +pub const fn radroots_event::VerifiedEvent::event(&self) -> &radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::VerifiedEvent::into_event(self) -> radroots_event::envelope::RadrootsEventEnvelope +pub fn radroots_event::VerifiedEvent::validate_contract(self) -> core::result::Result<radroots_event::admission::ContractValidatedEvent, radroots_event::Error> diff --git a/tools/xtask/src/contract.rs b/tools/xtask/src/contract.rs @@ -653,10 +653,10 @@ const POST_OPERATION_EXPECTATIONS: [PostOperationExpectation; 8] = [ "crates/event_codec/src/reply/authored.rs", ], rust_types: &[ - "radroots_event::reply::RadrootsAuthoredNip10Reply", - "radroots_event::reply::RadrootsNip10ReplyError", - "radroots_event::relay_hint::RadrootsNostrRelayHint", - "radroots_event::reply::RadrootsNip10ReplyReference", + "radroots_event::post::reply::RadrootsAuthoredNip10Reply", + "radroots_event::post::reply::RadrootsNip10ReplyError", + "radroots_event::tag::relay_hint::RadrootsNostrRelayHint", + "radroots_event::post::reply::RadrootsNip10ReplyReference", ], case_kinds: &[ "social.reply.build_authored_draft.valid", @@ -675,7 +675,7 @@ const POST_OPERATION_EXPECTATIONS: [PostOperationExpectation; 8] = [ "crates/event_codec/src/reply/inbound.rs", ], rust_types: &[ - "radroots_event::relay_hint::RadrootsNostrRelayHint", + "radroots_event::tag::relay_hint::RadrootsNostrRelayHint", "radroots_event_codec::reply::inbound::RadrootsInboundNip10EventReference", "radroots_event_codec::reply::inbound::RadrootsInboundNip10Participant", "radroots_event_codec::reply::inbound::RadrootsInboundNip10ReplyProjection", @@ -702,7 +702,7 @@ const POST_OPERATION_EXPECTATIONS: [PostOperationExpectation; 8] = [ "crates/event_codec/src/verification.rs", ], rust_types: &[ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::reply::admission::RadrootsAdmittedNip10ReplyEvent", "radroots_event_codec::reply::admission::RadrootsNip10ReplyAdmissionError", "radroots_event_codec::reply::inbound::RadrootsInboundNip10ReplyProjection", @@ -747,7 +747,7 @@ const POST_OPERATION_EXPECTATIONS: [PostOperationExpectation; 8] = [ "crates/event_codec/src/verification.rs", ], rust_types: &[ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::post::admission::RadrootsAdmittedRootPostEvent", "radroots_event_codec::post::admission::RadrootsPostAdmissionError", "radroots_event_codec::post::admission::RadrootsPostAdmissionOutcome", @@ -1044,10 +1044,10 @@ const FOOD_AVAILABILITY_OPERATION_EXPECTATIONS: [FoodAvailabilityOperationExpect ], rust_types: &[ "radroots_blossom::ByteVerifiedDescriptor", - "radroots_event::food_availability::RadrootsFoodAvailabilityDetails", - "radroots_event::food_availability::RadrootsFoodAvailabilityDetailsParts", - "radroots_event::food_availability::RadrootsFoodAvailabilityError", - "radroots_event::food_availability::RadrootsFoodAvailabilityImage", + "radroots_event::food::availability::RadrootsFoodAvailabilityDetails", + "radroots_event::food::availability::RadrootsFoodAvailabilityDetailsParts", + "radroots_event::food::availability::RadrootsFoodAvailabilityError", + "radroots_event::food::availability::RadrootsFoodAvailabilityImage", "radroots_event::media::RadrootsAuthoredImage", "radroots_event::wire::RadrootsNip01EventWireParts", "radroots_event_codec::food_availability::authored::RadrootsFoodAvailabilityEncodeError", @@ -1070,8 +1070,8 @@ const FOOD_AVAILABILITY_OPERATION_EXPECTATIONS: [FoodAvailabilityOperationExpect "crates/event_codec/src/food_availability/inbound.rs", ], rust_types: &[ - "radroots_event::classified_listing::RadrootsClassifiedListingPartition", - "radroots_event::food_availability::RadrootsFoodAvailabilityError", + "radroots_event::listing::classified::RadrootsClassifiedListingPartition", + "radroots_event::food::availability::RadrootsFoodAvailabilityError", "radroots_event_codec::food_availability::inbound::RadrootsFoodAvailabilityImageDiagnostic", "radroots_event_codec::food_availability::inbound::RadrootsFoodAvailabilityProjectionError", "radroots_event_codec::food_availability::inbound::RadrootsFoodAvailabilityProjectionOutcome", @@ -1097,7 +1097,7 @@ const FOOD_AVAILABILITY_OPERATION_EXPECTATIONS: [FoodAvailabilityOperationExpect "crates/event_codec/src/verification.rs", ], rust_types: &[ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::food_availability::admission::RadrootsAdmittedFoodAvailabilityEvent", "radroots_event_codec::food_availability::admission::RadrootsExcludedClassifiedListingCandidate", "radroots_event_codec::food_availability::admission::RadrootsFoodAvailabilityAdmissionError", @@ -9720,7 +9720,7 @@ transport = "native" [operations.operational_listing_build_draft.implementation] rust_modules = ["crates/core/src/unit.rs"] -rust_types = ["radroots_event::operational_listing::RadrootsOperationalListing"] +rust_types = ["radroots_event::listing::operational::RadrootsOperationalListing"] [operations.operational_listing_build_draft.conformance] vector = "contracts/conformance/vectors/operational_listing/build_draft.v1.json" diff --git a/tools/xtask/src/contract/comment_authority.rs b/tools/xtask/src/contract/comment_authority.rs @@ -46,15 +46,15 @@ pub(super) const COMMENT_OPERATION_EXPECTATIONS: [CommentOperationExpectation; 3 "crates/event_codec/src/comment/authored.rs", ], rust_types: &[ - "radroots_event::comment::RadrootsAuthoredNip22Comment", - "radroots_event::comment::RadrootsNip22AddressRootReference", - "radroots_event::comment::RadrootsNip22CommentError", - "radroots_event::comment::RadrootsNip22CommentParentReference", - "radroots_event::comment::RadrootsNip22CommentPosition", - "radroots_event::comment::RadrootsNip22CommentRoot", - "radroots_event::comment::RadrootsNip22CommentRootKind", - "radroots_event::comment::RadrootsNip22EventRootReference", - "radroots_event::relay_hint::RadrootsNostrRelayHint", + "radroots_event::post::comment::RadrootsAuthoredNip22Comment", + "radroots_event::post::comment::RadrootsNip22AddressRootReference", + "radroots_event::post::comment::RadrootsNip22CommentError", + "radroots_event::post::comment::RadrootsNip22CommentParentReference", + "radroots_event::post::comment::RadrootsNip22CommentPosition", + "radroots_event::post::comment::RadrootsNip22CommentRoot", + "radroots_event::post::comment::RadrootsNip22CommentRootKind", + "radroots_event::post::comment::RadrootsNip22EventRootReference", + "radroots_event::tag::relay_hint::RadrootsNostrRelayHint", "radroots_event::wire::RadrootsNip01EventWireParts", ], case_kinds: &[ @@ -106,7 +106,7 @@ pub(super) const COMMENT_OPERATION_EXPECTATIONS: [CommentOperationExpectation; 3 "crates/event_codec/src/verification.rs", ], rust_types: &[ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::comment::admission::RadrootsAdmittedNip22CommentEvent", "radroots_event_codec::comment::admission::RadrootsNip22CommentAdmissionError", "radroots_event_codec::comment::inbound::RadrootsInboundNip22CommentProjection", diff --git a/tools/xtask/src/contract/deletion_authority.rs b/tools/xtask/src/contract/deletion_authority.rs @@ -45,11 +45,11 @@ pub(super) const DELETION_OPERATION_EXPECTATIONS: [DeletionOperationExpectation; "crates/event_codec/src/deletion/authored.rs", ], rust_types: &[ - "radroots_event::deletion::RadrootsAuthoredNip09DeletionRequest", - "radroots_event::deletion::RadrootsNip09DeletionAddressTarget", - "radroots_event::deletion::RadrootsNip09DeletionError", - "radroots_event::deletion::RadrootsNip09DeletionEventTarget", - "radroots_event::ids::RadrootsNip01Coordinate", + "radroots_event::post::deletion::RadrootsAuthoredNip09DeletionRequest", + "radroots_event::post::deletion::RadrootsNip09DeletionAddressTarget", + "radroots_event::post::deletion::RadrootsNip09DeletionError", + "radroots_event::post::deletion::RadrootsNip09DeletionEventTarget", + "radroots_event::id::RadrootsNip01Coordinate", "radroots_event::wire::RadrootsNip01EventWireParts", ], case_kinds: &[ @@ -97,7 +97,7 @@ pub(super) const DELETION_OPERATION_EXPECTATIONS: [DeletionOperationExpectation; "crates/event_codec/src/verification.rs", ], rust_types: &[ - "radroots_event::RadrootsEventEnvelope", + "radroots_event::envelope::RadrootsEventEnvelope", "radroots_event_codec::deletion::admission::RadrootsAdmittedNip09DeletionRequestEvent", "radroots_event_codec::deletion::admission::RadrootsNip09DeletionAdmissionError", "radroots_event_codec::deletion::inbound::RadrootsInboundNip09DeletionProjection", diff --git a/tools/xtask/src/contract/food_availability_projection.rs b/tools/xtask/src/contract/food_availability_projection.rs @@ -877,7 +877,8 @@ fn validate_food_availability_projection_manifest_with_superseded_artifacts_unde if manifest.migration.up.sha256 != IMMUTABLE_PREDECESSOR_ARTIFACTS[7].sha256 || manifest.migration.down.sha256 != IMMUTABLE_PREDECESSOR_ARTIFACTS[8].sha256 || manifest.result_vector.sha256 != IMMUTABLE_PREDECESSOR_ARTIFACTS[4].sha256 - || manifest.result_vector.executor_sha256 != IMMUTABLE_PREDECESSOR_ARTIFACTS[6].sha256 + || (!superseded_artifacts.contains(RESULT_VECTOR_EXECUTOR_RELATIVE) + && manifest.result_vector.executor_sha256 != IMMUTABLE_PREDECESSOR_ARTIFACTS[6].sha256) { return Err(format!( "{MANIFEST_RELATIVE} does not describe the immutable FoodAvailability predecessor identity" diff --git a/tools/xtask/src/contract/nip09_reconciliation.rs b/tools/xtask/src/contract/nip09_reconciliation.rs @@ -91,7 +91,7 @@ const EVENT_STORE_STORE_ROOT_BASELINE_SHA256: &str = const EVENT_STORE_MIGRATION_IMPL_BASELINE_SHA256: &str = "69f3c730f8a4f3a4af0028c74f6903126def01ceb63eed8a173e696ce291dc09"; const EVENT_CRATE_ROOT_BASELINE_SHA256: &str = - "89a65d522cfb025f100da4e22ee847239459a2dde1a3e48e9d94212fb78472bf"; + "82e48537344777e00a72c4d93b20d66c7afd5cc5ffd25aa5ae3717b4bbd2f3ae"; const EVENT_CODEC_CRATE_ROOT_BASELINE_SHA256: &str = "8c29ceccb06abc94279db3257d52e14ad721e2eb302e54fbf26f8856d0db0b53"; const BLOSSOM_CRATE_ROOT_BASELINE_SHA256: &str = @@ -147,8 +147,10 @@ const GOVERNED_SUPPORT_SOURCE_TREE_BASELINES: [GovernedSourceTreeBaselineSpec; 5 ]; const SUPPORT_ITEM_MACRO_SOURCE_ALLOWLIST: [&str; 2] = [ "crates/event/src/contract/registry_v7.rs", - "crates/event/src/ids.rs", + "crates/event/src/id.rs", ]; +const SUCCESSOR_SOURCE_PATH_REPLACEMENTS: [(&str, &str); 1] = + [("crates/event/src/ids.rs", "crates/event/src/id.rs")]; const EVENT_STORE_PROTOCOL_RECONCILIATION_SOURCE_RELATIVE: &str = "crates/event_store/src/store/protocol_reconciliation_v1.rs"; const EVENT_STORE_PROTOCOL_STORAGE_SOURCE_RELATIVE: &str = @@ -671,7 +673,7 @@ enum CallableSpec { const ENTRY_POINT_SPECS: &[EntryPointSpec] = &[ EntryPointSpec { role: "event_head_candidate", - rust_path: "radroots_event::event_head::v1::event_head_candidate_for_nip01_event_v1", + rust_path: "radroots_event::envelope::event_head::v1::event_head_candidate_for_nip01_event_v1", source_path: "crates/event/src/event_head/v1.rs", callable: CallableSpec::Free { module_path: &[], @@ -681,7 +683,7 @@ const ENTRY_POINT_SPECS: &[EntryPointSpec] = &[ }, EntryPointSpec { role: "event_head_selection", - rust_path: "radroots_event::event_head::v1::select_event_head_v1", + rust_path: "radroots_event::envelope::event_head::v1::select_event_head_v1", source_path: "crates/event/src/event_head/v1.rs", callable: CallableSpec::Free { module_path: &[], @@ -1259,15 +1261,11 @@ const SOURCE_ROUTE_WITNESS_SPECS: &[SourceRouteWitnessSpec] = &[ modules: &[ ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "calendar", - }, - ModuleRouteSpec { - visibility: RouteVisibility::Public, - name: "classified_listing", + name: "admission", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "comment", + name: "calendar", }, ModuleRouteSpec { visibility: RouteVisibility::Public, @@ -1275,31 +1273,31 @@ const SOURCE_ROUTE_WITNESS_SPECS: &[SourceRouteWitnessSpec] = &[ }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "deletion", + name: "draft", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "draft", + name: "envelope", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "envelope", + name: "farm", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "event_head", + name: "food", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "food_availability", + name: "id", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "ids", + name: "knowledge", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "kinds", + name: "listing", }, ModuleRouteSpec { visibility: RouteVisibility::Public, @@ -1315,22 +1313,55 @@ const SOURCE_ROUTE_WITNESS_SPECS: &[SourceRouteWitnessSpec] = &[ }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "relay_hint", + name: "social", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "social", + name: "tag", }, ModuleRouteSpec { visibility: RouteVisibility::Public, - name: "tags", + name: "trade", }, ModuleRouteSpec { visibility: RouteVisibility::Public, name: "wire", }, ], - uses: &[], + uses: &[ + UseRouteSpec { + visibility: RouteVisibility::Public, + path: "draft::RadrootsEventDraft as EventDraft", + }, + UseRouteSpec { + visibility: RouteVisibility::Public, + path: "draft::RadrootsSignedEvent as SignedEvent", + }, + UseRouteSpec { + visibility: RouteVisibility::Public, + path: "envelope::RadrootsEventEnvelope as Event", + }, + UseRouteSpec { + visibility: RouteVisibility::Public, + path: "envelope::RadrootsEventKind as EventKind", + }, + UseRouteSpec { + visibility: RouteVisibility::Public, + path: "envelope::RadrootsEventTag as EventTag", + }, + UseRouteSpec { + visibility: RouteVisibility::Public, + path: "id::EventId", + }, + UseRouteSpec { + visibility: RouteVisibility::Public, + path: "verification::Error", + }, + UseRouteSpec { + visibility: RouteVisibility::Public, + path: "verification::SignatureVerifiedEvent as VerifiedEvent", + }, + ], }, SourceRouteWitnessSpec { role: "event_contract_registry_v7_route", @@ -4951,7 +4982,7 @@ fn describe_impl_resolution_witness( let mut protected_paths = FROZEN_SOURCE_SPECS .iter() - .map(|spec| spec.path) + .map(|spec| successor_source_path(spec.path)) .chain( ROUTE_FACADE_BASELINE_SOURCES .iter() @@ -5037,7 +5068,7 @@ fn describe_impl_resolution_witness( }; let mut protected_member_paths = FROZEN_SOURCE_SPECS .iter() - .map(|spec| spec.path) + .map(|spec| successor_source_path(spec.path)) .chain([ POST_CORE_EXTENSION_SOURCE_RELATIVE, POST_CORE_STORAGE_SOURCE_RELATIVE, @@ -5168,6 +5199,13 @@ fn normalized_identifier(identifier: &syn::Ident) -> String { normalized_identifier_spelling(&identifier.to_string()) } +fn successor_source_path(relative: &'static str) -> &'static str { + SUCCESSOR_SOURCE_PATH_REPLACEMENTS + .iter() + .find_map(|(predecessor, successor)| (*predecessor == relative).then_some(*successor)) + .unwrap_or(relative) +} + fn normalized_identifier_spelling(spelling: &str) -> String { spelling.strip_prefix("r#").unwrap_or(spelling).to_owned() } @@ -5239,6 +5277,13 @@ fn validate_raw_crate_attributes(relative: &str, source: &str) -> Result<(), Str "#![cfg_attr(coverage_nightly,feature(coverage_attribute))]", "#![cfg_attr(all(not(feature=\"std\"),not(test)),no_std)]", "#![forbid(unsafe_code)]", + "#![deny(rustdoc::broken_intra_doc_links)]", + "#![doc=\" Canonical Radroots event-domain models.\"]", + "#![doc=\"\"]", + "#![doc=\" Public behavior is grouped under the approved singular domain modules.\"]", + "#![doc=\" The crate root intentionally exposes only [`Event`], [`EventDraft`],\"]", + "#![doc=\" [`SignedEvent`], [`VerifiedEvent`], [`EventId`], [`EventKind`], [`EventTag`],\"]", + "#![doc=\" and [`Error`].\"]", ], "crates/event_codec/src/lib.rs" => &[ "#![cfg_attr(not(feature=\"std\"),no_std)]", @@ -5519,9 +5564,13 @@ fn validate_public_crate_root_resolution_authority( ) -> Result<(), String> { let protected_bindings = protected_resolution_bindings(file); let expected_file_attributes: &[&str] = match relative { - "crates/event/src/lib.rs" - | "crates/event_codec/src/lib.rs" - | "crates/blossom/src/lib.rs" => &["#![forbid(unsafe_code)]"], + "crates/event/src/lib.rs" => &[ + "#![forbid(unsafe_code)]", + "#![deny(rustdoc::broken_intra_doc_links)]", + ], + "crates/event_codec/src/lib.rs" | "crates/blossom/src/lib.rs" => { + &["#![forbid(unsafe_code)]"] + } _ => { return Err(format!( "unsupported public crate-root audit target {relative}" @@ -5557,23 +5606,7 @@ fn validate_public_crate_root_resolution_authority( .iter() .map(compact_tokens) .collect::<Vec<_>>(); - let expected_attributes: &[&str] = match item { - syn::Item::Struct(item) - if relative == "crates/event/src/lib.rs" - && matches!( - item.ident.to_string().as_str(), - "RadrootsEventRef" | "RadrootsEventPtr" - ) => - { - &[ - "#[cfg_attr(feature=\"serde\",derive(serde::Serialize,serde::Deserialize))]", - "#[cfg_attr(feature=\"dto-bindgen\",derive(dto_bindgen::Dto))]", - "#[cfg_attr(feature=\"dto-bindgen\",dto(export))]", - "#[derive(Clone,Debug,PartialEq,Eq)]", - ] - } - _ => &[], - }; + let expected_attributes: &[&str] = &[]; if attributes != expected_attributes { return Err(format!( "{relative} top-level item `{}` has unsupported source-generating attributes: expected {expected_attributes:?}, found {attributes:?}", @@ -5656,7 +5689,17 @@ fn validate_public_crate_root_resolution_authority( let mut routes = Vec::new(); flatten_use_tree("", &item_use.tree, &mut routes); for route in routes { - if route.ends_with("::*") || route.contains(" as ") { + let curated_event_alias = relative == "crates/event/src/lib.rs" + && matches!( + route.as_str(), + "draft::RadrootsEventDraft as EventDraft" + | "draft::RadrootsSignedEvent as SignedEvent" + | "envelope::RadrootsEventEnvelope as Event" + | "envelope::RadrootsEventKind as EventKind" + | "envelope::RadrootsEventTag as EventTag" + | "verification::SignatureVerifiedEvent as VerifiedEvent" + ); + if route.ends_with("::*") || (route.contains(" as ") && !curated_event_alias) { return Err(format!( "{relative} use route `{route}` must not use glob or alias name resolution" )); @@ -5829,6 +5872,7 @@ fn expected_source_module_route_attributes( module: &str, ) -> &'static [&'static str] { match (relative, module) { + ("crates/event/src/lib.rs", "knowledge") => &["#[cfg(feature=\"knowledge\")]"], ("crates/event_codec/src/lib.rs", "admission") => &["#[cfg(feature=\"serde_json\")]"], ("crates/event_codec/src/profile/mod.rs", "inbound") => &["#[cfg(feature=\"serde_json\")]"], (EVENT_STORE_LIB_SOURCE_RELATIVE, _) => &["#[cfg(feature=\"sqlite\")]"], @@ -9407,8 +9451,8 @@ fn validate_post_core_extension_source(relative: &str, bytes: &[u8]) -> Result<( "super::protocol_reconciliation_v1::ProtocolReconciliationV1IngestResult", "crate::error::RadrootsEventStoreError", "crate::model::RadrootsEventIngest", - "radroots_event::ids::RadrootsTradeCandidateId", - "radroots_event::ids::RadrootsTradeMutationId", + "radroots_event::id::RadrootsTradeCandidateId", + "radroots_event::id::RadrootsTradeMutationId", "radroots_event::trade::RADROOTS_TRADE_MUTATION_CONTRACT_IDS", "radroots_event::trade::RadrootsSellerReservationAssertionV1", "radroots_event::trade::RadrootsTradeDecisionV1", @@ -9556,8 +9600,8 @@ fn validate_post_core_storage_source( "crate::error::RadrootsEventStoreError", "crate::model::RadrootsTransportObservation", "radroots_event::envelope::RadrootsEventEnvelope", - "radroots_event::ids::RadrootsTradeCandidateId", - "radroots_event::ids::RadrootsTradeMutationId", + "radroots_event::id::RadrootsTradeCandidateId", + "radroots_event::id::RadrootsTradeMutationId", "radroots_event::trade::RadrootsSellerReservationAssertionV1", "radroots_event::trade::RadrootsTradeMutationEnvelopeV1", "radroots_event::trade::RadrootsTradeMutationKindV1", diff --git a/tools/xtask/src/contract/source_maintenance.rs b/tools/xtask/src/contract/source_maintenance.rs @@ -306,6 +306,10 @@ const SOURCE_SPECS: &[SourceSpec] = &[ path: "crates/blossom/src/url.rs", }, SourceSpec { + role: "event_public_surface", + path: "crates/event/src/lib.rs", + }, + SourceSpec { role: "event_contract_facade", path: "crates/event/src/contract.rs", }, @@ -335,7 +339,7 @@ const SOURCE_SPECS: &[SourceSpec] = &[ }, SourceSpec { role: "event_ids_authority", - path: "crates/event/src/ids.rs", + path: "crates/event/src/id.rs", }, SourceSpec { role: "event_trade_authority", @@ -454,6 +458,14 @@ const SOURCE_SPECS: &[SourceSpec] = &[ path: "crates/event_codec/src/deletion/reconciliation_v1.rs", }, SourceSpec { + role: "event_codec_error_authority", + path: "crates/event_codec/src/error.rs", + }, + SourceSpec { + role: "event_codec_food_admission_authority", + path: "crates/event_codec/src/food_availability/admission.rs", + }, + SourceSpec { role: "event_codec_food_inbound_facade", path: "crates/event_codec/src/food_availability/inbound.rs", }, @@ -502,6 +514,10 @@ const SOURCE_SPECS: &[SourceSpec] = &[ path: "crates/event_store/src/model/addressable_transition_feed_v1.rs", }, SourceSpec { + role: "current_visibility_model", + path: "crates/event_store/src/model/current_visibility_v1.rs", + }, + SourceSpec { role: "food_projection_model", path: "crates/event_store/src/model/food_availability_projection_v1.rs", }, @@ -578,6 +594,10 @@ const SOURCE_SPECS: &[SourceSpec] = &[ path: "tools/xtask/src/contract.rs", }, SourceSpec { + role: "dto_root_generation_authority", + path: "tools/xtask/src/dto_roots.rs", + }, + SourceSpec { role: "xtask_dispatch_and_release_preflight", path: "tools/xtask/src/main.rs", }, @@ -603,6 +623,7 @@ const PREDECESSOR_SUPERSEDED_SOURCE_PATHS: &[&str] = &[ "crates/core/src/quantity.rs", "crates/core/src/quantity_price.rs", "crates/core/src/unit.rs", + "crates/event/src/lib.rs", "crates/event/src/calendar.rs", "crates/event/src/classified_listing.rs", "crates/event/src/comment.rs", @@ -630,6 +651,8 @@ const PREDECESSOR_SUPERSEDED_SOURCE_PATHS: &[&str] = &[ "crates/event_codec/src/comment/inbound/registry_v7.rs", "crates/event_codec/src/deletion/mod.rs", "crates/event_codec/src/deletion/reconciliation_v1.rs", + "crates/event_codec/src/error.rs", + "crates/event_codec/src/food_availability/admission.rs", "crates/event_codec/src/food_availability/inbound.rs", "crates/event_codec/src/food_availability/inbound/registry_v7.rs", "crates/event_codec/src/job/traits.rs", @@ -648,6 +671,7 @@ const PREDECESSOR_SUPERSEDED_SOURCE_PATHS: &[&str] = &[ "crates/event_store/src/migrations.rs", "crates/event_store/src/model.rs", "crates/event_store/src/model/addressable_transition_feed_v1.rs", + "crates/event_store/src/model/current_visibility_v1.rs", "crates/event_store/src/model/food_availability_projection_v1.rs", "crates/event_store/src/model/ingest_reconciliation_v1.rs", "crates/event_store/src/model/reconciliation_v1.rs", @@ -663,6 +687,9 @@ const PREDECESSOR_SUPERSEDED_SOURCE_PATHS: &[&str] = &[ "crates/event_store/src/store/protocol_storage_v1.rs", ]; +const PREDECESSOR_SUPERSESSION_REPLACEMENTS: &[(&str, &str)] = + &[("crates/event/src/ids.rs", "crates/event/src/id.rs")]; + const PREDECESSOR_SUPERSEDED_ARTIFACT_PATHS: &[&str] = &[FOOD_PREDECESSOR_RESULT_VECTOR_EXECUTOR_RELATIVE]; @@ -1113,14 +1140,46 @@ fn validate_predecessor_production_source_coverage(workspace_root: &Path) -> Res if unique_source_paths.len() != source_paths.len() { return Err("SourceMaintenance SOURCE_SPECS paths must be unique".to_owned()); } + let replaced_predecessors = PREDECESSOR_SUPERSESSION_REPLACEMENTS + .iter() + .map(|(predecessor, _)| *predecessor) + .collect::<BTreeSet<_>>(); + let replacement_paths = PREDECESSOR_SUPERSESSION_REPLACEMENTS + .iter() + .map(|(_, replacement)| *replacement) + .collect::<BTreeSet<_>>(); + if replaced_predecessors.len() != PREDECESSOR_SUPERSESSION_REPLACEMENTS.len() + || replacement_paths.len() != PREDECESSOR_SUPERSESSION_REPLACEMENTS.len() + { + return Err( + "SourceMaintenance predecessor supersession replacements must be one-to-one".to_owned(), + ); + } + for (predecessor, replacement) in PREDECESSOR_SUPERSESSION_REPLACEMENTS { + if predecessor == replacement || !PREDECESSOR_SUPERSEDED_SOURCE_PATHS.contains(predecessor) + { + return Err(format!( + "SourceMaintenance replacement `{predecessor}` -> `{replacement}` must rename an explicitly superseded predecessor" + )); + } + if workspace_root.join(predecessor).exists() { + return Err(format!( + "SourceMaintenance renamed predecessor path `{predecessor}` must be absent" + )); + } + } for path in PREDECESSOR_SUPERSEDED_SOURCE_PATHS { + let current_path = PREDECESSOR_SUPERSESSION_REPLACEMENTS + .iter() + .find_map(|(predecessor, replacement)| (*predecessor == *path).then_some(*replacement)) + .unwrap_or(path); let count = source_paths .iter() - .filter(|candidate| **candidate == *path) + .filter(|candidate| **candidate == current_path) .count(); if count != 1 { return Err(format!( - "SourceMaintenance successor must current-byte-bind superseded predecessor path `{path}` exactly once; found {count}" + "SourceMaintenance successor must current-byte-bind superseded predecessor path `{path}` through `{current_path}` exactly once; found {count}" )); } } @@ -3584,7 +3643,7 @@ struct DelegatedAuthoritySpec { const EXECUTABLE_AUTHORITY_AST_SHA256: &str = "da4ba88c3cabe0e5ed6df4ca0115645c8a65d43cdea7d2dbf5e78d99256e8e15"; const BOUND_AUTHORITY_SOURCE_AST_SHA256: &str = - "bd1d92cdd1e399a844f5957ef2117d6860bc309b66af24b56ad251a464b2a6dd"; + "b61fd74737d24230a64e4b4e215e2b270e03947ef60481c7e6f301bf3ca05fe5"; #[derive(Clone, Debug, Serialize)] struct ExecutableAuthorityIdentity { diff --git a/tools/xtask/src/dto_roots.rs b/tools/xtask/src/dto_roots.rs @@ -124,9 +124,10 @@ fn generate_discovery_roots( let input = fs::read_to_string(&path).map_err(|error| { format!("failed to read DTO source `{source_file}` for {authority_label}: {error}") })?; - inventories.push( - scan_rust_source(source_file.clone(), &input).map_err(|error| error.to_string())?, - ); + let mut inventory = + scan_rust_source(source_file.clone(), &input).map_err(|error| error.to_string())?; + inventory.source_file = canonical_dto_source_path(source_file).to_owned(); + inventories.push(inventory); } let mut package_config = config.clone(); @@ -142,6 +143,47 @@ fn generate_discovery_roots( }) } +/// Returns the crate-visible source route used by generated root descriptors. +/// +/// `radroots_event` intentionally keeps several implementation files at the +/// crate source root while exposing them through singular domain facades with +/// `#[path = "..."]`. `dto_bindgen_core` derives a descriptor's Rust module +/// path from its source filename, so these routed files need the same logical +/// path that rustc assigns through their public facade. The physical source +/// path remains the authority used for reading and diagnostics. +fn canonical_dto_source_path(source_file: &str) -> &str { + match source_file { + "crates/event/src/account.rs" => "crates/event/src/profile/account.rs", + "crates/event/src/app_data.rs" => "crates/event/src/social/app_data.rs", + "crates/event/src/comment.rs" => "crates/event/src/post/comment.rs", + "crates/event/src/coop.rs" => "crates/event/src/farm/coop.rs", + "crates/event/src/document.rs" => "crates/event/src/post/document.rs", + "crates/event/src/follow.rs" => "crates/event/src/social/follow.rs", + "crates/event/src/gcs.rs" => "crates/event/src/farm/change_set.rs", + "crates/event/src/geochat.rs" => "crates/event/src/social/geochat.rs", + "crates/event/src/gift_wrap.rs" => "crates/event/src/social/gift_wrap.rs", + "crates/event/src/job.rs" => "crates/event/src/social/job.rs", + "crates/event/src/job_feedback.rs" => "crates/event/src/social/job_feedback.rs", + "crates/event/src/job_request.rs" => "crates/event/src/social/job_request.rs", + "crates/event/src/job_result.rs" => "crates/event/src/social/job_result.rs", + "crates/event/src/list.rs" => "crates/event/src/social/list.rs", + "crates/event/src/list_set.rs" => "crates/event/src/social/list_set.rs", + "crates/event/src/message.rs" => "crates/event/src/social/message.rs", + "crates/event/src/message_file.rs" => "crates/event/src/social/message_file.rs", + "crates/event/src/operational_listing.rs" => "crates/event/src/listing/operational.rs", + "crates/event/src/order.rs" => "crates/event/src/trade/order.rs", + "crates/event/src/order_economics.rs" => "crates/event/src/trade/order_economics.rs", + "crates/event/src/plot.rs" => "crates/event/src/farm/plot.rs", + "crates/event/src/reaction.rs" => "crates/event/src/post/reaction.rs", + "crates/event/src/relay_document.rs" => "crates/event/src/social/relay_document.rs", + "crates/event/src/resource_area.rs" => "crates/event/src/farm/resource_area.rs", + "crates/event/src/resource_cap.rs" => "crates/event/src/farm/resource_cap.rs", + "crates/event/src/seal.rs" => "crates/event/src/social/seal.rs", + "crates/event/src/trade_validation.rs" => "crates/event/src/trade/validation.rs", + _ => source_file, + } +} + fn workspace_path(workspace_root: &Path, configured_path: &str) -> Result<PathBuf, String> { let relative = Path::new(configured_path); if configured_path.is_empty() @@ -693,6 +735,52 @@ root_module_file = "crates/demo/src/generated/dto_roots.rs" } #[test] + fn event_routed_sources_generate_crate_visible_module_paths() { + for (physical, routed) in [ + ("account.rs", "profile/account.rs"), + ("app_data.rs", "social/app_data.rs"), + ("comment.rs", "post/comment.rs"), + ("coop.rs", "farm/coop.rs"), + ("document.rs", "post/document.rs"), + ("follow.rs", "social/follow.rs"), + ("gcs.rs", "farm/change_set.rs"), + ("geochat.rs", "social/geochat.rs"), + ("gift_wrap.rs", "social/gift_wrap.rs"), + ("job.rs", "social/job.rs"), + ("job_feedback.rs", "social/job_feedback.rs"), + ("job_request.rs", "social/job_request.rs"), + ("job_result.rs", "social/job_result.rs"), + ("list.rs", "social/list.rs"), + ("list_set.rs", "social/list_set.rs"), + ("message.rs", "social/message.rs"), + ("message_file.rs", "social/message_file.rs"), + ("operational_listing.rs", "listing/operational.rs"), + ("order.rs", "trade/order.rs"), + ("order_economics.rs", "trade/order_economics.rs"), + ("plot.rs", "farm/plot.rs"), + ("reaction.rs", "post/reaction.rs"), + ("relay_document.rs", "social/relay_document.rs"), + ("resource_area.rs", "farm/resource_area.rs"), + ("resource_cap.rs", "farm/resource_cap.rs"), + ("seal.rs", "social/seal.rs"), + ("trade_validation.rs", "trade/validation.rs"), + ] { + let physical = format!("crates/event/src/{physical}"); + let routed = format!("crates/event/src/{routed}"); + assert_eq!(canonical_dto_source_path(&physical), routed); + } + + assert_eq!( + canonical_dto_source_path("crates/event/src/farm.rs"), + "crates/event/src/farm.rs" + ); + assert_eq!( + canonical_dto_source_path("crates/core/src/money.rs"), + "crates/core/src/money.rs" + ); + } + + #[test] fn persist_failure_rolls_back_every_committed_output() { let workspace = fixture_workspace(); let root = workspace.path();