{"id":44944738,"url":"https://github.com/ciphernom/midstate","last_synced_at":"2026-04-22T06:08:31.368Z","repository":{"id":338221116,"uuid":"1154050065","full_name":"ciphernom/midstate","owner":"ciphernom","description":"midstate","archived":false,"fork":false,"pushed_at":"2026-03-04T12:23:25.000Z","size":7880,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T20:10:31.318Z","etag":null,"topics":["bitcoin","cryptocurrency","midstate","quantum-computing","signatures"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ciphernom.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-02-10T00:43:19.000Z","updated_at":"2026-03-04T11:52:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"6342a27f-fe41-41d8-8cb2-c8433cf87b10","html_url":"https://github.com/ciphernom/midstate","commit_stats":null,"previous_names":["ciphernom/midstate"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ciphernom/midstate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciphernom%2Fmidstate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciphernom%2Fmidstate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciphernom%2Fmidstate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciphernom%2Fmidstate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ciphernom","download_url":"https://codeload.github.com/ciphernom/midstate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciphernom%2Fmidstate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30279764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bitcoin","cryptocurrency","midstate","quantum-computing","signatures"],"created_at":"2026-02-18T09:35:37.126Z","updated_at":"2026-03-09T01:01:09.440Z","avatar_url":"https://github.com/ciphernom.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Midstate\n\nMidstate is a cryptocurrency implementing BLAKE3 sequential-time proof of work, post-quantum cryptography (WOTS and MSS), and strict power-of-2 coin denominations. Transactions operate on a two-phase commit-reveal protocol.\n\n## 1. Build\n\nCompilation requires the standard Rust toolchain.\n\n```bash\ncargo build --release\n\n```\n\nThe binary is output to `./target/release/midstate`.\n\n## 2. Node Operations\n\nNodes maintain the state accumulator, manage libp2p networking, and execute mining.\n\nStart a node with mining enabled:\n\n```bash\nmidstate node --data-dir ./data --port 9333 --rpc-port 8545 --mine --threads 3\n\n```\n\n**Native Batch Explorer**\nAccess the native explorer at `http://localhost:8545` to view detailed info - mempool, batches, height etc.\n\n**Midstate Axe Dashboard:**\nFor hardware nodes (or local testing), access the web dashboard at `http://127.0.0.1:8545/axe` to configure Wi-Fi, view live telemetry, and set up pool mining.\n\n## 3. Wallet Operations\n\nThe wallet communicates with the node via HTTP RPC. All wallet commands require a password, which is prompted interactively or read from the `MIDSTATE_PASSWORD` environment variable.\n\nCreate a new HD (BIP39) wallet:\n\n```bash\nmidstate wallet create --path wallet.dat\n\n```\n\nRestore a wallet from a 24-word seed phrase:\n\n```bash\nmidstate wallet restore --path wallet.dat\n\n```\n\n## 4. Addresses \u0026 Receiving\n\nMidstate utilizes post-quantum signatures. Standard addresses are consumed upon spending.\n\n**Generate a WOTS Address (Single-use):**\n\n```bash\nmidstate wallet receive --path wallet.dat --label \"payment1\"\n\n```\n\n**Generate an MSS Address (Multi-use):**\n\n```bash\nmidstate wallet generate-mss --path wallet.dat --height 10 --label \"donation\"\n\n```\n\n**Smart Contracts \u0026 Covenants:**\nCompile a human-readable `.msc` assembly file into a Pay-to-Script-Hash (P2SH) address.\n\n```bash\nmidstate wallet compile --file limit_order.msc\n\n```\n\n**Scan for Outputs:**\nIncoming transactions must be scanned to update local balances:\n\n```bash\nmidstate wallet scan --path wallet.dat --rpc-port 8545\n\n```\n\n## 5. Sending\n\nOutputs must be powers of 2. The wallet automatically decomposes base-10 integers into power-of-2 denominations, computes change, and executes the required commit and reveal transactions.\n\n**Standard Send:**\n\n```bash\nmidstate wallet send --path wallet.dat --rpc-port 8545 --to \u003cADDRESS_HEX\u003e:15\n\n```\n\n**Private Send:**\n\n```bash\nmidstate wallet send --path wallet.dat --rpc-port 8545 --to \u003cADDRESS_HEX\u003e:15 --private\n\n```\n\nThe `--private` flag splits the payment into separate, independent transactions for each required denomination, preventing output linking.\n\n## 6. P2P CoinJoin\n\nNodes coordinate uniform-denomination CoinJoin transactions over the p2p network to obfuscate UTXO lineage.\n\n**Initiate a mix:**\n\n```bash\nmidstate wallet mix --path wallet.dat --rpc-port 8545 --denomination 8\n\n```\n\nThis outputs a `\u003cMIX_ID\u003e`.\n\n**Join a mix:**\n\n```bash\nmidstate wallet mix --path wallet.dat --rpc-port 8545 --denomination 8 --join \u003cMIX_ID\u003e\n\n```\n\n## 7. Mining Rewards\n\nA solo mining node writes its deterministic coinbase seeds to a local log file. These must be imported to the wallet to be spent.\n\n```bash\nmidstate wallet import-rewards --path wallet.dat --coinbase-file ./data/coinbase_seeds.jsonl\n\n```\n\n## CLI Reference\n\n**Node**\n\n* `node` - Start the node daemon.\n\n**Wallet**\n\n* `wallet create` - Initialize a new HD wallet.\n* `wallet restore` - Restore an HD wallet from a 24-word seed phrase.\n* `wallet receive` - Generate a WOTS address.\n* `wallet generate-mss` - Generate an MSS address.\n* `wallet compile` - Compile a `.msc` script.\n* `wallet list` - Display controlled coins and unused keys.\n* `wallet balance` - Display aggregate balance.\n* `wallet scan` - Scan blockchain for incoming coins.\n* `wallet send` - Construct and broadcast a transaction.\n* `wallet mix` - Participate in a CoinJoin session.\n* `wallet history` - Display past transactions.\n* `wallet pending` - Display transactions awaiting block inclusion.\n* `wallet import-rewards` - Import coinbase seeds from node logs.\n\n**RPC (Debug)**\n\n* `state` - Display chain height, depth, and midstate.\n* `mempool` - Display pending transactions.\n* `peers` - List active p2p connections.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciphernom%2Fmidstate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciphernom%2Fmidstate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciphernom%2Fmidstate/lists"}