use circles_launcher::{new_launcher}; use heromodels::models::circle::circle::{new_circle}; use secp256k1::{Secp256k1, SecretKey, PublicKey}; use rand::rngs::OsRng; #[tokio::main] async fn main() -> Result<(), Box> { // Generate valid secp256k1 keypairs for testing let secp = Secp256k1::new(); let mut rng = OsRng; let secret_key1 = SecretKey::new(&mut rng); let public_key1 = PublicKey::from_secret_key(&secp, &secret_key1); let pk1_hex = hex::encode(public_key1.serialize()); let secret_key2 = SecretKey::new(&mut rng); let public_key2 = PublicKey::from_secret_key(&secp, &secret_key2); let pk2_hex = hex::encode(public_key2.serialize()); let secret_key3 = SecretKey::new(&mut rng); let public_key3 = PublicKey::from_secret_key(&secp, &secret_key3); let pk3_hex = hex::encode(public_key3.serialize()); println!("Generated test public keys:"); println!(" PK1: {}", pk1_hex); println!(" PK2: {}", pk2_hex); println!(" PK3: {}", pk3_hex); // Example 1: Create and save a circle println!("\n=== Example 1: Create and Save Circle ==="); let _circle = new_circle() .title("My Test Circle") .public_key(&pk1_hex) .ws_url("ws://127.0.0.1:8080") .description("A test circle for demonstration") .save(); Ok(()) }