{"id":18728790,"url":"https://github.com/rubyonworld/bitcoin-ruby-node","last_synced_at":"2025-11-12T05:30:18.932Z","repository":{"id":63384847,"uuid":"542153289","full_name":"RubyOnWorld/bitcoin-ruby-node","owner":"RubyOnWorld","description":"This is a bitcoin node based on bitcoin-ruby-blockchain, that is capable of connecting to the bitcoin network, download and store the blockchain, validate all the blocks and incoming transactions, and relay data to its peers.","archived":false,"fork":false,"pushed_at":"2022-09-27T16:39:52.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T14:26:38.187Z","etag":null,"topics":["bitcoin","capable","connection","node","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyOnWorld.png","metadata":{"files":{"readme":"README.rdoc","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-27T15:19:23.000Z","updated_at":"2022-11-17T22:30:39.000Z","dependencies_parsed_at":"2022-11-18T00:16:47.150Z","dependency_job_id":null,"html_url":"https://github.com/RubyOnWorld/bitcoin-ruby-node","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/RubyOnWorld%2Fbitcoin-ruby-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fbitcoin-ruby-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fbitcoin-ruby-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fbitcoin-ruby-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/bitcoin-ruby-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239599040,"owners_count":19665911,"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","capable","connection","node","ruby"],"created_at":"2024-11-07T14:24:22.180Z","updated_at":"2025-11-12T05:30:18.766Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","readme":"= Bitcoin-ruby-node\n\nThis is a bitcoin node based on bitcoin-ruby-blockchain[http://github.com/mhanne/bitcoin-ruby-blockchain],\nthat is capable of connecting to the bitcoin network, download and store the blockchain,\nvalidate all the blocks and incoming transactions, and relay data to its peers.\n\nIt also has a separate {Bitcoin::Node::CommandHandler CommandHandler} socket that can be\nused to query statistics, receive blockchain updates, relay transactions via the node, etc.\n\n== Installation\n\nWe assume you already have a ruby 1.9 or 2.0 compatible interpreter and rubygems environment.\n\n gem install bitcoin-ruby-node\n bitcoin_node --help\n\nOr add it to your Gemfile and\n\n require 'bitcoin/node'\n\n\n== Usage\n\nIn the simplest case, just run the node and it will start downloading the bitcoin blockchain\ninto a sqlite database in +~/.bitcoin-ruby/bitcoin/blocks.db+.\n\n bitcoin_node\n\nYou can specify options (see +--help+) or pass a config file with +--config+.\n\nSome common options you might want to use:\n\n-n --network \u003cname\u003e::\n  Network to use. Usually +bitcoin+.\n  Support for +namecoin+ is also quite good.\n  Use +testnet+ for development.\n\n-c --config \u003cfile\u003e::\n  Read options from config file.\n\n--connect \u003cip:port\u003e::\n  List of peers to connect to.\n\n-s --storage \u003cbackend-string\u003e::\n  Storage backend to use. See also STORAGE.\n\n--import \u003cblockchain dir\u003e::\n  Import blockchain in bitcoind/qt format from given directory.\n\n--skip-validation::\n  Skip validation of received blockchain data. Can be used to speed up import/sync when\n  blockchain data is received from a trusted source.\n\n--check-blocks \u003ccount\u003e::\n  Check consistency of the +count+ most recent blocks. Pass -1 to check all blocks.\n\n-v --verbose::\n  Display debug output.\n\n-h --help::\n  Display all available options.\n\nIt will take a long time to download/store the entire blockchain at first, so be patient ;)\n\n\n== Import\n\nIf you already have a local blockchain DB created by bitcoind/-qt, you can speed up the initial import by loading it directly and skipping validation:\n\n bitcoin_node --import ~/.bitcoin/blocks --skip-validation\n\n\n== Config Files [TODO]\n\nAll commands accept configuration, either via config file, or at the command line.\n\n=== Locations\n\nThere are 3 default locations where configfiles are loaded from:\n\n* /etc/bitcoin-ruby.yml\n* ~/.bitcoin-ruby.yml\n* ./bitcoin-ruby.yml\n\nFiles are loaded in order (if they exist) and override each others settings.\n\nTo specify a different config file use the +--config+ option.\n\n=== Files\n\nInside a config file, you can put options for the different commands, separated\ninto categories.\n\n all:\n   network: bitcoin\n   storage: sequel::postgres:/bitcoin\n   command: 127.0.0.1:1234\n blockchain:\n   max:\n     connect: 30\n wallet:\n   keystore: \"simple::file=keys.json\"\n\nOptions in the +all+ category are loaded by every command, and are loaded first\n(so command-specific options will override them).\n\nOther categories are loaded by the corresponding command and may override options\nfrom the +all+ category (ie. +bitcoin_wallet+ loads +all+ and +wallet+).\n\n\n== Command socket\n\nThe node opens a separate command socket which you can connect to and query statistics\nor get notified about new blocks/tx, etc. See below for a list of available commands.\n\nFor a list of commands, see {file:COMMANDS.rdoc} or {Bitcoin::Node::CommandHandler}.\n\n\n=== CLI interface\n\nThe `bitcoin_node_cli` command can be used to interface with a running node, send it commands\nand subscribe to notifications about new blocks/txs, etc.\nThe easiest way is to just call `bitcoin_node_cli` in the same way you started\n`bitcoin_node`, but with extra command arguments:\n\n bitcoin_node_cli info\n bitcoin_node_cli -c config.yml info\n bitcoin_node_cli monitor \"block tx\"\n\n\n=== CommandClient interface\n\nIf you are programming in an EventMachine context, you might find the\n{Bitcoin::Node::CommandClient} convenient.\n\n=== Raw socket\n\nOf course you can also connect to the socket by any other means you like, just send\nyour commands as valid JSON, like:\n\n {\"id\": 0, \"method\": \u003ccommand\u003e, \"params\": \u003cparams\u003e}\n\nand you'll receive responses in the form:\n\n {\"id\": \u003cid\u003e, \"method\": \u003cmethod\u003e, \"result\": \u003cresult\u003e}\n\nFor example:\n\n $ echo -e '{\"id\": 1, \"method\": \"tslb\", \"params\": {}}\\0' | nc 127.0.0.1 9999\n {\"id\":1,\"method\":\"tslb\",\"result\":{\"tslb\":10}}\n\n\n== Documentation\n\nAlways trying to improve, any help appreciated! If anything is unclear to you, let us know!\n\nDocumentation is generated using yardoc:\n\n rake doc\n\nThe specs are also a good place to see how things are supposed to work.\n\n\n== Specs\n\nThe specs can be run with\n\n rake\n\nor, if you want to run a single spec\n\n rspec spec/node/command_api_spec.rb\n\nCoverage information is automatically generated and can be found in +coverage/+ after\nthe test run.\n\n\n== Contributing\n\nAny help or feedback is greatly appreciated! Just open an issue, submit a pull-request,\nor come to #bitcoin-ruby on irc.freenode.net if you want to chat.\n\n\n== License\n\nThis software is licensed under the terms of the MIT license. See {file:COPYING} for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fbitcoin-ruby-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fbitcoin-ruby-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fbitcoin-ruby-node/lists"}