sdk

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

commit 6fc0865cd72e40f9b1f7f0e838ac512f8d459a2c
parent 125c6e9f3a3b864da9b76d83fc6b130dc95d8dfb
Author: triesap <tyson@radroots.org>
Date:   Thu, 18 Jun 2026 12:51:27 -0700

sdk: add local runtime feature

- add local-runtime as the neutral SDK runtime bundle
- make cli-runtime compose from the local runtime contract
- export public config and client runtime surface from the crate root
- document local-runtime as the shared local app and CLI feature

Diffstat:
Mcrates/sdk/Cargo.toml | 3++-
Mcrates/sdk/README | 7++++---
Mcrates/sdk/src/lib.rs | 23+++++++++++++++++++++++
3 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/crates/sdk/Cargo.toml b/crates/sdk/Cargo.toml @@ -68,7 +68,7 @@ relay-runtime = [ "radroots_nostr/client", "radroots_relay_transport/client", ] -cli-runtime = [ +local-runtime = [ "std", "serde", "serde_json", @@ -78,6 +78,7 @@ cli-runtime = [ "signing", "relay-client", ] +cli-runtime = ["local-runtime"] [dependencies] radroots_authority = { workspace = true, optional = true, default-features = false } diff --git a/crates/sdk/README b/crates/sdk/README @@ -31,13 +31,14 @@ targets already stored on each queued outbox event, so already queued work does not require configured builder relays. `push_outbox_with_adapter(...)` remains available for tests and controlled adapter-level substrate checks. -The `cli-runtime` feature is the curated feature bundle for command-line product +The `local-runtime` feature is the curated feature bundle for local product runtime consumers. It enables `std`, `serde`, `serde_json`, `runtime`, `local-signer`, `relay-runtime`, `signing`, and `relay-client`. `relay-client` is retained in this bundle only for current direct relay publish callers that have not migrated to the product runtime yet; it is classified for removal once -those callers are SDK-runtime backed. `cli-runtime` does not enable -`radrootsd-client`. +those callers are SDK-runtime backed. `local-runtime` does not enable +`radrootsd-client`. `cli-runtime` is an alias for `local-runtime` so CLI +consumers stay on the same runtime contract as local app consumers. Relay URL policy is explicit. Public relay URLs must use `wss://`. Local development `ws://` relay URLs are accepted only under `SdkRelayUrlPolicy::Localhost` diff --git a/crates/sdk/src/lib.rs b/crates/sdk/src/lib.rs @@ -37,6 +37,29 @@ mod runtime; #[cfg(feature = "runtime")] mod sync_runtime; +pub use crate::client::{ + FarmClient, ListingClient, ProfileClient, RadrootsSdkClient, SdkPublishError, + SdkPublishReceipt, SdkRadrootsdPublishReceipt, SdkRelayFailure, SdkRelayPublishReceipt, + SdkResolvedTransportTarget, SdkTransportReceipt, TradeClient, +}; +#[cfg(feature = "radrootsd-client")] +pub use crate::client::{ + RadrootsdBridgeClient, RadrootsdClient, RadrootsdSignerSessionClient, SdkRadrootsdBridgeError, + SdkRadrootsdBridgeJobRef, SdkRadrootsdBridgeJobView, SdkRadrootsdBridgeStatus, + SdkRadrootsdFarmPublishOptions, SdkRadrootsdListingPublishOptions, + SdkRadrootsdOrderRequestPublishOptions, SdkRadrootsdProfilePublishOptions, + SdkRadrootsdSessionError, SdkRadrootsdSignerSessionAuthorizeResult, + SdkRadrootsdSignerSessionCloseResult, SdkRadrootsdSignerSessionHandle, + SdkRadrootsdSignerSessionPublicKeyResult, SdkRadrootsdSignerSessionRef, + SdkRadrootsdSignerSessionRequireAuthResult, SdkRadrootsdSignerSessionView, +}; +pub use crate::config::{ + NetworkConfig, RADROOTS_SDK_DEFAULT_TIMEOUT_MS, RADROOTS_SDK_LOCAL_RADROOTSD_ENDPOINT, + RADROOTS_SDK_LOCAL_RELAY_URL, RADROOTS_SDK_PRODUCTION_RADROOTSD_ENDPOINT, + RADROOTS_SDK_PRODUCTION_RELAY_URL, RADROOTS_SDK_STAGING_RADROOTSD_ENDPOINT, + RADROOTS_SDK_STAGING_RELAY_URL, RadrootsSdkConfig, RadrootsdAuth, RadrootsdConfig, RelayConfig, + SdkConfigError, SdkEnvironment, SdkTransportMode, SignerConfig, +}; #[cfg(feature = "runtime")] pub use crate::error::{ RadrootsSdkError, RadrootsSdkErrorClass, RadrootsSdkPartialLocalMutationError,