Module: Counterparty
- Defined in:
- lib/counterparty_ruby.rb,
lib/counterparty/version.rb,
lib/counterparty/resource.rb,
lib/counterparty/resources.rb,
lib/counterparty/connection.rb
Overview
The main module, under which all classes in the library are defined.
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
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.1.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
64 65 66 |
# File 'lib/counterparty_ruby.rb', line 64 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
58 59 60 |
# File 'lib/counterparty_ruby.rb', line 58 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
70 71 72 73 |
# File 'lib/counterparty_ruby.rb', line 70 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
77 78 79 80 |
# File 'lib/counterparty_ruby.rb', line 77 def test! @connection = Connection.new 14000 @bitcoin = BlockrIo.new true end |