npub1xu…g43rm on Nostr: /// BIP-64MOD + GCC: Complete Git Empty & Genesis Constants /// /// This module ...
/// BIP-64MOD + GCC: Complete Git Empty & Genesis Constants
///
/// This module provides the standard cryptographic identifiers for "null",
/// "empty", and "genesis" states, including NIP-19 (Bech32) identities.
pub struct GitEmptyState;
impl GitEmptyState {
// === NULL REFERENCE (Zero Hash) ===
pub const NULL_SHA256: &'static str = "0000000000000000000000000000000000000000000000000000000000000000";
// === EMPTY BLOB (Empty File) ===
pub const BLOB_SHA1: &'static str = "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";
pub const BLOB_SHA256: &'static str = "473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813";
pub const BLOB_NSEC: &'static str = "nsec1guaq7npmaz5ndqdzvl3mr6d8mndprp2rdls5ram5jys2xqmjrqfsdzhrp6";
pub const BLOB_NPUB: &'static str = "npub180cvv07tjdrghvkyh6964p7w9vsqpf3p05868v399v86p8y6f69sq5fdp0";
// === EMPTY TREE (Empty Directory) ===
pub const TREE_SHA1: &'static str = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
pub const TREE_SHA256: &'static str = "6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321";
pub const TREE_NSEC: &'static str = "nsec1dmceksfzt3fknuwpqn29mrv9a75mq4a48v2tfwde88whfhkv2vsslsc46c";
pub const TREE_NPUB: &'static str = "npub1pxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq6erdfh";
// === GENESIS COMMIT (DeepSpaceM1 @ Epoch 0) ===
/// Result of: git commit --allow-empty -m 'Initial commit'
/// With Author/Committer: DeepSpaceM1 <ds_m1@gnostr.org> @ 1970-01-01T00:00:00Z
pub const GENESIS_AUTHOR_NAME: &'static str = "DeepSpaceM1";
pub const GENESIS_AUTHOR_EMAIL: &'static str = "ds_m1@gnostr.org";
pub const GENESIS_DATE_UNIX: i64 = 0;
pub const GENESIS_MESSAGE: &'static str = "Initial commit";
/// The resulting SHA-256 Commit Hash for this specific configuration
pub const GENESIS_COMMIT_SHA256: &'static str = "e9768652d87e07663479a0ad402513f56d953930b659c2ef389d4d03d3623910";
/// The NIP-19 Identity associated with the Genesis Commit
pub const GENESIS_NSEC: &'static str = "nsec1jpxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq68at9d";
pub const GENESIS_NPUB: &'static str = "npub1pxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq6erdfh";
}
/// Helper for constructing the commit object string for hashing
pub mod builders {
use super::GitEmptyState;
pub fn build_genesis_commit_object() -> String {
format!(
"tree {}\nauthor {} <{}> {} +0000\ncommitter {} <{}> {} +0000\n\n{}\n",
GitEmptyState::TREE_SHA256,
GitEmptyState::GENESIS_AUTHOR_NAME,
GitEmptyState::GENESIS_AUTHOR_EMAIL,
GitEmptyState::GENESIS_DATE_UNIX,
GitEmptyState::GENESIS_AUTHOR_NAME,
GitEmptyState::GENESIS_AUTHOR_EMAIL,
GitEmptyState::GENESIS_DATE_UNIX,
GitEmptyState::GENESIS_MESSAGE
)
}
}
fn main() {
println!("--- BIP-64MOD + GCC Genesis State ---");
println!("Commit Hash: {}", GitEmptyState::GENESIS_COMMIT_SHA256);
println!("Author: {} <{}>", GitEmptyState::GENESIS_AUTHOR_NAME, GitEmptyState::GENESIS_AUTHOR_EMAIL);
println!("Timestamp: {}", GitEmptyState::GENESIS_DATE_UNIX);
println!("NSEC: {}", GitEmptyState::GENESIS_NSEC);
let object_raw = builders::build_genesis_commit_object();
println!("\nRaw Git Commit Object:\n---\n{}---", object_raw);
}
Published at
2026-04-04 01:43:48 UTCEvent JSON
{
"id": "b12fc9503efdf1ee9923e54a1504a803bdc5d9795c827316d1527c25168da80e",
"pubkey": "37306250e62aafbe17f1fd1ee25a539f268e044d7516734c6e389c6de7273ac9",
"created_at": 1775267028,
"kind": 1,
"tags": [
[
"file",
"examples/git-empty-state.rs"
],
[
"version",
"0.3.3"
]
],
"content": "/// BIP-64MOD + GCC: Complete Git Empty \u0026 Genesis Constants\n/// \n/// This module provides the standard cryptographic identifiers for \"null\", \n/// \"empty\", and \"genesis\" states, including NIP-19 (Bech32) identities.\npub struct GitEmptyState;\n\nimpl GitEmptyState {\n // === NULL REFERENCE (Zero Hash) ===\n pub const NULL_SHA256: \u0026'static str = \"0000000000000000000000000000000000000000000000000000000000000000\";\n\n // === EMPTY BLOB (Empty File) ===\n pub const BLOB_SHA1: \u0026'static str = \"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391\";\n pub const BLOB_SHA256: \u0026'static str = \"473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813\";\n pub const BLOB_NSEC: \u0026'static str = \"nsec1guaq7npmaz5ndqdzvl3mr6d8mndprp2rdls5ram5jys2xqmjrqfsdzhrp6\";\n pub const BLOB_NPUB: \u0026'static str = \"npub180cvv07tjdrghvkyh6964p7w9vsqpf3p05868v399v86p8y6f69sq5fdp0\";\n\n // === EMPTY TREE (Empty Directory) ===\n pub const TREE_SHA1: \u0026'static str = \"4b825dc642cb6eb9a060e54bf8d69288fbee4904\";\n pub const TREE_SHA256: \u0026'static str = \"6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321\";\n pub const TREE_NSEC: \u0026'static str = \"nsec1dmceksfzt3fknuwpqn29mrv9a75mq4a48v2tfwde88whfhkv2vsslsc46c\";\n pub const TREE_NPUB: \u0026'static str = \"npub1pxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq6erdfh\";\n\n // === GENESIS COMMIT (DeepSpaceM1 @ Epoch 0) ===\n /// Result of: git commit --allow-empty -m 'Initial commit' \n /// With Author/Committer: DeepSpaceM1 \u003cds_m1@gnostr.org\u003e @ 1970-01-01T00:00:00Z\n pub const GENESIS_AUTHOR_NAME: \u0026'static str = \"DeepSpaceM1\";\n pub const GENESIS_AUTHOR_EMAIL: \u0026'static str = \"ds_m1@gnostr.org\";\n pub const GENESIS_DATE_UNIX: i64 = 0;\n pub const GENESIS_MESSAGE: \u0026'static str = \"Initial commit\";\n\n /// The resulting SHA-256 Commit Hash for this specific configuration\n pub const GENESIS_COMMIT_SHA256: \u0026'static str = \"e9768652d87e07663479a0ad402513f56d953930b659c2ef389d4d03d3623910\";\n \n /// The NIP-19 Identity associated with the Genesis Commit\n pub const GENESIS_NSEC: \u0026'static str = \"nsec1jpxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq68at9d\";\n pub const GENESIS_NPUB: \u0026'static str = \"npub1pxmpep6yk7z6p332u9588k0vscg26rv29pynvscg26rv29pynvsq6erdfh\";\n}\n\n/// Helper for constructing the commit object string for hashing\npub mod builders {\n use super::GitEmptyState;\n\n pub fn build_genesis_commit_object() -\u003e String {\n format!(\n \"tree {}\\nauthor {} \u003c{}\u003e {} +0000\\ncommitter {} \u003c{}\u003e {} +0000\\n\\n{}\\n\",\n GitEmptyState::TREE_SHA256,\n GitEmptyState::GENESIS_AUTHOR_NAME,\n GitEmptyState::GENESIS_AUTHOR_EMAIL,\n GitEmptyState::GENESIS_DATE_UNIX,\n GitEmptyState::GENESIS_AUTHOR_NAME,\n GitEmptyState::GENESIS_AUTHOR_EMAIL,\n GitEmptyState::GENESIS_DATE_UNIX,\n GitEmptyState::GENESIS_MESSAGE\n )\n }\n}\n\nfn main() {\n println!(\"--- BIP-64MOD + GCC Genesis State ---\");\n println!(\"Commit Hash: {}\", GitEmptyState::GENESIS_COMMIT_SHA256);\n println!(\"Author: {} \u003c{}\u003e\", GitEmptyState::GENESIS_AUTHOR_NAME, GitEmptyState::GENESIS_AUTHOR_EMAIL);\n println!(\"Timestamp: {}\", GitEmptyState::GENESIS_DATE_UNIX);\n println!(\"NSEC: {}\", GitEmptyState::GENESIS_NSEC);\n \n let object_raw = builders::build_genesis_commit_object();\n println!(\"\\nRaw Git Commit Object:\\n---\\n{}---\", object_raw);\n}\n",
"sig": "fe755e9ccbf2fae48c0886bd92e4d2d6081013f6141b2c10e8895727592e033875bd0b5479b92c7847b6b4359eeb3d613e0b1815cae98039492ff484b94ffd46"
}