{"id":25059664,"url":"https://github.com/0xb10c/mempool-dat","last_synced_at":"2025-10-21T14:31:47.912Z","repository":{"id":104384840,"uuid":"186916525","full_name":"0xB10C/mempool-dat","owner":"0xB10C","description":"Go package to parse Bitcoin Core's mempool.dat file","archived":false,"fork":false,"pushed_at":"2019-06-16T23:39:37.000Z","size":19,"stargazers_count":9,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T03:25:57.633Z","etag":null,"topics":["bitcoin","bitcoin-core","go","golang","mempool","parser"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/0xB10C/mempool-dat/lib","language":"Go","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/0xB10C.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}},"created_at":"2019-05-15T23:29:17.000Z","updated_at":"2024-03-27T12:29:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"320706c5-9504-4454-bda0-bf732fae7f8c","html_url":"https://github.com/0xB10C/mempool-dat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xB10C%2Fmempool-dat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xB10C%2Fmempool-dat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xB10C%2Fmempool-dat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xB10C%2Fmempool-dat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xB10C","download_url":"https://codeload.github.com/0xB10C/mempool-dat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237498585,"owners_count":19319978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","bitcoin-core","go","golang","mempool","parser"],"created_at":"2025-02-06T15:35:59.092Z","updated_at":"2025-10-21T14:31:42.593Z","avatar_url":"https://github.com/0xB10C.png","language":"Go","readme":"# mempool-dat\n\n[![GoDoc](https://godoc.org/github.com/0xB10C/mempool-dat/lib?status.svg)](https://godoc.org/github.com/0xB10C/mempool-dat/lib)\n\nThis Go package parses bitcoin mempool `mempool.dat` files.\nThese are wirtten by Bitcoin Core v0.14+ on shutdown and since v0.16.0 with the RPC `savemempool`.\n\nThe package offers access to the `mempool.dat`\n- header: version and number of transactions\n- mempool entries: raw transaction (here parsed as [btcsuite/btcd/wire MsgTx](https://godoc.org/github.com/btcsuite/btcd/wire#MsgTx)), first seen timestamp and the feeDelta  \n- and the not-parsed mapDeltas as byte slices \n\nYou may see this package as Work-In-Progress. There are no tests yet. \n\n## Example usage\n\nFor a runnable version of this snippet see [main.go](./main.go).\n\n\n```go\nimport (\n  \"fmt\"\n  mempoolDat \"github.com/0xb10c/mempool-dat/lib\"\n)\n\n[...]\n\nconst path string = \"mempool.dat\"\n\n[...]\n\n// please handle errors, omitted for brevity \nmempool, _ := mempoolDat.ReadMempoolFromPath(path)\n\n// prints the version and number of tx\nfmt.Println(mempool.GetFileHeader())\n\n// get all mempool entries with GetMempoolEntries (here only the first three are used)\nfor _, e := range mempool.GetMempoolEntries()[:3]{\n  fmt.Println(e.Info())\n}\n\n// get the firstSeen timestamp of a transaction\nfmt.Println(mempool.GetMempoolEntries()[4].GetFirstSeen())\n\n/* Furthermore you can use the full functionality of MsgTx (https://godoc.org/github.com/btcsuite/btcd/wire#MsgTx):\n    - transaction has a witness (spends a SegWit output)? with \u003centry\u003e.transaction.HasWitness() \n    - access input and outputs\n    - ...\n    But there is no way to get feerates for transactions, because they are (rightfully) not stored in the `mempool.dat`.\n    You'd have to the current UTXO set to get input amounts (which you need to calculate the fees)\n*/\n\n```\n\nThe full documentation can be fund on https://godoc.org/github.com/0xB10C/mempool-dat/lib.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xb10c%2Fmempool-dat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xb10c%2Fmempool-dat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xb10c%2Fmempool-dat/lists"}