mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
Migrate the ngit-grasp library and all non-test source code from
rust-nostr 0.44.x (git rev) to crates.io 0.45.0-alpha.1.
Key API changes adopted:
- nostr-sdk root no longer re-exports core types; switch to
nostr_sdk::prelude::* / nostr::*.
- TagKind removed: Tag::custom now takes impl Into<String>; tag.kind()
returns &str. All TagKind::{custom,Custom,d,Clone,Relays} usages
converted to string literals.
- EventBuilder: sign_with_keys -> finalize, build(pk) ->
finalize_unsigned(pk).
- MemoryDatabase moved to nostr-memory crate (bounded/unbounded builder).
- Client API: new() is no-arg (NIP-42 auth now via
ClientBuilder::authenticator(SignerAuthenticator::new(keys)));
subscribe(filter) / sync(filter) builders; Output.val -> Output.value.
- RelayPoolNotification -> RelayNotification / ClientNotification;
Shutdown relay variant removed; Message carries Box<RelayMessage>;
notifications() is now a Stream (use .next()); relay() returns
Result<Option<Relay>>.
- sync() now returns SyncSummary (remote is HashMap<EventId, ..>).
Also adopts NIP-01 machine-readable reject prefixes via the new
mandatory WritePolicyResult prefix field.
Tests and grasp-audit migration follow in subsequent commits.
43 lines
795 B
TOML
43 lines
795 B
TOML
[package]
|
|
name = "grasp-audit"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.75"
|
|
description = "Audit and compliance testing tool for GRASP protocol implementations"
|
|
license = "MIT"
|
|
|
|
[[bin]]
|
|
name = "grasp-audit"
|
|
path = "src/bin/grasp-audit.rs"
|
|
|
|
[dependencies]
|
|
# Nostr
|
|
nostr-sdk = "0.45.0-alpha.1"
|
|
|
|
# Async
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
# Error handling
|
|
anyhow = "1"
|
|
|
|
# CLI
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
# Utilities
|
|
uuid = { version = "1", features = ["v4"] }
|
|
|
|
# HTTP Client
|
|
reqwest = { version = "0.11", features = ["json"] }
|
|
regex = "1"
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|