{"id":51509522,"url":"https://github.com/murphsicles/bitcoin-hashes","last_synced_at":"2026-07-08T04:30:58.362Z","repository":{"id":358482287,"uuid":"1240888615","full_name":"murphsicles/bitcoin-hashes","owner":"murphsicles","description":"Zeta crate: bitcoin-hashes","archived":false,"fork":false,"pushed_at":"2026-05-17T15:13:13.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-17T17:31:03.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/murphsicles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T17:39:10.000Z","updated_at":"2026-05-17T15:13:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/murphsicles/bitcoin-hashes","commit_stats":null,"previous_names":["murphsicles/bitcoin-hashes"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/murphsicles/bitcoin-hashes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbitcoin-hashes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbitcoin-hashes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbitcoin-hashes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbitcoin-hashes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/murphsicles","download_url":"https://codeload.github.com/murphsicles/bitcoin-hashes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/murphsicles%2Fbitcoin-hashes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35252324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-08T04:30:57.183Z","updated_at":"2026-07-08T04:30:58.358Z","avatar_url":"https://github.com/murphsicles.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# @crypto/bitcoin-hashes\n\nBitcoin hashing primitives for Zeta — SHA256, SHA256d, Hash160, and SHA512.\n\n## Why This Exists\n\nBitcoin SV (BSV) relies on specific hash primitives throughout the protocol:\n\n- **SHA256** — the workhorse of Bitcoin\n- **SHA256d (double-SHA256)** — SHA256 applied twice, used for proof-of-work and transaction IDs\n- **Hash160** — RIPEMD160 after SHA256, used for address generation\n- **SHA512** — for extended hashing needs\n\nThis crate provides clean, auditable implementations for use in nour and other Zeta-based BSV tooling.\n\n## Usage\n\n```zeta\nuse @crypto/bitcoin-hashes::{Sha256, Sha256d, Hash160, Sha512, Hash};\n\n// SHA256\nlet hash = Sha256::hash(\"hello\");\nlet bytes = hash.to_byte_array();\n\n// Double-SHA256 — Bitcoin's PoW\nlet dhash = Sha256d::hash(tx_bytes);\n\n// Hash160 — Bitcoin addresses\nlet addr = Hash160::hash(pubkey);\n```\n\n## API\n\n### Hash trait\n\n```zeta\npub trait Hash {\n    fn hash(data: \u0026[u8]) -\u003e Self;\n    fn from_slice(bytes: \u0026[u8]) -\u003e Result\u003cSelf\u003e;\n    fn to_byte_array(self) -\u003e [u8];\n}\n```\n\n### Types\n\n| Type | Output Size | Description |\n|------|-------------|-------------|\n| `Sha256` | 32 bytes | SHA-256 |\n| `Sha256d` | 32 bytes | Double-SHA256 |\n| `Hash160` | 20 bytes | RIPEMD160(SHA256(x)) |\n| `Sha512` | 64 bytes | SHA-512 |\n\n## License\n\nMIT — per the Zeta Foundation and the original Rust Bitcoin project.\n\nFor nour. For Dark Factory. For BSV.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Fbitcoin-hashes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmurphsicles%2Fbitcoin-hashes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmurphsicles%2Fbitcoin-hashes/lists"}