bitcoin-elixir v0.0.2 Bitcoin.Node

GenServer representing a single running Bitcoin node.

Node can be configured with config :bittcoin, :node options which are documented in the config.exs file

Summary

Functions

Returns the config (congif.exs on top of the default config)

Returns the nonce

Start the node. Startup options are read from the config

Timestamp in UTC seconds. It’s used to validate sanity of other peers and blockhain data

Used by peer to provide fields for the VERSION message

Functions

config()

Returns the config (congif.exs on top of the default config)

height()
nonce()

Returns the nonce.

Nonce is generated at the node startup and used by peers to detect self connections.

protocol_version()
start_link()
start_link() :: {:ok, pid} | {:error, term}

Start the node. Startup options are read from the config.

timestamp()

Timestamp in UTC seconds. It’s used to validate sanity of other peers and blockhain data.

Check Bitcoin.Util.militime for more accurate timestamp.

version_fields()

Used by peer to provide fields for the VERSION message.