diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-04 06:17:55 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-04 06:17:55 +0000 |
| commit | 001ca45e385c05b0eaa36d9879e051853aaff107 (patch) | |
| tree | 603fb85d2563db5b7c418e9fd143d479bd09676e /grasp-audit/src/lib.rs | |
| parent | d428baf30feec295870fadda2d335d1e7f89507b (diff) | |
created POC grasp-auditor
Diffstat (limited to 'grasp-audit/src/lib.rs')
| -rw-r--r-- | grasp-audit/src/lib.rs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/grasp-audit/src/lib.rs b/grasp-audit/src/lib.rs new file mode 100644 index 0000000..3a6404f --- /dev/null +++ b/grasp-audit/src/lib.rs | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | //! GRASP Audit Tool | ||
| 2 | //! | ||
| 3 | //! A reusable compliance and audit testing tool for GRASP protocol implementations. | ||
| 4 | //! | ||
| 5 | //! # Features | ||
| 6 | //! | ||
| 7 | //! - **Isolated Testing**: Tests run in parallel with unique audit IDs | ||
| 8 | //! - **Production Audit**: Test live services with minimal impact | ||
| 9 | //! - **Clean Audit Events**: Special tags for easy cleanup without deletion trails | ||
| 10 | //! - **Spec-Mirrored Tests**: Test structure matches GRASP protocol exactly | ||
| 11 | //! | ||
| 12 | //! # Usage | ||
| 13 | //! | ||
| 14 | //! ```no_run | ||
| 15 | //! use grasp_audit::*; | ||
| 16 | //! | ||
| 17 | //! #[tokio::main] | ||
| 18 | //! async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
| 19 | //! // Create audit client for CI testing | ||
| 20 | //! let config = AuditConfig::ci(); | ||
| 21 | //! let client = AuditClient::new("ws://localhost:7000", config).await?; | ||
| 22 | //! | ||
| 23 | //! // Run smoke tests | ||
| 24 | //! let results = specs::nip01_smoke::Nip01SmokeTests::run_all(&client).await; | ||
| 25 | //! results.print_report(); | ||
| 26 | //! | ||
| 27 | //! Ok(()) | ||
| 28 | //! } | ||
| 29 | //! ``` | ||
| 30 | |||
| 31 | pub mod audit; | ||
| 32 | pub mod client; | ||
| 33 | pub mod isolation; | ||
| 34 | pub mod result; | ||
| 35 | pub mod specs; | ||
| 36 | |||
| 37 | pub use audit::{AuditConfig, AuditMode}; | ||
| 38 | pub use client::AuditClient; | ||
| 39 | pub use result::{AuditResult, TestResult}; | ||
| 40 | |||
| 41 | // Re-export commonly used types | ||
| 42 | pub use anyhow::{anyhow, Result}; | ||
| 43 | pub use nostr_sdk::prelude::*; | ||