Class: Tapyrus::ChainParams
- Inherits:
-
Object
- Object
- Tapyrus::ChainParams
- Defined in:
- lib/tapyrus/chain_params.rb
Overview
Network parameter class
Instance Attribute Summary collapse
-
#address_version ⇒ Object
readonly
Returns the value of attribute address_version.
-
#bip34_height ⇒ Object
readonly
Returns the value of attribute bip34_height.
-
#bip44_coin_type ⇒ Object
readonly
Returns the value of attribute bip44_coin_type.
-
#bip49_privkey_p2wpkh_p2sh_version ⇒ Object
readonly
Returns the value of attribute bip49_privkey_p2wpkh_p2sh_version.
-
#bip49_privkey_p2wsh_p2sh_version ⇒ Object
readonly
Returns the value of attribute bip49_privkey_p2wsh_p2sh_version.
-
#bip49_pubkey_p2wpkh_p2sh_version ⇒ Object
readonly
Returns the value of attribute bip49_pubkey_p2wpkh_p2sh_version.
-
#bip49_pubkey_p2wsh_p2sh_version ⇒ Object
readonly
Returns the value of attribute bip49_pubkey_p2wsh_p2sh_version.
-
#bip84_privkey_p2wpkh_version ⇒ Object
readonly
Returns the value of attribute bip84_privkey_p2wpkh_version.
-
#bip84_privkey_p2wsh_version ⇒ Object
readonly
Returns the value of attribute bip84_privkey_p2wsh_version.
-
#bip84_pubkey_p2wpkh_version ⇒ Object
readonly
Returns the value of attribute bip84_pubkey_p2wpkh_version.
-
#bip84_pubkey_p2wsh_version ⇒ Object
readonly
Returns the value of attribute bip84_pubkey_p2wsh_version.
-
#cp2pkh_version ⇒ Object
readonly
Returns the value of attribute cp2pkh_version.
-
#cp2sh_version ⇒ Object
readonly
Returns the value of attribute cp2sh_version.
-
#default_port ⇒ Object
readonly
Returns the value of attribute default_port.
-
#dns_seeds ⇒ Object
readonly
Returns the value of attribute dns_seeds.
-
#dust_relay_fee ⇒ Object
Returns the value of attribute dust_relay_fee.
-
#extended_privkey_version ⇒ Object
readonly
Returns the value of attribute extended_privkey_version.
-
#extended_pubkey_version ⇒ Object
readonly
Returns the value of attribute extended_pubkey_version.
-
#magic_head ⇒ Object
readonly
Returns the value of attribute magic_head.
-
#max_money ⇒ Object
readonly
Returns the value of attribute max_money.
-
#message_magic ⇒ Object
readonly
Returns the value of attribute message_magic.
-
#network ⇒ Object
readonly
Returns the value of attribute network.
-
#p2sh_version ⇒ Object
readonly
Returns the value of attribute p2sh_version.
-
#privkey_version ⇒ Object
readonly
Returns the value of attribute privkey_version.
-
#proof_of_work_limit ⇒ Object
readonly
Returns the value of attribute proof_of_work_limit.
-
#protocol_version ⇒ Object
readonly
Returns the value of attribute protocol_version.
-
#retarget_interval ⇒ Object
readonly
Returns the value of attribute retarget_interval.
-
#retarget_time ⇒ Object
readonly
Returns the value of attribute retarget_time.
-
#rpc_port ⇒ Object
readonly
Returns the value of attribute rpc_port.
-
#target_spacing ⇒ Object
readonly
Returns the value of attribute target_spacing.
Class Method Summary collapse
-
.dev ⇒ Object
development genesis.
-
.prod ⇒ Object
production genesis.
Instance Method Summary collapse
Instance Attribute Details
#address_version ⇒ Object (readonly)
Returns the value of attribute address_version.
9 10 11 |
# File 'lib/tapyrus/chain_params.rb', line 9 def address_version @address_version end |
#bip34_height ⇒ Object (readonly)
Returns the value of attribute bip34_height.
31 32 33 |
# File 'lib/tapyrus/chain_params.rb', line 31 def bip34_height @bip34_height end |
#bip44_coin_type ⇒ Object (readonly)
Returns the value of attribute bip44_coin_type.
34 35 36 |
# File 'lib/tapyrus/chain_params.rb', line 34 def bip44_coin_type @bip44_coin_type end |
#bip49_privkey_p2wpkh_p2sh_version ⇒ Object (readonly)
Returns the value of attribute bip49_privkey_p2wpkh_p2sh_version.
17 18 19 |
# File 'lib/tapyrus/chain_params.rb', line 17 def bip49_privkey_p2wpkh_p2sh_version @bip49_privkey_p2wpkh_p2sh_version end |
#bip49_privkey_p2wsh_p2sh_version ⇒ Object (readonly)
Returns the value of attribute bip49_privkey_p2wsh_p2sh_version.
19 20 21 |
# File 'lib/tapyrus/chain_params.rb', line 19 def bip49_privkey_p2wsh_p2sh_version @bip49_privkey_p2wsh_p2sh_version end |
#bip49_pubkey_p2wpkh_p2sh_version ⇒ Object (readonly)
Returns the value of attribute bip49_pubkey_p2wpkh_p2sh_version.
16 17 18 |
# File 'lib/tapyrus/chain_params.rb', line 16 def bip49_pubkey_p2wpkh_p2sh_version @bip49_pubkey_p2wpkh_p2sh_version end |
#bip49_pubkey_p2wsh_p2sh_version ⇒ Object (readonly)
Returns the value of attribute bip49_pubkey_p2wsh_p2sh_version.
18 19 20 |
# File 'lib/tapyrus/chain_params.rb', line 18 def bip49_pubkey_p2wsh_p2sh_version @bip49_pubkey_p2wsh_p2sh_version end |
#bip84_privkey_p2wpkh_version ⇒ Object (readonly)
Returns the value of attribute bip84_privkey_p2wpkh_version.
21 22 23 |
# File 'lib/tapyrus/chain_params.rb', line 21 def bip84_privkey_p2wpkh_version @bip84_privkey_p2wpkh_version end |
#bip84_privkey_p2wsh_version ⇒ Object (readonly)
Returns the value of attribute bip84_privkey_p2wsh_version.
23 24 25 |
# File 'lib/tapyrus/chain_params.rb', line 23 def bip84_privkey_p2wsh_version @bip84_privkey_p2wsh_version end |
#bip84_pubkey_p2wpkh_version ⇒ Object (readonly)
Returns the value of attribute bip84_pubkey_p2wpkh_version.
20 21 22 |
# File 'lib/tapyrus/chain_params.rb', line 20 def bip84_pubkey_p2wpkh_version @bip84_pubkey_p2wpkh_version end |
#bip84_pubkey_p2wsh_version ⇒ Object (readonly)
Returns the value of attribute bip84_pubkey_p2wsh_version.
22 23 24 |
# File 'lib/tapyrus/chain_params.rb', line 22 def bip84_pubkey_p2wsh_version @bip84_pubkey_p2wsh_version end |
#cp2pkh_version ⇒ Object (readonly)
Returns the value of attribute cp2pkh_version.
11 12 13 |
# File 'lib/tapyrus/chain_params.rb', line 11 def cp2pkh_version @cp2pkh_version end |
#cp2sh_version ⇒ Object (readonly)
Returns the value of attribute cp2sh_version.
12 13 14 |
# File 'lib/tapyrus/chain_params.rb', line 12 def cp2sh_version @cp2sh_version end |
#default_port ⇒ Object (readonly)
Returns the value of attribute default_port.
24 25 26 |
# File 'lib/tapyrus/chain_params.rb', line 24 def default_port @default_port end |
#dns_seeds ⇒ Object (readonly)
Returns the value of attribute dns_seeds.
33 34 35 |
# File 'lib/tapyrus/chain_params.rb', line 33 def dns_seeds @dns_seeds end |
#dust_relay_fee ⇒ Object
Returns the value of attribute dust_relay_fee.
36 37 38 |
# File 'lib/tapyrus/chain_params.rb', line 36 def dust_relay_fee @dust_relay_fee end |
#extended_privkey_version ⇒ Object (readonly)
Returns the value of attribute extended_privkey_version.
14 15 16 |
# File 'lib/tapyrus/chain_params.rb', line 14 def extended_privkey_version @extended_privkey_version end |
#extended_pubkey_version ⇒ Object (readonly)
Returns the value of attribute extended_pubkey_version.
15 16 17 |
# File 'lib/tapyrus/chain_params.rb', line 15 def extended_pubkey_version @extended_pubkey_version end |
#magic_head ⇒ Object (readonly)
Returns the value of attribute magic_head.
7 8 9 |
# File 'lib/tapyrus/chain_params.rb', line 7 def magic_head @magic_head end |
#max_money ⇒ Object (readonly)
Returns the value of attribute max_money.
30 31 32 |
# File 'lib/tapyrus/chain_params.rb', line 30 def max_money @max_money end |
#message_magic ⇒ Object (readonly)
Returns the value of attribute message_magic.
8 9 10 |
# File 'lib/tapyrus/chain_params.rb', line 8 def @message_magic end |
#network ⇒ Object (readonly)
Returns the value of attribute network.
6 7 8 |
# File 'lib/tapyrus/chain_params.rb', line 6 def network @network end |
#p2sh_version ⇒ Object (readonly)
Returns the value of attribute p2sh_version.
10 11 12 |
# File 'lib/tapyrus/chain_params.rb', line 10 def p2sh_version @p2sh_version end |
#privkey_version ⇒ Object (readonly)
Returns the value of attribute privkey_version.
13 14 15 |
# File 'lib/tapyrus/chain_params.rb', line 13 def privkey_version @privkey_version end |
#proof_of_work_limit ⇒ Object (readonly)
Returns the value of attribute proof_of_work_limit.
32 33 34 |
# File 'lib/tapyrus/chain_params.rb', line 32 def proof_of_work_limit @proof_of_work_limit end |
#protocol_version ⇒ Object (readonly)
Returns the value of attribute protocol_version.
26 27 28 |
# File 'lib/tapyrus/chain_params.rb', line 26 def protocol_version @protocol_version end |
#retarget_interval ⇒ Object (readonly)
Returns the value of attribute retarget_interval.
27 28 29 |
# File 'lib/tapyrus/chain_params.rb', line 27 def retarget_interval @retarget_interval end |
#retarget_time ⇒ Object (readonly)
Returns the value of attribute retarget_time.
28 29 30 |
# File 'lib/tapyrus/chain_params.rb', line 28 def retarget_time @retarget_time end |
#rpc_port ⇒ Object (readonly)
Returns the value of attribute rpc_port.
25 26 27 |
# File 'lib/tapyrus/chain_params.rb', line 25 def rpc_port @rpc_port end |
#target_spacing ⇒ Object (readonly)
Returns the value of attribute target_spacing.
29 30 31 |
# File 'lib/tapyrus/chain_params.rb', line 29 def target_spacing @target_spacing end |
Class Method Details
.dev ⇒ Object
development genesis
44 45 46 |
# File 'lib/tapyrus/chain_params.rb', line 44 def self.dev init("dev") end |
.prod ⇒ Object
production genesis
39 40 41 |
# File 'lib/tapyrus/chain_params.rb', line 39 def self.prod init("prod") end |
Instance Method Details
#dev? ⇒ Boolean
52 53 54 |
# File 'lib/tapyrus/chain_params.rb', line 52 def dev? network == "dev" end |
#prod? ⇒ Boolean
48 49 50 |
# File 'lib/tapyrus/chain_params.rb', line 48 def prod? network == "prod" end |