Module: Counterparty
- Defined in:
- lib/counterparty_ruby.rb,
lib/counterparty/version.rb,
lib/counterparty/resource.rb,
lib/counterparty/resources.rb,
lib/counterparty/tx_decode.rb,
lib/counterparty/tx_encode.rb,
lib/counterparty/connection.rb
Overview
Inspriration heavily lifted from:
Defined Under Namespace
Classes: BTCPay, Balance, Bet, BetExpiration, BetMatch, BetMatchExpiration, Broadcast, Burn, Callback, Cancel, Connection, CounterResource, Credit, Debit, Dividend, Execute, Issuance, JsonResponseError, Message, Order, OrderExpiration, OrderMatch, OrderMatchExpiration, Publish, ResponseError, Send, TxDecode, TxEncode
Constant Summary collapse
- ONE_XCP =
One XCP, in units of Satoshi
100_000_000
- ONE_BTC =
One BTC, in units of Satoshi
100_000_000
- VERSION =
The library version string
"1.2.0"
Class Attribute Summary collapse
-
.bitcoin ⇒ Object
Returns the current default bitcoin object, or creates a new test-mode connection, if none has been defined.
-
.connection ⇒ Object
Returns the current default connection object, or creates a new test-mode connection, if none has been defined.
Class Method Summary collapse
-
.production! ⇒ Object
Establishes the default connection for new objects as being the default counterparty production mode port/user/ip.
-
.test! ⇒ Object
Establishes the default connection for new objects as being the default counterparty test mode port/user/ip.
Class Attribute Details
.bitcoin ⇒ Object
Returns the current default bitcoin object, or creates a new test-mode connection, if none has been defined
67 68 69 |
# File 'lib/counterparty_ruby.rb', line 67 def bitcoin @bitcoin || BlockrIo.new end |
.connection ⇒ Object
Returns the current default connection object, or creates a new test-mode connection, if none has been defined
61 62 63 |
# File 'lib/counterparty_ruby.rb', line 61 def connection @connection || Connection.new end |
Class Method Details
.production! ⇒ Object
Establishes the default connection for new objects as being the default counterparty production mode port/user/ip
73 74 75 76 |
# File 'lib/counterparty_ruby.rb', line 73 def production! @connection = Connection.new @bitcoin = BlockrIo.new end |
.test! ⇒ Object
Establishes the default connection for new objects as being the default counterparty test mode port/user/ip
80 81 82 83 |
# File 'lib/counterparty_ruby.rb', line 80 def test! @connection = Connection.new 14000 @bitcoin = BlockrIo.new true end |