sdk

Radroots SDK and bindings
git clone https://radroots.dev/git/sdk.git
Log | Files | Refs | README

commit ea2cba9e56423390f4d3cf7bfa3a1195963f322f
parent a54ec0b1c92fbd24d142c8d32b79b0de7ba36813
Author: triesap <tyson@radroots.org>
Date:   Sat, 18 Jul 2026 10:05:42 +0000

sdk: align foundational event contract

- remove obsolete Profile and calendar authoring operations from package contracts
- remove unsafe legacy calendar JSON wrappers from the WASM codec surface
- regenerate TypeScript bindings without the retired raw Profile DTO
- pin local library dependencies to the `1.0.0-alpha.1` contract cohort

Diffstat:
MCargo.lock | 82+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
MCargo.toml | 50+++++++++++++++++++++++++-------------------------
Mcontracts/packages/go.toml | 6------
Mcontracts/packages/kotlin.toml | 6------
Mcontracts/packages/py.toml | 6------
Mcontracts/packages/swift.toml | 6------
Mcontracts/packages/ts.toml | 6------
Mcrates/event_codec_wasm/src/lib.rs | 132+++----------------------------------------------------------------------------
Mcrates/runtime_contract_v1/Cargo.toml | 2+-
Mcrates/sdk/Cargo.toml | 1-
Mpackages/event-bindings/src/generated/types.ts | 2--
Mtools/xtask/src/contracts.rs | 2+-
Mtools/xtask/src/dto_roots.rs | 1-
Mtools/xtask/src/wasm_declarations.rs | 13+++++++++----
14 files changed, 93 insertions(+), 222 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -1203,6 +1203,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] +name = "jiff-tzdb" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "142bd39932ad231f10513df9ab62661fead8719872150b7ad02a2df79f4e141e" + +[[package]] name = "js-sys" version = "0.3.100" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1306,6 +1312,12 @@ dependencies = [ ] [[package]] +name = "mediatype" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120fa187be19d9962f0926633453784691731018a2bf936ddb4e29101b79c4a7" + +[[package]] name = "memchr" version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1744,15 +1756,25 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "radroots_authority" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "radroots_event", "radroots_nostr", ] [[package]] +name = "radroots_blossom" +version = "1.0.0-alpha.1" +dependencies = [ + "mediatype", + "serde", + "sha2", + "url", +] + +[[package]] name = "radroots_core" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "dto_bindgen", "rust_decimal", @@ -1769,15 +1791,18 @@ dependencies = [ [[package]] name = "radroots_event" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "dto_bindgen", "hex", + "jiff-tzdb", + "radroots_blossom", "radroots_core", "secp256k1", "serde", "serde_json", "sha2", + "url", ] [[package]] @@ -1790,7 +1815,7 @@ dependencies = [ [[package]] name = "radroots_event_codec" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "hex", "nostr", @@ -1816,7 +1841,7 @@ dependencies = [ [[package]] name = "radroots_event_index" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "dto_bindgen", "dto_bindgen_core", @@ -1832,7 +1857,7 @@ dependencies = [ [[package]] name = "radroots_event_store" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "hex", "radroots_event", @@ -1847,7 +1872,7 @@ dependencies = [ [[package]] name = "radroots_geocoder" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "futures-executor", "hex", @@ -1863,12 +1888,10 @@ dependencies = [ [[package]] name = "radroots_identity" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "nostr", - "radroots_event", "radroots_protected_store", - "radroots_runtime", "radroots_runtime_paths", "radroots_secret_vault", "serde", @@ -1887,9 +1910,10 @@ dependencies = [ [[package]] name = "radroots_log" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "chrono", + "serde_json", "thiserror 1.0.69", "tracing", "tracing-appender", @@ -1898,7 +1922,7 @@ dependencies = [ [[package]] name = "radroots_nostr" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "nostr", "nostr-sdk", @@ -1912,7 +1936,7 @@ dependencies = [ [[package]] name = "radroots_nostr_connect" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "nostr", "serde", @@ -1923,7 +1947,7 @@ dependencies = [ [[package]] name = "radroots_nostr_signer" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "hex", "nostr", @@ -1941,7 +1965,7 @@ dependencies = [ [[package]] name = "radroots_outbox" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "hex", "radroots_event", @@ -1956,7 +1980,7 @@ dependencies = [ [[package]] name = "radroots_protected_store" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "chacha20poly1305", "getrandom 0.2.17", @@ -1968,14 +1992,14 @@ dependencies = [ [[package]] name = "radroots_protocol_contract_v1" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "serde", ] [[package]] name = "radroots_replica_schema" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "dto_bindgen_core", "serde", @@ -1992,7 +2016,7 @@ dependencies = [ [[package]] name = "radroots_replica_store" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "hex", "radroots_replica_schema", @@ -2021,7 +2045,7 @@ dependencies = [ [[package]] name = "radroots_replica_sync" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "base64 0.22.1", "hex", @@ -2054,7 +2078,7 @@ dependencies = [ [[package]] name = "radroots_runtime" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "anyhow", "chacha20poly1305", @@ -2084,7 +2108,7 @@ dependencies = [ [[package]] name = "radroots_runtime_paths" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "serde", "thiserror 1.0.69", @@ -2168,11 +2192,11 @@ dependencies = [ [[package]] name = "radroots_secret_vault" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" [[package]] name = "radroots_sql_core" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "chrono", "futures-executor", @@ -2184,7 +2208,7 @@ dependencies = [ [[package]] name = "radroots_trade" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "base64 0.22.1", "dto_bindgen", @@ -2213,7 +2237,7 @@ dependencies = [ [[package]] name = "radroots_transport" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "serde", "sha2", @@ -2221,7 +2245,7 @@ dependencies = [ [[package]] name = "radroots_transport_nostr" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "futures", "nostr", @@ -2239,7 +2263,7 @@ dependencies = [ [[package]] name = "radroots_transport_publish_protocol" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "radroots_transport", "serde", @@ -2247,7 +2271,7 @@ dependencies = [ [[package]] name = "radroots_transport_reticulum" -version = "0.1.0-alpha.2" +version = "1.0.0-alpha.1" dependencies = [ "radroots_transport", ] diff --git a/Cargo.toml b/Cargo.toml @@ -29,35 +29,35 @@ readme = "README" dto_bindgen = { version = "0.1.0" } dto_bindgen_backend_ts = { version = "0.1.0" } dto_bindgen_core = { version = "0.1.0" } -radroots_core = { path = "../lib/crates/core", version = "0.1.0-alpha.2", default-features = false } -radroots_authority = { path = "../lib/crates/authority", version = "0.1.0-alpha.2", default-features = false } -radroots_event_store = { path = "../lib/crates/event_store", version = "0.1.0-alpha.2", default-features = false } -radroots_event = { path = "../lib/crates/event", version = "0.1.0-alpha.2", default-features = false } -radroots_event_codec = { path = "../lib/crates/event_codec", version = "0.1.0-alpha.2", default-features = false } -radroots_event_index = { path = "../lib/crates/event_index", version = "0.1.0-alpha.2", default-features = false } -radroots_geocoder = { path = "../lib/crates/geocoder", version = "0.1.0-alpha.2" } -radroots_identity = { path = "../lib/crates/identity", version = "0.1.0-alpha.2", default-features = false, features = [ +radroots_core = { path = "../lib/crates/core", version = "=1.0.0-alpha.1", default-features = false } +radroots_authority = { path = "../lib/crates/authority", version = "=1.0.0-alpha.1", default-features = false } +radroots_event_store = { path = "../lib/crates/event_store", version = "=1.0.0-alpha.1", default-features = false } +radroots_event = { path = "../lib/crates/event", version = "=1.0.0-alpha.1", default-features = false } +radroots_event_codec = { path = "../lib/crates/event_codec", version = "=1.0.0-alpha.1", default-features = false } +radroots_event_index = { path = "../lib/crates/event_index", version = "=1.0.0-alpha.1", default-features = false } +radroots_geocoder = { path = "../lib/crates/geocoder", version = "=1.0.0-alpha.1" } +radroots_identity = { path = "../lib/crates/identity", version = "=1.0.0-alpha.1", default-features = false, features = [ "std", ] } -radroots_nostr = { path = "../lib/crates/nostr", version = "0.1.0-alpha.2", default-features = false } -radroots_nostr_connect = { path = "../lib/crates/nostr_connect", version = "0.1.0-alpha.2", default-features = false } -radroots_nostr_signer = { path = "../lib/crates/nostr_signer", version = "0.1.0-alpha.2", default-features = false } -radroots_outbox = { path = "../lib/crates/outbox", version = "0.1.0-alpha.2", default-features = false } -radroots_protocol_contract_v1 = { path = "../lib/crates/protocol_contract_v1", version = "0.1.0-alpha.2", default-features = false } -radroots_protected_store = { path = "../lib/crates/protected_store", version = "0.1.0-alpha.2", default-features = false } +radroots_nostr = { path = "../lib/crates/nostr", version = "=1.0.0-alpha.1", default-features = false } +radroots_nostr_connect = { path = "../lib/crates/nostr_connect", version = "=1.0.0-alpha.1", default-features = false } +radroots_nostr_signer = { path = "../lib/crates/nostr_signer", version = "=1.0.0-alpha.1", default-features = false } +radroots_outbox = { path = "../lib/crates/outbox", version = "=1.0.0-alpha.1", default-features = false } +radroots_protocol_contract_v1 = { path = "../lib/crates/protocol_contract_v1", version = "=1.0.0-alpha.1", default-features = false } +radroots_protected_store = { path = "../lib/crates/protected_store", version = "=1.0.0-alpha.1", default-features = false } radroots_runtime_contract_v1 = { path = "crates/runtime_contract_v1", version = "0.1.0", default-features = false } -radroots_secret_vault = { path = "../lib/crates/secret_vault", version = "0.1.0-alpha.2", default-features = false } -radroots_transport = { path = "../lib/crates/transport", version = "0.1.0-alpha.2", default-features = false } -radroots_transport_publish_protocol = { path = "../lib/crates/transport_publish_protocol", version = "0.1.0-alpha.2", default-features = false } -radroots_transport_nostr = { path = "../lib/crates/transport_nostr", version = "0.1.0-alpha.2", default-features = false } -radroots_transport_reticulum = { path = "../lib/crates/transport_reticulum", version = "0.1.0-alpha.2", default-features = false } -radroots_replica_store = { path = "../lib/crates/replica_store", version = "0.1.0-alpha.2", default-features = false } -radroots_replica_schema = { path = "../lib/crates/replica_schema", version = "0.1.0-alpha.2", default-features = false } -radroots_replica_sync = { path = "../lib/crates/replica_sync", version = "0.1.0-alpha.2", default-features = false } -radroots_runtime_paths = { path = "../lib/crates/runtime_paths", version = "0.1.0-alpha.2", default-features = false } +radroots_secret_vault = { path = "../lib/crates/secret_vault", version = "=1.0.0-alpha.1", default-features = false } +radroots_transport = { path = "../lib/crates/transport", version = "=1.0.0-alpha.1", default-features = false } +radroots_transport_publish_protocol = { path = "../lib/crates/transport_publish_protocol", version = "=1.0.0-alpha.1", default-features = false } +radroots_transport_nostr = { path = "../lib/crates/transport_nostr", version = "=1.0.0-alpha.1", default-features = false } +radroots_transport_reticulum = { path = "../lib/crates/transport_reticulum", version = "=1.0.0-alpha.1", default-features = false } +radroots_replica_store = { path = "../lib/crates/replica_store", version = "=1.0.0-alpha.1", default-features = false } +radroots_replica_schema = { path = "../lib/crates/replica_schema", version = "=1.0.0-alpha.1", default-features = false } +radroots_replica_sync = { path = "../lib/crates/replica_sync", version = "=1.0.0-alpha.1", default-features = false } +radroots_runtime_paths = { path = "../lib/crates/runtime_paths", version = "=1.0.0-alpha.1", default-features = false } radroots_sdk_sql_wasm_runtime = { path = "crates/sql_wasm_runtime", version = "0.1.0-alpha.2" } -radroots_sql_core = { path = "../lib/crates/sql_core", version = "0.1.0-alpha.2", default-features = false } -radroots_trade = { path = "../lib/crates/trade", version = "0.1.0-alpha.2", default-features = false, features = [ +radroots_sql_core = { path = "../lib/crates/sql_core", version = "=1.0.0-alpha.1", default-features = false } +radroots_trade = { path = "../lib/crates/trade", version = "=1.0.0-alpha.1", default-features = false, features = [ "serde_json", "std", ] } diff --git a/contracts/packages/go.toml b/contracts/packages/go.toml @@ -13,7 +13,6 @@ stage = "deferred" order = 3 [operations] -"profile.build_draft" = "profile.BuildDraft" "farm.build_draft" = "farm.BuildDraft" "listing.build_tags" = "listing.BuildTags" "listing.build_draft" = "listing.BuildDraft" @@ -23,8 +22,6 @@ order = 3 "social.reaction.build_tags" = "social.ReactionBuildTags" "social.article.build_tags" = "social.ArticleBuildTags" "social.file_metadata.build_tags" = "social.FileMetadataBuildTags" -"social.calendar_date_event.build_tags" = "social.CalendarDateEventBuildTags" -"social.calendar_time_event.build_tags" = "social.CalendarTimeEventBuildTags" "trade_validation.validate_listing_event" = "tradevalidation.ValidateListingEvent" [shared_types] @@ -37,7 +34,6 @@ order = 3 "RadrootsEventRef" = "RadrootsEventRef" "RadrootsEventPtr" = "RadrootsEventPtr" "RadrootsListingAddress" = "ListingAddress" -"RadrootsProfile" = "RadrootsProfile" "RadrootsFarm" = "RadrootsFarm" "RadrootsListing" = "RadrootsListing" "RadrootsPost" = "RadrootsPost" @@ -45,5 +41,3 @@ order = 3 "RadrootsReaction" = "RadrootsReaction" "RadrootsArticle" = "RadrootsArticle" "RadrootsFileMetadata" = "RadrootsFileMetadata" -"RadrootsCalendarDateEvent" = "RadrootsCalendarDateEvent" -"RadrootsCalendarTimeEvent" = "RadrootsCalendarTimeEvent" diff --git a/contracts/packages/kotlin.toml b/contracts/packages/kotlin.toml @@ -13,7 +13,6 @@ stage = "next" order = 2 [operations] -"profile.build_draft" = "profile.buildDraft" "farm.build_draft" = "farm.buildDraft" "listing.build_tags" = "listing.buildTags" "listing.build_draft" = "listing.buildDraft" @@ -23,8 +22,6 @@ order = 2 "social.reaction.build_tags" = "social.reaction.buildTags" "social.article.build_tags" = "social.article.buildTags" "social.file_metadata.build_tags" = "social.fileMetadata.buildTags" -"social.calendar_date_event.build_tags" = "social.calendarDateEvent.buildTags" -"social.calendar_time_event.build_tags" = "social.calendarTimeEvent.buildTags" "trade_validation.validate_listing_event" = "tradeValidation.validateListingEvent" [shared_types] @@ -37,7 +34,6 @@ order = 2 "RadrootsEventRef" = "RadrootsEventRef" "RadrootsEventPtr" = "RadrootsEventPtr" "RadrootsListingAddress" = "ListingAddress" -"RadrootsProfile" = "RadrootsProfile" "RadrootsFarm" = "RadrootsFarm" "RadrootsListing" = "RadrootsListing" "RadrootsPost" = "RadrootsPost" @@ -45,5 +41,3 @@ order = 2 "RadrootsReaction" = "RadrootsReaction" "RadrootsArticle" = "RadrootsArticle" "RadrootsFileMetadata" = "RadrootsFileMetadata" -"RadrootsCalendarDateEvent" = "RadrootsCalendarDateEvent" -"RadrootsCalendarTimeEvent" = "RadrootsCalendarTimeEvent" diff --git a/contracts/packages/py.toml b/contracts/packages/py.toml @@ -13,7 +13,6 @@ stage = "deferred" order = 3 [operations] -"profile.build_draft" = "profile_build_draft" "farm.build_draft" = "farm_build_draft" "listing.build_tags" = "listing_build_tags" "listing.build_draft" = "listing_build_draft" @@ -23,8 +22,6 @@ order = 3 "social.reaction.build_tags" = "social_reaction_build_tags" "social.article.build_tags" = "social_article_build_tags" "social.file_metadata.build_tags" = "social_file_metadata_build_tags" -"social.calendar_date_event.build_tags" = "social_calendar_date_event_build_tags" -"social.calendar_time_event.build_tags" = "social_calendar_time_event_build_tags" "trade_validation.validate_listing_event" = "trade_validation_validate_listing_event" [shared_types] @@ -37,7 +34,6 @@ order = 3 "RadrootsEventRef" = "RadrootsEventRef" "RadrootsEventPtr" = "RadrootsEventPtr" "RadrootsListingAddress" = "ListingAddress" -"RadrootsProfile" = "RadrootsProfile" "RadrootsFarm" = "RadrootsFarm" "RadrootsListing" = "RadrootsListing" "RadrootsPost" = "RadrootsPost" @@ -45,5 +41,3 @@ order = 3 "RadrootsReaction" = "RadrootsReaction" "RadrootsArticle" = "RadrootsArticle" "RadrootsFileMetadata" = "RadrootsFileMetadata" -"RadrootsCalendarDateEvent" = "RadrootsCalendarDateEvent" -"RadrootsCalendarTimeEvent" = "RadrootsCalendarTimeEvent" diff --git a/contracts/packages/swift.toml b/contracts/packages/swift.toml @@ -13,7 +13,6 @@ stage = "next" order = 2 [operations] -"profile.build_draft" = "profile.buildDraft" "farm.build_draft" = "farm.buildDraft" "listing.build_tags" = "listing.buildTags" "listing.build_draft" = "listing.buildDraft" @@ -23,8 +22,6 @@ order = 2 "social.reaction.build_tags" = "social.reaction.buildTags" "social.article.build_tags" = "social.article.buildTags" "social.file_metadata.build_tags" = "social.fileMetadata.buildTags" -"social.calendar_date_event.build_tags" = "social.calendarDateEvent.buildTags" -"social.calendar_time_event.build_tags" = "social.calendarTimeEvent.buildTags" "trade_validation.validate_listing_event" = "tradeValidation.validateListingEvent" [shared_types] @@ -37,7 +34,6 @@ order = 2 "RadrootsEventRef" = "RadrootsEventRef" "RadrootsEventPtr" = "RadrootsEventPtr" "RadrootsListingAddress" = "ListingAddress" -"RadrootsProfile" = "RadrootsProfile" "RadrootsFarm" = "RadrootsFarm" "RadrootsListing" = "RadrootsListing" "RadrootsPost" = "RadrootsPost" @@ -45,5 +41,3 @@ order = 2 "RadrootsReaction" = "RadrootsReaction" "RadrootsArticle" = "RadrootsArticle" "RadrootsFileMetadata" = "RadrootsFileMetadata" -"RadrootsCalendarDateEvent" = "RadrootsCalendarDateEvent" -"RadrootsCalendarTimeEvent" = "RadrootsCalendarTimeEvent" diff --git a/contracts/packages/ts.toml b/contracts/packages/ts.toml @@ -83,7 +83,6 @@ stage = "active" order = 1 [operations] -"profile.build_draft" = "profile.buildDraft" "farm.build_draft" = "farm.buildDraft" "listing.build_tags" = "listing.buildTags" "listing.build_draft" = "listing.buildDraft" @@ -93,8 +92,6 @@ order = 1 "social.reaction.build_tags" = "social.reaction.buildTags" "social.article.build_tags" = "social.article.buildTags" "social.file_metadata.build_tags" = "social.fileMetadata.buildTags" -"social.calendar_date_event.build_tags" = "social.calendarDateEvent.buildTags" -"social.calendar_time_event.build_tags" = "social.calendarTimeEvent.buildTags" "trade_validation.validate_listing_event" = "tradeValidation.validateListingEvent" [shared_types] @@ -107,7 +104,6 @@ order = 1 "RadrootsEventRef" = "RadrootsEventRef" "RadrootsEventPtr" = "RadrootsEventPtr" "RadrootsListingAddress" = "ListingAddress" -"RadrootsProfile" = "RadrootsProfile" "RadrootsFarm" = "RadrootsFarm" "RadrootsListing" = "RadrootsListing" "RadrootsPost" = "RadrootsPost" @@ -115,8 +111,6 @@ order = 1 "RadrootsReaction" = "RadrootsReaction" "RadrootsArticle" = "RadrootsArticle" "RadrootsFileMetadata" = "RadrootsFileMetadata" -"RadrootsCalendarDateEvent" = "RadrootsCalendarDateEvent" -"RadrootsCalendarTimeEvent" = "RadrootsCalendarTimeEvent" [artifacts] models_dir = "src/generated" diff --git a/crates/event_codec_wasm/src/lib.rs b/crates/event_codec_wasm/src/lib.rs @@ -1,10 +1,6 @@ #![forbid(unsafe_code)] use radroots_event::article::RadrootsArticle; -use radroots_event::calendar::{ - RadrootsCalendar, RadrootsCalendarDateEvent, RadrootsCalendarEventRsvp, - RadrootsCalendarTimeEvent, -}; use radroots_event::comment::RadrootsComment; use radroots_event::coop::RadrootsCoop; use radroots_event::document::RadrootsDocument; @@ -43,10 +39,6 @@ use radroots_event::report::RadrootsReport; use radroots_event::repost::{RadrootsGenericRepost, RadrootsRepost}; use radroots_event::seal::RadrootsSeal; use radroots_event_codec::article::encode::article_build_tags; -use radroots_event_codec::calendar::encode::{ - calendar_collection_build_tags, calendar_date_event_build_tags, calendar_time_event_build_tags, - rsvp_build_tags, -}; use radroots_event_codec::comment::encode::comment_build_tags; use radroots_event_codec::coop::encode::coop_build_tags; use radroots_event_codec::document::encode::document_build_tags; @@ -337,35 +329,6 @@ pub fn file_metadata_tags(metadata_json: &str) -> Result<String, RadrootsJsValue build_tags_json::<RadrootsFileMetadata, _, _>(metadata_json, file_metadata_build_tags) } -#[cfg_attr( - target_arch = "wasm32", - wasm_bindgen(js_name = calendar_date_event_tags) -)] -pub fn calendar_date_event_tags(event_json: &str) -> Result<String, RadrootsJsValue> { - build_tags_json::<RadrootsCalendarDateEvent, _, _>(event_json, calendar_date_event_build_tags) -} - -#[cfg_attr( - target_arch = "wasm32", - wasm_bindgen(js_name = calendar_time_event_tags) -)] -pub fn calendar_time_event_tags(event_json: &str) -> Result<String, RadrootsJsValue> { - build_tags_json::<RadrootsCalendarTimeEvent, _, _>(event_json, calendar_time_event_build_tags) -} - -#[cfg_attr(target_arch = "wasm32", wasm_bindgen(js_name = calendar_tags))] -pub fn calendar_tags(calendar_json: &str) -> Result<String, RadrootsJsValue> { - build_tags_json::<RadrootsCalendar, _, _>(calendar_json, calendar_collection_build_tags) -} - -#[cfg_attr( - target_arch = "wasm32", - wasm_bindgen(js_name = calendar_event_rsvp_tags) -)] -pub fn calendar_event_rsvp_tags(rsvp_json: &str) -> Result<String, RadrootsJsValue> { - build_tags_json::<RadrootsCalendarEventRsvp, _, _>(rsvp_json, rsvp_build_tags) -} - #[cfg_attr(target_arch = "wasm32", wasm_bindgen(js_name = repost_tags))] pub fn repost_tags(repost_json: &str) -> Result<String, RadrootsJsValue> { build_tags_json::<RadrootsRepost, _, _>(repost_json, repost_build_tags) @@ -602,10 +565,9 @@ mod tests { use radroots_event::listing::{RadrootsListingBin, RadrootsListingProduct}; use radroots_event::relay_auth::RadrootsRelayAuth; use radroots_event::social::{ - RadrootsCalendarDateValue, RadrootsCalendarEventFreeBusy, RadrootsCalendarEventRsvpStatus, - RadrootsCalendarParticipant, RadrootsReportFileTarget, RadrootsReportType, - RadrootsSocialFarmAnchor, RadrootsSocialLocation, RadrootsSocialMediaDimensions, - RadrootsSocialMediaMetadata, RadrootsSocialTarget, + RadrootsReportFileTarget, RadrootsReportType, RadrootsSocialFarmAnchor, + RadrootsSocialLocation, RadrootsSocialMediaDimensions, RadrootsSocialMediaMetadata, + RadrootsSocialTarget, }; use radroots_event::{RadrootsEventEnvelope, RadrootsEventEnvelopeParts}; @@ -987,69 +949,6 @@ mod tests { } } - fn sample_calendar_date_event() -> RadrootsCalendarDateEvent { - RadrootsCalendarDateEvent { - d_tag: "AAAAAAAAAAAAAAAAAAAAAw".to_string(), - title: "market day".to_string(), - start: "2026-06-20".to_string(), - description: Some("Farm stand pickup window.".to_string()), - end: Some("2026-06-21".to_string()), - days: Some(vec![RadrootsCalendarDateValue { - value: "2026-06-20".to_string(), - }]), - location: Some(social_location()), - summary: Some("weekly pickup".to_string()), - image: None, - participants: Some(vec![RadrootsCalendarParticipant { - pubkey: synthetic_pubkey('e'), - relay: Some("wss://relay.example.test".to_string()), - role: Some("host".to_string()), - }]), - } - } - - fn sample_calendar_time_event() -> RadrootsCalendarTimeEvent { - RadrootsCalendarTimeEvent { - d_tag: "AAAAAAAAAAAAAAAAAAAA-A".to_string(), - title: "wash pack shift".to_string(), - start: 1_781_895_600, - dates: vec![RadrootsCalendarDateValue { - value: "2026-06-20".to_string(), - }], - description: Some("Prepare CSA bins before pickup.".to_string()), - end: Some(1_781_899_200), - start_tzid: Some("America/Vancouver".to_string()), - end_tzid: Some("America/Vancouver".to_string()), - location: Some(social_location()), - summary: Some("field crew".to_string()), - image: None, - participants: None, - } - } - - fn sample_calendar() -> RadrootsCalendar { - RadrootsCalendar { - d_tag: "AAAAAAAAAAAAAAAAAAAA_A".to_string(), - title: "farm calendar".to_string(), - events: vec![address_target(31923, "AAAAAAAAAAAAAAAAAAAA-A")], - description: Some("Shared schedule for farm operations.".to_string()), - summary: Some("field schedule".to_string()), - image: None, - } - } - - fn sample_calendar_rsvp() -> RadrootsCalendarEventRsvp { - RadrootsCalendarEventRsvp { - d_tag: "AAAAAAAAAAAAAAAAAAAAAQ".to_string(), - event: address_target(31923, "AAAAAAAAAAAAAAAAAAAA-A"), - event_id: Some(synthetic_event_id('f')), - status: RadrootsCalendarEventRsvpStatus::Tentative, - free_busy: Some(RadrootsCalendarEventFreeBusy::Busy), - note: Some("depends on harvest".to_string()), - participants: None, - } - } - fn sample_comment() -> RadrootsComment { RadrootsComment { root: event_target(30023, 'a'), @@ -1253,17 +1152,13 @@ mod tests { #[test] fn bindings_reject_invalid_json() { - let bindings: [BindingEncoder; 46] = [ + let bindings: [BindingEncoder; 42] = [ listing_tags, listing_tags_full, post_tags, comment_tags, article_tags, file_metadata_tags, - calendar_date_event_tags, - calendar_time_event_tags, - calendar_tags, - calendar_event_rsvp_tags, repost_tags, generic_repost_tags, report_tags, @@ -1337,19 +1232,6 @@ mod tests { assert_tags_json(file_metadata_tags( &serde_json::to_string(&sample_public_file_metadata()).expect("file json"), )); - assert_tags_json(calendar_date_event_tags( - &serde_json::to_string(&sample_calendar_date_event()).expect("date json"), - )); - let time_tags = tags_json(calendar_time_event_tags( - &serde_json::to_string(&sample_calendar_time_event()).expect("time json"), - )); - assert!(has_tag(&time_tags, "D", "2026-06-20")); - assert_tags_json(calendar_tags( - &serde_json::to_string(&sample_calendar()).expect("calendar json"), - )); - assert_tags_json(calendar_event_rsvp_tags( - &serde_json::to_string(&sample_calendar_rsvp()).expect("rsvp json"), - )); assert_tags_json(reaction_tags( &serde_json::to_string(&sample_reaction()).expect("reaction json"), )); @@ -1382,12 +1264,6 @@ mod tests { }; assert!(reaction_tags(&serde_json::to_string(&reaction).expect("reaction json")).is_err()); - let mut rsvp = sample_calendar_rsvp(); - rsvp.event = event_target(31923, 'f'); - assert!( - calendar_event_rsvp_tags(&serde_json::to_string(&rsvp).expect("rsvp json")).is_err() - ); - let mut report = sample_report(); report.reported_pubkey.clear(); assert!(report_tags(&serde_json::to_string(&report).expect("report json")).is_err()); diff --git a/crates/runtime_contract_v1/Cargo.toml b/crates/runtime_contract_v1/Cargo.toml @@ -15,7 +15,7 @@ serde = ["dep:serde", "radroots_protocol_contract_v1/serde"] std = ["radroots_protocol_contract_v1/std"] [dependencies] -radroots_protocol_contract_v1 = { path = "../../../lib/crates/protocol_contract_v1", version = "0.1.0-alpha.2", default-features = false } +radroots_protocol_contract_v1 = { path = "../../../lib/crates/protocol_contract_v1", version = "=1.0.0-alpha.1", default-features = false } serde = { workspace = true, default-features = false, features = [ "alloc", "derive", diff --git a/crates/sdk/Cargo.toml b/crates/sdk/Cargo.toml @@ -42,7 +42,6 @@ knowledge = [ ] identity-models = [ "dep:radroots_identity", - "radroots_identity/profile", "radroots_identity/std", ] identity-storage = ["identity-models", "std", "radroots_identity/std"] diff --git a/packages/event-bindings/src/generated/types.ts b/packages/event-bindings/src/generated/types.ts @@ -148,8 +148,6 @@ export type RadrootsPlotRef = { pubkey: string, d_tag: string, }; export type RadrootsPost = { content: string, farm?: RadrootsSocialFarmAnchor | null, address_refs?: Array<RadrootsSocialTarget> | null, location?: RadrootsSocialLocation | null, topics?: Array<string> | null, quote_refs?: Array<RadrootsSocialTarget> | null, media?: Array<RadrootsSocialMediaMetadata> | null, }; -export type RadrootsProfile = { name: string, display_name?: string | null, nip05?: string | null, about?: string | null, website?: string | null, picture?: string | null, banner?: string | null, lud06?: string | null, lud16?: string | null, bot?: string | null, }; - export type RadrootsProfileType = "individual" | "farm" | "coop" | "any" | "radrootsd"; export type RadrootsReaction = { target: RadrootsSocialTarget, content: string, }; diff --git a/tools/xtask/src/contracts.rs b/tools/xtask/src/contracts.rs @@ -683,7 +683,7 @@ stage = "active" order = 1 [operations] -"profile.build_draft" = "profile.buildDraft" +"farm.build_draft" = "farm.buildDraft" [shared_types] "RadrootsNip01EventWireParts" = "RadrootsNip01EventWireParts" diff --git a/tools/xtask/src/dto_roots.rs b/tools/xtask/src/dto_roots.rs @@ -650,7 +650,6 @@ mod tests { "RadrootsPlotLocation", "RadrootsPlotRef", "RadrootsPost", - "RadrootsProfile", "RadrootsProfileType", "RadrootsReaction", "RadrootsRelayDocument", diff --git a/tools/xtask/src/wasm_declarations.rs b/tools/xtask/src/wasm_declarations.rs @@ -355,10 +355,6 @@ fn promise_of(type_expr: TypeScriptType) -> TypeScriptType { const EVENT_CODEC_FUNCTIONS: &[WasmPublicFunction] = &[ public_function!("article_tags", Some("article_json"), String, 2, 4), - public_function!("calendar_date_event_tags", Some("event_json"), String, 2, 4), - public_function!("calendar_event_rsvp_tags", Some("rsvp_json"), String, 2, 4), - public_function!("calendar_tags", Some("calendar_json"), String, 2, 4), - public_function!("calendar_time_event_tags", Some("event_json"), String, 2, 4), public_function!("comment_tags", Some("comment_json"), String, 2, 4), public_function!("coop_tags", Some("coop_json"), String, 2, 4), public_function!("document_tags", Some("document_json"), String, 2, 4), @@ -1023,6 +1019,15 @@ mod tests { .contents .contains("export declare const listing_tags") ); + for retired in [ + "calendar_date_event_tags", + "calendar_event_rsvp_tags", + "calendar_tags", + "calendar_time_event_tags", + ] { + assert!(!events[0].contents.contains(retired)); + assert!(!events[1].contents.contains(retired)); + } let replica_store = declaration_files(specs[1]).expect("replica store declarations"); assert!(