<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>2026-04-05T04:09:05Z</updated>
  <generator>https://nostr.at</generator>

  <title>Nostr notes by </title>
  <author>
    <name></name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://nostr.at/npub1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzqujme.rss" />
  <link href="https://nostr.at/npub1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzqujme" />
  <id>https://nostr.at/npub1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzqujme</id>
  <icon></icon>
  <logo></logo>


  <title>Nostr notes on relay.cypherflow.ai</title>
  <link href="https://nostr.at/r/relay.cypherflow.ai" />
  <link rel="self" type="application/atom+xml" href="https://nostr.at/r/relay.cypherflow.ai.rss" />
  <id>https://nostr.at/r/relay.cypherflow.ai</id>
  <icon></icon>
  <logo></logo>



  <entry>
    <id>https://nostr.at/nevent1qqszyzpsyxa6xyv6a5wacdkeykfc9c5mh09jq3lh99g8vf25mw88tggpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxrud4l4</id>
    
      <title type="html">use frost_secp256k1_tr as frost; use frost::{Identifier, round1, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqszyzpsyxa6xyv6a5wacdkeykfc9c5mh09jq3lh99g8vf25mw88tggpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxrud4l4" />
    <content type="html">
      use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, round1, round2};&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use std::fs;&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. SETUP: Reload the KeyPackage we saved in the last example&lt;br/&gt;    let p1_json = fs::read_to_string(&amp;#34;p1_key.json&amp;#34;)&lt;br/&gt;        .map_err(|_| &amp;#34;Run example 6 first to generate p1_key.json&amp;#34;)?;&lt;br/&gt;    let p1_key_pkg: frost::keys::KeyPackage = serde_json::from_str(&amp;amp;p1_json)?;&lt;br/&gt;    let p1_id = *p1_key_pkg.identifier();&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD: Distributed Handshake Simulation ---&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 2. SIGNER: Round 1 (Generate and Vault)&lt;br/&gt;    // In a real app, the Signer does this and sends the Commitment to a Nostr Relay.&lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed([42u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(p1_key_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;&lt;br/&gt;    // Securely &amp;#34;vault&amp;#34; the secret nonces (Simulating a local DB or protected file)&lt;br/&gt;    let nonce_json = serde_json::to_string(&amp;amp;p1_nonces)?;&lt;br/&gt;    fs::write(&amp;#34;p1_nonce_vault.json&amp;#34;, nonce_json)?;&lt;br/&gt;    println!(&amp;#34;✅ Signer: Generated Nonce and saved to p1_nonce_vault.json&amp;#34;);&lt;br/&gt;    println!(&amp;#34;✅ Signer: Shared Public Commitment: {}&amp;#34;, hex::encode(p1_commitments.serialize()?));&lt;br/&gt;&lt;br/&gt;    // 3. COORDINATOR: Create Signing Request&lt;br/&gt;    // The Coordinator sees the commitment and asks the group to sign a Git Commit.&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-distributed-commit-xyz123&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    &lt;br/&gt;    // We mock P2&amp;#39;s commitment here to satisfy the 2-of-3 threshold&lt;br/&gt;    let mock_p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([7u8; 32]);&lt;br/&gt;    let (_, p2_commitments) = round1::commit(p1_key_pkg.signing_share(), &amp;amp;mut rng2); // Mocking&lt;br/&gt;    commitments_map.insert(mock_p2_id, p2_commitments);&lt;br/&gt;&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;    println!(&amp;#34;\n🚀 Coordinator: Created Signing Request for message: {:?}&amp;#34;, &lt;br/&gt;        String::from_utf8_lossy(message));&lt;br/&gt;&lt;br/&gt;    // 4. SIGNER: Round 2 (Fulfill Request)&lt;br/&gt;    // Signer receives the SigningPackage, reloads their secret nonce, and signs.&lt;br/&gt;    let vaulted_nonce_json = fs::read_to_string(&amp;#34;p1_nonce_vault.json&amp;#34;)?;&lt;br/&gt;    let p1_reloaded_nonces: round1::SigningNonces = serde_json::from_str(&amp;amp;vaulted_nonce_json)?;&lt;br/&gt;&lt;br/&gt;    let p1_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_reloaded_nonces, &amp;amp;p1_key_pkg)?;&lt;br/&gt;    &lt;br/&gt;    println!(&amp;#34;✅ Signer: Fulfilled request with Signature Share: {}&amp;#34;, &lt;br/&gt;        hex::encode(p1_share.serialize()));&lt;br/&gt;&lt;br/&gt;    // IMPORTANT: Delete the secret nonce after use to prevent reuse attacks!&lt;br/&gt;    fs::remove_file(&amp;#34;p1_nonce_vault.json&amp;#34;)?;&lt;br/&gt;    println!(&amp;#34;🛡️  Signer: Secret nonce deleted from vault (Reuse Protection).&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:05Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsvva90dccpgfm3gqxd3qy0wzxn6e9l8e6g5d30fqph7mpsvzzgl9qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxxy082q</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsvva90dccpgfm3gqxd3qy0wzxn6e9l8e6g5d30fqph7mpsvzzgl9qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxxy082q" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 1. Setup Signer (P1) and peer (P2)&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;    &lt;br/&gt;    // 2. Round 1: Both signers generate nonces (Simulating P2&amp;#39;s contribution)&lt;br/&gt;    let mut rng1 = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(shares[&amp;amp;p1_id].signing_share(), &amp;amp;mut rng1);&lt;br/&gt;&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([2u8; 32]);&lt;br/&gt;    let (_p2_nonces, p2_commitments) = round1::commit(shares[&amp;amp;p2_id].signing_share(), &amp;amp;mut rng2);&lt;br/&gt;&lt;br/&gt;    // 3. Coordinator: Create a valid SigningPackage with 2 signers&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-verification-test&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    commitments_map.insert(p2_id, p2_commitments); // Added P2 to satisfy threshold&lt;br/&gt;    &lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Round 2: Signer Validation ---&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 4. SIGNER-SIDE CHECK (Manual)&lt;br/&gt;    if !signing_package.signing_commitments().contains_key(&amp;amp;p1_id) {&lt;br/&gt;        return Err(&amp;#34;Validation Failed: My commitment is missing!&amp;#34;.into());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    let commitment_count = signing_package.signing_commitments().len() as u16;&lt;br/&gt;    if commitment_count &amp;lt; min_signers {&lt;br/&gt;         return Err(format!(&amp;#34;Validation Failed: Only {} commitments provided, need {}.&amp;#34;, commitment_count, min_signers).into());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;✅ Signing Package validated ({} signers).&amp;#34;, commitment_count);&lt;br/&gt;    println!(&amp;#34;Proceeding to sign message: {:?}&amp;#34;, String::from_utf8_lossy(message));&lt;br/&gt;&lt;br/&gt;    // 5. Generate the Share&lt;br/&gt;    let p1_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share());&lt;br/&gt;    let p1_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p1_id,&lt;br/&gt;        *shares[&amp;amp;p1_id].signing_share(),&lt;br/&gt;        p1_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    let p1_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_package)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;\nPartial Signature Share for P1:&amp;#34;);&lt;br/&gt;    println!(&amp;#34;{}&amp;#34;, hex::encode(p1_signature_share.serialize()));&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:17Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqszvtejvhaa2nur7z7nknaqu4atc6xxp6yxfdjxyf98mejpvelsdkcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxru9zae</id>
    
      <title type="html">domain = &amp;#34;&amp;#34; nip42 = false min_pow = 0 max_event_size = ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqszvtejvhaa2nur7z7nknaqu4atc6xxp6yxfdjxyf98mejpvelsdkcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxru9zae" />
    <content type="html">
      domain = &amp;#34;&amp;#34;&lt;br/&gt;nip42 = false&lt;br/&gt;min_pow = 0&lt;br/&gt;max_event_size = 153600&lt;br/&gt;max_limit = 5000&lt;br/&gt;default_limit = 500&lt;br/&gt;max_subid_length = 150&lt;br/&gt;whitelist = []&lt;br/&gt;blacklist = []&lt;br/&gt;admins = []&lt;br/&gt;allowed_kinds = []&lt;br/&gt;disallowed_kinds = []&lt;br/&gt;&lt;br/&gt;[net]&lt;br/&gt;ip = &amp;#34;127.0.0.1&amp;#34;&lt;br/&gt;port = 3598&lt;br/&gt;&lt;br/&gt;[lmdb]&lt;br/&gt;dir = &amp;#34;./lmdb&amp;#34;&lt;br/&gt;map_size = 34359738368&lt;br/&gt;max_readers = 126&lt;br/&gt;additional_dbs = 0&lt;br/&gt;&lt;br/&gt;[ratelimit]&lt;br/&gt;max_queries = 500&lt;br/&gt;events_per_minute = 120&lt;br/&gt;&lt;br/&gt;[nip11.limitation]&lt;br/&gt;payment_required = false&lt;br/&gt;&lt;br/&gt;[plugins.rhai]&lt;br/&gt;workers = 3&lt;br/&gt;plugins = []&lt;br/&gt;&lt;br/&gt;[grasp]&lt;br/&gt;enable = true&lt;br/&gt;git_path = &amp;#34;git&amp;#34;&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:16Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs9tmheksv9ecg237pf74xj33s4qag3q3zdmjswszresmwjlm75p8cpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxdhk28e</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs9tmheksv9ecg237pf74xj33s4qag3q3zdmjswszresmwjlm75p8cpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxdhk28e" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use get_file_hash_core::{get_relay_urls, publish_patch, publish_metadata_event, DEFAULT_PICTURE_URL, DEFAULT_BANNER_URL};&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;#[tokio::main]&lt;br/&gt;async fn main() {&lt;br/&gt;    use nostr_sdk::Keys;&lt;br/&gt;    use nostr_sdk::EventId;&lt;br/&gt;    use std::str::FromStr;&lt;br/&gt;&lt;br/&gt;    let keys = Keys::generate();&lt;br/&gt;    let relay_urls = get_relay_urls();&lt;br/&gt;    let d_tag = &amp;#34;my-gnostr-repository-patch-with-metadata-example&amp;#34;; // Repository identifier&lt;br/&gt;    let commit_id = &amp;#34;f1e2d3c4b5a6f7e8d9c0b1a2f3e4d5c6b7a8f9e0&amp;#34;; // Example commit ID&lt;br/&gt;&lt;br/&gt;    // Metadata for NIP-01 event&lt;br/&gt;    let picture_url = DEFAULT_PICTURE_URL;&lt;br/&gt;    let banner_url = DEFAULT_BANNER_URL;&lt;br/&gt;    let metadata_file_path = &amp;#34;./README.md&amp;#34;; // Using README.md content for metadata&lt;br/&gt;&lt;br/&gt;    // Dummy EventId for examples that require a build_manifest_event_id&lt;br/&gt;    const DUMMY_BUILD_MANIFEST_ID_STR: &amp;amp;str = &amp;#34;f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0&amp;#34;;&lt;br/&gt;    let dummy_build_manifest_id = EventId::from_str(DUMMY_BUILD_MANIFEST_ID_STR).unwrap();&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;Publishing NIP-01 Metadata Event...&amp;#34;);&lt;br/&gt;    publish_metadata_event(&lt;br/&gt;        &amp;amp;keys,&lt;br/&gt;        &amp;amp;relay_urls,&lt;br/&gt;        picture_url,&lt;br/&gt;        banner_url,&lt;br/&gt;        metadata_file_path&lt;br/&gt;    ).await;&lt;br/&gt;    println!(&amp;#34;NIP-01 Metadata Event published.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;&lt;br/&gt;Publishing NIP-34 Patch Event without build_manifest_event_id...&amp;#34;);&lt;br/&gt;    publish_patch!(&lt;br/&gt;        &amp;amp;keys,&lt;br/&gt;        &amp;amp;relay_urls,&lt;br/&gt;        d_tag,&lt;br/&gt;        commit_id,&lt;br/&gt;        &amp;#34;../Cargo.toml&amp;#34; // Use an existing file for the patch content&lt;br/&gt;    );&lt;br/&gt;    println!(&amp;#34;NIP-34 Patch Event without build_manifest_event_id published.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;&lt;br/&gt;Publishing NIP-34 Patch Event with build_manifest_event_id...&amp;#34;);&lt;br/&gt;    publish_patch!(&lt;br/&gt;        &amp;amp;keys,&lt;br/&gt;        &amp;amp;relay_urls,&lt;br/&gt;        d_tag,&lt;br/&gt;        commit_id,&lt;br/&gt;        &amp;#34;../Cargo.toml&amp;#34;, // Use an existing file for the patch content&lt;br/&gt;        Some(&amp;amp;dummy_build_manifest_id)&lt;br/&gt;    );&lt;br/&gt;    println!(&amp;#34;NIP-34 Patch Event with build_manifest_event_id published.&amp;#34;);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example publish_patch_with_metadata --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:16Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqstcxy6kvje09y8w266wjc0pft9xcd5g4nfumc75c7fxrjvrzd92espr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx8mm9gu</id>
    
      <title type="html">use frost_secp256k1_tr as frost; use frost::{Identifier, round1, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqstcxy6kvje09y8w266wjc0pft9xcd5g4nfumc75c7fxrjvrzd92espr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx8mm9gu" />
    <content type="html">
      use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, round1, round2};&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;use std::fs;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Load the persistent KeyPackage&lt;br/&gt;    let p1_json = fs::read_to_string(&amp;#34;p1_key.json&amp;#34;)?;&lt;br/&gt;    let p1_key_pkg: frost::keys::KeyPackage = serde_json::from_str(&amp;amp;p1_json)?;&lt;br/&gt;    let p1_id = *p1_key_pkg.identifier();&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD: Batch Nonce Management ---&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 2. BATCH GENERATION (The &amp;#34;Public Offer&amp;#34;)&lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed([88u8; 32]);&lt;br/&gt;    let mut public_commitments = BTreeMap::new();&lt;br/&gt;    let mut secret_nonce_vault = BTreeMap::new();&lt;br/&gt;&lt;br/&gt;    for i in 0..5 {&lt;br/&gt;        let (nonces, commitments) = round1::commit(p1_key_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;        public_commitments.insert(i, commitments);&lt;br/&gt;        secret_nonce_vault.insert(i, nonces);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // Save the vault (Private)&lt;br/&gt;    fs::write(&amp;#34;p1_batch_vault.json&amp;#34;, serde_json::to_string(&amp;amp;secret_nonce_vault)?)?;&lt;br/&gt;    println!(&amp;#34;✅ Signer: Generated 5 nonces and saved to p1_batch_vault.json&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 3. COORDINATOR REQUEST (Choosing Index #3)&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-batch-commit-hash-003&amp;#34;;&lt;br/&gt;    let selected_index: u64 = 3;&lt;br/&gt;    &lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    // Coordinator uses P1&amp;#39;s commitment at the specific index&lt;br/&gt;    commitments_map.insert(p1_id, public_commitments[&amp;amp;selected_index]);&lt;br/&gt;    &lt;br/&gt;    // Mock P2 to satisfy threshold&lt;br/&gt;    let mock_p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;    let (_, p2_commitments) = round1::commit(p1_key_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;    commitments_map.insert(mock_p2_id, p2_commitments);&lt;br/&gt;&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;    println!(&amp;#34;\n🚀 Coordinator: Requesting signature for Index #{}&amp;#34;, selected_index);&lt;br/&gt;&lt;br/&gt;    // 4. SIGNER: Selective Fulfillment&lt;br/&gt;    let mut current_vault: BTreeMap&amp;lt;u64, round1::SigningNonces&amp;gt; = &lt;br/&gt;        serde_json::from_str(&amp;amp;fs::read_to_string(&amp;#34;p1_batch_vault.json&amp;#34;)?)?;&lt;br/&gt;&lt;br/&gt;    // Extract only the requested nonce&lt;br/&gt;    if let Some(p1_nonces) = current_vault.remove(&amp;amp;selected_index) {&lt;br/&gt;        let p1_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_pkg)?;&lt;br/&gt;        &lt;br/&gt;        // Save the updated vault (Index 3 is now GONE)&lt;br/&gt;        fs::write(&amp;#34;p1_batch_vault.json&amp;#34;, serde_json::to_string(&amp;amp;current_vault)?)?;&lt;br/&gt;        &lt;br/&gt;        println!(&amp;#34;✅ Signer: Signed message using Index #{}&amp;#34;, selected_index);&lt;br/&gt;        println!(&amp;#34;✅ Signer: Partial Signature: {}&amp;#34;, hex::encode(p1_share.serialize()));&lt;br/&gt;        println!(&amp;#34;🛡️  Signer: Index #{} purged from vault. {} nonces remain.&amp;#34;, &lt;br/&gt;            selected_index, current_vault.len());&lt;br/&gt;    } else {&lt;br/&gt;        println!(&amp;#34;❌ Error: Nonce index {} has already been used!&amp;#34;, selected_index);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:16Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsx4mkhteatame240zzqx5q46x9ay5f0cj5dj4th49x7n34nehyvcqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxqapjs9</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] fn main() -&amp;gt; Result&amp;lt;(), ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsx4mkhteatame240zzqx5q46x9ay5f0cj5dj4th49x7n34nehyvcqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxqapjs9" />
    <content type="html">
      &lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    get_file_hash_core::frost_mailbox_logic::simulate_frost_mailbox_coordinator()&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example frost_mailbox --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:05Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs9p42vdkp0kmguhvnnc9s8as306gau9y0nzd4y59hnf7vzg3cdeugpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxnqsvfe</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs9p42vdkp0kmguhvnnc9s8as306gau9y0nzd4y59hnf7vzg3cdeugpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxnqsvfe" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Setup deterministic dealer (Genesis State)&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let (shares, _pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, 2, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. Setup Participant 1&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p1_share = &amp;amp;shares[&amp;amp;p1_id];&lt;br/&gt;    &lt;br/&gt;    // 3. Setup Nonce RNG&lt;br/&gt;    let mut nonce_rng = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Round 1: Batch Nonce Generation ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Participant: {:?}&amp;#34;, p1_id);&lt;br/&gt;    println!(&amp;#34;Generating 10 Nonce Pairs...\n&amp;#34;);&lt;br/&gt;&lt;br/&gt;    let mut batch_commitments = BTreeMap::new();&lt;br/&gt;    let mut batch_secrets = Vec::new();&lt;br/&gt;&lt;br/&gt;    for i in 0..10 {&lt;br/&gt;        // Generate a single pair&lt;br/&gt;        let (nonces, commitments) = round1::commit(p1_share.signing_share(), &amp;amp;mut nonce_rng);&lt;br/&gt;        &lt;br/&gt;        // Store the secret nonces locally (index i)&lt;br/&gt;        batch_secrets.push(nonces);&lt;br/&gt;        &lt;br/&gt;        // Store the public commitments in a map to share with the Coordinator&lt;br/&gt;        batch_commitments.insert(i, commitments);&lt;br/&gt;&lt;br/&gt;        println!(&amp;#34;Nonce Pair [{}]:&amp;#34;, i);&lt;br/&gt;        println!(&amp;#34;  Hiding:  {}&amp;#34;, hex::encode(commitments.hiding().serialize()?));&lt;br/&gt;        println!(&amp;#34;  Binding: {}&amp;#34;, hex::encode(commitments.binding().serialize()?));&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 4. Persistence Simulation&lt;br/&gt;    // In a real GCC app, you would save `batch_secrets` to an encrypted file &lt;br/&gt;    // and send `batch_commitments` to a Nostr Relay (Kind 1351).&lt;br/&gt;    println!(&amp;#34;\n✅ Batch generation complete.&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Ready to sign up to 10 independent Git commits.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Run with --features nostr&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:05Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsy49pwkfe07u3g2xuhnxecr03w4xgtqjhw7g9c8r0hr0jd690javcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx76afga</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsy49pwkfe07u3g2xuhnxecr03w4xgtqjhw7g9c8r0hr0jd690javcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx76afga" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use get_file_hash_core::{get_git_tracked_files, DEFAULT_GNOSTR_KEY, DEFAULT_PICTURE_URL, DEFAULT_BANNER_URL, publish_nostr_event_if_release, get_repo_announcement_event, publish_patch_event};&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;#[tokio::main]&lt;br/&gt;async fn main() {&lt;br/&gt;    use get_file_hash_core::publish_patch;&lt;br/&gt;    use nostr_sdk::Keys;&lt;br/&gt;    use nostr_sdk::EventId;&lt;br/&gt;    use std::str::FromStr;&lt;br/&gt;&lt;br/&gt;    let keys = Keys::generate();&lt;br/&gt;    let relay_urls = get_file_hash_core::get_relay_urls();&lt;br/&gt;    let d_tag = &amp;#34;my-awesome-repo-example&amp;#34;;&lt;br/&gt;    let commit_id = &amp;#34;a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0&amp;#34;; // Example commit ID&lt;br/&gt;&lt;br/&gt;    // Dummy EventId for examples that require a build_manifest_event_id&lt;br/&gt;    const DUMMY_BUILD_MANIFEST_ID_STR: &amp;amp;str = &amp;#34;f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0&amp;#34;;&lt;br/&gt;    let dummy_build_manifest_id = EventId::from_str(DUMMY_BUILD_MANIFEST_ID_STR).unwrap();&lt;br/&gt;&lt;br/&gt;    // Example 1: Without build_manifest_event_id&lt;br/&gt;    println!(&amp;#34;Publishing patch without build_manifest_event_id...&amp;#34;);&lt;br/&gt;    publish_patch!(&lt;br/&gt;        &amp;amp;keys,&lt;br/&gt;        &amp;amp;relay_urls,&lt;br/&gt;        d_tag,&lt;br/&gt;        commit_id,&lt;br/&gt;        &amp;#34;../Cargo.toml&amp;#34; // Use an existing file for the patch content&lt;br/&gt;    );&lt;br/&gt;    println!(&amp;#34;Patch without build_manifest_event_id published.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // Example 2: With build_manifest_event_id&lt;br/&gt;    println!(&amp;#34;Publishing patch with build_manifest_event_id...&amp;#34;);&lt;br/&gt;    publish_patch!(&lt;br/&gt;        &amp;amp;keys,&lt;br/&gt;        &amp;amp;relay_urls,&lt;br/&gt;        d_tag,&lt;br/&gt;        commit_id,&lt;br/&gt;        &amp;#34;../Cargo.toml&amp;#34;, // Use an existing file for the patch content&lt;br/&gt;        Some(&amp;amp;dummy_build_manifest_id)&lt;br/&gt;    );&lt;br/&gt;    println!(&amp;#34;Patch with build_manifest_event_id published.&amp;#34;);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example publish_patch --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:05Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsv9wa75warnk8lrqa6lcvap2zzw3vrvd7kr8r7kvt83z87rn00tcqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxxx7pvk</id>
    
      <title type="html">//#[cfg(feature = &amp;#34;gen-protos&amp;#34;)] fn compile_protos() { ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsv9wa75warnk8lrqa6lcvap2zzw3vrvd7kr8r7kvt83z87rn00tcqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxxx7pvk" />
    <content type="html">
      //#[cfg(feature = &amp;#34;gen-protos&amp;#34;)]&lt;br/&gt;fn compile_protos() {&lt;br/&gt;    tonic_prost_build::configure()&lt;br/&gt;        .build_server(true)&lt;br/&gt;        .build_client(true)&lt;br/&gt;        .build_transport(true)&lt;br/&gt;        .protoc_arg(&amp;#34;--experimental_allow_proto3_optional&amp;#34;)&lt;br/&gt;        .compile_protos(&amp;amp;[&amp;#34;proto/plugins.proto&amp;#34;], &amp;amp;[&amp;#34;proto&amp;#34;])&lt;br/&gt;        .expect(&amp;#34;protoc is required&amp;#34;);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;//#[cfg(not(feature = &amp;#34;gen-protos&amp;#34;))]&lt;br/&gt;//fn compile_protos() {}&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;fn main() {&lt;br/&gt;    compile_protos();&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:04Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsrrt23w2687k2l83mnl4w6lx9nv4jpz3x4mdchgxp62pswsh26thgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxlrqz3g</id>
    
      <title type="html">use frost_secp256k1_tr as frost; use frost::{Identifier, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsrrt23w2687k2l83mnl4w6lx9nv4jpz3x4mdchgxp62pswsh26thgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxlrqz3g" />
    <content type="html">
      use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use std::fs;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. SETUP: Initial Key Generation (The &amp;#34;Genesis&amp;#34; event)&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. PERSISTENCE: Save Participant 1&amp;#39;s KeyPackage to a file&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p1_key_pkg = frost::keys::KeyPackage::new(&lt;br/&gt;        p1_id,&lt;br/&gt;        *shares[&amp;amp;p1_id].signing_share(),&lt;br/&gt;        frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share()),&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    // Serialize to JSON (standard for many Nostr/Git tools)&lt;br/&gt;    let p1_json = serde_json::to_string_pretty(&amp;amp;p1_key_pkg)?;&lt;br/&gt;    fs::write(&amp;#34;p1_key.json&amp;#34;, p1_json)?;&lt;br/&gt;    &lt;br/&gt;    let pub_json = serde_json::to_string_pretty(&amp;amp;pubkey_package)?;&lt;br/&gt;    fs::write(&amp;#34;group_public.json&amp;#34;, pub_json)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD: Key Persistence ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;✅ Saved p1_key.json and group_public.json to disk.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 3. RELOAD: Simulate a Signer waking up later&lt;br/&gt;    let p1_loaded_json = fs::read_to_string(&amp;#34;p1_key.json&amp;#34;)?;&lt;br/&gt;    let p1_reloaded_pkg: frost::keys::KeyPackage = serde_json::from_str(&amp;amp;p1_loaded_json)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;✅ Reloaded KeyPackage for Participant: {:?}&amp;#34;, p1_reloaded_pkg.identifier());&lt;br/&gt;&lt;br/&gt;    // 4. SIGN: Use the reloaded key to sign a new Git Commit Hash&lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed([100u8; 32]); // Fresh seed for this specific signing session&lt;br/&gt;    let (nonces, commitments) = round1::commit(p1_reloaded_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;\nGenerated Nonce for new session:&amp;#34;);&lt;br/&gt;    println!(&amp;#34;  Commitment: {}&amp;#34;, hex::encode(commitments.serialize()?));&lt;br/&gt;&lt;br/&gt;    // Cleanup files for the example&lt;br/&gt;    // fs::remove_file(&amp;#34;p1_key.json&amp;#34;)?;&lt;br/&gt;    // fs::remove_file(&amp;#34;group_public.json&amp;#34;)?;&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:53Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsf3z3jy5cjfv66w9795apr6r7q37j0jcgplhvxa2etm9wl87j0cjcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx80v3cv</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use frost_secp256k1_tr as ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsf3z3jy5cjfv66w9795apr6r7q37j0jcgplhvxa2etm9wl87j0cjcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx80v3cv" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost_secp256k1_tr as frost; // MUST use the -tr variant for BIP-340/Nostr&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand::thread_rng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use serde_json::json;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use sha2::{Digest, Sha256};&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use hex;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    let mut rng = thread_rng();&lt;br/&gt;    let (max_signers, min_signers) = (3, 2);&lt;br/&gt;&lt;br/&gt;    // 1. Setup Nostr Event Metadata&lt;br/&gt;    let pubkey_hex = &amp;#34;79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798&amp;#34;; // Example&lt;br/&gt;    let created_at = 1712050000;&lt;br/&gt;    let kind = 1;&lt;br/&gt;    let content = &amp;#34;Hello from ROAST threshold signatures!&amp;#34;;&lt;br/&gt;    &lt;br/&gt;    // 2. Serialize for Nostr ID (per NIP-01)&lt;br/&gt;    let event_json = json!([&lt;br/&gt;        0,&lt;br/&gt;        pubkey_hex,&lt;br/&gt;        created_at,&lt;br/&gt;        kind,&lt;br/&gt;        [],&lt;br/&gt;        content&lt;br/&gt;    ]).to_string();&lt;br/&gt;    &lt;br/&gt;    let mut hasher = Sha256::new();&lt;br/&gt;    hasher.update(event_json.as_bytes());&lt;br/&gt;    let event_id = hasher.finalize(); // This 32-byte hash is our signing message&lt;br/&gt;&lt;br/&gt;    // 3. FROST/ROAST Key Generation&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        max_signers,&lt;br/&gt;        min_signers,&lt;br/&gt;        frost::keys::IdentifierList::Default,&lt;br/&gt;        &amp;amp;mut rng,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 4. ROAST Coordination Simulation (Round 1: Commitments)&lt;br/&gt;    // In ROAST, the coordinator keeps a &amp;#34;session&amp;#34; open and collects commitments&lt;br/&gt;    let mut session_commitments = BTreeMap::new();&lt;br/&gt;    let mut signer_nonces = BTreeMap::new();&lt;br/&gt;&lt;br/&gt;    // Signers 1 and 3 respond first (Signer 2 is offline/slow)&lt;br/&gt;    for &amp;amp;id_val in &amp;amp;[1, 3] {&lt;br/&gt;        let id = frost::Identifier::try_from(id_val as u16)?;&lt;br/&gt;        let (nonces, comms) = frost::round1::commit(shares[&amp;amp;id].signing_share(), &amp;amp;mut rng);&lt;br/&gt;        session_commitments.insert(id, comms);&lt;br/&gt;        signer_nonces.insert(id, nonces);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 5. Round 2: Signing the Nostr ID&lt;br/&gt;    let signing_package = frost::SigningPackage::new(session_commitments, &amp;amp;event_id);&lt;br/&gt;    let mut signature_shares = BTreeMap::new();&lt;br/&gt;&lt;br/&gt;    for (id, nonces) in signer_nonces {&lt;br/&gt;        let key_package: frost::keys::KeyPackage = shares[&amp;amp;id].clone().try_into()?;&lt;br/&gt;        let share = frost::round2::sign(&amp;amp;signing_package, &amp;amp;nonces, &amp;amp;key_package)?;&lt;br/&gt;        signature_shares.insert(id, share);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 6. Aggregate into a BIP-340 Signature&lt;br/&gt;    let group_signature = frost::aggregate(&lt;br/&gt;        &amp;amp;signing_package,&lt;br/&gt;        &amp;amp;signature_shares,&lt;br/&gt;        &amp;amp;pubkey_package,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 7. Verification (using BIP-340 logic)&lt;br/&gt;    pubkey_package.verifying_key().verify(&amp;amp;event_id, &amp;amp;group_signature)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;Nostr Event ID: {}&amp;#34;, hex::encode(event_id));&lt;br/&gt;    println!(&amp;#34;Threshold Signature (BIP-340): {}&amp;#34;, hex::encode(group_signature.serialize()?));&lt;br/&gt;    println!(&amp;#34;Successfully signed Nostr event using ROAST/FROST!&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example frost_bip_340 --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:51Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsru6yag2rafmtnhv75j0gnat7v3t5nvnn2g0v85tqtly3s5w6tvqspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx0jnvjg</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsru6yag2rafmtnhv75j0gnat7v3t5nvnn2g0v85tqtly3s5w6tvqspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx0jnvjg" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Dealer Setup&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. Setup Participant Identifiers&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;&lt;br/&gt;    // 3. Construct KeyPackages manually for RC.0&lt;br/&gt;    let p1_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share());&lt;br/&gt;    let p1_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p1_id,&lt;br/&gt;        *shares[&amp;amp;p1_id].signing_share(),&lt;br/&gt;        p1_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    let p2_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p2_id].signing_share());&lt;br/&gt;    let p2_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p2_id,&lt;br/&gt;        *shares[&amp;amp;p2_id].signing_share(),&lt;br/&gt;        p2_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    // 4. Round 1: Commitments&lt;br/&gt;    let mut rng1 = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(p1_key_package.signing_share(), &amp;amp;mut rng1);&lt;br/&gt;&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([2u8; 32]);&lt;br/&gt;    let (p2_nonces, p2_commitments) = round1::commit(p2_key_package.signing_share(), &amp;amp;mut rng2);&lt;br/&gt;&lt;br/&gt;    // 5. Coordinator: Signing Package&lt;br/&gt;    let message = b&amp;#34;gnostr-commit-7445bd727dbce5bac004861a45c35ccd4f4a195bfb1cc39f2a7c9fd3aa3b6547&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    commitments_map.insert(p2_id, p2_commitments);&lt;br/&gt;&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;&lt;br/&gt;    // 6. Round 2: Partial Signatures&lt;br/&gt;    let p1_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_package)?;&lt;br/&gt;    let p2_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p2_nonces, &amp;amp;p2_key_package)?;&lt;br/&gt;&lt;br/&gt;    // 7. Aggregation&lt;br/&gt;    let mut signature_shares = BTreeMap::new();&lt;br/&gt;    signature_shares.insert(p1_id, p1_signature_share);&lt;br/&gt;    signature_shares.insert(p2_id, p2_signature_share);&lt;br/&gt;&lt;br/&gt;    let group_signature = frost::aggregate(&amp;amp;signing_package, &amp;amp;signature_shares, &amp;amp;pubkey_package)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Aggregated Signature ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Final Signature (Hex): {}&amp;#34;, hex::encode(group_signature.serialize()?));&lt;br/&gt;&lt;br/&gt;    // Final Verification&lt;br/&gt;    pubkey_package.verifying_key().verify(message, &amp;amp;group_signature)?;&lt;br/&gt;    println!(&amp;#34;🛡️  Signature is valid for the 2nd generation group!&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Run with --features nostr&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:51Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs28a34v778ue46gzdl3cn7vvh2vggjxyzk5s582046kknyjkxhpqcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx6l4ft4</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs28a34v778ue46gzdl3cn7vvh2vggjxyzk5s582046kknyjkxhpqcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx6l4ft4" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use get_file_hash_core::{get_relay_urls, publish_issue, DEFAULT_GNOSTR_KEY, DEFAULT_PICTURE_URL, DEFAULT_BANNER_URL, publish_nostr_event_if_release, get_repo_announcement_event, publish_patch_event};&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;#[tokio::main]&lt;br/&gt;async fn main() {&lt;br/&gt;    use nostr_sdk::Keys;&lt;br/&gt;    use nostr_sdk::EventId;&lt;br/&gt;    use std::str::FromStr;&lt;br/&gt;&lt;br/&gt;    let keys = Keys::generate();&lt;br/&gt;    let relay_urls = get_relay_urls();&lt;br/&gt;    let d_tag = &amp;#34;my-gnostr-repository-issue-example&amp;#34;; // Repository identifier&lt;br/&gt;    let issue_id_1 = &amp;#34;issue-001&amp;#34;; // Unique identifier for the first issue&lt;br/&gt;    let issue_id_2 = &amp;#34;issue-002&amp;#34;; // Unique identifier for the second issue&lt;br/&gt;    let title_1 = &amp;#34;Bug: Application crashes on startup&amp;#34;;&lt;br/&gt;    let content_1 = &amp;#34;The application fails to launch on macOS Ventura. It throws a &amp;#39;Segmentation Fault&amp;#39; error immediately after execution. This was observed on version `v1.2.3`.&lt;br/&gt;&lt;br/&gt;Steps to reproduce:&lt;br/&gt;1. Download `app-v1.2.3-macos.tar.gz`&lt;br/&gt;2. Extract the archive&lt;br/&gt;3. Run `./app`&lt;br/&gt;&lt;br/&gt;Expected behavior: Application launches successfully.&lt;br/&gt;Actual behavior: Application crashes with &amp;#39;Segmentation Fault&amp;#39;.&amp;#34;;&lt;br/&gt;&lt;br/&gt;    let title_2 = &amp;#34;Feature Request: Dark Mode&amp;#34;;&lt;br/&gt;    let content_2 = &amp;#34;Users have requested a dark mode option to improve readability and reduce eye strain during prolonged use. This should be toggleable in the settings menu.&lt;br/&gt;&lt;br/&gt;Considerations:&lt;br/&gt;- Adherence to system dark mode settings.&lt;br/&gt;- Consistent styling across all UI components.&amp;#34;;&lt;br/&gt;&lt;br/&gt;    // Dummy EventId for examples that require a build_manifest_event_id&lt;br/&gt;    const DUMMY_BUILD_MANIFEST_ID_STR: &amp;amp;str = &amp;#34;f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0&amp;#34;;&lt;br/&gt;    let dummy_build_manifest_id = EventId::from_str(DUMMY_BUILD_MANIFEST_ID_STR).unwrap();&lt;br/&gt;&lt;br/&gt;    // Example 1: Publish an issue without build_manifest_event_id&lt;br/&gt;    println!(&amp;#34;Publishing issue &amp;#39;{}&amp;#39; without build_manifest_event_id...&amp;#34;, title_1);&lt;br/&gt;    publish_issue!(&lt;br/&gt;        &amp;amp;keys,&lt;br/&gt;        &amp;amp;relay_urls,&lt;br/&gt;        d_tag,&lt;br/&gt;        issue_id_1,&lt;br/&gt;        title_1,&lt;br/&gt;        content_1&lt;br/&gt;    );&lt;br/&gt;    println!(&amp;#34;Issue &amp;#39;{}&amp;#39; published.&amp;#34;, title_1);&lt;br/&gt;&lt;br/&gt;    // Example 2: Publish an issue with build_manifest_event_id&lt;br/&gt;    println!(&amp;#34;Publishing issue &amp;#39;{}&amp;#39; with build_manifest_event_id...&amp;#34;, title_2);&lt;br/&gt;    publish_issue!(&lt;br/&gt;        &amp;amp;keys,&lt;br/&gt;        &amp;amp;relay_urls,&lt;br/&gt;        d_tag,&lt;br/&gt;        issue_id_2,&lt;br/&gt;        title_2,&lt;br/&gt;        content_2,&lt;br/&gt;        Some(&amp;amp;dummy_build_manifest_id)&lt;br/&gt;    );&lt;br/&gt;    println!(&amp;#34;Issue &amp;#39;{}&amp;#39; published.&amp;#34;, title_2);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example publish_issue --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:51Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs8xaf8chxxzhfax5uw3r8y309nxekhvxz0vs80un9vnhvge8v0vlqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx92tw23</id>
    
      <title>Nostr event nevent1qqs8xaf8chxxzhfax5uw3r8y309nxekhvxz0vs80un9vnhvge8v0vlqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx92tw23</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs8xaf8chxxzhfax5uw3r8y309nxekhvxz0vs80un9vnhvge8v0vlqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx92tw23" />
    <content type="html">
      
    </content>
    <updated>2026-04-05T04:08:46Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsyhqa2wqjglqrlrjws0qqqwhtpr9vzxjawe3xjm070p3hq9kzszqcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx4yvmdu</id>
    
      <title type="html">use frost_secp256k1_tr as frost; use frost::{Identifier, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsyhqa2wqjglqrlrjws0qqqwhtpr9vzxjawe3xjm070p3hq9kzszqcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx4yvmdu" />
    <content type="html">
      use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. RECREATE CONTEXT (Same as Signer)&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;&lt;br/&gt;    // 2. SIMULATE SIGNING (Round 1 &amp;amp; 2)&lt;br/&gt;    let mut rng1 = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(shares[&amp;amp;p1_id].signing_share(), &amp;amp;mut rng1);&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([2u8; 32]);&lt;br/&gt;    let (p2_nonces, p2_commitments) = round1::commit(shares[&amp;amp;p2_id].signing_share(), &amp;amp;mut rng2);&lt;br/&gt;&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-verification-test&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    commitments_map.insert(p2_id, p2_commitments);&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;&lt;br/&gt;    // Generate shares (using the KeyPackage method we perfected)&lt;br/&gt;    let p1_key_pkg = frost::keys::KeyPackage::new(p1_id, *shares[&amp;amp;p1_id].signing_share(), &lt;br/&gt;        frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share()), &lt;br/&gt;        *pubkey_package.verifying_key(), min_signers);&lt;br/&gt;    let p2_key_pkg = frost::keys::KeyPackage::new(p2_id, *shares[&amp;amp;p2_id].signing_share(), &lt;br/&gt;        frost::keys::VerifyingShare::from(*shares[&amp;amp;p2_id].signing_share()), &lt;br/&gt;        *pubkey_package.verifying_key(), min_signers);&lt;br/&gt;&lt;br/&gt;    let p1_sig_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_pkg)?;&lt;br/&gt;    let p2_sig_share = round2::sign(&amp;amp;signing_package, &amp;amp;p2_nonces, &amp;amp;p2_key_pkg)?;&lt;br/&gt;&lt;br/&gt;    // 3. COORDINATOR: AGGREGATION&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD: Coordinator Aggregation ---&amp;#34;);&lt;br/&gt;    &lt;br/&gt;    let mut shares_map = BTreeMap::new();&lt;br/&gt;    shares_map.insert(p1_id, p1_sig_share);&lt;br/&gt;    shares_map.insert(p2_id, p2_sig_share);&lt;br/&gt;&lt;br/&gt;    let final_signature = frost::aggregate(&lt;br/&gt;        &amp;amp;signing_package, &lt;br/&gt;        &amp;amp;shares_map, &lt;br/&gt;        &amp;amp;pubkey_package&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    let sig_bytes = final_signature.serialize()?;&lt;br/&gt;    println!(&amp;#34;✅ Aggregation Successful!&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Final Signature (Hex): {}&amp;#34;, hex::encode(&amp;amp;sig_bytes));&lt;br/&gt;&lt;br/&gt;    // 4. VERIFICATION (The moment of truth)&lt;br/&gt;    pubkey_package.verifying_key().verify(message, &amp;amp;final_signature)?;&lt;br/&gt;    println!(&amp;#34;🛡️  Signature Verified against Group Public Key!&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:41Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsr94qhyc6x7xue3t3luwrnlfrqyyzv2mv875nwsg3twcnf9hzw2hcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxrf03xx</id>
    
      <title type="html">use frost_secp256k1_tr as frost; use frost::{Identifier, round1, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsr94qhyc6x7xue3t3luwrnlfrqyyzv2mv875nwsg3twcnf9hzw2hcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxrf03xx" />
    <content type="html">
      use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, round1, round2};&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;use std::fs;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Load the persistent KeyPackage&lt;br/&gt;    let p1_json = fs::read_to_string(&amp;#34;p1_key.json&amp;#34;)?;&lt;br/&gt;    let p1_key_pkg: frost::keys::KeyPackage = serde_json::from_str(&amp;amp;p1_json)?;&lt;br/&gt;    let p1_id = *p1_key_pkg.identifier();&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD: Batch Nonce Management ---&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 2. BATCH GENERATION (The &amp;#34;Public Offer&amp;#34;)&lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed([88u8; 32]);&lt;br/&gt;    let mut public_commitments = BTreeMap::new();&lt;br/&gt;    let mut secret_nonce_vault = BTreeMap::new();&lt;br/&gt;&lt;br/&gt;    for i in 0..5 {&lt;br/&gt;        let (nonces, commitments) = round1::commit(p1_key_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;        public_commitments.insert(i, commitments);&lt;br/&gt;        secret_nonce_vault.insert(i, nonces);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // Save the vault (Private)&lt;br/&gt;    fs::write(&amp;#34;p1_batch_vault.json&amp;#34;, serde_json::to_string(&amp;amp;secret_nonce_vault)?)?;&lt;br/&gt;    println!(&amp;#34;✅ Signer: Generated 5 nonces and saved to p1_batch_vault.json&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 3. COORDINATOR REQUEST (Choosing Index #3)&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-batch-commit-hash-003&amp;#34;;&lt;br/&gt;    let selected_index: u64 = 3;&lt;br/&gt;    &lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    // Coordinator uses P1&amp;#39;s commitment at the specific index&lt;br/&gt;    commitments_map.insert(p1_id, public_commitments[&amp;amp;selected_index]);&lt;br/&gt;    &lt;br/&gt;    // Mock P2 to satisfy threshold&lt;br/&gt;    let mock_p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;    let (_, p2_commitments) = round1::commit(p1_key_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;    commitments_map.insert(mock_p2_id, p2_commitments);&lt;br/&gt;&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;    println!(&amp;#34;\n🚀 Coordinator: Requesting signature for Index #{}&amp;#34;, selected_index);&lt;br/&gt;&lt;br/&gt;    // 4. SIGNER: Selective Fulfillment&lt;br/&gt;    let mut current_vault: BTreeMap&amp;lt;u64, round1::SigningNonces&amp;gt; = &lt;br/&gt;        serde_json::from_str(&amp;amp;fs::read_to_string(&amp;#34;p1_batch_vault.json&amp;#34;)?)?;&lt;br/&gt;&lt;br/&gt;    // Extract only the requested nonce&lt;br/&gt;    if let Some(p1_nonces) = current_vault.remove(&amp;amp;selected_index) {&lt;br/&gt;        let p1_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_pkg)?;&lt;br/&gt;        &lt;br/&gt;        // Save the updated vault (Index 3 is now GONE)&lt;br/&gt;        fs::write(&amp;#34;p1_batch_vault.json&amp;#34;, serde_json::to_string(&amp;amp;current_vault)?)?;&lt;br/&gt;        &lt;br/&gt;        println!(&amp;#34;✅ Signer: Signed message using Index #{}&amp;#34;, selected_index);&lt;br/&gt;        println!(&amp;#34;✅ Signer: Partial Signature: {}&amp;#34;, hex::encode(p1_share.serialize()));&lt;br/&gt;        println!(&amp;#34;🛡️  Signer: Index #{} purged from vault. {} nonces remain.&amp;#34;, &lt;br/&gt;            selected_index, current_vault.len());&lt;br/&gt;    } else {&lt;br/&gt;        println!(&amp;#34;❌ Error: Nonce index {} has already been used!&amp;#34;, selected_index);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:38Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqspcyek57fsm9r9k9vdw7ny0zsecyavn5xh8y05vkzt5s220udzpecpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx6nswp8</id>
    
      <title type="html"># n34-relay WIP</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqspcyek57fsm9r9k9vdw7ny0zsecyavn5xh8y05vkzt5s220udzpecpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx6nswp8" />
    <content type="html">
      # n34-relay&lt;br/&gt;&lt;br/&gt;WIP&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:35Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsv70vmtslgnkd3d4ueezxz4vvz8lvvnpp5t7afhmhdxa34w52aczgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx7y6hss</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use rand_chacha::ChaCha20Rng; ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsv70vmtslgnkd3d4ueezxz4vvz8lvvnpp5t7afhmhdxa34w52aczgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx7y6hss" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use hex;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost_secp256k1_tr as frost; &lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost::keys::IdentifierList;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Create a deterministic seed (e.g., 32 bytes of zeros or a Git Hash)&lt;br/&gt;    let seed_hex = &amp;#34;473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813&amp;#34;;&lt;br/&gt;    let seed_bytes = hex::decode(seed_hex)?;&lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed(seed_bytes.try_into().map_err(|_| &amp;#34;Invalid seed length&amp;#34;)?);&lt;br/&gt;&lt;br/&gt;    let max_signers = 3;&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    // Round 0: Key Generation (Trusted Dealer)&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;&lt;br/&gt;    // Using IdentifierList::Default creates identifiers 1, 2, 3...&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        max_signers,&lt;br/&gt;        min_signers,&lt;br/&gt;        IdentifierList::Default,&lt;br/&gt;        &amp;amp;mut rng,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- Deterministic FROST Dealer ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Threshold: {} of {}&amp;#34;, min_signers, max_signers);&lt;br/&gt;    println!(&amp;#34;Number of shares generated: {}&amp;#34;, shares.len()); &lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;\n--- Verifying Shares Against Commitments ---&amp;#34;);&lt;br/&gt;    for (identifier, share) in &amp;amp;shares {&lt;br/&gt;&lt;br/&gt;        // The Deterministic Values (Scalar Hex)&lt;br/&gt;        // Because your seed is fixed to the EMPTY_BLOB_SHA256,&lt;br/&gt;        // the &amp;#34;redacted&amp;#34; values in your output are always the same.&lt;br/&gt;        // Here are the Secret Signing Shares (the private scalars) for your 2-of-3 setup:&lt;br/&gt;        //&lt;br/&gt;        // Participant,Identifier (x),Signing Share (f(x)) in Hex&lt;br/&gt;        // Participant 1,...0001,757f49553754988450d995c65a0459a0f5a703d7c585f95f468202d09a365f57&lt;br/&gt;        // Participant 2,...0002,a3c4835e32308cb11b43968962290bc9171f1f1ca90c21741890e4f326f9879b&lt;br/&gt;        // Participant 3,...0003,d209bd672d0c80dd65ad974c6a4dc1f138973a618c924988eaaa0715b3bcafdf&lt;br/&gt;        //&lt;br/&gt;        // println!(&amp;#34;Participant Identifier: {:?} {:?}&amp;#34;, identifier, _share);&lt;br/&gt;        //&lt;br/&gt;&lt;br/&gt;        // In FROST, the &amp;#39;verify&amp;#39; method checks the share against the VSS commitment&lt;br/&gt;        match share.verify() {&lt;br/&gt;            Ok(_) =&amp;gt; {&lt;br/&gt;                println!(&amp;#34;Participant {:?}: Valid  ✅&amp;#34;, identifier);&lt;br/&gt;            }&lt;br/&gt;            Err(e) =&amp;gt; {&lt;br/&gt;                println!(&amp;#34;Participant {:?}: INVALID! ❌ Error: {:?}&amp;#34;, identifier, e);&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    let pubkey_bytes = pubkey_package.verifying_key().serialize()?;&lt;br/&gt;    println!(&amp;#34;Group Public Key (Hex Compressed): {}&amp;#34;, hex::encode(&amp;amp;pubkey_bytes));&lt;br/&gt;    let x_only_hex = hex::encode(&amp;amp;pubkey_bytes[1..]);&lt;br/&gt;    println!(&amp;#34;Group Public Key (Hex X-Only):       {}&amp;#34;, x_only_hex);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;Run with --features nostr to enable this example.&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:35Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsqwh5lr27wqjuvnkh3zlh3mh39497ptl7x0m8yv5j5h967f26k8aqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx66sllt</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsqwh5lr27wqjuvnkh3zlh3mh39497ptl7x0m8yv5j5h967f26k8aqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx66sllt" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList};&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. We need the dealer setup first to get a real SigningShare&lt;br/&gt;    let dealer_seed = [0u8; 32]; &lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed(dealer_seed);&lt;br/&gt;    &lt;br/&gt;    let (shares, _pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, 2, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. Setup nonce RNG&lt;br/&gt;    let nonce_seed = [1u8; 32]; &lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed(nonce_seed);&lt;br/&gt;&lt;br/&gt;    // 3. Get Participant 1&amp;#39;s share&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p1_share = shares.get(&amp;amp;p1_id).ok_or(&amp;#34;Share not found&amp;#34;)?;&lt;br/&gt;&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    // Round 1: Commitments &amp;amp; Nonces&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    &lt;br/&gt;    // In RC.0, commit() requires the secret share reference&lt;br/&gt;    let (p1_nonces, p1_commitments) = frost::round1::commit(p1_share.signing_share(), &amp;amp;mut rng);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Round 1: Nonce Generation ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Participant Identifier: {:?}&amp;#34;, p1_id);&lt;br/&gt;    &lt;br/&gt;    // 4. Handle Results for serialization&lt;br/&gt;    println!(&amp;#34;\nPublic Signing Commitments (To be shared):&amp;#34;);&lt;br/&gt;    println!(&amp;#34;  Hiding:  {}&amp;#34;, hex::encode(p1_commitments.hiding().serialize()?));&lt;br/&gt;    println!(&amp;#34;  Binding: {}&amp;#34;, hex::encode(p1_commitments.binding().serialize()?));&lt;br/&gt;&lt;br/&gt;    // Keep nonces in memory for the next step&lt;br/&gt;    let _p1_secret_nonces = p1_nonces; &lt;br/&gt;    &lt;br/&gt;    println!(&amp;#34;\n✅ Nonces generated and tied to Participant 1&amp;#39;s share.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;Run with --features nostr to enable this example.&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:34Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsynrqte874a588kew8hyq8ffa7099764g0szktwqk3k77xp8n9sqqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx4w4keh</id>
    
      <title type="html">use frost_secp256k1_tr as frost; use frost::{Identifier, round1, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsynrqte874a588kew8hyq8ffa7099764g0szktwqk3k77xp8n9sqqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx4w4keh" />
    <content type="html">
      use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, round1, round2};&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use std::fs;&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. SETUP: Reload the KeyPackage we saved in the last example&lt;br/&gt;    let p1_json = fs::read_to_string(&amp;#34;p1_key.json&amp;#34;)&lt;br/&gt;        .map_err(|_| &amp;#34;Run example 6 first to generate p1_key.json&amp;#34;)?;&lt;br/&gt;    let p1_key_pkg: frost::keys::KeyPackage = serde_json::from_str(&amp;amp;p1_json)?;&lt;br/&gt;    let p1_id = *p1_key_pkg.identifier();&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD: Distributed Handshake Simulation ---&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 2. SIGNER: Round 1 (Generate and Vault)&lt;br/&gt;    // In a real app, the Signer does this and sends the Commitment to a Nostr Relay.&lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed([42u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(p1_key_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;&lt;br/&gt;    // Securely &amp;#34;vault&amp;#34; the secret nonces (Simulating a local DB or protected file)&lt;br/&gt;    let nonce_json = serde_json::to_string(&amp;amp;p1_nonces)?;&lt;br/&gt;    fs::write(&amp;#34;p1_nonce_vault.json&amp;#34;, nonce_json)?;&lt;br/&gt;    println!(&amp;#34;✅ Signer: Generated Nonce and saved to p1_nonce_vault.json&amp;#34;);&lt;br/&gt;    println!(&amp;#34;✅ Signer: Shared Public Commitment: {}&amp;#34;, hex::encode(p1_commitments.serialize()?));&lt;br/&gt;&lt;br/&gt;    // 3. COORDINATOR: Create Signing Request&lt;br/&gt;    // The Coordinator sees the commitment and asks the group to sign a Git Commit.&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-distributed-commit-xyz123&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    &lt;br/&gt;    // We mock P2&amp;#39;s commitment here to satisfy the 2-of-3 threshold&lt;br/&gt;    let mock_p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([7u8; 32]);&lt;br/&gt;    let (_, p2_commitments) = round1::commit(p1_key_pkg.signing_share(), &amp;amp;mut rng2); // Mocking&lt;br/&gt;    commitments_map.insert(mock_p2_id, p2_commitments);&lt;br/&gt;&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;    println!(&amp;#34;\n🚀 Coordinator: Created Signing Request for message: {:?}&amp;#34;, &lt;br/&gt;        String::from_utf8_lossy(message));&lt;br/&gt;&lt;br/&gt;    // 4. SIGNER: Round 2 (Fulfill Request)&lt;br/&gt;    // Signer receives the SigningPackage, reloads their secret nonce, and signs.&lt;br/&gt;    let vaulted_nonce_json = fs::read_to_string(&amp;#34;p1_nonce_vault.json&amp;#34;)?;&lt;br/&gt;    let p1_reloaded_nonces: round1::SigningNonces = serde_json::from_str(&amp;amp;vaulted_nonce_json)?;&lt;br/&gt;&lt;br/&gt;    let p1_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_reloaded_nonces, &amp;amp;p1_key_pkg)?;&lt;br/&gt;    &lt;br/&gt;    println!(&amp;#34;✅ Signer: Fulfilled request with Signature Share: {}&amp;#34;, &lt;br/&gt;        hex::encode(p1_share.serialize()));&lt;br/&gt;&lt;br/&gt;    // IMPORTANT: Delete the secret nonce after use to prevent reuse attacks!&lt;br/&gt;    fs::remove_file(&amp;#34;p1_nonce_vault.json&amp;#34;)?;&lt;br/&gt;    println!(&amp;#34;🛡️  Signer: Secret nonce deleted from vault (Reuse Protection).&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:25Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqswpeqmzrtzud0szarz23l3m73rdpurz7l9vnzmaw6jtyrek7kr9gspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx0uu9jg</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqswpeqmzrtzud0szarz23l3m73rdpurz7l9vnzmaw6jtyrek7kr9gspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx0uu9jg" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 1. Setup Signer (P1) and peer (P2)&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;    &lt;br/&gt;    // 2. Round 1: Both signers generate nonces (Simulating P2&amp;#39;s contribution)&lt;br/&gt;    let mut rng1 = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(shares[&amp;amp;p1_id].signing_share(), &amp;amp;mut rng1);&lt;br/&gt;&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([2u8; 32]);&lt;br/&gt;    let (_p2_nonces, p2_commitments) = round1::commit(shares[&amp;amp;p2_id].signing_share(), &amp;amp;mut rng2);&lt;br/&gt;&lt;br/&gt;    // 3. Coordinator: Create a valid SigningPackage with 2 signers&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-verification-test&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    commitments_map.insert(p2_id, p2_commitments); // Added P2 to satisfy threshold&lt;br/&gt;    &lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Round 2: Signer Validation ---&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 4. SIGNER-SIDE CHECK (Manual)&lt;br/&gt;    if !signing_package.signing_commitments().contains_key(&amp;amp;p1_id) {&lt;br/&gt;        return Err(&amp;#34;Validation Failed: My commitment is missing!&amp;#34;.into());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    let commitment_count = signing_package.signing_commitments().len() as u16;&lt;br/&gt;    if commitment_count &amp;lt; min_signers {&lt;br/&gt;         return Err(format!(&amp;#34;Validation Failed: Only {} commitments provided, need {}.&amp;#34;, commitment_count, min_signers).into());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;✅ Signing Package validated ({} signers).&amp;#34;, commitment_count);&lt;br/&gt;    println!(&amp;#34;Proceeding to sign message: {:?}&amp;#34;, String::from_utf8_lossy(message));&lt;br/&gt;&lt;br/&gt;    // 5. Generate the Share&lt;br/&gt;    let p1_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share());&lt;br/&gt;    let p1_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p1_id,&lt;br/&gt;        *shares[&amp;amp;p1_id].signing_share(),&lt;br/&gt;        p1_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    let p1_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_package)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;\nPartial Signature Share for P1:&amp;#34;);&lt;br/&gt;    println!(&amp;#34;{}&amp;#34;, hex::encode(p1_signature_share.serialize()));&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:23Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs033p3htgtwrrzqvxwz6qjg96d806mxzyv94efm3hk4letqhtugmgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxkrx4fy</id>
    
      <title type="html">/// deterministic nostr event build example // deterministic ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs033p3htgtwrrzqvxwz6qjg96d806mxzyv94efm3hk4letqhtugmgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxkrx4fy" />
    <content type="html">
      /// deterministic nostr event build example&lt;br/&gt;// deterministic nostr event build example&lt;br/&gt;use get_file_hash_core::get_file_hash;&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use get_file_hash_core::{get_git_tracked_files, DEFAULT_GNOSTR_KEY, DEFAULT_PICTURE_URL, DEFAULT_BANNER_URL, publish_nostr_event_if_release, get_repo_announcement_event};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use nostr_sdk::{EventBuilder, Keys, Tag, SecretKey};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use std::fs;&lt;br/&gt;&lt;br/&gt;use std::path::PathBuf;&lt;br/&gt;use sha2::{Digest, Sha256};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use ::hex;&lt;br/&gt;&lt;br/&gt;#[tokio::main]&lt;br/&gt;async fn main() {&lt;br/&gt;    let manifest_dir = std::env::var(&amp;#34;CARGO_MANIFEST_DIR&amp;#34;).unwrap();&lt;br/&gt;    let is_git_repo = std::path::Path::new(&amp;amp;manifest_dir).join(&amp;#34;.git&amp;#34;).exists();&lt;br/&gt;    #[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;	#[allow(unused_mut)]&lt;br/&gt;    let mut git_branch_str = String::new();&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_PKG_NAME={}&amp;#34;, env!(&amp;#34;CARGO_PKG_NAME&amp;#34;));&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_PKG_VERSION={}&amp;#34;, env!(&amp;#34;CARGO_PKG_VERSION&amp;#34;));&lt;br/&gt;&lt;br/&gt;    if is_git_repo {&lt;br/&gt;        let git_commit_hash_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for commit hash&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_str = if git_commit_hash_output.status.success() &amp;amp;&amp;amp; !git_commit_hash_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_commit_hash_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git commit hash command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_commit_hash_output.status, String::from_utf8_lossy(&amp;amp;git_commit_hash_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH={}&amp;#34;, git_commit_hash_str);&lt;br/&gt;&lt;br/&gt;        let git_branch_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;--abbrev-ref&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for branch name&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_branch_str = if git_branch_output.status.success() &amp;amp;&amp;amp; !git_branch_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_branch_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git branch command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_branch_output.status, String::from_utf8_lossy(&amp;amp;git_branch_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_BRANCH={}&amp;#34;, git_branch_str);&lt;br/&gt;    } else {&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH=&amp;#34;);&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_BRANCH=&amp;#34;);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=.git/HEAD&amp;#34;);&lt;br/&gt;&lt;br/&gt;    //#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;    //let relay_urls = get_file_hash_core::get_relay_urls();&lt;br/&gt;&lt;br/&gt;    let cargo_toml_hash = get_file_hash!(&amp;#34;../Cargo.toml&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_TOML_HASH={}&amp;#34;, cargo_toml_hash);&lt;br/&gt;&lt;br/&gt;    let lib_hash = get_file_hash!(&amp;#34;../src/lib.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=LIB_HASH={}&amp;#34;, lib_hash);&lt;br/&gt;&lt;br/&gt;    let build_hash = get_file_hash!(&amp;#34;../build.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=BUILD_HASH={}&amp;#34;, build_hash);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=Cargo.toml&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=src/lib.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=build.rs&amp;#34;);&lt;br/&gt;    let online_relays_csv_path = PathBuf::from(&amp;amp;manifest_dir).join(&amp;#34;src/get_file_hash_core/src/online_relays_gps.csv&amp;#34;);&lt;br/&gt;    if online_relays_csv_path.exists() {&lt;br/&gt;        println!(&amp;#34;cargo:rerun-if-changed={}&amp;#34;, online_relays_csv_path.to_str().unwrap());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;    if cfg!(not(debug_assertions)) {&lt;br/&gt;        println!(&amp;#34;cargo:warning=Nostr feature enabled: Build may take longer due to network operations (publishing events to relays).&amp;#34;);&lt;br/&gt;&lt;br/&gt;        // This code only runs in release builds&lt;br/&gt;        let package_version = std::env::var(&amp;#34;CARGO_PKG_VERSION&amp;#34;).unwrap();&lt;br/&gt;&lt;br/&gt;        let output_dir = PathBuf::from(format!(&amp;#34;.gnostr/build/{}&amp;#34;, package_version));&lt;br/&gt;        if let Err(e) = fs::create_dir_all(&amp;amp;output_dir) {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Failed to create output directory {}: {}&amp;#34;, output_dir.display(), e);&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        let files_to_publish: Vec&amp;lt;String&amp;gt; = get_git_tracked_files(&amp;amp;PathBuf::from(&amp;amp;manifest_dir));&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for commit hash&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_str = if git_commit_hash_output.status.success() &amp;amp;&amp;amp; !git_commit_hash_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_commit_hash_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git commit hash command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_commit_hash_output.status, String::from_utf8_lossy(&amp;amp;git_commit_hash_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH={}&amp;#34;, git_commit_hash_str);&lt;br/&gt;        // Create padded_commit_hash&lt;br/&gt;        let padded_commit_hash = format!(&amp;#34;{:0&amp;gt;64}&amp;#34;, &amp;amp;git_commit_hash_str);&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=PADDED_COMMIT_HASH={}&amp;#34;, padded_commit_hash);&lt;br/&gt;        // Initialize client and keys once&lt;br/&gt;        let initial_secret_key = SecretKey::parse(&amp;amp;padded_commit_hash).expect(&amp;#34;Failed to create Nostr SecretKey from PADDED_COMMIT_HASH&amp;#34;);&lt;br/&gt;        let initial_keys = Keys::new(initial_secret_key);&lt;br/&gt;        let mut client = nostr_sdk::Client::new(initial_keys.clone());&lt;br/&gt;        let mut relay_urls = get_file_hash_core::get_relay_urls();&lt;br/&gt;&lt;br/&gt;        // Add relays to the client&lt;br/&gt;        for relay_url in relay_urls.iter() {&lt;br/&gt;            if let Err(e) = client.add_relay(relay_url).await {&lt;br/&gt;                println!(&amp;#34;cargo:warning=Failed to add relay {}: {}&amp;#34;, relay_url, e);&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;        client.connect().await;&lt;br/&gt;        println!(&amp;#34;cargo:warning=Added and connected to {} relays.&amp;#34;, relay_urls.len());&lt;br/&gt;&lt;br/&gt;        let mut published_event_ids: Vec&amp;lt;Tag&amp;gt; = Vec::new();&lt;br/&gt;        let mut total_bytes_sent: usize = 0;&lt;br/&gt;    &lt;br/&gt;        for file_path_str in &amp;amp;files_to_publish {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Processing file: {}&amp;#34;, file_path_str);&lt;br/&gt;            match fs::read(file_path_str) {&lt;br/&gt;                Ok(bytes) =&amp;gt; {&lt;br/&gt;                    let mut hasher = Sha256::new();&lt;br/&gt;                    hasher.update(&amp;amp;bytes);&lt;br/&gt;                    let result = hasher.finalize();&lt;br/&gt;                    let file_hash_hex = hex::encode(result);&lt;br/&gt;&lt;br/&gt;                    match SecretKey::from_hex(&amp;amp;file_hash_hex.clone()) {&lt;br/&gt;                        Ok(secret_key) =&amp;gt; {&lt;br/&gt;                            let keys = Keys::new(secret_key);&lt;br/&gt;                            let content = String::from_utf8_lossy(&amp;amp;bytes).into_owned();&lt;br/&gt;                            let tags = vec![&lt;br/&gt;                                Tag::parse([&amp;#34;file&amp;#34;, file_path_str].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                                Tag::parse([&amp;#34;version&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                            ];&lt;br/&gt;                            let event_builder = EventBuilder::text_note(content).tags(tags);&lt;br/&gt;&lt;br/&gt;                            if let Some(event_id) = publish_nostr_event_if_release(&amp;amp;mut client, file_hash_hex, keys.clone(), event_builder, &amp;amp;mut relay_urls, file_path_str, &amp;amp;output_dir, &amp;amp;mut total_bytes_sent).await {&lt;br/&gt;                                published_event_ids.push(Tag::event(event_id));&lt;br/&gt;                            }&lt;br/&gt;&lt;br/&gt;                            // Publish metadata event&lt;br/&gt;                            get_file_hash_core::publish_metadata_event(&lt;br/&gt;                                &amp;amp;keys,&lt;br/&gt;                                &amp;amp;relay_urls,&lt;br/&gt;                                DEFAULT_PICTURE_URL,&lt;br/&gt;                                DEFAULT_BANNER_URL,&lt;br/&gt;                                file_path_str,&lt;br/&gt;                            ).await;&lt;br/&gt;                        }&lt;br/&gt;                        Err(e) =&amp;gt; {&lt;br/&gt;                            println!(&amp;#34;cargo:warning=Failed to derive Nostr secret key for {}: {}&amp;#34;, file_path_str, e);&lt;br/&gt;                        }&lt;br/&gt;                    }&lt;br/&gt;                }&lt;br/&gt;                Err(e) =&amp;gt; {&lt;br/&gt;                    println!(&amp;#34;cargo:warning=Failed to read file {}: {}&amp;#34;, file_path_str, e);&lt;br/&gt;                }&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        // Create and publish the build_manifest&lt;br/&gt;        if !published_event_ids.is_empty() {&lt;br/&gt;&lt;br/&gt;            //TODO this will be either the default or detected from env vars PRIVATE_KEY&lt;br/&gt;            let keys = Keys::new(SecretKey::from_hex(DEFAULT_GNOSTR_KEY).expect(&amp;#34;Failed to create Nostr keys from DEFAULT_GNOSTR_KEY&amp;#34;));&lt;br/&gt;            let cloned_keys = keys.clone();&lt;br/&gt;            let content = format!(&amp;#34;Build manifest for get_file_hash v{}&amp;#34;, package_version);&lt;br/&gt;            let mut tags = vec![&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;            ];&lt;br/&gt;            tags.extend(published_event_ids);&lt;br/&gt;&lt;br/&gt;            let event_builder = EventBuilder::text_note(content.clone()).tags(tags);&lt;br/&gt;&lt;br/&gt;            if let Some(event_id) = publish_nostr_event_if_release(&lt;br/&gt;                &amp;amp;mut client,&lt;br/&gt;                hex::encode(Sha256::digest(content.as_bytes())),&lt;br/&gt;                keys,&lt;br/&gt;                event_builder,&lt;br/&gt;                &amp;amp;mut relay_urls,&lt;br/&gt;                &amp;#34;build_manifest.json&amp;#34;,&lt;br/&gt;                &amp;amp;output_dir,&lt;br/&gt;                &amp;amp;mut total_bytes_sent,&lt;br/&gt;            ).await {&lt;br/&gt;&lt;br/&gt;                let build_manifest_event_id = Some(event_id);&lt;br/&gt;&lt;br/&gt;            // Publish metadata event for the build manifest&lt;br/&gt;            get_file_hash_core::publish_metadata_event(&lt;br/&gt;                &amp;amp;cloned_keys, // Use reference to cloned keys here&lt;br/&gt;                &amp;amp;relay_urls,&lt;br/&gt;                DEFAULT_PICTURE_URL,&lt;br/&gt;                DEFAULT_BANNER_URL,&lt;br/&gt;                &amp;amp;format!(&amp;#34;build_manifest:{}&amp;#34;, package_version),&lt;br/&gt;            ).await;&lt;br/&gt;            let git_commit_hash = &amp;amp;git_commit_hash_str;&lt;br/&gt;            let git_branch = &amp;amp;git_branch_str;&lt;br/&gt;            let repo_url = std::env::var(&amp;#34;CARGO_PKG_REPOSITORY&amp;#34;).unwrap();&lt;br/&gt;            let repo_name = std::env::var(&amp;#34;CARGO_PKG_NAME&amp;#34;).unwrap();&lt;br/&gt;            let repo_description = std::env::var(&amp;#34;CARGO_PKG_DESCRIPTION&amp;#34;).unwrap();&lt;br/&gt;&lt;br/&gt;            let output_dir = PathBuf::from(format!(&amp;#34;.gnostr/build/{}&amp;#34;, package_version));&lt;br/&gt;            if let Err(e) = fs::create_dir_all(&amp;amp;output_dir) {&lt;br/&gt;                println!(&amp;#34;cargo:warning=Failed to create output directory {}: {}&amp;#34;, output_dir.display(), e);&lt;br/&gt;            }&lt;br/&gt;&lt;br/&gt;            let announcement_keys = Keys::new(SecretKey::from_hex(build_manifest_event_id.unwrap().to_hex().as_str()).expect(&amp;#34;Failed to create Nostr keys from build_manifest_event_id&amp;#34;));&lt;br/&gt;            let announcement_pubkey_hex = announcement_keys.public_key().to_string();&lt;br/&gt;&lt;br/&gt;            // Publish NIP-34 Repository Announcement&lt;br/&gt;            if let Some(_event_id) = get_repo_announcement_event(&lt;br/&gt;                &amp;amp;mut client,&lt;br/&gt;                &amp;amp;announcement_keys,&lt;br/&gt;                &amp;amp;relay_urls,&lt;br/&gt;                &amp;amp;repo_url,&lt;br/&gt;                &amp;amp;repo_name,&lt;br/&gt;                &amp;amp;repo_description,&lt;br/&gt;                &amp;amp;git_commit_hash,&lt;br/&gt;                &amp;amp;git_branch,&lt;br/&gt;                &amp;amp;output_dir,&lt;br/&gt;                &amp;amp;announcement_pubkey_hex&lt;br/&gt;            ).await {&lt;br/&gt;                // Successfully published announcement&lt;br/&gt;            }&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;        println!(&amp;#34;cargo:warning=Total bytes sent to Nostr relays: {} bytes ({} MB)&amp;#34;, total_bytes_sent, total_bytes_sent as f64 / 1024.0 / 1024.0);&lt;br/&gt;    }&lt;br/&gt;}&lt;br/&gt;// deterministic nostr event build example&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:23Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsqjlyu8alpvjr94q8cj9n3rzc8falhyydkemk6hpv6ec0538p94mgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxsx3x7a</id>
    
      <title type="html">/// Usage: cargo run --example cli-parser --features nostr ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsqjlyu8alpvjr94q8cj9n3rzc8falhyydkemk6hpv6ec0538p94mgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxsx3x7a" />
    <content type="html">
      /// Usage: cargo run --example cli-parser --features nostr&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;Run with --features nostr to enable this example.&amp;#34;);&lt;br/&gt;}&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use clap::{Parser, Subcommand};&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost::round1::{self, SigningCommitments, SigningNonces};&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost::keys::IdentifierList;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand::SeedableRng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use std::fs;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use std::path::PathBuf;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;#[derive(Parser)]&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;#[command(name = &amp;#34;gnostr-frost&amp;#34;)]&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;#[command(version = &amp;#34;0.1.0&amp;#34;)]&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;#[command(about = &amp;#34;BIP-64MOD &#43; GCC Threshold Signature Tool&amp;#34;, long_about = None)]&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;struct Cli {&lt;br/&gt;    #[command(subcommand)]&lt;br/&gt;    command: Commands,&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;#[derive(Subcommand)]&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;enum Commands {&lt;br/&gt;    /// Step 1: Generate a new T-of-N key set (Dealer Mode)&lt;br/&gt;    Keygen {&lt;br/&gt;        #[arg(long, default_value_t = 2)]&lt;br/&gt;        threshold: u16,&lt;br/&gt;        #[arg(long, default_value_t = 3)]&lt;br/&gt;        total: u16,&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        output_dir: Option&amp;lt;PathBuf&amp;gt;,&lt;br/&gt;    },&lt;br/&gt;    /// Step 2: Generate a batch of public/private nonces&lt;br/&gt;    Batch {&lt;br/&gt;        #[arg(short, long, default_value_t = 10)]&lt;br/&gt;        count: u16,&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        key: PathBuf,&lt;br/&gt;    },&lt;br/&gt;    /// Step 3: Sign a message hash using a vaulted nonce index&lt;br/&gt;    Sign {&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        message: String,&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        index: u64,&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        key: PathBuf,&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        vault: PathBuf,&lt;br/&gt;    },&lt;br/&gt;    /// Step 4: Aggregate shares into a final BIP-340 signature&lt;br/&gt;    Aggregate {&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        message: String,&lt;br/&gt;        #[arg(required = true)]&lt;br/&gt;        shares: Vec&amp;lt;String&amp;gt;,&lt;br/&gt;    },&lt;br/&gt;    /// Step 5: Verify a BIP-340 signature against the group public key&lt;br/&gt;    Verify {&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        message: String,&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        signature: String,&lt;br/&gt;        #[arg(short, long)]&lt;br/&gt;        public_key: PathBuf,&lt;br/&gt;    },&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;type NonceMap = BTreeMap&amp;lt;u32, SigningNonces&amp;gt;;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;type CommitmentMap = BTreeMap&amp;lt;u32, SigningCommitments&amp;gt;;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    let cli = Cli::parse();&lt;br/&gt;&lt;br/&gt;    match &amp;amp;cli.command {&lt;br/&gt;        Commands::Keygen { threshold, total, output_dir } =&amp;gt; {&lt;br/&gt;            println!(&amp;#34;🛠️  Executing Keygen: {}-of-{}...&amp;#34;, threshold, total);&lt;br/&gt;            let mut rng = ChaCha20Rng::from_entropy(); &lt;br/&gt;            let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;                *total, *threshold, IdentifierList::Default, &amp;amp;mut rng&lt;br/&gt;            )?;&lt;br/&gt;&lt;br/&gt;            let path = output_dir.as_deref().unwrap_or(std::path::Path::new(&amp;#34;.&amp;#34;));&lt;br/&gt;            let pub_path = path.join(&amp;#34;group_public.json&amp;#34;);&lt;br/&gt;            fs::write(&amp;amp;pub_path, serde_json::to_string_pretty(&amp;amp;pubkey_package)?)?;&lt;br/&gt;            println!(&amp;#34;✅ Saved Group Public Key to {:?}&amp;#34;, pub_path);&lt;br/&gt;&lt;br/&gt;            for (id, share) in shares {&lt;br/&gt;                let key_pkg = frost::keys::KeyPackage::new(&lt;br/&gt;                    id,&lt;br/&gt;                    *share.signing_share(),&lt;br/&gt;                    frost::keys::VerifyingShare::from(*share.signing_share()),&lt;br/&gt;                    *pubkey_package.verifying_key(),&lt;br/&gt;                    *threshold,&lt;br/&gt;                );&lt;br/&gt;                let id_hex = hex::encode(id.serialize());&lt;br/&gt;                let file_name = format!(&amp;#34;p{}_key.json&amp;#34;, id_hex);&lt;br/&gt;                fs::write(path.join(file_name), serde_json::to_string_pretty(&amp;amp;key_pkg)?)?;&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        Commands::Batch { count, key } =&amp;gt; {&lt;br/&gt;            println!(&amp;#34;📦 Executing Batch...&amp;#34;);&lt;br/&gt;            let key_pkg: frost::keys::KeyPackage = serde_json::from_str(&amp;amp;fs::read_to_string(key)?)?;&lt;br/&gt;            let mut rng = ChaCha20Rng::from_entropy();&lt;br/&gt;            let mut public_commitments = CommitmentMap::new();&lt;br/&gt;            let mut secret_nonce_vault = NonceMap::new();&lt;br/&gt;            &lt;br/&gt;            for i in 0..*count {&lt;br/&gt;                let (nonces, commitments) = round1::commit(key_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;                public_commitments.insert(i as u32, commitments);&lt;br/&gt;                secret_nonce_vault.insert(i as u32, nonces);&lt;br/&gt;            }&lt;br/&gt;&lt;br/&gt;            let id_hex = hex::encode(key_pkg.identifier().serialize());&lt;br/&gt;            fs::write(format!(&amp;#34;p{}_vault.json&amp;#34;, id_hex), serde_json::to_string(&amp;amp;secret_nonce_vault)?)?;&lt;br/&gt;            fs::write(format!(&amp;#34;p{}_public_comms.json&amp;#34;, id_hex), serde_json::to_string(&amp;amp;public_commitments)?)?;&lt;br/&gt;            println!(&amp;#34;✅ Nonces and Commitments saved for ID {}&amp;#34;, id_hex);&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        Commands::Sign { message, index, key, vault } =&amp;gt; {&lt;br/&gt;            println!(&amp;#34;✍️  Executing Sign: Index #{}...&amp;#34;, index);&lt;br/&gt;            let key_pkg: frost::keys::KeyPackage = serde_json::from_str(&amp;amp;fs::read_to_string(key)?)?;&lt;br/&gt;            let mut vault_data: NonceMap = serde_json::from_str(&amp;amp;fs::read_to_string(vault)?)?;&lt;br/&gt;            let signing_nonces = vault_data.remove(&amp;amp;(*index as u32)).ok_or(&amp;#34;Nonce not found!&amp;#34;)?;&lt;br/&gt;            fs::write(vault, serde_json::to_string(&amp;amp;vault_data)?)?;&lt;br/&gt;&lt;br/&gt;            let mut commitments_map = BTreeMap::new();&lt;br/&gt;            commitments_map.insert(*key_pkg.identifier(), *signing_nonces.commitments());&lt;br/&gt;&lt;br/&gt;            // Discovery logic for peers&lt;br/&gt;            for entry in fs::read_dir(&amp;#34;.&amp;#34;)? {&lt;br/&gt;                let path = entry?.path();&lt;br/&gt;                let fname = path.file_name().unwrap().to_str().unwrap();&lt;br/&gt;                if fname.starts_with(&amp;#39;p&amp;#39;) &amp;amp;&amp;amp; fname.contains(&amp;#34;_public_comms.json&amp;#34;) {&lt;br/&gt;                    let id_hex = fname.strip_prefix(&amp;#39;p&amp;#39;).unwrap().strip_suffix(&amp;#34;_public_comms.json&amp;#34;).unwrap();&lt;br/&gt;                    let peer_id: frost::Identifier = serde_json::from_str(&amp;amp;format!(&amp;#34;\&amp;#34;{}\&amp;#34;&amp;#34;, id_hex))?;&lt;br/&gt;                    if peer_id != *key_pkg.identifier() {&lt;br/&gt;                        let peer_comms: CommitmentMap = serde_json::from_str(&amp;amp;fs::read_to_string(&amp;amp;path)?)?;&lt;br/&gt;                        if let Some(c) = peer_comms.get(&amp;amp;(*index as u32)) {&lt;br/&gt;                            commitments_map.insert(peer_id, *c);&lt;br/&gt;                        }&lt;br/&gt;                    }&lt;br/&gt;                }&lt;br/&gt;            }&lt;br/&gt;&lt;br/&gt;            let signing_package = frost::SigningPackage::new(commitments_map, message.as_bytes());&lt;br/&gt;            let share = frost::round2::sign(&amp;amp;signing_package, &amp;amp;signing_nonces, &amp;amp;key_pkg)?;&lt;br/&gt;            let share_file = format!(&amp;#34;p{}_share.json&amp;#34;, hex::encode(key_pkg.identifier().serialize()));&lt;br/&gt;            fs::write(&amp;amp;share_file, serde_json::to_string(&amp;amp;share)?)?;&lt;br/&gt;            println!(&amp;#34;✅ Share saved to {}&amp;#34;, share_file);&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        Commands::Aggregate { message, shares } =&amp;gt; {&lt;br/&gt;            println!(&amp;#34;🧬 Executing Aggregate...&amp;#34;);&lt;br/&gt;            let pubkey_package: frost::keys::PublicKeyPackage = serde_json::from_str(&amp;amp;fs::read_to_string(&amp;#34;group_public.json&amp;#34;)?)?;&lt;br/&gt;            let mut commitments_map = BTreeMap::new();&lt;br/&gt;            let mut signature_shares = BTreeMap::new();&lt;br/&gt;&lt;br/&gt;            for share_path in shares {&lt;br/&gt;                let share: frost::round2::SignatureShare = serde_json::from_str(&amp;amp;fs::read_to_string(share_path)?)?;&lt;br/&gt;                let fname = std::path::Path::new(share_path).file_name().unwrap().to_str().unwrap();&lt;br/&gt;                let id_hex = fname.strip_prefix(&amp;#39;p&amp;#39;).unwrap().strip_suffix(&amp;#34;_share.json&amp;#34;).unwrap();&lt;br/&gt;                let peer_id: frost::Identifier = serde_json::from_str(&amp;amp;format!(&amp;#34;\&amp;#34;{}\&amp;#34;&amp;#34;, id_hex))?;&lt;br/&gt;&lt;br/&gt;                let comms_file = format!(&amp;#34;p{}_public_comms.json&amp;#34;, id_hex);&lt;br/&gt;                let peer_comms: CommitmentMap = serde_json::from_str(&amp;amp;fs::read_to_string(comms_file)?)?;&lt;br/&gt;                commitments_map.insert(peer_id, *peer_comms.get(&amp;amp;0).unwrap());&lt;br/&gt;                signature_shares.insert(peer_id, share);&lt;br/&gt;            }&lt;br/&gt;&lt;br/&gt;            let signing_package = frost::SigningPackage::new(commitments_map, message.as_bytes());&lt;br/&gt;            let group_sig = frost::aggregate(&amp;amp;signing_package, &amp;amp;signature_shares, &amp;amp;pubkey_package)?;&lt;br/&gt;            let sig_hex = hex::encode(group_sig.serialize()?);&lt;br/&gt;            println!(&amp;#34;✅ Aggregation Successful!\nFinal BIP-340 Signature: {}&amp;#34;, sig_hex);&lt;br/&gt;            fs::write(&amp;#34;final_signature.json&amp;#34;, serde_json::to_string(&amp;amp;group_sig)?)?;&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        Commands::Verify { message, signature, public_key } =&amp;gt; {&lt;br/&gt;            println!(&amp;#34;🔍 Executing Verify...&amp;#34;);&lt;br/&gt;            let pubkey_package: frost::keys::PublicKeyPackage = serde_json::from_str(&amp;amp;fs::read_to_string(public_key)?)?;&lt;br/&gt;            let sig_bytes = hex::decode(signature)?;&lt;br/&gt;            let group_sig = frost::Signature::deserialize(&amp;amp;sig_bytes)?;&lt;br/&gt;&lt;br/&gt;            match pubkey_package.verifying_key().verify(message.as_bytes(), &amp;amp;group_sig) {&lt;br/&gt;                Ok(_) =&amp;gt; println!(&amp;#34;✅ SUCCESS: The signature is VALID!&amp;#34;),&lt;br/&gt;                Err(_) =&amp;gt; println!(&amp;#34;❌ FAILURE: Invalid signature.&amp;#34;),&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:21Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsg69udtz436zztmfcpvmd0dmek7p2g9x5ajxc8te2kqrnz8ewta6cpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx7lntnc</id>
    
      <title type="html">GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsg69udtz436zztmfcpvmd0dmek7p2g9x5ajxc8te2kqrnz8ewta6cpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx7lntnc" />
    <content type="html">
                          GNU AFFERO GENERAL PUBLIC LICENSE&lt;br/&gt;                       Version 3, 19 November 2007&lt;br/&gt;&lt;br/&gt; Copyright (C) 2007 Free Software Foundation, Inc. &amp;lt;&lt;a href=&#34;https://fsf.org/&amp;gt&#34;&gt;https://fsf.org/&amp;gt&lt;/a&gt;;&lt;br/&gt; Everyone is permitted to copy and distribute verbatim copies&lt;br/&gt; of this license document, but changing it is not allowed.&lt;br/&gt;&lt;br/&gt;                            Preamble&lt;br/&gt;&lt;br/&gt;  The GNU Affero General Public License is a free, copyleft license for&lt;br/&gt;software and other kinds of works, specifically designed to ensure&lt;br/&gt;cooperation with the community in the case of network server software.&lt;br/&gt;&lt;br/&gt;  The licenses for most software and other practical works are designed&lt;br/&gt;to take away your freedom to share and change the works.  By contrast,&lt;br/&gt;our General Public Licenses are intended to guarantee your freedom to&lt;br/&gt;share and change all versions of a program--to make sure it remains free&lt;br/&gt;software for all its users.&lt;br/&gt;&lt;br/&gt;  When we speak of free software, we are referring to freedom, not&lt;br/&gt;price.  Our General Public Licenses are designed to make sure that you&lt;br/&gt;have the freedom to distribute copies of free software (and charge for&lt;br/&gt;them if you wish), that you receive source code or can get it if you&lt;br/&gt;want it, that you can change the software or use pieces of it in new&lt;br/&gt;free programs, and that you know you can do these things.&lt;br/&gt;&lt;br/&gt;  Developers that use our General Public Licenses protect your rights&lt;br/&gt;with two steps: (1) assert copyright on the software, and (2) offer&lt;br/&gt;you this License which gives you legal permission to copy, distribute&lt;br/&gt;and/or modify the software.&lt;br/&gt;&lt;br/&gt;  A secondary benefit of defending all users&amp;#39; freedom is that&lt;br/&gt;improvements made in alternate versions of the program, if they&lt;br/&gt;receive widespread use, become available for other developers to&lt;br/&gt;incorporate.  Many developers of free software are heartened and&lt;br/&gt;encouraged by the resulting cooperation.  However, in the case of&lt;br/&gt;software used on network servers, this result may fail to come about.&lt;br/&gt;The GNU General Public License permits making a modified version and&lt;br/&gt;letting the public access it on a server without ever releasing its&lt;br/&gt;source code to the public.&lt;br/&gt;&lt;br/&gt;  The GNU Affero General Public License is designed specifically to&lt;br/&gt;ensure that, in such cases, the modified source code becomes available&lt;br/&gt;to the community.  It requires the operator of a network server to&lt;br/&gt;provide the source code of the modified version running there to the&lt;br/&gt;users of that server.  Therefore, public use of a modified version, on&lt;br/&gt;a publicly accessible server, gives the public access to the source&lt;br/&gt;code of the modified version.&lt;br/&gt;&lt;br/&gt;  An older license, called the Affero General Public License and&lt;br/&gt;published by Affero, was designed to accomplish similar goals.  This is&lt;br/&gt;a different license, not a version of the Affero GPL, but Affero has&lt;br/&gt;released a new version of the Affero GPL which permits relicensing under&lt;br/&gt;this license.&lt;br/&gt;&lt;br/&gt;  The precise terms and conditions for copying, distribution and&lt;br/&gt;modification follow.&lt;br/&gt;&lt;br/&gt;                       TERMS AND CONDITIONS&lt;br/&gt;&lt;br/&gt;  0. Definitions.&lt;br/&gt;&lt;br/&gt;  &amp;#34;This License&amp;#34; refers to version 3 of the GNU Affero General Public License.&lt;br/&gt;&lt;br/&gt;  &amp;#34;Copyright&amp;#34; also means copyright-like laws that apply to other kinds of&lt;br/&gt;works, such as semiconductor masks.&lt;br/&gt;&lt;br/&gt;  &amp;#34;The Program&amp;#34; refers to any copyrightable work licensed under this&lt;br/&gt;License.  Each licensee is addressed as &amp;#34;you&amp;#34;.  &amp;#34;Licensees&amp;#34; and&lt;br/&gt;&amp;#34;recipients&amp;#34; may be individuals or organizations.&lt;br/&gt;&lt;br/&gt;  To &amp;#34;modify&amp;#34; a work means to copy from or adapt all or part of the work&lt;br/&gt;in a fashion requiring copyright permission, other than the making of an&lt;br/&gt;exact copy.  The resulting work is called a &amp;#34;modified version&amp;#34; of the&lt;br/&gt;earlier work or a work &amp;#34;based on&amp;#34; the earlier work.&lt;br/&gt;&lt;br/&gt;  A &amp;#34;covered work&amp;#34; means either the unmodified Program or a work based&lt;br/&gt;on the Program.&lt;br/&gt;&lt;br/&gt;  To &amp;#34;propagate&amp;#34; a work means to do anything with it that, without&lt;br/&gt;permission, would make you directly or secondarily liable for&lt;br/&gt;infringement under applicable copyright law, except executing it on a&lt;br/&gt;computer or modifying a private copy.  Propagation includes copying,&lt;br/&gt;distribution (with or without modification), making available to the&lt;br/&gt;public, and in some countries other activities as well.&lt;br/&gt;&lt;br/&gt;  To &amp;#34;convey&amp;#34; a work means any kind of propagation that enables other&lt;br/&gt;parties to make or receive copies.  Mere interaction with a user through&lt;br/&gt;a computer network, with no transfer of a copy, is not conveying.&lt;br/&gt;&lt;br/&gt;  An interactive user interface displays &amp;#34;Appropriate Legal Notices&amp;#34;&lt;br/&gt;to the extent that it includes a convenient and prominently visible&lt;br/&gt;feature that (1) displays an appropriate copyright notice, and (2)&lt;br/&gt;tells the user that there is no warranty for the work (except to the&lt;br/&gt;extent that warranties are provided), that licensees may convey the&lt;br/&gt;work under this License, and how to view a copy of this License.  If&lt;br/&gt;the interface presents a list of user commands or options, such as a&lt;br/&gt;menu, a prominent item in the list meets this criterion.&lt;br/&gt;&lt;br/&gt;  1. Source Code.&lt;br/&gt;&lt;br/&gt;  The &amp;#34;source code&amp;#34; for a work means the preferred form of the work&lt;br/&gt;for making modifications to it.  &amp;#34;Object code&amp;#34; means any non-source&lt;br/&gt;form of a work.&lt;br/&gt;&lt;br/&gt;  A &amp;#34;Standard Interface&amp;#34; means an interface that either is an official&lt;br/&gt;standard defined by a recognized standards body, or, in the case of&lt;br/&gt;interfaces specified for a particular programming language, one that&lt;br/&gt;is widely used among developers working in that language.&lt;br/&gt;&lt;br/&gt;  The &amp;#34;System Libraries&amp;#34; of an executable work include anything, other&lt;br/&gt;than the work as a whole, that (a) is included in the normal form of&lt;br/&gt;packaging a Major Component, but which is not part of that Major&lt;br/&gt;Component, and (b) serves only to enable use of the work with that&lt;br/&gt;Major Component, or to implement a Standard Interface for which an&lt;br/&gt;implementation is available to the public in source code form.  A&lt;br/&gt;&amp;#34;Major Component&amp;#34;, in this context, means a major essential component&lt;br/&gt;(kernel, window system, and so on) of the specific operating system&lt;br/&gt;(if any) on which the executable work runs, or a compiler used to&lt;br/&gt;produce the work, or an object code interpreter used to run it.&lt;br/&gt;&lt;br/&gt;  The &amp;#34;Corresponding Source&amp;#34; for a work in object code form means all&lt;br/&gt;the source code needed to generate, install, and (for an executable&lt;br/&gt;work) run the object code and to modify the work, including scripts to&lt;br/&gt;control those activities.  However, it does not include the work&amp;#39;s&lt;br/&gt;System Libraries, or general-purpose tools or generally available free&lt;br/&gt;programs which are used unmodified in performing those activities but&lt;br/&gt;which are not part of the work.  For example, Corresponding Source&lt;br/&gt;includes interface definition files associated with source files for&lt;br/&gt;the work, and the source code for shared libraries and dynamically&lt;br/&gt;linked subprograms that the work is specifically designed to require,&lt;br/&gt;such as by intimate data communication or control flow between those&lt;br/&gt;subprograms and other parts of the work.&lt;br/&gt;&lt;br/&gt;  The Corresponding Source need not include anything that users&lt;br/&gt;can regenerate automatically from other parts of the Corresponding&lt;br/&gt;Source.&lt;br/&gt;&lt;br/&gt;  The Corresponding Source for a work in source code form is that&lt;br/&gt;same work.&lt;br/&gt;&lt;br/&gt;  2. Basic Permissions.&lt;br/&gt;&lt;br/&gt;  All rights granted under this License are granted for the term of&lt;br/&gt;copyright on the Program, and are irrevocable provided the stated&lt;br/&gt;conditions are met.  This License explicitly affirms your unlimited&lt;br/&gt;permission to run the unmodified Program.  The output from running a&lt;br/&gt;covered work is covered by this License only if the output, given its&lt;br/&gt;content, constitutes a covered work.  This License acknowledges your&lt;br/&gt;rights of fair use or other equivalent, as provided by copyright law.&lt;br/&gt;&lt;br/&gt;  You may make, run and propagate covered works that you do not&lt;br/&gt;convey, without conditions so long as your license otherwise remains&lt;br/&gt;in force.  You may convey covered works to others for the sole purpose&lt;br/&gt;of having them make modifications exclusively for you, or provide you&lt;br/&gt;with facilities for running those works, provided that you comply with&lt;br/&gt;the terms of this License in conveying all material for which you do&lt;br/&gt;not control copyright.  Those thus making or running the covered works&lt;br/&gt;for you must do so exclusively on your behalf, under your direction&lt;br/&gt;and control, on terms that prohibit them from making any copies of&lt;br/&gt;your copyrighted material outside their relationship with you.&lt;br/&gt;&lt;br/&gt;  Conveying under any other circumstances is permitted solely under&lt;br/&gt;the conditions stated below.  Sublicensing is not allowed; section 10&lt;br/&gt;makes it unnecessary.&lt;br/&gt;&lt;br/&gt;  3. Protecting Users&amp;#39; Legal Rights From Anti-Circumvention Law.&lt;br/&gt;&lt;br/&gt;  No covered work shall be deemed part of an effective technological&lt;br/&gt;measure under any applicable law fulfilling obligations under article&lt;br/&gt;11 of the WIPO copyright treaty adopted on 20 December 1996, or&lt;br/&gt;similar laws prohibiting or restricting circumvention of such&lt;br/&gt;measures.&lt;br/&gt;&lt;br/&gt;  When you convey a covered work, you waive any legal power to forbid&lt;br/&gt;circumvention of technological measures to the extent such circumvention&lt;br/&gt;is effected by exercising rights under this License with respect to&lt;br/&gt;the covered work, and you disclaim any intention to limit operation or&lt;br/&gt;modification of the work as a means of enforcing, against the work&amp;#39;s&lt;br/&gt;users, your or third parties&amp;#39; legal rights to forbid circumvention of&lt;br/&gt;technological measures.&lt;br/&gt;&lt;br/&gt;  4. Conveying Verbatim Copies.&lt;br/&gt;&lt;br/&gt;  You may convey verbatim copies of the Program&amp;#39;s source code as you&lt;br/&gt;receive it, in any medium, provided that you conspicuously and&lt;br/&gt;appropriately publish on each copy an appropriate copyright notice;&lt;br/&gt;keep intact all notices stating that this License and any&lt;br/&gt;non-permissive terms added in accord with section 7 apply to the code;&lt;br/&gt;keep intact all notices of the absence of any warranty; and give all&lt;br/&gt;recipients a copy of this License along with the Program.&lt;br/&gt;&lt;br/&gt;  You may charge any price or no price for each copy that you convey,&lt;br/&gt;and you may offer support or warranty protection for a fee.&lt;br/&gt;&lt;br/&gt;  5. Conveying Modified Source Versions.&lt;br/&gt;&lt;br/&gt;  You may convey a work based on the Program, or the modifications to&lt;br/&gt;produce it from the Program, in the form of source code under the&lt;br/&gt;terms of section 4, provided that you also meet all of these conditions:&lt;br/&gt;&lt;br/&gt;    a) The work must carry prominent notices stating that you modified&lt;br/&gt;    it, and giving a relevant date.&lt;br/&gt;&lt;br/&gt;    b) The work must carry prominent notices stating that it is&lt;br/&gt;    released under this License and any conditions added under section&lt;br/&gt;    7.  This requirement modifies the requirement in section 4 to&lt;br/&gt;    &amp;#34;keep intact all notices&amp;#34;.&lt;br/&gt;&lt;br/&gt;    c) You must license the entire work, as a whole, under this&lt;br/&gt;    License to anyone who comes into possession of a copy.  This&lt;br/&gt;    License will therefore apply, along with any applicable section 7&lt;br/&gt;    additional terms, to the whole of the work, and all its parts,&lt;br/&gt;    regardless of how they are packaged.  This License gives no&lt;br/&gt;    permission to license the work in any other way, but it does not&lt;br/&gt;    invalidate such permission if you have separately received it.&lt;br/&gt;&lt;br/&gt;    d) If the work has interactive user interfaces, each must display&lt;br/&gt;    Appropriate Legal Notices; however, if the Program has interactive&lt;br/&gt;    interfaces that do not display Appropriate Legal Notices, your&lt;br/&gt;    work need not make them do so.&lt;br/&gt;&lt;br/&gt;  A compilation of a covered work with other separate and independent&lt;br/&gt;works, which are not by their nature extensions of the covered work,&lt;br/&gt;and which are not combined with it such as to form a larger program,&lt;br/&gt;in or on a volume of a storage or distribution medium, is called an&lt;br/&gt;&amp;#34;aggregate&amp;#34; if the compilation and its resulting copyright are not&lt;br/&gt;used to limit the access or legal rights of the compilation&amp;#39;s users&lt;br/&gt;beyond what the individual works permit.  Inclusion of a covered work&lt;br/&gt;in an aggregate does not cause this License to apply to the other&lt;br/&gt;parts of the aggregate.&lt;br/&gt;&lt;br/&gt;  6. Conveying Non-Source Forms.&lt;br/&gt;&lt;br/&gt;  You may convey a covered work in object code form under the terms&lt;br/&gt;of sections 4 and 5, provided that you also convey the&lt;br/&gt;machine-readable Corresponding Source under the terms of this License,&lt;br/&gt;in one of these ways:&lt;br/&gt;&lt;br/&gt;    a) Convey the object code in, or embodied in, a physical product&lt;br/&gt;    (including a physical distribution medium), accompanied by the&lt;br/&gt;    Corresponding Source fixed on a durable physical medium&lt;br/&gt;    customarily used for software interchange.&lt;br/&gt;&lt;br/&gt;    b) Convey the object code in, or embodied in, a physical product&lt;br/&gt;    (including a physical distribution medium), accompanied by a&lt;br/&gt;    written offer, valid for at least three years and valid for as&lt;br/&gt;    long as you offer spare parts or customer support for that product&lt;br/&gt;    model, to give anyone who possesses the object code either (1) a&lt;br/&gt;    copy of the Corresponding Source for all the software in the&lt;br/&gt;    product that is covered by this License, on a durable physical&lt;br/&gt;    medium customarily used for software interchange, for a price no&lt;br/&gt;    more than your reasonable cost of physically performing this&lt;br/&gt;    conveying of source, or (2) access to copy the&lt;br/&gt;    Corresponding Source from a network server at no charge.&lt;br/&gt;&lt;br/&gt;    c) Convey individual copies of the object code with a copy of the&lt;br/&gt;    written offer to provide the Corresponding Source.  This&lt;br/&gt;    alternative is allowed only occasionally and noncommercially, and&lt;br/&gt;    only if you received the object code with such an offer, in accord&lt;br/&gt;    with subsection 6b.&lt;br/&gt;&lt;br/&gt;    d) Convey the object code by offering access from a designated&lt;br/&gt;    place (gratis or for a charge), and offer equivalent access to the&lt;br/&gt;    Corresponding Source in the same way through the same place at no&lt;br/&gt;    further charge.  You need not require recipients to copy the&lt;br/&gt;    Corresponding Source along with the object code.  If the place to&lt;br/&gt;    copy the object code is a network server, the Corresponding Source&lt;br/&gt;    may be on a different server (operated by you or a third party)&lt;br/&gt;    that supports equivalent copying facilities, provided you maintain&lt;br/&gt;    clear directions next to the object code saying where to find the&lt;br/&gt;    Corresponding Source.  Regardless of what server hosts the&lt;br/&gt;    Corresponding Source, you remain obligated to ensure that it is&lt;br/&gt;    available for as long as needed to satisfy these requirements.&lt;br/&gt;&lt;br/&gt;    e) Convey the object code using peer-to-peer transmission, provided&lt;br/&gt;    you inform other peers where the object code and Corresponding&lt;br/&gt;    Source of the work are being offered to the general public at no&lt;br/&gt;    charge under subsection 6d.&lt;br/&gt;&lt;br/&gt;  A separable portion of the object code, whose source code is excluded&lt;br/&gt;from the Corresponding Source as a System Library, need not be&lt;br/&gt;included in conveying the object code work.&lt;br/&gt;&lt;br/&gt;  A &amp;#34;User Product&amp;#34; is either (1) a &amp;#34;consumer product&amp;#34;, which means any&lt;br/&gt;tangible personal property which is normally used for personal, family,&lt;br/&gt;or household purposes, or (2) anything designed or sold for incorporation&lt;br/&gt;into a dwelling.  In determining whether a product is a consumer product,&lt;br/&gt;doubtful cases shall be resolved in favor of coverage.  For a particular&lt;br/&gt;product received by a particular user, &amp;#34;normally used&amp;#34; refers to a&lt;br/&gt;typical or common use of that class of product, regardless of the status&lt;br/&gt;of the particular user or of the way in which the particular user&lt;br/&gt;actually uses, or expects or is expected to use, the product.  A product&lt;br/&gt;is a consumer product regardless of whether the product has substantial&lt;br/&gt;commercial, industrial or non-consumer uses, unless such uses represent&lt;br/&gt;the only significant mode of use of the product.&lt;br/&gt;&lt;br/&gt;  &amp;#34;Installation Information&amp;#34; for a User Product means any methods,&lt;br/&gt;procedures, authorization keys, or other information required to install&lt;br/&gt;and execute modified versions of a covered work in that User Product from&lt;br/&gt;a modified version of its Corresponding Source.  The information must&lt;br/&gt;suffice to ensure that the continued functioning of the modified object&lt;br/&gt;code is in no case prevented or interfered with solely because&lt;br/&gt;modification has been made.&lt;br/&gt;&lt;br/&gt;  If you convey an object code work under this section in, or with, or&lt;br/&gt;specifically for use in, a User Product, and the conveying occurs as&lt;br/&gt;part of a transaction in which the right of possession and use of the&lt;br/&gt;User Product is transferred to the recipient in perpetuity or for a&lt;br/&gt;fixed term (regardless of how the transaction is characterized), the&lt;br/&gt;Corresponding Source conveyed under this section must be accompanied&lt;br/&gt;by the Installation Information.  But this requirement does not apply&lt;br/&gt;if neither you nor any third party retains the ability to install&lt;br/&gt;modified object code on the User Product (for example, the work has&lt;br/&gt;been installed in ROM).&lt;br/&gt;&lt;br/&gt;  The requirement to provide Installation Information does not include a&lt;br/&gt;requirement to continue to provide support service, warranty, or updates&lt;br/&gt;for a work that has been modified or installed by the recipient, or for&lt;br/&gt;the User Product in which it has been modified or installed.  Access to a&lt;br/&gt;network may be denied when the modification itself materially and&lt;br/&gt;adversely affects the operation of the network or violates the rules and&lt;br/&gt;protocols for communication across the network.&lt;br/&gt;&lt;br/&gt;  Corresponding Source conveyed, and Installation Information provided,&lt;br/&gt;in accord with this section must be in a format that is publicly&lt;br/&gt;documented (and with an implementation available to the public in&lt;br/&gt;source code form), and must require no special password or key for&lt;br/&gt;unpacking, reading or copying.&lt;br/&gt;&lt;br/&gt;  7. Additional Terms.&lt;br/&gt;&lt;br/&gt;  &amp;#34;Additional permissions&amp;#34; are terms that supplement the terms of this&lt;br/&gt;License by making exceptions from one or more of its conditions.&lt;br/&gt;Additional permissions that are applicable to the entire Program shall&lt;br/&gt;be treated as though they were included in this License, to the extent&lt;br/&gt;that they are valid under applicable law.  If additional permissions&lt;br/&gt;apply only to part of the Program, that part may be used separately&lt;br/&gt;under those permissions, but the entire Program remains governed by&lt;br/&gt;this License without regard to the additional permissions.&lt;br/&gt;&lt;br/&gt;  When you convey a copy of a covered work, you may at your option&lt;br/&gt;remove any additional permissions from that copy, or from any part of&lt;br/&gt;it.  (Additional permissions may be written to require their own&lt;br/&gt;removal in certain cases when you modify the work.)  You may place&lt;br/&gt;additional permissions on material, added by you to a covered work,&lt;br/&gt;for which you have or can give appropriate copyright permission.&lt;br/&gt;&lt;br/&gt;  Notwithstanding any other provision of this License, for material you&lt;br/&gt;add to a covered work, you may (if authorized by the copyright holders of&lt;br/&gt;that material) supplement the terms of this License with terms:&lt;br/&gt;&lt;br/&gt;    a) Disclaiming warranty or limiting liability differently from the&lt;br/&gt;    terms of sections 15 and 16 of this License; or&lt;br/&gt;&lt;br/&gt;    b) Requiring preservation of specified reasonable legal notices or&lt;br/&gt;    author attributions in that material or in the Appropriate Legal&lt;br/&gt;    Notices displayed by works containing it; or&lt;br/&gt;&lt;br/&gt;    c) Prohibiting misrepresentation of the origin of that material, or&lt;br/&gt;    requiring that modified versions of such material be marked in&lt;br/&gt;    reasonable ways as different from the original version; or&lt;br/&gt;&lt;br/&gt;    d) Limiting the use for publicity purposes of names of licensors or&lt;br/&gt;    authors of the material; or&lt;br/&gt;&lt;br/&gt;    e) Declining to grant rights under trademark law for use of some&lt;br/&gt;    trade names, trademarks, or service marks; or&lt;br/&gt;&lt;br/&gt;    f) Requiring indemnification of licensors and authors of that&lt;br/&gt;    material by anyone who conveys the material (or modified versions of&lt;br/&gt;    it) with contractual assumptions of liability to the recipient, for&lt;br/&gt;    any liability that these contractual assumptions directly impose on&lt;br/&gt;    those licensors and authors.&lt;br/&gt;&lt;br/&gt;  All other non-permissive additional terms are considered &amp;#34;further&lt;br/&gt;restrictions&amp;#34; within the meaning of section 10.  If the Program as you&lt;br/&gt;received it, or any part of it, contains a notice stating that it is&lt;br/&gt;governed by this License along with a term that is a further&lt;br/&gt;restriction, you may remove that term.  If a license document contains&lt;br/&gt;a further restriction but permits relicensing or conveying under this&lt;br/&gt;License, you may add to a covered work material governed by the terms&lt;br/&gt;of that license document, provided that the further restriction does&lt;br/&gt;not survive such relicensing or conveying.&lt;br/&gt;&lt;br/&gt;  If you add terms to a covered work in accord with this section, you&lt;br/&gt;must place, in the relevant source files, a statement of the&lt;br/&gt;additional terms that apply to those files, or a notice indicating&lt;br/&gt;where to find the applicable terms.&lt;br/&gt;&lt;br/&gt;  Additional terms, permissive or non-permissive, may be stated in the&lt;br/&gt;form of a separately written license, or stated as exceptions;&lt;br/&gt;the above requirements apply either way.&lt;br/&gt;&lt;br/&gt;  8. Termination.&lt;br/&gt;&lt;br/&gt;  You may not propagate or modify a covered work except as expressly&lt;br/&gt;provided under this License.  Any attempt otherwise to propagate or&lt;br/&gt;modify it is void, and will automatically terminate your rights under&lt;br/&gt;this License (including any patent licenses granted under the third&lt;br/&gt;paragraph of section 11).&lt;br/&gt;&lt;br/&gt;  However, if you cease all violation of this License, then your&lt;br/&gt;license from a particular copyright holder is reinstated (a)&lt;br/&gt;provisionally, unless and until the copyright holder explicitly and&lt;br/&gt;finally terminates your license, and (b) permanently, if the copyright&lt;br/&gt;holder fails to notify you of the violation by some reasonable means&lt;br/&gt;prior to 60 days after the cessation.&lt;br/&gt;&lt;br/&gt;  Moreover, your license from a particular copyright holder is&lt;br/&gt;reinstated permanently if the copyright holder notifies you of the&lt;br/&gt;violation by some reasonable means, this is the first time you have&lt;br/&gt;received notice of violation of this License (for any work) from that&lt;br/&gt;copyright holder, and you cure the violation prior to 30 days after&lt;br/&gt;your receipt of the notice.&lt;br/&gt;&lt;br/&gt;  Termination of your rights under this section does not terminate the&lt;br/&gt;licenses of parties who have received copies or rights from you under&lt;br/&gt;this License.  If your rights have been terminated and not permanently&lt;br/&gt;reinstated, you do not qualify to receive new licenses for the same&lt;br/&gt;material under section 10.&lt;br/&gt;&lt;br/&gt;  9. Acceptance Not Required for Having Copies.&lt;br/&gt;&lt;br/&gt;  You are not required to accept this License in order to receive or&lt;br/&gt;run a copy of the Program.  Ancillary propagation of a covered work&lt;br/&gt;occurring solely as a consequence of using peer-to-peer transmission&lt;br/&gt;to receive a copy likewise does not require acceptance.  However,&lt;br/&gt;nothing other than this License grants you permission to propagate or&lt;br/&gt;modify any covered work.  These actions infringe copyright if you do&lt;br/&gt;not accept this License.  Therefore, by modifying or propagating a&lt;br/&gt;covered work, you indicate your acceptance of this License to do so.&lt;br/&gt;&lt;br/&gt;  10. Automatic Licensing of Downstream Recipients.&lt;br/&gt;&lt;br/&gt;  Each time you convey a covered work, the recipient automatically&lt;br/&gt;receives a license from the original licensors, to run, modify and&lt;br/&gt;propagate that work, subject to this License.  You are not responsible&lt;br/&gt;for enforcing compliance by third parties with this License.&lt;br/&gt;&lt;br/&gt;  An &amp;#34;entity transaction&amp;#34; is a transaction transferring control of an&lt;br/&gt;organization, or substantially all assets of one, or subdividing an&lt;br/&gt;organization, or merging organizations.  If propagation of a covered&lt;br/&gt;work results from an entity transaction, each party to that&lt;br/&gt;transaction who receives a copy of the work also receives whatever&lt;br/&gt;licenses to the work the party&amp;#39;s predecessor in interest had or could&lt;br/&gt;give under the previous paragraph, plus a right to possession of the&lt;br/&gt;Corresponding Source of the work from the predecessor in interest, if&lt;br/&gt;the predecessor has it or can get it with reasonable efforts.&lt;br/&gt;&lt;br/&gt;  You may not impose any further restrictions on the exercise of the&lt;br/&gt;rights granted or affirmed under this License.  For example, you may&lt;br/&gt;not impose a license fee, royalty, or other charge for exercise of&lt;br/&gt;rights granted under this License, and you may not initiate litigation&lt;br/&gt;(including a cross-claim or counterclaim in a lawsuit) alleging that&lt;br/&gt;any patent claim is infringed by making, using, selling, offering for&lt;br/&gt;sale, or importing the Program or any portion of it.&lt;br/&gt;&lt;br/&gt;  11. Patents.&lt;br/&gt;&lt;br/&gt;  A &amp;#34;contributor&amp;#34; is a copyright holder who authorizes use under this&lt;br/&gt;License of the Program or a work on which the Program is based.  The&lt;br/&gt;work thus licensed is called the contributor&amp;#39;s &amp;#34;contributor version&amp;#34;.&lt;br/&gt;&lt;br/&gt;  A contributor&amp;#39;s &amp;#34;essential patent claims&amp;#34; are all patent claims&lt;br/&gt;owned or controlled by the contributor, whether already acquired or&lt;br/&gt;hereafter acquired, that would be infringed by some manner, permitted&lt;br/&gt;by this License, of making, using, or selling its contributor version,&lt;br/&gt;but do not include claims that would be infringed only as a&lt;br/&gt;consequence of further modification of the contributor version.  For&lt;br/&gt;purposes of this definition, &amp;#34;control&amp;#34; includes the right to grant&lt;br/&gt;patent sublicenses in a manner consistent with the requirements of&lt;br/&gt;this License.&lt;br/&gt;&lt;br/&gt;  Each contributor grants you a non-exclusive, worldwide, royalty-free&lt;br/&gt;patent license under the contributor&amp;#39;s essential patent claims, to&lt;br/&gt;make, use, sell, offer for sale, import and otherwise run, modify and&lt;br/&gt;propagate the contents of its contributor version.&lt;br/&gt;&lt;br/&gt;  In the following three paragraphs, a &amp;#34;patent license&amp;#34; is any express&lt;br/&gt;agreement or commitment, however denominated, not to enforce a patent&lt;br/&gt;(such as an express permission to practice a patent or covenant not to&lt;br/&gt;sue for patent infringement).  To &amp;#34;grant&amp;#34; such a patent license to a&lt;br/&gt;party means to make such an agreement or commitment not to enforce a&lt;br/&gt;patent against the party.&lt;br/&gt;&lt;br/&gt;  If you convey a covered work, knowingly relying on a patent license,&lt;br/&gt;and the Corresponding Source of the work is not available for anyone&lt;br/&gt;to copy, free of charge and under the terms of this License, through a&lt;br/&gt;publicly available network server or other readily accessible means,&lt;br/&gt;then you must either (1) cause the Corresponding Source to be so&lt;br/&gt;available, or (2) arrange to deprive yourself of the benefit of the&lt;br/&gt;patent license for this particular work, or (3) arrange, in a manner&lt;br/&gt;consistent with the requirements of this License, to extend the patent&lt;br/&gt;license to downstream recipients.  &amp;#34;Knowingly relying&amp;#34; means you have&lt;br/&gt;actual knowledge that, but for the patent license, your conveying the&lt;br/&gt;covered work in a country, or your recipient&amp;#39;s use of the covered work&lt;br/&gt;in a country, would infringe one or more identifiable patents in that&lt;br/&gt;country that you have reason to believe are valid.&lt;br/&gt;&lt;br/&gt;  If, pursuant to or in connection with a single transaction or&lt;br/&gt;arrangement, you convey, or propagate by procuring conveyance of, a&lt;br/&gt;covered work, and grant a patent license to some of the parties&lt;br/&gt;receiving the covered work authorizing them to use, propagate, modify&lt;br/&gt;or convey a specific copy of the covered work, then the patent license&lt;br/&gt;you grant is automatically extended to all recipients of the covered&lt;br/&gt;work and works based on it.&lt;br/&gt;&lt;br/&gt;  A patent license is &amp;#34;discriminatory&amp;#34; if it does not include within&lt;br/&gt;the scope of its coverage, prohibits the exercise of, or is&lt;br/&gt;conditioned on the non-exercise of one or more of the rights that are&lt;br/&gt;specifically granted under this License.  You may not convey a covered&lt;br/&gt;work if you are a party to an arrangement with a third party that is&lt;br/&gt;in the business of distributing software, under which you make payment&lt;br/&gt;to the third party based on the extent of your activity of conveying&lt;br/&gt;the work, and under which the third party grants, to any of the&lt;br/&gt;parties who would receive the covered work from you, a discriminatory&lt;br/&gt;patent license (a) in connection with copies of the covered work&lt;br/&gt;conveyed by you (or copies made from those copies), or (b) primarily&lt;br/&gt;for and in connection with specific products or compilations that&lt;br/&gt;contain the covered work, unless you entered into that arrangement,&lt;br/&gt;or that patent license was granted, prior to 28 March 2007.&lt;br/&gt;&lt;br/&gt;  Nothing in this License shall be construed as excluding or limiting&lt;br/&gt;any implied license or other defenses to infringement that may&lt;br/&gt;otherwise be available to you under applicable patent law.&lt;br/&gt;&lt;br/&gt;  12. No Surrender of Others&amp;#39; Freedom.&lt;br/&gt;&lt;br/&gt;  If conditions are imposed on you (whether by court order, agreement or&lt;br/&gt;otherwise) that contradict the conditions of this License, they do not&lt;br/&gt;excuse you from the conditions of this License.  If you cannot convey a&lt;br/&gt;covered work so as to satisfy simultaneously your obligations under this&lt;br/&gt;License and any other pertinent obligations, then as a consequence you may&lt;br/&gt;not convey it at all.  For example, if you agree to terms that obligate you&lt;br/&gt;to collect a royalty for further conveying from those to whom you convey&lt;br/&gt;the Program, the only way you could satisfy both those terms and this&lt;br/&gt;License would be to refrain entirely from conveying the Program.&lt;br/&gt;&lt;br/&gt;  13. Remote Network Interaction; Use with the GNU General Public License.&lt;br/&gt;&lt;br/&gt;  Notwithstanding any other provision of this License, if you modify the&lt;br/&gt;Program, your modified version must prominently offer all users&lt;br/&gt;interacting with it remotely through a computer network (if your version&lt;br/&gt;supports such interaction) an opportunity to receive the Corresponding&lt;br/&gt;Source of your version by providing access to the Corresponding Source&lt;br/&gt;from a network server at no charge, through some standard or customary&lt;br/&gt;means of facilitating copying of software.  This Corresponding Source&lt;br/&gt;shall include the Corresponding Source for any work covered by version 3&lt;br/&gt;of the GNU General Public License that is incorporated pursuant to the&lt;br/&gt;following paragraph.&lt;br/&gt;&lt;br/&gt;  Notwithstanding any other provision of this License, you have&lt;br/&gt;permission to link or combine any covered work with a work licensed&lt;br/&gt;under version 3 of the GNU General Public License into a single&lt;br/&gt;combined work, and to convey the resulting work.  The terms of this&lt;br/&gt;License will continue to apply to the part which is the covered work,&lt;br/&gt;but the work with which it is combined will remain governed by version&lt;br/&gt;3 of the GNU General Public License.&lt;br/&gt;&lt;br/&gt;  14. Revised Versions of this License.&lt;br/&gt;&lt;br/&gt;  The Free Software Foundation may publish revised and/or new versions of&lt;br/&gt;the GNU Affero General Public License from time to time.  Such new versions&lt;br/&gt;will be similar in spirit to the present version, but may differ in detail to&lt;br/&gt;address new problems or concerns.&lt;br/&gt;&lt;br/&gt;  Each version is given a distinguishing version number.  If the&lt;br/&gt;Program specifies that a certain numbered version of the GNU Affero General&lt;br/&gt;Public License &amp;#34;or any later version&amp;#34; applies to it, you have the&lt;br/&gt;option of following the terms and conditions either of that numbered&lt;br/&gt;version or of any later version published by the Free Software&lt;br/&gt;Foundation.  If the Program does not specify a version number of the&lt;br/&gt;GNU Affero General Public License, you may choose any version ever published&lt;br/&gt;by the Free Software Foundation.&lt;br/&gt;&lt;br/&gt;  If the Program specifies that a proxy can decide which future&lt;br/&gt;versions of the GNU Affero General Public License can be used, that proxy&amp;#39;s&lt;br/&gt;public statement of acceptance of a version permanently authorizes you&lt;br/&gt;to choose that version for the Program.&lt;br/&gt;&lt;br/&gt;  Later license versions may give you additional or different&lt;br/&gt;permissions.  However, no additional obligations are imposed on any&lt;br/&gt;author or copyright holder as a result of your choosing to follow a&lt;br/&gt;later version.&lt;br/&gt;&lt;br/&gt;  15. Disclaimer of Warranty.&lt;br/&gt;&lt;br/&gt;  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY&lt;br/&gt;APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT&lt;br/&gt;HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM &amp;#34;AS IS&amp;#34; WITHOUT WARRANTY&lt;br/&gt;OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,&lt;br/&gt;THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR&lt;br/&gt;PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM&lt;br/&gt;IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF&lt;br/&gt;ALL NECESSARY SERVICING, REPAIR OR CORRECTION.&lt;br/&gt;&lt;br/&gt;  16. Limitation of Liability.&lt;br/&gt;&lt;br/&gt;  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING&lt;br/&gt;WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS&lt;br/&gt;THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY&lt;br/&gt;GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE&lt;br/&gt;USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF&lt;br/&gt;DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD&lt;br/&gt;PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),&lt;br/&gt;EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF&lt;br/&gt;SUCH DAMAGES.&lt;br/&gt;&lt;br/&gt;  17. Interpretation of Sections 15 and 16.&lt;br/&gt;&lt;br/&gt;  If the disclaimer of warranty and limitation of liability provided&lt;br/&gt;above cannot be given local legal effect according to their terms,&lt;br/&gt;reviewing courts shall apply local law that most closely approximates&lt;br/&gt;an absolute waiver of all civil liability in connection with the&lt;br/&gt;Program, unless a warranty or assumption of liability accompanies a&lt;br/&gt;copy of the Program in return for a fee.&lt;br/&gt;&lt;br/&gt;                     END OF TERMS AND CONDITIONS&lt;br/&gt;&lt;br/&gt;            How to Apply These Terms to Your New Programs&lt;br/&gt;&lt;br/&gt;  If you develop a new program, and you want it to be of the greatest&lt;br/&gt;possible use to the public, the best way to achieve this is to make it&lt;br/&gt;free software which everyone can redistribute and change under these terms.&lt;br/&gt;&lt;br/&gt;  To do so, attach the following notices to the program.  It is safest&lt;br/&gt;to attach them to the start of each source file to most effectively&lt;br/&gt;state the exclusion of warranty; and each file should have at least&lt;br/&gt;the &amp;#34;copyright&amp;#34; line and a pointer to where the full notice is found.&lt;br/&gt;&lt;br/&gt;    &amp;lt;one line to give the program&amp;#39;s name and a brief idea of what it does.&amp;gt;&lt;br/&gt;    Copyright (C) 2023  &amp;lt;name of author&amp;gt;&lt;br/&gt;&lt;br/&gt;    This program is free software: you can redistribute it and/or modify&lt;br/&gt;    it under the terms of the GNU Affero General Public License as published&lt;br/&gt;    by the Free Software Foundation, either version 3 of the License, or&lt;br/&gt;    (at your option) any later version.&lt;br/&gt;&lt;br/&gt;    This program is distributed in the hope that it will be useful,&lt;br/&gt;    but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br/&gt;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&lt;br/&gt;    GNU Affero General Public License for more details.&lt;br/&gt;&lt;br/&gt;    You should have received a copy of the GNU Affero General Public License&lt;br/&gt;    along with this program. If not, see &amp;lt;&lt;a href=&#34;https://www.gnu.org/licenses/&amp;gt&#34;&gt;https://www.gnu.org/licenses/&amp;gt&lt;/a&gt;;.&lt;br/&gt;&lt;br/&gt;Also add information on how to contact you by electronic and paper mail.&lt;br/&gt;&lt;br/&gt;  If your software can interact with users remotely through a computer&lt;br/&gt;network, you should also make sure that it provides a way for users to&lt;br/&gt;get its source.  For example, if your program is a web application, its&lt;br/&gt;interface could display a &amp;#34;Source&amp;#34; link that leads users to an archive&lt;br/&gt;of the code.  There are many ways you could offer source, and different&lt;br/&gt;solutions will be better for different programs; see section 13 for the&lt;br/&gt;specific requirements.&lt;br/&gt;&lt;br/&gt;  You should also get your employer (if you work as a programmer) or school,&lt;br/&gt;if any, to sign a &amp;#34;copyright disclaimer&amp;#34; for the program, if necessary.&lt;br/&gt;For more information on this, and how to apply and follow the GNU AGPL, see&lt;br/&gt;&amp;lt;&lt;a href=&#34;https://www.gnu.org/licenses/&amp;gt&#34;&gt;https://www.gnu.org/licenses/&amp;gt&lt;/a&gt;;.&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:15Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsgudlyadcemyyl7xgrkke86yhymmxtkx5s6tm4tdahk452q4r87fqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxgpztp4</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsgudlyadcemyyl7xgrkke86yhymmxtkx5s6tm4tdahk452q4r87fqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxgpztp4" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Setup deterministic dealer (Genesis State)&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let (shares, _pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, 2, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. Setup Participant 1&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p1_share = &amp;amp;shares[&amp;amp;p1_id];&lt;br/&gt;    &lt;br/&gt;    // 3. Setup Nonce RNG&lt;br/&gt;    let mut nonce_rng = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Round 1: Batch Nonce Generation ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Participant: {:?}&amp;#34;, p1_id);&lt;br/&gt;    println!(&amp;#34;Generating 10 Nonce Pairs...\n&amp;#34;);&lt;br/&gt;&lt;br/&gt;    let mut batch_commitments = BTreeMap::new();&lt;br/&gt;    let mut batch_secrets = Vec::new();&lt;br/&gt;&lt;br/&gt;    for i in 0..10 {&lt;br/&gt;        // Generate a single pair&lt;br/&gt;        let (nonces, commitments) = round1::commit(p1_share.signing_share(), &amp;amp;mut nonce_rng);&lt;br/&gt;        &lt;br/&gt;        // Store the secret nonces locally (index i)&lt;br/&gt;        batch_secrets.push(nonces);&lt;br/&gt;        &lt;br/&gt;        // Store the public commitments in a map to share with the Coordinator&lt;br/&gt;        batch_commitments.insert(i, commitments);&lt;br/&gt;&lt;br/&gt;        println!(&amp;#34;Nonce Pair [{}]:&amp;#34;, i);&lt;br/&gt;        println!(&amp;#34;  Hiding:  {}&amp;#34;, hex::encode(commitments.hiding().serialize()?));&lt;br/&gt;        println!(&amp;#34;  Binding: {}&amp;#34;, hex::encode(commitments.binding().serialize()?));&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 4. Persistence Simulation&lt;br/&gt;    // In a real GCC app, you would save `batch_secrets` to an encrypted file &lt;br/&gt;    // and send `batch_commitments` to a Nostr Relay (Kind 1351).&lt;br/&gt;    println!(&amp;#34;\n✅ Batch generation complete.&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Ready to sign up to 10 independent Git commits.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Run with --features nostr&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:12Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsga8c95tu8c5yewf76m6xgjvlmzvjcyl6gj8g3twsv4p0z9p388tspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxp4yfhd</id>
    
      <title type="html">/// BIP-64MOD &#43; GCC: Complete Git Empty &amp;amp; Genesis Constants ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsga8c95tu8c5yewf76m6xgjvlmzvjcyl6gj8g3twsv4p0z9p388tspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxp4yfhd" />
    <content type="html">
      /// BIP-64MOD &#43; GCC: Complete Git Empty &amp;amp; Genesis Constants&lt;br/&gt;/// &lt;br/&gt;/// This module provides the standard cryptographic identifiers for &amp;#34;null&amp;#34;, &lt;br/&gt;/// &amp;#34;empty&amp;#34;, and &amp;#34;genesis&amp;#34; states, including NIP-19 (Bech32) identities.&lt;br/&gt;pub struct GitEmptyState;&lt;br/&gt;&lt;br/&gt;impl GitEmptyState {&lt;br/&gt;    // === NULL REFERENCE (Zero Hash) ===&lt;br/&gt;    pub const NULL_SHA256: &amp;amp;&amp;#39;static str = &amp;#34;0000000000000000000000000000000000000000000000000000000000000000&amp;#34;;&lt;br/&gt;&lt;br/&gt;    // === EMPTY BLOB (Empty File) ===&lt;br/&gt;    pub const BLOB_SHA1: &amp;amp;&amp;#39;static str = &amp;#34;e69de29bb2d1d6434b8b29ae775ad8c2e48c5391&amp;#34;;&lt;br/&gt;    pub const BLOB_SHA256: &amp;amp;&amp;#39;static str = &amp;#34;473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813&amp;#34;;&lt;br/&gt;    pub const BLOB_NSEC: &amp;amp;&amp;#39;static str = &amp;#34;nsec1guaq7npmaz5ndqdzvl3mr6d8mndprp2rdls5ram5jys2xqmjrqfsdzhrp6&amp;#34;;&lt;br/&gt;    pub const BLOB_NPUB: &amp;amp;&amp;#39;static str = &amp;#34;npub180cvv07tjdrghvkyh6964p7w9vsqpf3p05868v399v86p8y6f69sq5fdp0&amp;#34;;&lt;br/&gt;&lt;br/&gt;    // === EMPTY TREE (Empty Directory) ===&lt;br/&gt;    pub const TREE_SHA1: &amp;amp;&amp;#39;static str = &amp;#34;4b825dc642cb6eb9a060e54bf8d69288fbee4904&amp;#34;;&lt;br/&gt;    pub const TREE_SHA256: &amp;amp;&amp;#39;static str = &amp;#34;6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321&amp;#34;;&lt;br/&gt;    pub const TREE_NSEC: &amp;amp;&amp;#39;static str = &amp;#34;nsec1dmceksfzt3fknuwpqn29mrv9a75mq4a48v2tfwde88whfhkv2vsslsc46c&amp;#34;;&lt;br/&gt;    pub const TREE_NPUB: &amp;amp;&amp;#39;static str = &amp;#34;npub1pxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq6erdfh&amp;#34;;&lt;br/&gt;&lt;br/&gt;    // === GENESIS COMMIT (DeepSpaceM1 @ Epoch 0) ===&lt;br/&gt;    /// Result of: git commit --allow-empty -m &amp;#39;Initial commit&amp;#39; &lt;br/&gt;    /// With Author/Committer: DeepSpaceM1 &amp;lt;ds_m1@gnostr.org&amp;gt; @ 1970-01-01T00:00:00Z&lt;br/&gt;    pub const GENESIS_AUTHOR_NAME: &amp;amp;&amp;#39;static str = &amp;#34;DeepSpaceM1&amp;#34;;&lt;br/&gt;    pub const GENESIS_AUTHOR_EMAIL: &amp;amp;&amp;#39;static str = &amp;#34;ds_m1@gnostr.org&amp;#34;;&lt;br/&gt;    pub const GENESIS_DATE_UNIX: i64 = 0;&lt;br/&gt;    pub const GENESIS_MESSAGE: &amp;amp;&amp;#39;static str = &amp;#34;Initial commit&amp;#34;;&lt;br/&gt;&lt;br/&gt;    /// The resulting SHA-256 Commit Hash for this specific configuration&lt;br/&gt;    pub const GENESIS_COMMIT_SHA256: &amp;amp;&amp;#39;static str = &amp;#34;e9768652d87e07663479a0ad402513f56d953930b659c2ef389d4d03d3623910&amp;#34;;&lt;br/&gt;    &lt;br/&gt;    /// The NIP-19 Identity associated with the Genesis Commit&lt;br/&gt;    pub const GENESIS_NSEC: &amp;amp;&amp;#39;static str = &amp;#34;nsec1jpxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq68at9d&amp;#34;;&lt;br/&gt;    pub const GENESIS_NPUB: &amp;amp;&amp;#39;static str = &amp;#34;npub1pxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq6erdfh&amp;#34;;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;/// Helper for constructing the commit object string for hashing&lt;br/&gt;pub mod builders {&lt;br/&gt;    use super::GitEmptyState;&lt;br/&gt;&lt;br/&gt;    pub fn build_genesis_commit_object() -&amp;gt; String {&lt;br/&gt;        format!(&lt;br/&gt;            &amp;#34;tree {}\nauthor {} &amp;lt;{}&amp;gt; {} &#43;0000\ncommitter {} &amp;lt;{}&amp;gt; {} &#43;0000\n\n{}\n&amp;#34;,&lt;br/&gt;            GitEmptyState::TREE_SHA256,&lt;br/&gt;            GitEmptyState::GENESIS_AUTHOR_NAME,&lt;br/&gt;            GitEmptyState::GENESIS_AUTHOR_EMAIL,&lt;br/&gt;            GitEmptyState::GENESIS_DATE_UNIX,&lt;br/&gt;            GitEmptyState::GENESIS_AUTHOR_NAME,&lt;br/&gt;            GitEmptyState::GENESIS_AUTHOR_EMAIL,&lt;br/&gt;            GitEmptyState::GENESIS_DATE_UNIX,&lt;br/&gt;            GitEmptyState::GENESIS_MESSAGE&lt;br/&gt;        )&lt;br/&gt;    }&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD &#43; GCC Genesis State ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Commit Hash: {}&amp;#34;, GitEmptyState::GENESIS_COMMIT_SHA256);&lt;br/&gt;    println!(&amp;#34;Author:      {} &amp;lt;{}&amp;gt;&amp;#34;, GitEmptyState::GENESIS_AUTHOR_NAME, GitEmptyState::GENESIS_AUTHOR_EMAIL);&lt;br/&gt;    println!(&amp;#34;Timestamp:   {}&amp;#34;, GitEmptyState::GENESIS_DATE_UNIX);&lt;br/&gt;    println!(&amp;#34;NSEC:        {}&amp;#34;, GitEmptyState::GENESIS_NSEC);&lt;br/&gt;    &lt;br/&gt;    let object_raw = builders::build_genesis_commit_object();&lt;br/&gt;    println!(&amp;#34;\nRaw Git Commit Object:\n---\n{}---&amp;#34;, object_raw);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:12Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsxqn3042cywpzy8wq06a29nj2hg850gczz0xgkmmwq0tjkf5gmtrspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx7p7uay</id>
    
      <title type="html">use frost_secp256k1_tr as frost; use frost::{Identifier, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsxqn3042cywpzy8wq06a29nj2hg850gczz0xgkmmwq0tjkf5gmtrspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx7p7uay" />
    <content type="html">
      use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use std::fs;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. SETUP: Initial Key Generation (The &amp;#34;Genesis&amp;#34; event)&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. PERSISTENCE: Save Participant 1&amp;#39;s KeyPackage to a file&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p1_key_pkg = frost::keys::KeyPackage::new(&lt;br/&gt;        p1_id,&lt;br/&gt;        *shares[&amp;amp;p1_id].signing_share(),&lt;br/&gt;        frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share()),&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    // Serialize to JSON (standard for many Nostr/Git tools)&lt;br/&gt;    let p1_json = serde_json::to_string_pretty(&amp;amp;p1_key_pkg)?;&lt;br/&gt;    fs::write(&amp;#34;p1_key.json&amp;#34;, p1_json)?;&lt;br/&gt;    &lt;br/&gt;    let pub_json = serde_json::to_string_pretty(&amp;amp;pubkey_package)?;&lt;br/&gt;    fs::write(&amp;#34;group_public.json&amp;#34;, pub_json)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD: Key Persistence ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;✅ Saved p1_key.json and group_public.json to disk.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 3. RELOAD: Simulate a Signer waking up later&lt;br/&gt;    let p1_loaded_json = fs::read_to_string(&amp;#34;p1_key.json&amp;#34;)?;&lt;br/&gt;    let p1_reloaded_pkg: frost::keys::KeyPackage = serde_json::from_str(&amp;amp;p1_loaded_json)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;✅ Reloaded KeyPackage for Participant: {:?}&amp;#34;, p1_reloaded_pkg.identifier());&lt;br/&gt;&lt;br/&gt;    // 4. SIGN: Use the reloaded key to sign a new Git Commit Hash&lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed([100u8; 32]); // Fresh seed for this specific signing session&lt;br/&gt;    let (nonces, commitments) = round1::commit(p1_reloaded_pkg.signing_share(), &amp;amp;mut rng);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;\nGenerated Nonce for new session:&amp;#34;);&lt;br/&gt;    println!(&amp;#34;  Commitment: {}&amp;#34;, hex::encode(commitments.serialize()?));&lt;br/&gt;&lt;br/&gt;    // Cleanup files for the example&lt;br/&gt;    // fs::remove_file(&amp;#34;p1_key.json&amp;#34;)?;&lt;br/&gt;    // fs::remove_file(&amp;#34;group_public.json&amp;#34;)?;&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:11Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsx9v8yy2yuts7r5349xny7hppynjxexywr4mn3mst4zju7ye90n6qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxmxjft2</id>
    
      <title type="html">[workspace] members = [&amp;#34;cargo:.&amp;#34;] # Config for ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsx9v8yy2yuts7r5349xny7hppynjxexywr4mn3mst4zju7ye90n6qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxmxjft2" />
    <content type="html">
      [workspace]&lt;br/&gt;members = [&amp;#34;cargo:.&amp;#34;]&lt;br/&gt;&lt;br/&gt;# Config for &amp;#39;dist&amp;#39;&lt;br/&gt;[dist]&lt;br/&gt;# The preferred dist version to use in CI (Cargo.toml SemVer syntax)&lt;br/&gt;cargo-dist-version = &amp;#34;0.30.3&amp;#34;&lt;br/&gt;# CI backends to support&lt;br/&gt;ci = &amp;#34;github&amp;#34;&lt;br/&gt;# The installers to generate for each app&lt;br/&gt;installers = [&amp;#34;shell&amp;#34;, &amp;#34;powershell&amp;#34;, &amp;#34;homebrew&amp;#34;, &amp;#34;msi&amp;#34;]&lt;br/&gt;# A GitHub repo to push Homebrew formulas to&lt;br/&gt;tap = &amp;#34;gnostr-org/homebrew-gnostr-org&amp;#34;&lt;br/&gt;# Target platforms to build apps for (Rust target-triple syntax)&lt;br/&gt;targets = [&amp;#34;aarch64-apple-darwin&amp;#34;, &amp;#34;x86_64-apple-darwin&amp;#34;, &amp;#34;x86_64-unknown-linux-gnu&amp;#34;, &amp;#34;x86_64-pc-windows-msvc&amp;#34;]&lt;br/&gt;# Path that installers should place binaries in&lt;br/&gt;install-path = &amp;#34;CARGO_HOME&amp;#34;&lt;br/&gt;# Publish jobs to run in CI&lt;br/&gt;publish-jobs = [&amp;#34;homebrew&amp;#34;]&lt;br/&gt;# Whether to install an updater program&lt;br/&gt;install-updater = true&lt;br/&gt;# Skip checking whether the specified configuration files are up to date&lt;br/&gt;allow-dirty = [&amp;#34;ci&amp;#34;]&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:05Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs8nsxlkqnchyfm2d0jnxfhjlavdm00dh5jcjafrgyxk2g8nlmsjjspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx9dmuyg</id>
    
      <title type="html">[package] name = &amp;#34;n34-relay&amp;#34; description = &amp;#34;A nostr ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs8nsxlkqnchyfm2d0jnxfhjlavdm00dh5jcjafrgyxk2g8nlmsjjspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx9dmuyg" />
    <content type="html">
      [package]&lt;br/&gt;name         = &amp;#34;n34-relay&amp;#34;&lt;br/&gt;description  = &amp;#34;A nostr GRASP relay implementation&amp;#34;&lt;br/&gt;version      = &amp;#34;0.1.1&amp;#34;&lt;br/&gt;edition      = &amp;#34;2024&amp;#34;&lt;br/&gt;license      = &amp;#34;AGPL-3.0-or-later&amp;#34;&lt;br/&gt;authors      = [&amp;#34;Awiteb &amp;lt;a@4rs.nl&amp;gt;&amp;#34;]&lt;br/&gt;readme       = &amp;#34;README.md&amp;#34;&lt;br/&gt;repository   = &amp;#34;&lt;a href=&#34;https://github.com/gnostr-org/get_file_hash.git&amp;#34&#34;&gt;https://github.com/gnostr-org/get_file_hash.git&amp;#34&lt;/a&gt;;&lt;br/&gt;documentation = &amp;#34;&lt;a href=&#34;https://relay.n34.dev/docs.html&amp;#34&#34;&gt;https://relay.n34.dev/docs.html&amp;#34&lt;/a&gt;;&lt;br/&gt;homepage      = &amp;#34;&lt;a href=&#34;https://relay.n34.dev&amp;#34&#34;&gt;https://relay.n34.dev&amp;#34&lt;/a&gt;;&lt;br/&gt;keywords     = [&amp;#34;nostr&amp;#34;, &amp;#34;NIP-34&amp;#34;, &amp;#34;GRASP&amp;#34;]&lt;br/&gt;rust-version = &amp;#34;1.88.0&amp;#34;&lt;br/&gt;&lt;br/&gt;[features]&lt;br/&gt;gen-protos = []&lt;br/&gt;&lt;br/&gt;[package.metadata.wix]&lt;br/&gt;upgrade-guid = &amp;#34;036A2A4F-DA54-4FE2-B2D8-8C58D5814874&amp;#34;&lt;br/&gt;path-guid = &amp;#34;97D3207D-71DB-4DD0-B548-E43E8C664B7D&amp;#34;&lt;br/&gt;license = false&lt;br/&gt;eula = false&lt;br/&gt;&lt;br/&gt;documentation = &amp;#34;&lt;a href=&#34;https://relay.n34.dev/docs.html&amp;#34&#34;&gt;https://relay.n34.dev/docs.html&amp;#34&lt;/a&gt;;&lt;br/&gt;homepage      = &amp;#34;&lt;a href=&#34;https://relay.n34.dev&amp;#34&#34;&gt;https://relay.n34.dev&amp;#34&lt;/a&gt;;&lt;br/&gt;&lt;br/&gt;[[bin]]&lt;br/&gt;name = &amp;#34;nip34_relay&amp;#34;&lt;br/&gt;path = &amp;#34;src/main.rs&amp;#34;&lt;br/&gt;&lt;br/&gt;[dependencies]&lt;br/&gt;rhai = { version = &amp;#34;1.23.4&amp;#34;, features = [&lt;br/&gt;  &amp;#34;no_position&amp;#34;,&lt;br/&gt;  &amp;#34;sync&amp;#34;,&lt;br/&gt;  &amp;#34;serde&amp;#34;,&lt;br/&gt;  &amp;#34;decimal&amp;#34;,&lt;br/&gt;] }&lt;br/&gt;tokio = { version = &amp;#34;1.47.1&amp;#34;, features = [&lt;br/&gt;  &amp;#34;macros&amp;#34;,&lt;br/&gt;  &amp;#34;rt-multi-thread&amp;#34;,&lt;br/&gt;  &amp;#34;signal&amp;#34;,&lt;br/&gt;  &amp;#34;fs&amp;#34;,&lt;br/&gt;  &amp;#34;process&amp;#34;,&lt;br/&gt;] }&lt;br/&gt;tonic = { version = &amp;#34;0.14.2&amp;#34;, features = [&lt;br/&gt;  &amp;#34;tls-ring&amp;#34;,&lt;br/&gt;  &amp;#34;tls-webpki-roots&amp;#34;,&lt;br/&gt;  &amp;#34;gzip&amp;#34;,&lt;br/&gt;  &amp;#34;deflate&amp;#34;,&lt;br/&gt;] }&lt;br/&gt;tower-http = { version = &amp;#34;0.6.6&amp;#34;, features = [&lt;br/&gt;  &amp;#34;cors&amp;#34;,&lt;br/&gt;  &amp;#34;decompression-br&amp;#34;,&lt;br/&gt;  &amp;#34;decompression-deflate&amp;#34;,&lt;br/&gt;  &amp;#34;decompression-gzip&amp;#34;,&lt;br/&gt;  &amp;#34;decompression-zstd&amp;#34;,&lt;br/&gt;  &amp;#34;trace&amp;#34;,&lt;br/&gt;  &amp;#34;timeout&amp;#34;,&lt;br/&gt;] }&lt;br/&gt;&lt;br/&gt;axum               = { version = &amp;#34;0.8.6&amp;#34;, features = [&amp;#34;http2&amp;#34;, &amp;#34;ws&amp;#34;] }&lt;br/&gt;base64             = &amp;#34;0.22.1&amp;#34;&lt;br/&gt;chrono             = &amp;#34;0.4.42&amp;#34;&lt;br/&gt;config             = { version = &amp;#34;0.15.15&amp;#34;, default-features = false, features = [&amp;#34;toml&amp;#34;] }&lt;br/&gt;const_format       = &amp;#34;0.2.34&amp;#34;&lt;br/&gt;convert_case       = &amp;#34;0.8.0&amp;#34;&lt;br/&gt;easy-ext           = &amp;#34;1.0.2&amp;#34;&lt;br/&gt;either             = &amp;#34;1.15.0&amp;#34;&lt;br/&gt;flume              = &amp;#34;0.11.1&amp;#34;&lt;br/&gt;futures            = &amp;#34;0.3.31&amp;#34;&lt;br/&gt;hyper              = &amp;#34;1.7.0&amp;#34;&lt;br/&gt;hyper-util         = &amp;#34;0.1.17&amp;#34;&lt;br/&gt;parking_lot        = { version = &amp;#34;0.12.5&amp;#34;, features = [&amp;#34;serde&amp;#34;] }&lt;br/&gt;prost              = &amp;#34;0.14.1&amp;#34;&lt;br/&gt;serde              = { version = &amp;#34;1.0.219&amp;#34;, features = [&amp;#34;rc&amp;#34;] }&lt;br/&gt;serde_json         = &amp;#34;1.0.145&amp;#34;&lt;br/&gt;serde_with         = &amp;#34;3.15.0&amp;#34;&lt;br/&gt;sha1               = &amp;#34;0.10.6&amp;#34;&lt;br/&gt;sha2               = &amp;#34;0.10.9&amp;#34;&lt;br/&gt;strum              = { version = &amp;#34;0.27.2&amp;#34;, features = [&amp;#34;derive&amp;#34;] }&lt;br/&gt;thiserror          = &amp;#34;2.0.16&amp;#34;&lt;br/&gt;tokio-util         = { version = &amp;#34;0.7.17&amp;#34;, features = [&amp;#34;io&amp;#34;] }&lt;br/&gt;toml               = &amp;#34;0.9.5&amp;#34;&lt;br/&gt;tonic-prost        = &amp;#34;0.14.2&amp;#34;&lt;br/&gt;tower              = { version = &amp;#34;0.5.2&amp;#34;, features = [&amp;#34;limit&amp;#34;] }&lt;br/&gt;tracing            = &amp;#34;0.1.41&amp;#34;&lt;br/&gt;tracing-subscriber = { version = &amp;#34;0.3.20&amp;#34;, features = [&amp;#34;env-filter&amp;#34;] }&lt;br/&gt;dirs = &amp;#34;6.0.0&amp;#34;&lt;br/&gt;&lt;br/&gt;  # We frequently switch between stable and unstable versions; this will make the&lt;br/&gt;  # process easier.&lt;br/&gt;  [dependencies.nostr]&lt;br/&gt;  default-features = false&lt;br/&gt;  features         = [&amp;#34;std&amp;#34;]&lt;br/&gt;  git              = &amp;#34;&lt;a href=&#34;https://git.4rs.nl/mirrors/nostr.git&amp;#34&#34;&gt;https://git.4rs.nl/mirrors/nostr.git&amp;#34&lt;/a&gt;;&lt;br/&gt;  rev              = &amp;#34;27a1947d3&amp;#34;&lt;br/&gt;  # version          = &amp;#34;0.45.0&amp;#34;&lt;br/&gt;  [dependencies.nostr-database]&lt;br/&gt;  default-features = false&lt;br/&gt;  git              = &amp;#34;&lt;a href=&#34;https://git.4rs.nl/mirrors/nostr.git&amp;#34&#34;&gt;https://git.4rs.nl/mirrors/nostr.git&amp;#34&lt;/a&gt;;&lt;br/&gt;  rev              = &amp;#34;27a1947d3&amp;#34;&lt;br/&gt;  # version          = &amp;#34;0.45.0&amp;#34;&lt;br/&gt;  [dependencies.nostr-lmdb]&lt;br/&gt;  default-features = false&lt;br/&gt;  git              = &amp;#34;&lt;a href=&#34;https://git.4rs.nl/mirrors/nostr.git&amp;#34&#34;&gt;https://git.4rs.nl/mirrors/nostr.git&amp;#34&lt;/a&gt;;&lt;br/&gt;  rev              = &amp;#34;27a1947d3&amp;#34;&lt;br/&gt;  # version          = &amp;#34;0.45.0&amp;#34;&lt;br/&gt;  [dependencies.nostr-relay-builder]&lt;br/&gt;  default-features = false&lt;br/&gt;  git              = &amp;#34;&lt;a href=&#34;https://git.4rs.nl/mirrors/nostr.git&amp;#34&#34;&gt;https://git.4rs.nl/mirrors/nostr.git&amp;#34&lt;/a&gt;;&lt;br/&gt;  rev              = &amp;#34;27a1947d3&amp;#34;&lt;br/&gt;  # version          = &amp;#34;0.45.0&amp;#34;&lt;br/&gt;&lt;br/&gt;[build-dependencies]&lt;br/&gt;tonic-prost-build = &amp;#34;0.14.2&amp;#34;&lt;br/&gt;[target.&amp;#39;cfg(not(windows))&amp;#39;.build-dependencies]&lt;br/&gt;protobuf-src = &amp;#34;2.1.0&amp;#34;&lt;br/&gt;&lt;br/&gt;# [profile.release]&lt;br/&gt;# lto       = &amp;#34;fat&amp;#34;&lt;br/&gt;# opt-level = 3&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:03Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsdveyzq0vzycmv9jkwxznwejdk9eskeh8zyn4jnw4vpxxy6qryudspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxqxvnyk</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] fn main() -&amp;gt; Result&amp;lt;(), ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsdveyzq0vzycmv9jkwxznwejdk9eskeh8zyn4jnw4vpxxy6qryudspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxqxvnyk" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    get_file_hash_core::frost_mailbox_logic::simulate_frost_mailbox_post_signer()&lt;br/&gt;}&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example frost_mailbox_post --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:01Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqszjstf3yjrjwd73xyukjpwg7x77hy9vhxy4s63alpzg3tzhm3r48spr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxfwcn99</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqszjstf3yjrjwd73xyukjpwg7x77hy9vhxy4s63alpzg3tzhm3r48spr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxfwcn99" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Dealer Setup&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. Setup Participant Identifiers&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;&lt;br/&gt;    // 3. Construct KeyPackages manually for RC.0&lt;br/&gt;    let p1_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share());&lt;br/&gt;    let p1_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p1_id,&lt;br/&gt;        *shares[&amp;amp;p1_id].signing_share(),&lt;br/&gt;        p1_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    let p2_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p2_id].signing_share());&lt;br/&gt;    let p2_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p2_id,&lt;br/&gt;        *shares[&amp;amp;p2_id].signing_share(),&lt;br/&gt;        p2_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    // 4. Round 1: Commitments&lt;br/&gt;    let mut rng1 = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(p1_key_package.signing_share(), &amp;amp;mut rng1);&lt;br/&gt;&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([2u8; 32]);&lt;br/&gt;    let (p2_nonces, p2_commitments) = round1::commit(p2_key_package.signing_share(), &amp;amp;mut rng2);&lt;br/&gt;&lt;br/&gt;    // 5. Coordinator: Signing Package&lt;br/&gt;    let message = b&amp;#34;gnostr-commit-7445bd727dbce5bac004861a45c35ccd4f4a195bfb1cc39f2a7c9fd3aa3b6547&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    commitments_map.insert(p2_id, p2_commitments);&lt;br/&gt;&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;&lt;br/&gt;    // 6. Round 2: Partial Signatures&lt;br/&gt;    let p1_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_package)?;&lt;br/&gt;    let p2_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p2_nonces, &amp;amp;p2_key_package)?;&lt;br/&gt;&lt;br/&gt;    // 7. Aggregation&lt;br/&gt;    let mut signature_shares = BTreeMap::new();&lt;br/&gt;    signature_shares.insert(p1_id, p1_signature_share);&lt;br/&gt;    signature_shares.insert(p2_id, p2_signature_share);&lt;br/&gt;&lt;br/&gt;    let group_signature = frost::aggregate(&amp;amp;signing_package, &amp;amp;signature_shares, &amp;amp;pubkey_package)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Aggregated Signature ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Final Signature (Hex): {}&amp;#34;, hex::encode(group_signature.serialize()?));&lt;br/&gt;&lt;br/&gt;    // Final Verification&lt;br/&gt;    pubkey_package.verifying_key().verify(message, &amp;amp;group_signature)?;&lt;br/&gt;    println!(&amp;#34;🛡️  Signature is valid for the 2nd generation group!&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Run with --features nostr&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:08:02Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsv0c48j2qgtq4p7cg6zxj4jnmdy97reqdhe3ss6zy29er9vpxkamgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxqwyqwt</id>
    
      <title type="html">use frost_secp256k1_tr as frost; use frost::{Identifier, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsv0c48j2qgtq4p7cg6zxj4jnmdy97reqdhe3ss6zy29er9vpxkamgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxqwyqwt" />
    <content type="html">
      use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. RECREATE CONTEXT (Same as Signer)&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;&lt;br/&gt;    // 2. SIMULATE SIGNING (Round 1 &amp;amp; 2)&lt;br/&gt;    let mut rng1 = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(shares[&amp;amp;p1_id].signing_share(), &amp;amp;mut rng1);&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([2u8; 32]);&lt;br/&gt;    let (p2_nonces, p2_commitments) = round1::commit(shares[&amp;amp;p2_id].signing_share(), &amp;amp;mut rng2);&lt;br/&gt;&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-verification-test&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    commitments_map.insert(p2_id, p2_commitments);&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;&lt;br/&gt;    // Generate shares (using the KeyPackage method we perfected)&lt;br/&gt;    let p1_key_pkg = frost::keys::KeyPackage::new(p1_id, *shares[&amp;amp;p1_id].signing_share(), &lt;br/&gt;        frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share()), &lt;br/&gt;        *pubkey_package.verifying_key(), min_signers);&lt;br/&gt;    let p2_key_pkg = frost::keys::KeyPackage::new(p2_id, *shares[&amp;amp;p2_id].signing_share(), &lt;br/&gt;        frost::keys::VerifyingShare::from(*shares[&amp;amp;p2_id].signing_share()), &lt;br/&gt;        *pubkey_package.verifying_key(), min_signers);&lt;br/&gt;&lt;br/&gt;    let p1_sig_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_pkg)?;&lt;br/&gt;    let p2_sig_share = round2::sign(&amp;amp;signing_package, &amp;amp;p2_nonces, &amp;amp;p2_key_pkg)?;&lt;br/&gt;&lt;br/&gt;    // 3. COORDINATOR: AGGREGATION&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD: Coordinator Aggregation ---&amp;#34;);&lt;br/&gt;    &lt;br/&gt;    let mut shares_map = BTreeMap::new();&lt;br/&gt;    shares_map.insert(p1_id, p1_sig_share);&lt;br/&gt;    shares_map.insert(p2_id, p2_sig_share);&lt;br/&gt;&lt;br/&gt;    let final_signature = frost::aggregate(&lt;br/&gt;        &amp;amp;signing_package, &lt;br/&gt;        &amp;amp;shares_map, &lt;br/&gt;        &amp;amp;pubkey_package&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    let sig_bytes = final_signature.serialize()?;&lt;br/&gt;    println!(&amp;#34;✅ Aggregation Successful!&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Final Signature (Hex): {}&amp;#34;, hex::encode(&amp;amp;sig_bytes));&lt;br/&gt;&lt;br/&gt;    // 4. VERIFICATION (The moment of truth)&lt;br/&gt;    pubkey_package.verifying_key().verify(message, &amp;amp;final_signature)?;&lt;br/&gt;    println!(&amp;#34;🛡️  Signature Verified against Group Public Key!&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:59Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsgphxdg42ydt7vvmggzkkrhmekjvg597z6xja96razuq0pdwsq64qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxqxjdxw</id>
    
      <title type="html">exclude = [&amp;#34;target/**/*.toml&amp;#34;, &amp;#34;Cargo.lock&amp;#34;] ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsgphxdg42ydt7vvmggzkkrhmekjvg597z6xja96razuq0pdwsq64qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxqxjdxw" />
    <content type="html">
      exclude = [&amp;#34;target/**/*.toml&amp;#34;, &amp;#34;Cargo.lock&amp;#34;]&lt;br/&gt;&lt;br/&gt;[formatting]&lt;br/&gt;align_entries = true&lt;br/&gt;indent_tables = true&lt;br/&gt;reorder_keys  = false&lt;br/&gt;&lt;br/&gt;[[rule]]&lt;br/&gt;include                 = [&amp;#34;**/Cargo.toml&amp;#34;]&lt;br/&gt;keys                    = [&amp;#34;dependencies&amp;#34;]&lt;br/&gt;formatting.reorder_keys = true&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:53Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs8q8qpcsypflt70hzgsy5xayefm2uz0px5cn7yjnv9zaaxz7r3n3gpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx28ele9</id>
    
      <title type="html">/// deterministic nostr event build example // deterministic ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs8q8qpcsypflt70hzgsy5xayefm2uz0px5cn7yjnv9zaaxz7r3n3gpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx28ele9" />
    <content type="html">
      /// deterministic nostr event build example&lt;br/&gt;// deterministic nostr event build example&lt;br/&gt;use get_file_hash_core::get_file_hash;&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use get_file_hash_core::{get_git_tracked_files, DEFAULT_GNOSTR_KEY, DEFAULT_PICTURE_URL, DEFAULT_BANNER_URL, publish_nostr_event_if_release, get_repo_announcement_event};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use nostr_sdk::{EventBuilder, Keys, Tag, SecretKey};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use std::fs;&lt;br/&gt;&lt;br/&gt;use std::path::PathBuf;&lt;br/&gt;use sha2::{Digest, Sha256};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use ::hex;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;gen-protos&amp;#34;)]&lt;br/&gt;fn compile_protos() {&lt;br/&gt;    tonic_prost_build::configure()&lt;br/&gt;        .build_server(true)&lt;br/&gt;        .build_client(true)&lt;br/&gt;        .build_transport(true)&lt;br/&gt;        .protoc_arg(&amp;#34;--experimental_allow_proto3_optional&amp;#34;)&lt;br/&gt;        //.compile_protos(&amp;amp;[&amp;#34;proto/plugins.proto&amp;#34;], &amp;amp;[&amp;#34;proto&amp;#34;])&lt;br/&gt;        .compile_protos(&amp;amp;[&amp;#34;n34-relay/proto/plugins.proto&amp;#34;], &amp;amp;[&amp;#34;n34-relay/proto&amp;#34;])&lt;br/&gt;        .expect(&amp;#34;protoc is required&amp;#34;);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;gen-protos&amp;#34;))]&lt;br/&gt;fn compile_protos() {}&lt;br/&gt;&lt;br/&gt;#[tokio::main]&lt;br/&gt;async fn main() {&lt;br/&gt;	compile_protos();&lt;br/&gt;    let manifest_dir = std::env::var(&amp;#34;CARGO_MANIFEST_DIR&amp;#34;).unwrap();&lt;br/&gt;    let is_git_repo = std::path::Path::new(&amp;amp;manifest_dir).join(&amp;#34;.git&amp;#34;).exists();&lt;br/&gt;    #[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;	#[allow(unused_mut)]&lt;br/&gt;    let mut git_branch_str = String::new();&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_PKG_NAME={}&amp;#34;, env!(&amp;#34;CARGO_PKG_NAME&amp;#34;));&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_PKG_VERSION={}&amp;#34;, env!(&amp;#34;CARGO_PKG_VERSION&amp;#34;));&lt;br/&gt;&lt;br/&gt;    if is_git_repo {&lt;br/&gt;        let git_commit_hash_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for commit hash&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_str = if git_commit_hash_output.status.success() &amp;amp;&amp;amp; !git_commit_hash_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_commit_hash_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git commit hash command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_commit_hash_output.status, String::from_utf8_lossy(&amp;amp;git_commit_hash_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH={}&amp;#34;, git_commit_hash_str);&lt;br/&gt;&lt;br/&gt;        let git_branch_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;--abbrev-ref&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for branch name&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_branch_str = if git_branch_output.status.success() &amp;amp;&amp;amp; !git_branch_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_branch_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git branch command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_branch_output.status, String::from_utf8_lossy(&amp;amp;git_branch_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_BRANCH={}&amp;#34;, git_branch_str);&lt;br/&gt;    } else {&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH=&amp;#34;);&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_BRANCH=&amp;#34;);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=.git/HEAD&amp;#34;);&lt;br/&gt;&lt;br/&gt;    //#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;    //let relay_urls = get_file_hash_core::get_relay_urls();&lt;br/&gt;&lt;br/&gt;    let cargo_toml_hash = get_file_hash!(&amp;#34;Cargo.toml&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_TOML_HASH={}&amp;#34;, cargo_toml_hash);&lt;br/&gt;&lt;br/&gt;    let lib_hash = get_file_hash!(&amp;#34;src/lib.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=LIB_HASH={}&amp;#34;, lib_hash);&lt;br/&gt;&lt;br/&gt;    let build_hash = get_file_hash!(&amp;#34;build.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=BUILD_HASH={}&amp;#34;, build_hash);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=Cargo.toml&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=src/lib.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=build.rs&amp;#34;);&lt;br/&gt;    let online_relays_csv_path = PathBuf::from(&amp;amp;manifest_dir).join(&amp;#34;src/get_file_hash_core/src/online_relays_gps.csv&amp;#34;);&lt;br/&gt;    if online_relays_csv_path.exists() {&lt;br/&gt;        println!(&amp;#34;cargo:rerun-if-changed={}&amp;#34;, online_relays_csv_path.to_str().unwrap());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;    if cfg!(not(debug_assertions)) {&lt;br/&gt;        println!(&amp;#34;cargo:warning=Nostr feature enabled: Build may take longer due to network operations (publishing events to relays).&amp;#34;);&lt;br/&gt;&lt;br/&gt;        // This code only runs in release builds&lt;br/&gt;        let package_version = std::env::var(&amp;#34;CARGO_PKG_VERSION&amp;#34;).unwrap();&lt;br/&gt;&lt;br/&gt;        let output_dir = PathBuf::from(format!(&amp;#34;.gnostr/build/{}&amp;#34;, package_version));&lt;br/&gt;        if let Err(e) = fs::create_dir_all(&amp;amp;output_dir) {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Failed to create output directory {}: {}&amp;#34;, output_dir.display(), e);&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        let files_to_publish: Vec&amp;lt;String&amp;gt; = get_git_tracked_files(&amp;amp;PathBuf::from(&amp;amp;manifest_dir));&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for commit hash&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_str = if git_commit_hash_output.status.success() &amp;amp;&amp;amp; !git_commit_hash_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_commit_hash_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git commit hash command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_commit_hash_output.status, String::from_utf8_lossy(&amp;amp;git_commit_hash_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH={}&amp;#34;, git_commit_hash_str);&lt;br/&gt;        // Create padded_commit_hash&lt;br/&gt;        let padded_commit_hash = format!(&amp;#34;{:0&amp;gt;64}&amp;#34;, &amp;amp;git_commit_hash_str);&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=PADDED_COMMIT_HASH={}&amp;#34;, padded_commit_hash);&lt;br/&gt;        // Initialize client and keys once&lt;br/&gt;        let initial_secret_key = SecretKey::parse(&amp;amp;padded_commit_hash).expect(&amp;#34;Failed to create Nostr SecretKey from PADDED_COMMIT_HASH&amp;#34;);&lt;br/&gt;        let initial_keys = Keys::new(initial_secret_key);&lt;br/&gt;        let mut client = nostr_sdk::Client::new(initial_keys.clone());&lt;br/&gt;        let mut relay_urls = get_file_hash_core::get_relay_urls();&lt;br/&gt;&lt;br/&gt;        // Add relays to the client&lt;br/&gt;        for relay_url in relay_urls.iter() {&lt;br/&gt;            if let Err(e) = client.add_relay(relay_url).await {&lt;br/&gt;                println!(&amp;#34;cargo:warning=Failed to add relay {}: {}&amp;#34;, relay_url, e);&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;        client.connect().await;&lt;br/&gt;        println!(&amp;#34;cargo:warning=Added and connected to {} relays.&amp;#34;, relay_urls.len());&lt;br/&gt;&lt;br/&gt;        let mut published_event_ids: Vec&amp;lt;Tag&amp;gt; = Vec::new();&lt;br/&gt;        let mut total_bytes_sent: usize = 0;&lt;br/&gt;    &lt;br/&gt;        for file_path_str in &amp;amp;files_to_publish {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Processing file: {}&amp;#34;, file_path_str);&lt;br/&gt;            match fs::read(file_path_str) {&lt;br/&gt;                Ok(bytes) =&amp;gt; {&lt;br/&gt;                    let mut hasher = Sha256::new();&lt;br/&gt;                    hasher.update(&amp;amp;bytes);&lt;br/&gt;                    let result = hasher.finalize();&lt;br/&gt;                    let file_hash_hex = hex::encode(result);&lt;br/&gt;&lt;br/&gt;                    match SecretKey::from_hex(&amp;amp;file_hash_hex.clone()) {&lt;br/&gt;                        Ok(secret_key) =&amp;gt; {&lt;br/&gt;                            let keys = Keys::new(secret_key);&lt;br/&gt;                            let content = String::from_utf8_lossy(&amp;amp;bytes).into_owned();&lt;br/&gt;                            let tags = vec![&lt;br/&gt;                                Tag::parse([&amp;#34;file&amp;#34;, file_path_str].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                                Tag::parse([&amp;#34;version&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                            ];&lt;br/&gt;                            let event_builder = EventBuilder::text_note(content).tags(tags);&lt;br/&gt;&lt;br/&gt;                            if let Some(event_id) = publish_nostr_event_if_release(&amp;amp;mut client, file_hash_hex, keys.clone(), event_builder, &amp;amp;mut relay_urls, file_path_str, &amp;amp;output_dir, &amp;amp;mut total_bytes_sent).await {&lt;br/&gt;                                published_event_ids.push(Tag::event(event_id));&lt;br/&gt;                            }&lt;br/&gt;&lt;br/&gt;                            // Publish metadata event&lt;br/&gt;                            get_file_hash_core::publish_metadata_event(&lt;br/&gt;                                &amp;amp;keys,&lt;br/&gt;                                &amp;amp;relay_urls,&lt;br/&gt;                                DEFAULT_PICTURE_URL,&lt;br/&gt;                                DEFAULT_BANNER_URL,&lt;br/&gt;                                file_path_str,&lt;br/&gt;                            ).await;&lt;br/&gt;                        }&lt;br/&gt;                        Err(e) =&amp;gt; {&lt;br/&gt;                            println!(&amp;#34;cargo:warning=Failed to derive Nostr secret key for {}: {}&amp;#34;, file_path_str, e);&lt;br/&gt;                        }&lt;br/&gt;                    }&lt;br/&gt;                }&lt;br/&gt;                Err(e) =&amp;gt; {&lt;br/&gt;                    println!(&amp;#34;cargo:warning=Failed to read file {}: {}&amp;#34;, file_path_str, e);&lt;br/&gt;                }&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        // Create and publish the build_manifest&lt;br/&gt;        if !published_event_ids.is_empty() {&lt;br/&gt;&lt;br/&gt;            //TODO this will be either the default or detected from env vars PRIVATE_KEY&lt;br/&gt;            let keys = Keys::new(SecretKey::from_hex(DEFAULT_GNOSTR_KEY).expect(&amp;#34;Failed to create Nostr keys from DEFAULT_GNOSTR_KEY&amp;#34;));&lt;br/&gt;            let cloned_keys = keys.clone();&lt;br/&gt;            let content = format!(&amp;#34;Build manifest for get_file_hash v{}&amp;#34;, package_version);&lt;br/&gt;            let mut tags = vec![&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;            ];&lt;br/&gt;            tags.extend(published_event_ids);&lt;br/&gt;&lt;br/&gt;            let event_builder = EventBuilder::text_note(content.clone()).tags(tags);&lt;br/&gt;&lt;br/&gt;            if let Some(event_id) = publish_nostr_event_if_release(&lt;br/&gt;                &amp;amp;mut client,&lt;br/&gt;                hex::encode(Sha256::digest(content.as_bytes())),&lt;br/&gt;                keys,&lt;br/&gt;                event_builder,&lt;br/&gt;                &amp;amp;mut relay_urls,&lt;br/&gt;                &amp;#34;build_manifest.json&amp;#34;,&lt;br/&gt;                &amp;amp;output_dir,&lt;br/&gt;                &amp;amp;mut total_bytes_sent,&lt;br/&gt;            ).await {&lt;br/&gt;&lt;br/&gt;                let build_manifest_event_id = Some(event_id);&lt;br/&gt;&lt;br/&gt;            // Publish metadata event for the build manifest&lt;br/&gt;            get_file_hash_core::publish_metadata_event(&lt;br/&gt;                &amp;amp;cloned_keys, // Use reference to cloned keys here&lt;br/&gt;                &amp;amp;relay_urls,&lt;br/&gt;                DEFAULT_PICTURE_URL,&lt;br/&gt;                DEFAULT_BANNER_URL,&lt;br/&gt;                &amp;amp;format!(&amp;#34;build_manifest:{}&amp;#34;, package_version),&lt;br/&gt;            ).await;&lt;br/&gt;            let git_commit_hash = &amp;amp;git_commit_hash_str;&lt;br/&gt;            let git_branch = &amp;amp;git_branch_str;&lt;br/&gt;            let repo_url = std::env::var(&amp;#34;CARGO_PKG_REPOSITORY&amp;#34;).unwrap();&lt;br/&gt;            let repo_name = std::env::var(&amp;#34;CARGO_PKG_NAME&amp;#34;).unwrap();&lt;br/&gt;            let repo_description = std::env::var(&amp;#34;CARGO_PKG_DESCRIPTION&amp;#34;).unwrap();&lt;br/&gt;&lt;br/&gt;            let output_dir = PathBuf::from(format!(&amp;#34;.gnostr/build/{}&amp;#34;, package_version));&lt;br/&gt;            if let Err(e) = fs::create_dir_all(&amp;amp;output_dir) {&lt;br/&gt;                println!(&amp;#34;cargo:warning=Failed to create output directory {}: {}&amp;#34;, output_dir.display(), e);&lt;br/&gt;            }&lt;br/&gt;&lt;br/&gt;            let announcement_keys = Keys::new(SecretKey::from_hex(build_manifest_event_id.unwrap().to_hex().as_str()).expect(&amp;#34;Failed to create Nostr keys from build_manifest_event_id&amp;#34;));&lt;br/&gt;            let announcement_pubkey_hex = announcement_keys.public_key().to_string();&lt;br/&gt;&lt;br/&gt;            // Publish NIP-34 Repository Announcement&lt;br/&gt;            if let Some(_event_id) = get_repo_announcement_event(&lt;br/&gt;                &amp;amp;mut client,&lt;br/&gt;                &amp;amp;announcement_keys,&lt;br/&gt;                &amp;amp;relay_urls,&lt;br/&gt;                &amp;amp;repo_url,&lt;br/&gt;                &amp;amp;repo_name,&lt;br/&gt;                &amp;amp;repo_description,&lt;br/&gt;                &amp;amp;git_commit_hash,&lt;br/&gt;                &amp;amp;git_branch,&lt;br/&gt;                &amp;amp;output_dir,&lt;br/&gt;                &amp;amp;announcement_pubkey_hex&lt;br/&gt;            ).await {&lt;br/&gt;                // Successfully published announcement&lt;br/&gt;            }&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;        println!(&amp;#34;cargo:warning=Total bytes sent to Nostr relays: {} bytes ({} MB)&amp;#34;, total_bytes_sent, total_bytes_sent as f64 / 1024.0 / 1024.0);&lt;br/&gt;    }&lt;br/&gt;}&lt;br/&gt;// deterministic nostr event build example&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:50Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsgdhxddf7se26n2ju969jvhqa98suqrmrl55v5f3w2cqjdl9qrqnspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxh7a9tj</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsgdhxddf7se26n2ju969jvhqa98suqrmrl55v5f3w2cqjdl9qrqnspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxh7a9tj" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList};&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. We need the dealer setup first to get a real SigningShare&lt;br/&gt;    let dealer_seed = [0u8; 32]; &lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed(dealer_seed);&lt;br/&gt;    &lt;br/&gt;    let (shares, _pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, 2, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. Setup nonce RNG&lt;br/&gt;    let nonce_seed = [1u8; 32]; &lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed(nonce_seed);&lt;br/&gt;&lt;br/&gt;    // 3. Get Participant 1&amp;#39;s share&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p1_share = shares.get(&amp;amp;p1_id).ok_or(&amp;#34;Share not found&amp;#34;)?;&lt;br/&gt;&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    // Round 1: Commitments &amp;amp; Nonces&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    &lt;br/&gt;    // In RC.0, commit() requires the secret share reference&lt;br/&gt;    let (p1_nonces, p1_commitments) = frost::round1::commit(p1_share.signing_share(), &amp;amp;mut rng);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Round 1: Nonce Generation ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Participant Identifier: {:?}&amp;#34;, p1_id);&lt;br/&gt;    &lt;br/&gt;    // 4. Handle Results for serialization&lt;br/&gt;    println!(&amp;#34;\nPublic Signing Commitments (To be shared):&amp;#34;);&lt;br/&gt;    println!(&amp;#34;  Hiding:  {}&amp;#34;, hex::encode(p1_commitments.hiding().serialize()?));&lt;br/&gt;    println!(&amp;#34;  Binding: {}&amp;#34;, hex::encode(p1_commitments.binding().serialize()?));&lt;br/&gt;&lt;br/&gt;    // Keep nonces in memory for the next step&lt;br/&gt;    let _p1_secret_nonces = p1_nonces; &lt;br/&gt;    &lt;br/&gt;    println!(&amp;#34;\n✅ Nonces generated and tied to Participant 1&amp;#39;s share.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;Run with --features nostr to enable this example.&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:50Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsdv8mv7dqjz6js3aw2ehmpf4q2jrdc4v78ufsurja9hr2a0wg5kgspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx9swjzu</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] fn main() -&amp;gt; Result&amp;lt;(), ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsdv8mv7dqjz6js3aw2ehmpf4q2jrdc4v78ufsurja9hr2a0wg5kgspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx9swjzu" />
    <content type="html">
      &lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    get_file_hash_core::frost_mailbox_logic::simulate_frost_mailbox_coordinator()&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example frost_mailbox --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:49Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsw9npj2fvyk8vyhwa5wh5r5e82xq4mk70m26ptc0cpfwmzumtk3tgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx2fvwdy</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsw9npj2fvyk8vyhwa5wh5r5e82xq4mk70m26ptc0cpfwmzumtk3tgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx2fvwdy" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 1. Setup Signer (P1) and peer (P2)&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;    &lt;br/&gt;    // 2. Round 1: Both signers generate nonces (Simulating P2&amp;#39;s contribution)&lt;br/&gt;    let mut rng1 = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(shares[&amp;amp;p1_id].signing_share(), &amp;amp;mut rng1);&lt;br/&gt;&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([2u8; 32]);&lt;br/&gt;    let (_p2_nonces, p2_commitments) = round1::commit(shares[&amp;amp;p2_id].signing_share(), &amp;amp;mut rng2);&lt;br/&gt;&lt;br/&gt;    // 3. Coordinator: Create a valid SigningPackage with 2 signers&lt;br/&gt;    let message = b&amp;#34;gnostr-gcc-verification-test&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    commitments_map.insert(p2_id, p2_commitments); // Added P2 to satisfy threshold&lt;br/&gt;    &lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Round 2: Signer Validation ---&amp;#34;);&lt;br/&gt;&lt;br/&gt;    // 4. SIGNER-SIDE CHECK (Manual)&lt;br/&gt;    if !signing_package.signing_commitments().contains_key(&amp;amp;p1_id) {&lt;br/&gt;        return Err(&amp;#34;Validation Failed: My commitment is missing!&amp;#34;.into());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    let commitment_count = signing_package.signing_commitments().len() as u16;&lt;br/&gt;    if commitment_count &amp;lt; min_signers {&lt;br/&gt;         return Err(format!(&amp;#34;Validation Failed: Only {} commitments provided, need {}.&amp;#34;, commitment_count, min_signers).into());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;✅ Signing Package validated ({} signers).&amp;#34;, commitment_count);&lt;br/&gt;    println!(&amp;#34;Proceeding to sign message: {:?}&amp;#34;, String::from_utf8_lossy(message));&lt;br/&gt;&lt;br/&gt;    // 5. Generate the Share&lt;br/&gt;    let p1_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share());&lt;br/&gt;    let p1_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p1_id,&lt;br/&gt;        *shares[&amp;amp;p1_id].signing_share(),&lt;br/&gt;        p1_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    let p1_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_package)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;\nPartial Signature Share for P1:&amp;#34;);&lt;br/&gt;    println!(&amp;#34;{}&amp;#34;, hex::encode(p1_signature_share.serialize()));&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Enable nostr feature.&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:48Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsguta66v2x3n3ng6t3ey8rm8nmn4jxze2x0zkltk8fqacpkc0ezwgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxlh0vh9</id>
    
      <title type="html">/lmdb /target /relay_base .rustc_info.json bin/CACHEDIR.TAG ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsguta66v2x3n3ng6t3ey8rm8nmn4jxze2x0zkltk8fqacpkc0ezwgpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxlh0vh9" />
    <content type="html">
      /lmdb&lt;br/&gt;/target&lt;br/&gt;/relay_base&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;.rustc_info.json&lt;br/&gt;bin/CACHEDIR.TAG&lt;br/&gt;bin/config.toml&lt;br/&gt;bin/debug/&lt;br/&gt;bin/lmdb/&lt;br/&gt;bin/logs.log&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:42Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs9u3hgk5qwdmqmlhzl2n4lwrvjt6rtj2dlg5kp6wcvej9hh24h3sqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxl7wyzx</id>
    
      <title type="html">/// deterministic nostr event build example // deterministic ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs9u3hgk5qwdmqmlhzl2n4lwrvjt6rtj2dlg5kp6wcvej9hh24h3sqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxl7wyzx" />
    <content type="html">
      /// deterministic nostr event build example&lt;br/&gt;// deterministic nostr event build example&lt;br/&gt;use get_file_hash_core::get_file_hash;&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use get_file_hash_core::{get_git_tracked_files, DEFAULT_GNOSTR_KEY, DEFAULT_PICTURE_URL, DEFAULT_BANNER_URL, publish_nostr_event_if_release, get_repo_announcement_event};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use nostr_sdk::{EventBuilder, Keys, Tag, SecretKey};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use std::fs;&lt;br/&gt;&lt;br/&gt;use std::path::PathBuf;&lt;br/&gt;use sha2::{Digest, Sha256};&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;use ::hex;&lt;br/&gt;&lt;br/&gt;#[tokio::main]&lt;br/&gt;async fn main() {&lt;br/&gt;    let manifest_dir = std::env::var(&amp;#34;CARGO_MANIFEST_DIR&amp;#34;).unwrap();&lt;br/&gt;    let is_git_repo = std::path::Path::new(&amp;amp;manifest_dir).join(&amp;#34;.git&amp;#34;).exists();&lt;br/&gt;    #[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;	#[allow(unused_mut)]&lt;br/&gt;    let mut git_branch_str = String::new();&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_PKG_NAME={}&amp;#34;, env!(&amp;#34;CARGO_PKG_NAME&amp;#34;));&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_PKG_VERSION={}&amp;#34;, env!(&amp;#34;CARGO_PKG_VERSION&amp;#34;));&lt;br/&gt;&lt;br/&gt;    if is_git_repo {&lt;br/&gt;        let git_commit_hash_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for commit hash&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_str = if git_commit_hash_output.status.success() &amp;amp;&amp;amp; !git_commit_hash_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_commit_hash_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git commit hash command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_commit_hash_output.status, String::from_utf8_lossy(&amp;amp;git_commit_hash_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH={}&amp;#34;, git_commit_hash_str);&lt;br/&gt;&lt;br/&gt;        let git_branch_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;--abbrev-ref&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for branch name&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_branch_str = if git_branch_output.status.success() &amp;amp;&amp;amp; !git_branch_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_branch_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git branch command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_branch_output.status, String::from_utf8_lossy(&amp;amp;git_branch_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_BRANCH={}&amp;#34;, git_branch_str);&lt;br/&gt;    } else {&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH=&amp;#34;);&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_BRANCH=&amp;#34;);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=.git/HEAD&amp;#34;);&lt;br/&gt;&lt;br/&gt;    //#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;    //let relay_urls = get_file_hash_core::get_relay_urls();&lt;br/&gt;&lt;br/&gt;    let cargo_toml_hash = get_file_hash!(&amp;#34;../Cargo.toml&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=CARGO_TOML_HASH={}&amp;#34;, cargo_toml_hash);&lt;br/&gt;&lt;br/&gt;    let lib_hash = get_file_hash!(&amp;#34;../src/lib.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=LIB_HASH={}&amp;#34;, lib_hash);&lt;br/&gt;&lt;br/&gt;    let build_hash = get_file_hash!(&amp;#34;../build.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rustc-env=BUILD_HASH={}&amp;#34;, build_hash);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=Cargo.toml&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=src/lib.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;cargo:rerun-if-changed=build.rs&amp;#34;);&lt;br/&gt;    let online_relays_csv_path = PathBuf::from(&amp;amp;manifest_dir).join(&amp;#34;src/get_file_hash_core/src/online_relays_gps.csv&amp;#34;);&lt;br/&gt;    if online_relays_csv_path.exists() {&lt;br/&gt;        println!(&amp;#34;cargo:rerun-if-changed={}&amp;#34;, online_relays_csv_path.to_str().unwrap());&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;#[cfg(all(not(debug_assertions), feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;    if cfg!(not(debug_assertions)) {&lt;br/&gt;        println!(&amp;#34;cargo:warning=Nostr feature enabled: Build may take longer due to network operations (publishing events to relays).&amp;#34;);&lt;br/&gt;&lt;br/&gt;        // This code only runs in release builds&lt;br/&gt;        let package_version = std::env::var(&amp;#34;CARGO_PKG_VERSION&amp;#34;).unwrap();&lt;br/&gt;&lt;br/&gt;        let output_dir = PathBuf::from(format!(&amp;#34;.gnostr/build/{}&amp;#34;, package_version));&lt;br/&gt;        if let Err(e) = fs::create_dir_all(&amp;amp;output_dir) {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Failed to create output directory {}: {}&amp;#34;, output_dir.display(), e);&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        let files_to_publish: Vec&amp;lt;String&amp;gt; = get_git_tracked_files(&amp;amp;PathBuf::from(&amp;amp;manifest_dir));&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_output = std::process::Command::new(&amp;#34;git&amp;#34;)&lt;br/&gt;            .args(&amp;amp;[&amp;#34;rev-parse&amp;#34;, &amp;#34;HEAD&amp;#34;])&lt;br/&gt;            .stdout(std::process::Stdio::piped())&lt;br/&gt;            .stderr(std::process::Stdio::piped())&lt;br/&gt;            .output()&lt;br/&gt;            .expect(&amp;#34;Failed to execute git command for commit hash&amp;#34;);&lt;br/&gt;&lt;br/&gt;        let git_commit_hash_str = if git_commit_hash_output.status.success() &amp;amp;&amp;amp; !git_commit_hash_output.stdout.is_empty() {&lt;br/&gt;            String::from_utf8(git_commit_hash_output.stdout).unwrap().trim().to_string()&lt;br/&gt;        } else {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Git commit hash command failed or returned empty. Status: {:?}, Stderr: {}&amp;#34;, &lt;br/&gt;                     git_commit_hash_output.status, String::from_utf8_lossy(&amp;amp;git_commit_hash_output.stderr));&lt;br/&gt;            String::new()&lt;br/&gt;        };&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=GIT_COMMIT_HASH={}&amp;#34;, git_commit_hash_str);&lt;br/&gt;        // Create padded_commit_hash&lt;br/&gt;        let padded_commit_hash = format!(&amp;#34;{:0&amp;gt;64}&amp;#34;, &amp;amp;git_commit_hash_str);&lt;br/&gt;        println!(&amp;#34;cargo:rustc-env=PADDED_COMMIT_HASH={}&amp;#34;, padded_commit_hash);&lt;br/&gt;        // Initialize client and keys once&lt;br/&gt;        let initial_secret_key = SecretKey::parse(&amp;amp;padded_commit_hash).expect(&amp;#34;Failed to create Nostr SecretKey from PADDED_COMMIT_HASH&amp;#34;);&lt;br/&gt;        let initial_keys = Keys::new(initial_secret_key);&lt;br/&gt;        let mut client = nostr_sdk::Client::new(initial_keys.clone());&lt;br/&gt;        let mut relay_urls = get_file_hash_core::get_relay_urls();&lt;br/&gt;&lt;br/&gt;        // Add relays to the client&lt;br/&gt;        for relay_url in relay_urls.iter() {&lt;br/&gt;            if let Err(e) = client.add_relay(relay_url).await {&lt;br/&gt;                println!(&amp;#34;cargo:warning=Failed to add relay {}: {}&amp;#34;, relay_url, e);&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;        client.connect().await;&lt;br/&gt;        println!(&amp;#34;cargo:warning=Added and connected to {} relays.&amp;#34;, relay_urls.len());&lt;br/&gt;&lt;br/&gt;        let mut published_event_ids: Vec&amp;lt;Tag&amp;gt; = Vec::new();&lt;br/&gt;        let mut total_bytes_sent: usize = 0;&lt;br/&gt;    &lt;br/&gt;        for file_path_str in &amp;amp;files_to_publish {&lt;br/&gt;            println!(&amp;#34;cargo:warning=Processing file: {}&amp;#34;, file_path_str);&lt;br/&gt;            match fs::read(file_path_str) {&lt;br/&gt;                Ok(bytes) =&amp;gt; {&lt;br/&gt;                    let mut hasher = Sha256::new();&lt;br/&gt;                    hasher.update(&amp;amp;bytes);&lt;br/&gt;                    let result = hasher.finalize();&lt;br/&gt;                    let file_hash_hex = hex::encode(result);&lt;br/&gt;&lt;br/&gt;                    match SecretKey::from_hex(&amp;amp;file_hash_hex.clone()) {&lt;br/&gt;                        Ok(secret_key) =&amp;gt; {&lt;br/&gt;                            let keys = Keys::new(secret_key);&lt;br/&gt;                            let content = String::from_utf8_lossy(&amp;amp;bytes).into_owned();&lt;br/&gt;                            let tags = vec![&lt;br/&gt;                                Tag::parse([&amp;#34;file&amp;#34;, file_path_str].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                                Tag::parse([&amp;#34;version&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                            ];&lt;br/&gt;                            let event_builder = EventBuilder::text_note(content).tags(tags);&lt;br/&gt;&lt;br/&gt;                            if let Some(event_id) = publish_nostr_event_if_release(&amp;amp;mut client, file_hash_hex, keys.clone(), event_builder, &amp;amp;mut relay_urls, file_path_str, &amp;amp;output_dir, &amp;amp;mut total_bytes_sent).await {&lt;br/&gt;                                published_event_ids.push(Tag::event(event_id));&lt;br/&gt;                            }&lt;br/&gt;&lt;br/&gt;                            // Publish metadata event&lt;br/&gt;                            get_file_hash_core::publish_metadata_event(&lt;br/&gt;                                &amp;amp;keys,&lt;br/&gt;                                &amp;amp;relay_urls,&lt;br/&gt;                                DEFAULT_PICTURE_URL,&lt;br/&gt;                                DEFAULT_BANNER_URL,&lt;br/&gt;                                file_path_str,&lt;br/&gt;                            ).await;&lt;br/&gt;                        }&lt;br/&gt;                        Err(e) =&amp;gt; {&lt;br/&gt;                            println!(&amp;#34;cargo:warning=Failed to derive Nostr secret key for {}: {}&amp;#34;, file_path_str, e);&lt;br/&gt;                        }&lt;br/&gt;                    }&lt;br/&gt;                }&lt;br/&gt;                Err(e) =&amp;gt; {&lt;br/&gt;                    println!(&amp;#34;cargo:warning=Failed to read file {}: {}&amp;#34;, file_path_str, e);&lt;br/&gt;                }&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;&lt;br/&gt;        // Create and publish the build_manifest&lt;br/&gt;        if !published_event_ids.is_empty() {&lt;br/&gt;&lt;br/&gt;            //TODO this will be either the default or detected from env vars PRIVATE_KEY&lt;br/&gt;            let keys = Keys::new(SecretKey::from_hex(DEFAULT_GNOSTR_KEY).expect(&amp;#34;Failed to create Nostr keys from DEFAULT_GNOSTR_KEY&amp;#34;));&lt;br/&gt;            let cloned_keys = keys.clone();&lt;br/&gt;            let content = format!(&amp;#34;Build manifest for get_file_hash v{}&amp;#34;, package_version);&lt;br/&gt;            let mut tags = vec![&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;                Tag::parse([&amp;#34;build_manifest&amp;#34;, &amp;amp;package_version].iter().map(ToString::to_string).collect::&amp;lt;Vec&amp;lt;String&amp;gt;&amp;gt;()).unwrap(),&lt;br/&gt;            ];&lt;br/&gt;            tags.extend(published_event_ids);&lt;br/&gt;&lt;br/&gt;            let event_builder = EventBuilder::text_note(content.clone()).tags(tags);&lt;br/&gt;&lt;br/&gt;            if let Some(event_id) = publish_nostr_event_if_release(&lt;br/&gt;                &amp;amp;mut client,&lt;br/&gt;                hex::encode(Sha256::digest(content.as_bytes())),&lt;br/&gt;                keys,&lt;br/&gt;                event_builder,&lt;br/&gt;                &amp;amp;mut relay_urls,&lt;br/&gt;                &amp;#34;build_manifest.json&amp;#34;,&lt;br/&gt;                &amp;amp;output_dir,&lt;br/&gt;                &amp;amp;mut total_bytes_sent,&lt;br/&gt;            ).await {&lt;br/&gt;&lt;br/&gt;                let build_manifest_event_id = Some(event_id);&lt;br/&gt;&lt;br/&gt;            // Publish metadata event for the build manifest&lt;br/&gt;            get_file_hash_core::publish_metadata_event(&lt;br/&gt;                &amp;amp;cloned_keys, // Use reference to cloned keys here&lt;br/&gt;                &amp;amp;relay_urls,&lt;br/&gt;                DEFAULT_PICTURE_URL,&lt;br/&gt;                DEFAULT_BANNER_URL,&lt;br/&gt;                &amp;amp;format!(&amp;#34;build_manifest:{}&amp;#34;, package_version),&lt;br/&gt;            ).await;&lt;br/&gt;            let git_commit_hash = &amp;amp;git_commit_hash_str;&lt;br/&gt;            let git_branch = &amp;amp;git_branch_str;&lt;br/&gt;            let repo_url = std::env::var(&amp;#34;CARGO_PKG_REPOSITORY&amp;#34;).unwrap();&lt;br/&gt;            let repo_name = std::env::var(&amp;#34;CARGO_PKG_NAME&amp;#34;).unwrap();&lt;br/&gt;            let repo_description = std::env::var(&amp;#34;CARGO_PKG_DESCRIPTION&amp;#34;).unwrap();&lt;br/&gt;&lt;br/&gt;            let output_dir = PathBuf::from(format!(&amp;#34;.gnostr/build/{}&amp;#34;, package_version));&lt;br/&gt;            if let Err(e) = fs::create_dir_all(&amp;amp;output_dir) {&lt;br/&gt;                println!(&amp;#34;cargo:warning=Failed to create output directory {}: {}&amp;#34;, output_dir.display(), e);&lt;br/&gt;            }&lt;br/&gt;&lt;br/&gt;            let announcement_keys = Keys::new(SecretKey::from_hex(build_manifest_event_id.unwrap().to_hex().as_str()).expect(&amp;#34;Failed to create Nostr keys from build_manifest_event_id&amp;#34;));&lt;br/&gt;            let announcement_pubkey_hex = announcement_keys.public_key().to_string();&lt;br/&gt;&lt;br/&gt;            // Publish NIP-34 Repository Announcement&lt;br/&gt;            if let Some(_event_id) = get_repo_announcement_event(&lt;br/&gt;                &amp;amp;mut client,&lt;br/&gt;                &amp;amp;announcement_keys,&lt;br/&gt;                &amp;amp;relay_urls,&lt;br/&gt;                &amp;amp;repo_url,&lt;br/&gt;                &amp;amp;repo_name,&lt;br/&gt;                &amp;amp;repo_description,&lt;br/&gt;                &amp;amp;git_commit_hash,&lt;br/&gt;                &amp;amp;git_branch,&lt;br/&gt;                &amp;amp;output_dir,&lt;br/&gt;                &amp;amp;announcement_pubkey_hex&lt;br/&gt;            ).await {&lt;br/&gt;                // Successfully published announcement&lt;br/&gt;            }&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;        println!(&amp;#34;cargo:warning=Total bytes sent to Nostr relays: {} bytes ({} MB)&amp;#34;, total_bytes_sent, total_bytes_sent as f64 / 1024.0 / 1024.0);&lt;br/&gt;    }&lt;br/&gt;}&lt;br/&gt;// deterministic nostr event build example&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:35Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsdfxqt5xmxp8l0325r0yrjkf607ezzh5fs0mh7r5j240cmnymlu0spr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx25whnx</id>
    
      <title type="html"># `get_file_hash` macro This project provides a Rust procedural ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsdfxqt5xmxp8l0325r0yrjkf607ezzh5fs0mh7r5j240cmnymlu0spr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx25whnx" />
    <content type="html">
      # `get_file_hash` macro&lt;br/&gt;&lt;br/&gt;This project provides a Rust procedural macro, `get_file_hash!`, designed to compute the SHA-256 hash of a specified file at compile time. This hash is then embedded directly into your compiled executable. This feature is invaluable for:&lt;br/&gt;&lt;br/&gt;*   **Integrity Verification:** Ensuring the deployed code hasn&amp;#39;t been tampered with.&lt;br/&gt;*   **Versioning:** Embedding a unique identifier linked to the exact source code version.&lt;br/&gt;*   **Cache Busting:** Generating unique names for assets based on their content.&lt;br/&gt;&lt;br/&gt;## Project Structure&lt;br/&gt;&lt;br/&gt;*   `get_file_hash_core`: A foundational crate containing the `get_file_hash!` macro definition.&lt;br/&gt;*   `get_file_hash`: The main library crate that re-exports the macro.&lt;br/&gt;*   `src/bin/get_file_hash.rs`: An example executable demonstrating the macro&amp;#39;s usage by hashing its own source file and updating this `README.md`.&lt;br/&gt;*   `build.rs`: A build script that also utilizes the `get_file_hash!` macro to hash `Cargo.toml` during the build process.&lt;br/&gt;&lt;br/&gt;## Usage of `get_file_hash!` Macro&lt;br/&gt;&lt;br/&gt;To use the `get_file_hash!` macro, ensure you have `get_file_hash` (or `get_file_hash_core` for direct usage) as a dependency in your `Cargo.toml`.&lt;br/&gt;&lt;br/&gt;### Example&lt;br/&gt;&lt;br/&gt;```rust&lt;br/&gt;use get_file_hash::get_file_hash;&lt;br/&gt;use get_file_hash::CARGO_TOML_HASH;&lt;br/&gt;use sha2::{Digest, Sha256};&lt;br/&gt;&lt;br/&gt;fn main() {&lt;br/&gt;    // The macro resolves the path relative to CARGO_MANIFEST_DIR&lt;br/&gt;    let readme_hash = get_file_hash!(&amp;#34;src/bin/readme.rs&amp;#34;);&lt;br/&gt;    let lib_hash = get_file_hash!(&amp;#34;src/lib.rs&amp;#34;);&lt;br/&gt;    println!(&amp;#34;The SHA-256 hash of src/lib.rs is: {}&amp;#34;, lib_hash);&lt;br/&gt;    println!(&amp;#34;The SHA-256 hash of src/bin/readme.rs is: {}&amp;#34;, readme_hash);&lt;br/&gt;    println!(&amp;#34;The SHA-256 hash of Cargo.toml is: {}&amp;#34;, CARGO_TOML_HASH);&lt;br/&gt;}&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;## Release&lt;br/&gt;## [`README.md`](./README.md)&lt;br/&gt;&lt;br/&gt;```bash&lt;br/&gt;cargo run --bin readme &amp;gt; README.md&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;## [`src/bin/readme.rs`](src/bin/readme.rs)&lt;br/&gt;&lt;br/&gt;*   **Target File:** `src/bin/readme.rs`&lt;br/&gt;## NIP-34 Integration: Git Repository Events on Nostr&lt;br/&gt;&lt;br/&gt;This library provides a set of powerful macros and functions for integrating Git repository events with the Nostr protocol, adhering to the [NIP-34: Git Repositories on Nostr](&lt;a href=&#34;https://github.com/nostr-protocol/nips/blob/master/34.md&#34;&gt;https://github.com/nostr-protocol/nips/blob/master/34.md&lt;/a&gt;) specification.&lt;br/&gt;&lt;br/&gt;These tools allow you to publish various Git-related events to Nostr relays, enabling decentralized tracking and collaboration for your code repositories.&lt;br/&gt;&lt;br/&gt;### Available NIP-34 Macros&lt;br/&gt;&lt;br/&gt;Each macro provides a convenient way to publish specific NIP-34 event kinds:&lt;br/&gt;&lt;br/&gt;*   [`repository_announcement!`](#repository_announcement)&lt;br/&gt;    *   Publishes a `Repository Announcement` event (Kind 30617) to announce a new or updated Git repository.&lt;br/&gt;*   [`publish_patch!`](#publish_patch)&lt;br/&gt;    *   Publishes a `Patch` event (Kind 1617) containing a Git patch (diff) for a specific commit.&lt;br/&gt;*   [`publish_pull_request!`](#publish_pull_request)&lt;br/&gt;    *   Publishes a `Pull Request` event (Kind 1618) to propose changes and facilitate code review.&lt;br/&gt;*   [`publish_pr_update!`](#publish_pr_update)&lt;br/&gt;    *   Publishes a `Pull Request Update` event (Kind 1619) to update an existing pull request.&lt;br/&gt;*   [`publish_repository_state!`](#publish_repository_state)&lt;br/&gt;    *   Publishes a `Repository State` event (Kind 1620) to announce the current state of a branch (e.g., its latest commit).&lt;br/&gt;*   [`publish_issue!`](#publish_issue)&lt;br/&gt;    *   Publishes an `Issue` event (Kind 1621) to report bugs, request features, or track tasks.&lt;br/&gt;&lt;br/&gt;### Running NIP-34 Examples&lt;br/&gt;&lt;br/&gt;To see these macros in action, navigate to the `examples/` directory and run each example individually with the `nostr` feature enabled:&lt;br/&gt;&lt;br/&gt;```bash&lt;br/&gt;cargo run --example repository_announcement --features nostr&lt;br/&gt;cargo run --example publish_patch --features nostr&lt;br/&gt;cargo run --example publish_pull_request --features nostr&lt;br/&gt;cargo run --example publish_pr_update --features nostr&lt;br/&gt;cargo run --example publish_repository_state --features nostr&lt;br/&gt;cargo run --example publish_issue --features nostr&lt;br/&gt;```&lt;br/&gt;&lt;br/&gt;*   **SHA-256 Hash:** 6c6325c5a4c14f44cbda6ca53179ab3d6666ce7c916365668c6dd1d79215db59&lt;br/&gt;*   **Status:** Integrity Verified..&lt;br/&gt;&lt;br/&gt;##&lt;br/&gt;&lt;br/&gt;## [`build.rs`](build.rs)&lt;br/&gt;&lt;br/&gt;*   **Target File:** `build.rs`&lt;br/&gt;*   **SHA-256 Hash:** 20c958c8cbb5c77cf5eb3763b6da149b61241d328df52d39b7aa97903305c889&lt;br/&gt;*   **Status:** Integrity Verified..&lt;br/&gt;&lt;br/&gt;##&lt;br/&gt;&lt;br/&gt;## [`Cargo.toml`](Cargo.toml)&lt;br/&gt;&lt;br/&gt;*   **Target File:** `Cargo.toml`&lt;br/&gt;*   **SHA-256 Hash:** e3f392bf23b5fb40902acd313a8c76d1943060b6805ea8615de62f9baf0c6513&lt;br/&gt;*   **Status:** Integrity Verified..&lt;br/&gt;&lt;br/&gt;##&lt;br/&gt;&lt;br/&gt;## [`src/lib.rs`](src/lib.rs)&lt;br/&gt;&lt;br/&gt;*   **Target File:** `src/lib.rs`&lt;br/&gt;*   **SHA-256 Hash:** 591593482a6c9aac8793aa1e488e613f52a4effb1ec3465fd9d6a54537f2b123&lt;br/&gt;*   **Status:** Integrity Verified..&lt;br/&gt;&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:34Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqspdpaf4k2jkycq2x4u74d5k07egs8y9nqx85el77t7ppgrg8cpd3cpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxu5dr53</id>
    
      <title type="html">#!/usr/bin/env sh N34_RELAY_BASE_DIR=./bin RUST_LOG=debug cargo ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqspdpaf4k2jkycq2x4u74d5k07egs8y9nqx85el77t7ppgrg8cpd3cpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxu5dr53" />
    <content type="html">
      #!/usr/bin/env sh&lt;br/&gt;N34_RELAY_BASE_DIR=./bin RUST_LOG=debug cargo run -p n34-relay&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:31Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs2a8g5yqv96qdakpvmcu5c5qtuufgj5fsx8hgqnj6qpsgfn97xlgspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxx0kk4g</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use frost_secp256k1_tr as ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs2a8g5yqv96qdakpvmcu5c5qtuufgj5fsx8hgqnj6qpsgfn97xlgspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxx0kk4g" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost_secp256k1_tr as frost; // MUST use the -tr variant for BIP-340/Nostr&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand::thread_rng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use serde_json::json;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use sha2::{Digest, Sha256};&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use hex;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    let mut rng = thread_rng();&lt;br/&gt;    let (max_signers, min_signers) = (3, 2);&lt;br/&gt;&lt;br/&gt;    // 1. Setup Nostr Event Metadata&lt;br/&gt;    let pubkey_hex = &amp;#34;79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798&amp;#34;; // Example&lt;br/&gt;    let created_at = 1712050000;&lt;br/&gt;    let kind = 1;&lt;br/&gt;    let content = &amp;#34;Hello from ROAST threshold signatures!&amp;#34;;&lt;br/&gt;    &lt;br/&gt;    // 2. Serialize for Nostr ID (per NIP-01)&lt;br/&gt;    let event_json = json!([&lt;br/&gt;        0,&lt;br/&gt;        pubkey_hex,&lt;br/&gt;        created_at,&lt;br/&gt;        kind,&lt;br/&gt;        [],&lt;br/&gt;        content&lt;br/&gt;    ]).to_string();&lt;br/&gt;    &lt;br/&gt;    let mut hasher = Sha256::new();&lt;br/&gt;    hasher.update(event_json.as_bytes());&lt;br/&gt;    let event_id = hasher.finalize(); // This 32-byte hash is our signing message&lt;br/&gt;&lt;br/&gt;    // 3. FROST/ROAST Key Generation&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        max_signers,&lt;br/&gt;        min_signers,&lt;br/&gt;        frost::keys::IdentifierList::Default,&lt;br/&gt;        &amp;amp;mut rng,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 4. ROAST Coordination Simulation (Round 1: Commitments)&lt;br/&gt;    // In ROAST, the coordinator keeps a &amp;#34;session&amp;#34; open and collects commitments&lt;br/&gt;    let mut session_commitments = BTreeMap::new();&lt;br/&gt;    let mut signer_nonces = BTreeMap::new();&lt;br/&gt;&lt;br/&gt;    // Signers 1 and 3 respond first (Signer 2 is offline/slow)&lt;br/&gt;    for &amp;amp;id_val in &amp;amp;[1, 3] {&lt;br/&gt;        let id = frost::Identifier::try_from(id_val as u16)?;&lt;br/&gt;        let (nonces, comms) = frost::round1::commit(shares[&amp;amp;id].signing_share(), &amp;amp;mut rng);&lt;br/&gt;        session_commitments.insert(id, comms);&lt;br/&gt;        signer_nonces.insert(id, nonces);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 5. Round 2: Signing the Nostr ID&lt;br/&gt;    let signing_package = frost::SigningPackage::new(session_commitments, &amp;amp;event_id);&lt;br/&gt;    let mut signature_shares = BTreeMap::new();&lt;br/&gt;&lt;br/&gt;    for (id, nonces) in signer_nonces {&lt;br/&gt;        let key_package: frost::keys::KeyPackage = shares[&amp;amp;id].clone().try_into()?;&lt;br/&gt;        let share = frost::round2::sign(&amp;amp;signing_package, &amp;amp;nonces, &amp;amp;key_package)?;&lt;br/&gt;        signature_shares.insert(id, share);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 6. Aggregate into a BIP-340 Signature&lt;br/&gt;    let group_signature = frost::aggregate(&lt;br/&gt;        &amp;amp;signing_package,&lt;br/&gt;        &amp;amp;signature_shares,&lt;br/&gt;        &amp;amp;pubkey_package,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 7. Verification (using BIP-340 logic)&lt;br/&gt;    pubkey_package.verifying_key().verify(&amp;amp;event_id, &amp;amp;group_signature)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;Nostr Event ID: {}&amp;#34;, hex::encode(event_id));&lt;br/&gt;    println!(&amp;#34;Threshold Signature (BIP-340): {}&amp;#34;, hex::encode(group_signature.serialize()?));&lt;br/&gt;    println!(&amp;#34;Successfully signed Nostr event using ROAST/FROST!&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example frost_bip_340 --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:30Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs0jr26al58a3w88vqmptmrvlwt0l05t85vfzxd8ysfeda9gjx8wzcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxkjmhnd</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs0jr26al58a3w88vqmptmrvlwt0l05t85vfzxd8ysfeda9gjx8wzcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxkjmhnd" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Setup deterministic dealer (Genesis State)&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let (shares, _pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, 2, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. Setup Participant 1&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p1_share = &amp;amp;shares[&amp;amp;p1_id];&lt;br/&gt;    &lt;br/&gt;    // 3. Setup Nonce RNG&lt;br/&gt;    let mut nonce_rng = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Round 1: Batch Nonce Generation ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Participant: {:?}&amp;#34;, p1_id);&lt;br/&gt;    println!(&amp;#34;Generating 10 Nonce Pairs...\n&amp;#34;);&lt;br/&gt;&lt;br/&gt;    let mut batch_commitments = BTreeMap::new();&lt;br/&gt;    let mut batch_secrets = Vec::new();&lt;br/&gt;&lt;br/&gt;    for i in 0..10 {&lt;br/&gt;        // Generate a single pair&lt;br/&gt;        let (nonces, commitments) = round1::commit(p1_share.signing_share(), &amp;amp;mut nonce_rng);&lt;br/&gt;        &lt;br/&gt;        // Store the secret nonces locally (index i)&lt;br/&gt;        batch_secrets.push(nonces);&lt;br/&gt;        &lt;br/&gt;        // Store the public commitments in a map to share with the Coordinator&lt;br/&gt;        batch_commitments.insert(i, commitments);&lt;br/&gt;&lt;br/&gt;        println!(&amp;#34;Nonce Pair [{}]:&amp;#34;, i);&lt;br/&gt;        println!(&amp;#34;  Hiding:  {}&amp;#34;, hex::encode(commitments.hiding().serialize()?));&lt;br/&gt;        println!(&amp;#34;  Binding: {}&amp;#34;, hex::encode(commitments.binding().serialize()?));&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 4. Persistence Simulation&lt;br/&gt;    // In a real GCC app, you would save `batch_secrets` to an encrypted file &lt;br/&gt;    // and send `batch_commitments` to a Nostr Relay (Kind 1351).&lt;br/&gt;    println!(&amp;#34;\n✅ Batch generation complete.&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Ready to sign up to 10 independent Git commits.&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Run with --features nostr&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:30Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsglmzcgzswpt7z3qa8w6fee32ke799nqx8pszk0ptruvu7h4emjtspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxdzcq0f</id>
    
      <title type="html">/// BIP-64MOD &#43; GCC: Complete Git Empty &amp;amp; Genesis Constants ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsglmzcgzswpt7z3qa8w6fee32ke799nqx8pszk0ptruvu7h4emjtspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxdzcq0f" />
    <content type="html">
      /// BIP-64MOD &#43; GCC: Complete Git Empty &amp;amp; Genesis Constants&lt;br/&gt;/// &lt;br/&gt;/// This module provides the standard cryptographic identifiers for &amp;#34;null&amp;#34;, &lt;br/&gt;/// &amp;#34;empty&amp;#34;, and &amp;#34;genesis&amp;#34; states, including NIP-19 (Bech32) identities.&lt;br/&gt;pub struct GitEmptyState;&lt;br/&gt;&lt;br/&gt;impl GitEmptyState {&lt;br/&gt;    // === NULL REFERENCE (Zero Hash) ===&lt;br/&gt;    pub const NULL_SHA256: &amp;amp;&amp;#39;static str = &amp;#34;0000000000000000000000000000000000000000000000000000000000000000&amp;#34;;&lt;br/&gt;&lt;br/&gt;    // === EMPTY BLOB (Empty File) ===&lt;br/&gt;    pub const BLOB_SHA1: &amp;amp;&amp;#39;static str = &amp;#34;e69de29bb2d1d6434b8b29ae775ad8c2e48c5391&amp;#34;;&lt;br/&gt;    pub const BLOB_SHA256: &amp;amp;&amp;#39;static str = &amp;#34;473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813&amp;#34;;&lt;br/&gt;    pub const BLOB_NSEC: &amp;amp;&amp;#39;static str = &amp;#34;nsec1guaq7npmaz5ndqdzvl3mr6d8mndprp2rdls5ram5jys2xqmjrqfsdzhrp6&amp;#34;;&lt;br/&gt;    pub const BLOB_NPUB: &amp;amp;&amp;#39;static str = &amp;#34;npub180cvv07tjdrghvkyh6964p7w9vsqpf3p05868v399v86p8y6f69sq5fdp0&amp;#34;;&lt;br/&gt;&lt;br/&gt;    // === EMPTY TREE (Empty Directory) ===&lt;br/&gt;    pub const TREE_SHA1: &amp;amp;&amp;#39;static str = &amp;#34;4b825dc642cb6eb9a060e54bf8d69288fbee4904&amp;#34;;&lt;br/&gt;    pub const TREE_SHA256: &amp;amp;&amp;#39;static str = &amp;#34;6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321&amp;#34;;&lt;br/&gt;    pub const TREE_NSEC: &amp;amp;&amp;#39;static str = &amp;#34;nsec1dmceksfzt3fknuwpqn29mrv9a75mq4a48v2tfwde88whfhkv2vsslsc46c&amp;#34;;&lt;br/&gt;    pub const TREE_NPUB: &amp;amp;&amp;#39;static str = &amp;#34;npub1pxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq6erdfh&amp;#34;;&lt;br/&gt;&lt;br/&gt;    // === GENESIS COMMIT (DeepSpaceM1 @ Epoch 0) ===&lt;br/&gt;    /// Result of: git commit --allow-empty -m &amp;#39;Initial commit&amp;#39; &lt;br/&gt;    /// With Author/Committer: DeepSpaceM1 &amp;lt;ds_m1@gnostr.org&amp;gt; @ 1970-01-01T00:00:00Z&lt;br/&gt;    pub const GENESIS_AUTHOR_NAME: &amp;amp;&amp;#39;static str = &amp;#34;DeepSpaceM1&amp;#34;;&lt;br/&gt;    pub const GENESIS_AUTHOR_EMAIL: &amp;amp;&amp;#39;static str = &amp;#34;ds_m1@gnostr.org&amp;#34;;&lt;br/&gt;    pub const GENESIS_DATE_UNIX: i64 = 0;&lt;br/&gt;    pub const GENESIS_MESSAGE: &amp;amp;&amp;#39;static str = &amp;#34;Initial commit&amp;#34;;&lt;br/&gt;&lt;br/&gt;    /// The resulting SHA-256 Commit Hash for this specific configuration&lt;br/&gt;    pub const GENESIS_COMMIT_SHA256: &amp;amp;&amp;#39;static str = &amp;#34;e9768652d87e07663479a0ad402513f56d953930b659c2ef389d4d03d3623910&amp;#34;;&lt;br/&gt;    &lt;br/&gt;    /// The NIP-19 Identity associated with the Genesis Commit&lt;br/&gt;    pub const GENESIS_NSEC: &amp;amp;&amp;#39;static str = &amp;#34;nsec1jpxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq68at9d&amp;#34;;&lt;br/&gt;    pub const GENESIS_NPUB: &amp;amp;&amp;#39;static str = &amp;#34;npub1pxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq6erdfh&amp;#34;;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;/// Helper for constructing the commit object string for hashing&lt;br/&gt;pub mod builders {&lt;br/&gt;    use super::GitEmptyState;&lt;br/&gt;&lt;br/&gt;    pub fn build_genesis_commit_object() -&amp;gt; String {&lt;br/&gt;        format!(&lt;br/&gt;            &amp;#34;tree {}\nauthor {} &amp;lt;{}&amp;gt; {} &#43;0000\ncommitter {} &amp;lt;{}&amp;gt; {} &#43;0000\n\n{}\n&amp;#34;,&lt;br/&gt;            GitEmptyState::TREE_SHA256,&lt;br/&gt;            GitEmptyState::GENESIS_AUTHOR_NAME,&lt;br/&gt;            GitEmptyState::GENESIS_AUTHOR_EMAIL,&lt;br/&gt;            GitEmptyState::GENESIS_DATE_UNIX,&lt;br/&gt;            GitEmptyState::GENESIS_AUTHOR_NAME,&lt;br/&gt;            GitEmptyState::GENESIS_AUTHOR_EMAIL,&lt;br/&gt;            GitEmptyState::GENESIS_DATE_UNIX,&lt;br/&gt;            GitEmptyState::GENESIS_MESSAGE&lt;br/&gt;        )&lt;br/&gt;    }&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD &#43; GCC Genesis State ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Commit Hash: {}&amp;#34;, GitEmptyState::GENESIS_COMMIT_SHA256);&lt;br/&gt;    println!(&amp;#34;Author:      {} &amp;lt;{}&amp;gt;&amp;#34;, GitEmptyState::GENESIS_AUTHOR_NAME, GitEmptyState::GENESIS_AUTHOR_EMAIL);&lt;br/&gt;    println!(&amp;#34;Timestamp:   {}&amp;#34;, GitEmptyState::GENESIS_DATE_UNIX);&lt;br/&gt;    println!(&amp;#34;NSEC:        {}&amp;#34;, GitEmptyState::GENESIS_NSEC);&lt;br/&gt;    &lt;br/&gt;    let object_raw = builders::build_genesis_commit_object();&lt;br/&gt;    println!(&amp;#34;\nRaw Git Commit Object:\n---\n{}---&amp;#34;, object_raw);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:21Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqs0dq6s4l5mf3sjxwtymwtfdpe5j2hpr5qflq4gcx4rrttq0n8rk0qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxr4n2vu</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use frost_secp256k1_tr as ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqs0dq6s4l5mf3sjxwtymwtfdpe5j2hpr5qflq4gcx4rrttq0n8rk0qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxr4n2vu" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand::thread_rng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    let mut rng = thread_rng();&lt;br/&gt;    let max_signers = 3;&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    // Round 0: Key Generation (Trusted Dealer)&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    &lt;br/&gt;    // In a real P2P setup, you&amp;#39;d use Distributed Key Generation (DKG).&lt;br/&gt;    // For local testing/simulations, the trusted dealer is faster.&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        max_signers,&lt;br/&gt;        min_signers,&lt;br/&gt;        frost::keys::IdentifierList::Default,&lt;br/&gt;        &amp;amp;mut rng,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // Verifying the public key exists&lt;br/&gt;    let group_public_key = pubkey_package.verifying_key();&lt;br/&gt;    println!(&amp;#34;Group Public Key: {:?}&amp;#34;, group_public_key);&lt;br/&gt;&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    // Round 1: Commitment&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    &lt;br/&gt;    let message = b&amp;#34;BIP-64MOD Consensus Proposal&amp;#34;;&lt;br/&gt;    let mut signing_commitments = BTreeMap::new();&lt;br/&gt;    let mut participant_nonces = BTreeMap::new();&lt;br/&gt;&lt;br/&gt;    // Participants 1 and 2 decide to sign&lt;br/&gt;    for i in 1..=min_signers {&lt;br/&gt;        let identifier = frost::Identifier::try_from(i as u16)?;&lt;br/&gt;        &lt;br/&gt;        // Generate nonces and commitments&lt;br/&gt;        let (nonces, commitments) = frost::round1::commit(&lt;br/&gt;            shares[&amp;amp;identifier].signing_share(),&lt;br/&gt;            &amp;amp;mut rng,&lt;br/&gt;        );&lt;br/&gt;        &lt;br/&gt;        signing_commitments.insert(identifier, commitments);&lt;br/&gt;        participant_nonces.insert(identifier, nonces);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    // Round 2: Signing&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    &lt;br/&gt;    let mut signature_shares = BTreeMap::new();&lt;br/&gt;    let signing_package = frost::SigningPackage::new(signing_commitments, message);&lt;br/&gt;&lt;br/&gt;    for i in 1..=min_signers {&lt;br/&gt;        let identifier = frost::Identifier::try_from(i as u16)?;&lt;br/&gt;        let nonces = &amp;amp;participant_nonces[&amp;amp;identifier];&lt;br/&gt;        &lt;br/&gt;        // Each participant produces a signature share&lt;br/&gt;        let key_package: frost::keys::KeyPackage = shares[&amp;amp;identifier].clone().try_into()?;&lt;br/&gt;        let share = frost::round2::sign(&amp;amp;signing_package, nonces, &amp;amp;key_package)?;&lt;br/&gt;        signature_shares.insert(identifier, share);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    // Finalization: Aggregation&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    &lt;br/&gt;    let group_signature = frost::aggregate(&lt;br/&gt;        &amp;amp;signing_package,&lt;br/&gt;        &amp;amp;signature_shares,&lt;br/&gt;        &amp;amp;pubkey_package,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // Verification&lt;br/&gt;    group_public_key.verify(message, &amp;amp;group_signature)?;&lt;br/&gt;    &lt;br/&gt;    println!(&amp;#34;Threshold signature verified successfully!&amp;#34;);&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example trusted-dealer --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:20Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqszh6kmns9nd95cgpaheng7rzasydacqgaky3vmpvy5mnz3jtslruqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxhy60qc</id>
    
      <title type="html">[workspace] members = [&amp;#34;.&amp;#34;, ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqszh6kmns9nd95cgpaheng7rzasydacqgaky3vmpvy5mnz3jtslruqpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxhy60qc" />
    <content type="html">
      [workspace]&lt;br/&gt;members = [&amp;#34;.&amp;#34;, &amp;#34;src/get_file_hash_core&amp;#34;, &amp;#34;n34&amp;#34;, &amp;#34;n34-relay&amp;#34;]&lt;br/&gt;&lt;br/&gt;[workspace.package]&lt;br/&gt;version = &amp;#34;0.4.7&amp;#34;&lt;br/&gt;edition = &amp;#34;2024&amp;#34;&lt;br/&gt;license = &amp;#34;MIT&amp;#34;&lt;br/&gt;authors = [&amp;#34;gnostr admin@gnostr.org&amp;#34;]&lt;br/&gt;documentation = &amp;#34;&lt;a href=&#34;https://github.com/gnostr-org/get_file_hash#readme&amp;#34&#34;&gt;https://github.com/gnostr-org/get_file_hash#readme&amp;#34&lt;/a&gt;;&lt;br/&gt;homepage = &amp;#34;&lt;a href=&#34;https://github.com/gnostr-org/get_file_hash&amp;#34&#34;&gt;https://github.com/gnostr-org/get_file_hash&amp;#34&lt;/a&gt;;&lt;br/&gt;repository = &amp;#34;&lt;a href=&#34;https://github.com/gnostr-org/get_file_hash&amp;#34&#34;&gt;https://github.com/gnostr-org/get_file_hash&amp;#34&lt;/a&gt;;&lt;br/&gt;description = &amp;#34;A utility crate providing a procedural macro to compute and embed file hashes at compile time.&amp;#34;&lt;br/&gt;&lt;br/&gt;[package]&lt;br/&gt;name = &amp;#34;get_file_hash&amp;#34;&lt;br/&gt;version.workspace = true&lt;br/&gt;edition.workspace = true&lt;br/&gt;description.workspace = true&lt;br/&gt;repository.workspace = true&lt;br/&gt;homepage.workspace = true&lt;br/&gt;authors.workspace = true&lt;br/&gt;license.workspace = true&lt;br/&gt;&lt;br/&gt;[package.metadata.wix]&lt;br/&gt;upgrade-guid = &amp;#34;DED69220-26E3-4406-B564-7F2B58C56F57&amp;#34;&lt;br/&gt;path-guid = &amp;#34;8DB39A25-8B99-4C25-8CF5-4704353C7C6E&amp;#34;&lt;br/&gt;license = false&lt;br/&gt;eula = false&lt;br/&gt;&lt;br/&gt;[features]&lt;br/&gt;nostr = [&amp;#34;dep:nostr&amp;#34;, &amp;#34;dep:nostr-sdk&amp;#34;, &amp;#34;dep:hex&amp;#34;]&lt;br/&gt;frost = [&amp;#34;dep:nostr&amp;#34;, &amp;#34;dep:nostr-sdk&amp;#34;, &amp;#34;dep:hex&amp;#34;]&lt;br/&gt;gen-protos = []&lt;br/&gt;&lt;br/&gt;[workspace.dependencies]&lt;br/&gt;get_file_hash_core = { features = [&amp;#34;nostr&amp;#34;], path = &amp;#34;src/get_file_hash_core&amp;#34;, version = &amp;#34;0.4.7&amp;#34; }&lt;br/&gt;rand_chacha = &amp;#34;0.3&amp;#34;&lt;br/&gt;sha2 = &amp;#34;0.11.0&amp;#34;&lt;br/&gt;nostr = { version = &amp;#34;0.44.2&amp;#34;, features = [&amp;#34;std&amp;#34;, &amp;#34;nip46&amp;#34;] }&lt;br/&gt;nostr-sdk = { version = &amp;#34;0.44.0&amp;#34;, default-features = false, features = [&amp;#34;default&amp;#34;] }&lt;br/&gt;hex = &amp;#34;0.4.2&amp;#34;&lt;br/&gt;tokio = &amp;#34;1&amp;#34;&lt;br/&gt;serde_json = &amp;#34;1.0&amp;#34;&lt;br/&gt;csv = { version = &amp;#34;1.3.0&amp;#34;, default-features = false }&lt;br/&gt;url = &amp;#34;2.5.0&amp;#34;&lt;br/&gt;reqwest = { version = &amp;#34;0.12.0&amp;#34;, default-features = false }&lt;br/&gt;tempfile = &amp;#34;3.27.0&amp;#34;&lt;br/&gt;rand = &amp;#34;0.8&amp;#34;&lt;br/&gt;frost-secp256k1-tr = &amp;#34;3.0.0-rc.0&amp;#34;&lt;br/&gt;serial_test = { version = &amp;#34;3.4.0&amp;#34;, features = [&amp;#34;test_logging&amp;#34;] }&lt;br/&gt;log = &amp;#34;0.4&amp;#34;&lt;br/&gt;n34 = { version = &amp;#34;0.4.0&amp;#34;, path = &amp;#34;n34&amp;#34; }&lt;br/&gt;n34-relay = { version = &amp;#34;0.1.1&amp;#34;, path = &amp;#34;n34-relay&amp;#34; }&lt;br/&gt;chrono                     = &amp;#34;0.4.41&amp;#34;&lt;br/&gt;convert_case               = &amp;#34;0.8.0&amp;#34;&lt;br/&gt;dirs                       = &amp;#34;6.0.0&amp;#34;&lt;br/&gt;easy-ext                   = &amp;#34;1.0.2&amp;#34;&lt;br/&gt;either                     = &amp;#34;1.15.0&amp;#34;&lt;br/&gt;futures                    = &amp;#34;0.3.31&amp;#34;&lt;br/&gt;nostr-browser-signer-proxy = &amp;#34;0.43.0&amp;#34;&lt;br/&gt;regex                      = &amp;#34;1.11.1&amp;#34;&lt;br/&gt;thiserror                  = &amp;#34;2.0.12&amp;#34;&lt;br/&gt;toml                       = &amp;#34;0.9.4&amp;#34;&lt;br/&gt;tracing                    = &amp;#34;0.1.41&amp;#34;&lt;br/&gt;tracing-subscriber         = &amp;#34;0.3.19&amp;#34;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[dependencies]&lt;br/&gt;get_file_hash_core = { workspace = true, features = [&amp;#34;nostr&amp;#34;]  }&lt;br/&gt;sha2 = { workspace = true }&lt;br/&gt;tracing = { workspace = true }&lt;br/&gt;tracing-subscriber = { workspace = true }&lt;br/&gt;nostr = { workspace = true, optional = true }&lt;br/&gt;nostr-sdk = { workspace = true, optional = true }&lt;br/&gt;hex = { workspace = true, optional = true }&lt;br/&gt;tokio = { workspace = true, features = [&amp;#34;full&amp;#34;] }&lt;br/&gt;frost-secp256k1-tr = { workspace = true }&lt;br/&gt;rand = { workspace = true }&lt;br/&gt;serde_json = { workspace = true }&lt;br/&gt;rand_chacha = { workspace = true }&lt;br/&gt;n34 = { workspace = true }&lt;br/&gt;n34-relay = { workspace = true }&lt;br/&gt;axum               = { version = &amp;#34;0.8.6&amp;#34;, features = [&amp;#34;http2&amp;#34;, &amp;#34;ws&amp;#34;] }&lt;br/&gt;base64             = &amp;#34;0.22.1&amp;#34;&lt;br/&gt;chrono             = &amp;#34;0.4.42&amp;#34;&lt;br/&gt;config             = { version = &amp;#34;0.15.15&amp;#34;, default-features = false, features = [&amp;#34;toml&amp;#34;] }&lt;br/&gt;const_format       = &amp;#34;0.2.34&amp;#34;&lt;br/&gt;convert_case       = &amp;#34;0.8.0&amp;#34;&lt;br/&gt;easy-ext           = &amp;#34;1.0.2&amp;#34;&lt;br/&gt;either             = &amp;#34;1.15.0&amp;#34;&lt;br/&gt;flume              = &amp;#34;0.11.1&amp;#34;&lt;br/&gt;futures            = &amp;#34;0.3.31&amp;#34;&lt;br/&gt;hyper              = &amp;#34;1.7.0&amp;#34;&lt;br/&gt;hyper-util         = &amp;#34;0.1.17&amp;#34;&lt;br/&gt;parking_lot        = { version = &amp;#34;0.12.5&amp;#34;, features = [&amp;#34;serde&amp;#34;] }&lt;br/&gt;prost              = &amp;#34;0.14.1&amp;#34;&lt;br/&gt;serde              = { version = &amp;#34;1.0.219&amp;#34;, features = [&amp;#34;rc&amp;#34;] }&lt;br/&gt;#serde_json         = &amp;#34;1.0.145&amp;#34;&lt;br/&gt;serde_with         = &amp;#34;3.15.0&amp;#34;&lt;br/&gt;sha1               = &amp;#34;0.10.6&amp;#34;&lt;br/&gt;#sha2               = &amp;#34;0.10.9&amp;#34;&lt;br/&gt;strum              = { version = &amp;#34;0.27.2&amp;#34;, features = [&amp;#34;derive&amp;#34;] }&lt;br/&gt;thiserror          = &amp;#34;2.0.16&amp;#34;&lt;br/&gt;tokio-util         = { version = &amp;#34;0.7.17&amp;#34;, features = [&amp;#34;io&amp;#34;] }&lt;br/&gt;toml               = &amp;#34;0.9.5&amp;#34;&lt;br/&gt;tonic-prost        = &amp;#34;0.14.2&amp;#34;&lt;br/&gt;tower              = { version = &amp;#34;0.5.2&amp;#34;, features = [&amp;#34;limit&amp;#34;] }&lt;br/&gt;#tracing            = &amp;#34;0.1.41&amp;#34;&lt;br/&gt;#tracing-subscriber = { version = &amp;#34;0.3.20&amp;#34;, features = [&amp;#34;env-filter&amp;#34;] }&lt;br/&gt;dirs = &amp;#34;6.0.0&amp;#34;&lt;br/&gt;rhai = { version = &amp;#34;1.23.4&amp;#34;, features = [&lt;br/&gt;  &amp;#34;no_position&amp;#34;,&lt;br/&gt;  &amp;#34;sync&amp;#34;,&lt;br/&gt;  &amp;#34;serde&amp;#34;,&lt;br/&gt;  &amp;#34;decimal&amp;#34;,&lt;br/&gt;] }&lt;br/&gt;##tokio = { version = &amp;#34;1.47.1&amp;#34;, features = [&lt;br/&gt;##  &amp;#34;macros&amp;#34;,&lt;br/&gt;##  &amp;#34;rt-multi-thread&amp;#34;,&lt;br/&gt;##  &amp;#34;signal&amp;#34;,&lt;br/&gt;##  &amp;#34;fs&amp;#34;,&lt;br/&gt;##  &amp;#34;process&amp;#34;,&lt;br/&gt;##] }&lt;br/&gt;tonic = { version = &amp;#34;0.14.2&amp;#34;, features = [&lt;br/&gt;  &amp;#34;tls-ring&amp;#34;,&lt;br/&gt;  &amp;#34;tls-webpki-roots&amp;#34;,&lt;br/&gt;  &amp;#34;gzip&amp;#34;,&lt;br/&gt;  &amp;#34;deflate&amp;#34;,&lt;br/&gt;] }&lt;br/&gt;tower-http = { version = &amp;#34;0.6.6&amp;#34;, features = [&lt;br/&gt;  &amp;#34;cors&amp;#34;,&lt;br/&gt;  &amp;#34;decompression-br&amp;#34;,&lt;br/&gt;  &amp;#34;decompression-deflate&amp;#34;,&lt;br/&gt;  &amp;#34;decompression-gzip&amp;#34;,&lt;br/&gt;  &amp;#34;decompression-zstd&amp;#34;,&lt;br/&gt;  &amp;#34;trace&amp;#34;,&lt;br/&gt;  &amp;#34;timeout&amp;#34;,&lt;br/&gt;] }&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[dependencies.clap]&lt;br/&gt;features = [&amp;#34;derive&amp;#34;]&lt;br/&gt;version  = &amp;#34;4.5.42&amp;#34;&lt;br/&gt;&lt;br/&gt;[dependencies.clap-verbosity-flag]&lt;br/&gt;default-features = false&lt;br/&gt;features         = [&amp;#34;tracing&amp;#34;]&lt;br/&gt;version          = &amp;#34;3.0.3&amp;#34;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;  # We frequently switch between stable and unstable versions; this will make the&lt;br/&gt;  # process easier.&lt;br/&gt;  ## [dependencies.nostr]&lt;br/&gt;  ## default-features = false&lt;br/&gt;  ## features         = [&amp;#34;std&amp;#34;]&lt;br/&gt;  ## git              = &amp;#34;&lt;a href=&#34;https://git.4rs.nl/mirrors/nostr.git&amp;#34&#34;&gt;https://git.4rs.nl/mirrors/nostr.git&amp;#34&lt;/a&gt;;&lt;br/&gt;  ## rev              = &amp;#34;27a1947d3&amp;#34;&lt;br/&gt;  ## # version          = &amp;#34;0.45.0&amp;#34;&lt;br/&gt;  [dependencies.nostr-database]&lt;br/&gt;  default-features = false&lt;br/&gt;  git              = &amp;#34;&lt;a href=&#34;https://git.4rs.nl/mirrors/nostr.git&amp;#34&#34;&gt;https://git.4rs.nl/mirrors/nostr.git&amp;#34&lt;/a&gt;;&lt;br/&gt;  rev              = &amp;#34;27a1947d3&amp;#34;&lt;br/&gt;  # version          = &amp;#34;0.45.0&amp;#34;&lt;br/&gt;  [dependencies.nostr-lmdb]&lt;br/&gt;  default-features = false&lt;br/&gt;  git              = &amp;#34;&lt;a href=&#34;https://git.4rs.nl/mirrors/nostr.git&amp;#34&#34;&gt;https://git.4rs.nl/mirrors/nostr.git&amp;#34&lt;/a&gt;;&lt;br/&gt;  rev              = &amp;#34;27a1947d3&amp;#34;&lt;br/&gt;  # version          = &amp;#34;0.45.0&amp;#34;&lt;br/&gt;  [dependencies.nostr-relay-builder]&lt;br/&gt;  default-features = false&lt;br/&gt;  git              = &amp;#34;&lt;a href=&#34;https://git.4rs.nl/mirrors/nostr.git&amp;#34&#34;&gt;https://git.4rs.nl/mirrors/nostr.git&amp;#34&lt;/a&gt;;&lt;br/&gt;  rev              = &amp;#34;27a1947d3&amp;#34;&lt;br/&gt;  # version          = &amp;#34;0.45.0&amp;#34;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;[build-dependencies]&lt;br/&gt;get_file_hash_core = { workspace = true, features = [&amp;#34;nostr&amp;#34;] }&lt;br/&gt;sha2 = { workspace = true }&lt;br/&gt;serde_json = { workspace = true }&lt;br/&gt;tokio = { workspace = true, features = [&amp;#34;full&amp;#34;] }&lt;br/&gt;nostr = { workspace = true }&lt;br/&gt;nostr-sdk = { workspace = true }&lt;br/&gt;hex = { workspace = true }&lt;br/&gt;tonic-prost-build = &amp;#34;0.14.2&amp;#34;&lt;br/&gt;[target.&amp;#39;cfg(not(windows))&amp;#39;.build-dependencies]&lt;br/&gt;protobuf-src = &amp;#34;2.1.0&amp;#34;&lt;br/&gt;&lt;br/&gt;# The profile that &amp;#39;dist&amp;#39; will build with&lt;br/&gt;[profile.dist]&lt;br/&gt;inherits = &amp;#34;release&amp;#34;&lt;br/&gt;lto = &amp;#34;thin&amp;#34;&lt;br/&gt;&lt;br/&gt;[dev-dependencies]&lt;br/&gt;serial_test = { workspace = true }&lt;br/&gt;&lt;br/&gt;[[example]]&lt;br/&gt;name = &amp;#34;gnostr-build&amp;#34;&lt;br/&gt;path = &amp;#34;examples/gnostr-build.rs&amp;#34;&lt;br/&gt;required-features = [&amp;#34;nostr&amp;#34;]&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:20Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsdpvyzqdvvgswt3c70ph78pg39t0vezy290a4c25uneaz3mxy86fspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxghs6qy</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use rand_chacha::ChaCha20Rng; ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsdpvyzqdvvgswt3c70ph78pg39t0vezy290a4c25uneaz3mxy86fspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxghs6qy" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand_chacha::ChaCha20Rng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use hex;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost_secp256k1_tr as frost; &lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost::keys::IdentifierList;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Create a deterministic seed (e.g., 32 bytes of zeros or a Git Hash)&lt;br/&gt;    let seed_hex = &amp;#34;473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813&amp;#34;;&lt;br/&gt;    let seed_bytes = hex::decode(seed_hex)?;&lt;br/&gt;    let mut rng = ChaCha20Rng::from_seed(seed_bytes.try_into().map_err(|_| &amp;#34;Invalid seed length&amp;#34;)?);&lt;br/&gt;&lt;br/&gt;    let max_signers = 3;&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;    // Round 0: Key Generation (Trusted Dealer)&lt;br/&gt;    ////////////////////////////////////////////////////////////////////////////&lt;br/&gt;&lt;br/&gt;    // Using IdentifierList::Default creates identifiers 1, 2, 3...&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        max_signers,&lt;br/&gt;        min_signers,&lt;br/&gt;        IdentifierList::Default,&lt;br/&gt;        &amp;amp;mut rng,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- Deterministic FROST Dealer ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Threshold: {} of {}&amp;#34;, min_signers, max_signers);&lt;br/&gt;    println!(&amp;#34;Number of shares generated: {}&amp;#34;, shares.len()); &lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;\n--- Verifying Shares Against Commitments ---&amp;#34;);&lt;br/&gt;    for (identifier, share) in &amp;amp;shares {&lt;br/&gt;&lt;br/&gt;        // The Deterministic Values (Scalar Hex)&lt;br/&gt;        // Because your seed is fixed to the EMPTY_BLOB_SHA256,&lt;br/&gt;        // the &amp;#34;redacted&amp;#34; values in your output are always the same.&lt;br/&gt;        // Here are the Secret Signing Shares (the private scalars) for your 2-of-3 setup:&lt;br/&gt;        //&lt;br/&gt;        // Participant,Identifier (x),Signing Share (f(x)) in Hex&lt;br/&gt;        // Participant 1,...0001,757f49553754988450d995c65a0459a0f5a703d7c585f95f468202d09a365f57&lt;br/&gt;        // Participant 2,...0002,a3c4835e32308cb11b43968962290bc9171f1f1ca90c21741890e4f326f9879b&lt;br/&gt;        // Participant 3,...0003,d209bd672d0c80dd65ad974c6a4dc1f138973a618c924988eaaa0715b3bcafdf&lt;br/&gt;        //&lt;br/&gt;        // println!(&amp;#34;Participant Identifier: {:?} {:?}&amp;#34;, identifier, _share);&lt;br/&gt;        //&lt;br/&gt;&lt;br/&gt;        // In FROST, the &amp;#39;verify&amp;#39; method checks the share against the VSS commitment&lt;br/&gt;        match share.verify() {&lt;br/&gt;            Ok(_) =&amp;gt; {&lt;br/&gt;                println!(&amp;#34;Participant {:?}: Valid  ✅&amp;#34;, identifier);&lt;br/&gt;            }&lt;br/&gt;            Err(e) =&amp;gt; {&lt;br/&gt;                println!(&amp;#34;Participant {:?}: INVALID! ❌ Error: {:?}&amp;#34;, identifier, e);&lt;br/&gt;            }&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    let pubkey_bytes = pubkey_package.verifying_key().serialize()?;&lt;br/&gt;    println!(&amp;#34;Group Public Key (Hex Compressed): {}&amp;#34;, hex::encode(&amp;amp;pubkey_bytes));&lt;br/&gt;    let x_only_hex = hex::encode(&amp;amp;pubkey_bytes[1..]);&lt;br/&gt;    println!(&amp;#34;Group Public Key (Hex X-Only):       {}&amp;#34;, x_only_hex);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;Run with --features nostr to enable this example.&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:18Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsgffqr6ch8duw92adfxhcmggjh49zaap7zu3sl2rn0shg5t72t33cpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx8k9hev</id>
    
      <title type="html">use rand_chacha::ChaCha20Rng; use ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsgffqr6ch8duw92adfxhcmggjh49zaap7zu3sl2rn0shg5t72t33cpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx8k9hev" />
    <content type="html">
      use rand_chacha::ChaCha20Rng;&lt;br/&gt;use rand_chacha::rand_core::SeedableRng;&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;use frost::{Identifier, keys::IdentifierList, round1, round2};&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    // 1. Dealer Setup&lt;br/&gt;    let mut dealer_rng = ChaCha20Rng::from_seed([0u8; 32]);&lt;br/&gt;    let min_signers = 2;&lt;br/&gt;    let (shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        3, min_signers, IdentifierList::Default, &amp;amp;mut dealer_rng&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    // 2. Setup Participant Identifiers&lt;br/&gt;    let p1_id = Identifier::try_from(1u16)?;&lt;br/&gt;    let p2_id = Identifier::try_from(2u16)?;&lt;br/&gt;&lt;br/&gt;    // 3. Construct KeyPackages manually for RC.0&lt;br/&gt;    let p1_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p1_id].signing_share());&lt;br/&gt;    let p1_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p1_id,&lt;br/&gt;        *shares[&amp;amp;p1_id].signing_share(),&lt;br/&gt;        p1_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    let p2_verifying_share = frost::keys::VerifyingShare::from(*shares[&amp;amp;p2_id].signing_share());&lt;br/&gt;    let p2_key_package = frost::keys::KeyPackage::new(&lt;br/&gt;        p2_id,&lt;br/&gt;        *shares[&amp;amp;p2_id].signing_share(),&lt;br/&gt;        p2_verifying_share,&lt;br/&gt;        *pubkey_package.verifying_key(),&lt;br/&gt;        min_signers,&lt;br/&gt;    );&lt;br/&gt;&lt;br/&gt;    // 4. Round 1: Commitments&lt;br/&gt;    let mut rng1 = ChaCha20Rng::from_seed([1u8; 32]);&lt;br/&gt;    let (p1_nonces, p1_commitments) = round1::commit(p1_key_package.signing_share(), &amp;amp;mut rng1);&lt;br/&gt;&lt;br/&gt;    let mut rng2 = ChaCha20Rng::from_seed([2u8; 32]);&lt;br/&gt;    let (p2_nonces, p2_commitments) = round1::commit(p2_key_package.signing_share(), &amp;amp;mut rng2);&lt;br/&gt;&lt;br/&gt;    // 5. Coordinator: Signing Package&lt;br/&gt;    let message = b&amp;#34;gnostr-commit-7445bd727dbce5bac004861a45c35ccd4f4a195bfb1cc39f2a7c9fd3aa3b6547&amp;#34;;&lt;br/&gt;    let mut commitments_map = BTreeMap::new();&lt;br/&gt;    commitments_map.insert(p1_id, p1_commitments);&lt;br/&gt;    commitments_map.insert(p2_id, p2_commitments);&lt;br/&gt;&lt;br/&gt;    let signing_package = frost::SigningPackage::new(commitments_map, message);&lt;br/&gt;&lt;br/&gt;    // 6. Round 2: Partial Signatures&lt;br/&gt;    let p1_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p1_nonces, &amp;amp;p1_key_package)?;&lt;br/&gt;    let p2_signature_share = round2::sign(&amp;amp;signing_package, &amp;amp;p2_nonces, &amp;amp;p2_key_package)?;&lt;br/&gt;&lt;br/&gt;    // 7. Aggregation&lt;br/&gt;    let mut signature_shares = BTreeMap::new();&lt;br/&gt;    signature_shares.insert(p1_id, p1_signature_share);&lt;br/&gt;    signature_shares.insert(p2_id, p2_signature_share);&lt;br/&gt;&lt;br/&gt;    let group_signature = frost::aggregate(&amp;amp;signing_package, &amp;amp;signature_shares, &amp;amp;pubkey_package)?;&lt;br/&gt;&lt;br/&gt;    println!(&amp;#34;--- BIP-64MOD Aggregated Signature ---&amp;#34;);&lt;br/&gt;    println!(&amp;#34;Final Signature (Hex): {}&amp;#34;, hex::encode(group_signature.serialize()?));&lt;br/&gt;&lt;br/&gt;    // Final Verification&lt;br/&gt;    pubkey_package.verifying_key().verify(message, &amp;amp;group_signature)?;&lt;br/&gt;    println!(&amp;#34;🛡️  Signature is valid for the 2nd generation group!&amp;#34;);&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() { println!(&amp;#34;Run with --features nostr&amp;#34;); }&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:18Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsz35ft904mtyp6xf0x8jads3fhj4vuecktt5dtt9e5c44wlltt65qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxp77glw</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] fn main() -&amp;gt; Result&amp;lt;(), ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsz35ft904mtyp6xf0x8jads3fhj4vuecktt5dtt9e5c44wlltt65qpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxp77glw" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    get_file_hash_core::frost_mailbox_logic::simulate_frost_mailbox_post_signer()&lt;br/&gt;}&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example frost_mailbox_post --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:09Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsvp5ez9wm53pwmzkuvlmljf4pl64v5wk9swe384g0dz0tq42stwxspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxdcyxxp</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] use frost_secp256k1_tr as ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsvp5ez9wm53pwmzkuvlmljf4pl64v5wk9swe384g0dz0tq42stwxspr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcxdcyxxp" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use frost_secp256k1_tr as frost;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use rand::thread_rng;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;use std::collections::BTreeMap;&lt;br/&gt;&lt;br/&gt;/// A simplified ROAST Coordinator that manages signing sessions&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;struct RoastCoordinator {&lt;br/&gt;    min_signers: u16,&lt;br/&gt;    _message: Vec&amp;lt;u8&amp;gt;,&lt;br/&gt;    commitments: BTreeMap&amp;lt;frost::Identifier, frost::round1::SigningCommitments&amp;gt;,&lt;br/&gt;    nonces: BTreeMap&amp;lt;frost::Identifier, frost::round1::SigningNonces&amp;gt;,&lt;br/&gt;    shares: BTreeMap&amp;lt;frost::Identifier, frost::round2::SignatureShare&amp;gt;,&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;impl RoastCoordinator {&lt;br/&gt;    fn new(min_signers: u16, message: &amp;amp;[u8]) -&amp;gt; Self {&lt;br/&gt;        Self {&lt;br/&gt;            min_signers,&lt;br/&gt;            _message: message.to_vec(),&lt;br/&gt;            commitments: BTreeMap::new(),&lt;br/&gt;            nonces: BTreeMap::new(),&lt;br/&gt;            shares: BTreeMap::new(),&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    /// ROAST Logic: Collect commitments until we hit the threshold.&lt;br/&gt;    /// In a real P2P system, this would be an async stream handler.&lt;br/&gt;    fn add_commitment(&amp;amp;mut self, id: frost::Identifier, comms: frost::round1::SigningCommitments, nonces: frost::round1::SigningNonces) {&lt;br/&gt;        if self.commitments.len() &amp;lt; self.min_signers as usize {&lt;br/&gt;            self.commitments.insert(id, comms);&lt;br/&gt;            self.nonces.insert(id, nonces);&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    /// ROAST Logic: Collect signature shares.&lt;br/&gt;    fn add_share(&amp;amp;mut self, id: frost::Identifier, share: frost::round2::SignatureShare) {&lt;br/&gt;        if self.shares.len() &amp;lt; self.min_signers as usize {&lt;br/&gt;            self.shares.insert(id, share);&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    fn is_ready_to_sign(&amp;amp;self) -&amp;gt; bool {&lt;br/&gt;        self.commitments.len() &amp;gt;= self.min_signers as usize&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    fn is_ready_to_aggregate(&amp;amp;self) -&amp;gt; bool {&lt;br/&gt;        self.shares.len() &amp;gt;= self.min_signers as usize&lt;br/&gt;    }&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    let mut rng = thread_rng();&lt;br/&gt;    let (max_signers, min_signers) = (5, 3);&lt;br/&gt;    let message = b&amp;#34;BIP-64MOD Context: ROAST Coordination&amp;#34;;&lt;br/&gt;&lt;br/&gt;    // 1. Setup: Generate keys (Dealer mode for simulation)&lt;br/&gt;    let (key_shares, pubkey_package) = frost::keys::generate_with_dealer(&lt;br/&gt;        max_signers,&lt;br/&gt;        min_signers,&lt;br/&gt;        frost::keys::IdentifierList::Default,&lt;br/&gt;        &amp;amp;mut rng,&lt;br/&gt;    )?;&lt;br/&gt;&lt;br/&gt;    let mut coordinator = RoastCoordinator::new(min_signers, message);&lt;br/&gt;&lt;br/&gt;    // 2. Round 1: Asynchronous Commitment Collection&lt;br/&gt;    // Simulate signers 1, 3, and 5 responding first (ROAST skips 2 and 4)&lt;br/&gt;    for &amp;amp;id_num in &amp;amp;[1, 3, 5] {&lt;br/&gt;        let id = frost::Identifier::try_from(id_num as u16)?;&lt;br/&gt;        let (nonces, comms) = frost::round1::commit(key_shares[&amp;amp;id].signing_share(), &amp;amp;mut rng);&lt;br/&gt;        &lt;br/&gt;        // Signers store their nonces locally, send comms to coordinator&lt;br/&gt;        coordinator.add_commitment(id, comms, nonces);&lt;br/&gt;        &lt;br/&gt;        // Note: Signer 2 was &amp;#34;offline&amp;#34;, but ROAST doesn&amp;#39;t care because we hit 3/5.&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 3. Round 2: Signing&lt;br/&gt;    if coordinator.is_ready_to_sign() {&lt;br/&gt;        let signing_package = frost::SigningPackage::new(coordinator.commitments.clone(), message);&lt;br/&gt;        &lt;br/&gt;        let mut temp_shares = BTreeMap::new();&lt;br/&gt;        for &amp;amp;id in coordinator.commitments.keys() {&lt;br/&gt;            // In reality, coordinator sends signing_package to signers&lt;br/&gt;            // Here we simulate the signers producing shares&lt;br/&gt;&lt;br/&gt;            let nonces = &amp;amp;coordinator.nonces[&amp;amp;id];&lt;br/&gt;            &lt;br/&gt;            let key_package: frost::keys::KeyPackage = key_shares[&amp;amp;id].clone().try_into()?;&lt;br/&gt;            let share = frost::round2::sign(&amp;amp;signing_package, &amp;amp;nonces, &amp;amp;key_package)?;&lt;br/&gt;            temp_shares.insert(id, share);&lt;br/&gt;        }&lt;br/&gt;        for (id, share) in temp_shares {&lt;br/&gt;            coordinator.add_share(id, share);&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    // 4. Finalization: Aggregation&lt;br/&gt;    if coordinator.is_ready_to_aggregate() {&lt;br/&gt;        let signing_package = frost::SigningPackage::new(coordinator.commitments.clone(), message);&lt;br/&gt;        let group_signature = frost::aggregate(&lt;br/&gt;            &amp;amp;signing_package,&lt;br/&gt;            &amp;amp;coordinator.shares,&lt;br/&gt;            &amp;amp;pubkey_package,&lt;br/&gt;        )?;&lt;br/&gt;&lt;br/&gt;        pubkey_package.verifying_key().verify(message, &amp;amp;group_signature)?;&lt;br/&gt;        println!(&amp;#34;ROAST-coordinated signature verified!&amp;#34;);&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;    Ok(())&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example roast-experiment --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:07:07Z</updated>
  </entry>

  <entry>
    <id>https://nostr.at/nevent1qqsdu9aptamvlyt2gzj283ysawctdmtkzwsmjqfyjx4dn7du57pghfcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx4a8rml</id>
    
      <title type="html">#[cfg(feature = &amp;#34;nostr&amp;#34;)] fn main() -&amp;gt; Result&amp;lt;(), ...</title>
    
    <link rel="alternate" href="https://nostr.at/nevent1qqsdu9aptamvlyt2gzj283ysawctdmtkzwsmjqfyjx4dn7du57pghfcpr9mhxue69uhhyetvv9ujucmewp5x2unxd3hhwtnpdypzq4aeg4ferl4a2r4l2l3u4e2zkveehwn6l0e2zfyyhxxauczzrkcx4a8rml" />
    <content type="html">
      #[cfg(feature = &amp;#34;nostr&amp;#34;)]&lt;br/&gt;fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {&lt;br/&gt;    get_file_hash_core::frost_mailbox_logic::simulate_frost_mailbox_post_signer()&lt;br/&gt;}&lt;br/&gt;#[cfg(not(feature = &amp;#34;nostr&amp;#34;))]&lt;br/&gt;fn main() {&lt;br/&gt;    println!(&amp;#34;This example requires the &amp;#39;nostr&amp;#39; feature. Please run with: cargo run --example frost_mailbox_post --features nostr&amp;#34;);&lt;br/&gt;}&lt;br/&gt;
    </content>
    <updated>2026-04-05T04:09:20Z</updated>
  </entry>

</feed>