Class: Tapyrus::ChainParams

Inherits:
Object show all
Defined in:
lib/tapyrus/chain_params.rb

Overview

Network parameter class

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#address_versionObject (readonly)

Returns the value of attribute address_version.



11
12
13
# File 'lib/tapyrus/chain_params.rb', line 11

def address_version
  @address_version
end

#bip34_heightObject (readonly)

Returns the value of attribute bip34_height.



33
34
35
# File 'lib/tapyrus/chain_params.rb', line 33

def bip34_height
  @bip34_height
end

#bip44_coin_typeObject (readonly)

Returns the value of attribute bip44_coin_type.



36
37
38
# File 'lib/tapyrus/chain_params.rb', line 36

def bip44_coin_type
  @bip44_coin_type
end

#bip49_privkey_p2wpkh_p2sh_versionObject (readonly)

Returns the value of attribute bip49_privkey_p2wpkh_p2sh_version.



19
20
21
# File 'lib/tapyrus/chain_params.rb', line 19

def bip49_privkey_p2wpkh_p2sh_version
  @bip49_privkey_p2wpkh_p2sh_version
end

#bip49_privkey_p2wsh_p2sh_versionObject (readonly)

Returns the value of attribute bip49_privkey_p2wsh_p2sh_version.



21
22
23
# File 'lib/tapyrus/chain_params.rb', line 21

def bip49_privkey_p2wsh_p2sh_version
  @bip49_privkey_p2wsh_p2sh_version
end

#bip49_pubkey_p2wpkh_p2sh_versionObject (readonly)

Returns the value of attribute bip49_pubkey_p2wpkh_p2sh_version.



18
19
20
# File 'lib/tapyrus/chain_params.rb', line 18

def bip49_pubkey_p2wpkh_p2sh_version
  @bip49_pubkey_p2wpkh_p2sh_version
end

#bip49_pubkey_p2wsh_p2sh_versionObject (readonly)

Returns the value of attribute bip49_pubkey_p2wsh_p2sh_version.



20
21
22
# File 'lib/tapyrus/chain_params.rb', line 20

def bip49_pubkey_p2wsh_p2sh_version
  @bip49_pubkey_p2wsh_p2sh_version
end

#bip84_privkey_p2wpkh_versionObject (readonly)

Returns the value of attribute bip84_privkey_p2wpkh_version.



23
24
25
# File 'lib/tapyrus/chain_params.rb', line 23

def bip84_privkey_p2wpkh_version
  @bip84_privkey_p2wpkh_version
end

#bip84_privkey_p2wsh_versionObject (readonly)

Returns the value of attribute bip84_privkey_p2wsh_version.



25
26
27
# File 'lib/tapyrus/chain_params.rb', line 25

def bip84_privkey_p2wsh_version
  @bip84_privkey_p2wsh_version
end

#bip84_pubkey_p2wpkh_versionObject (readonly)

Returns the value of attribute bip84_pubkey_p2wpkh_version.



22
23
24
# File 'lib/tapyrus/chain_params.rb', line 22

def bip84_pubkey_p2wpkh_version
  @bip84_pubkey_p2wpkh_version
end

#bip84_pubkey_p2wsh_versionObject (readonly)

Returns the value of attribute bip84_pubkey_p2wsh_version.



24
25
26
# File 'lib/tapyrus/chain_params.rb', line 24

def bip84_pubkey_p2wsh_version
  @bip84_pubkey_p2wsh_version
end

#cp2pkh_versionObject (readonly)

Returns the value of attribute cp2pkh_version.



13
14
15
# File 'lib/tapyrus/chain_params.rb', line 13

def cp2pkh_version
  @cp2pkh_version
end

#cp2sh_versionObject (readonly)

Returns the value of attribute cp2sh_version.



14
15
16
# File 'lib/tapyrus/chain_params.rb', line 14

def cp2sh_version
  @cp2sh_version
end

#default_portObject (readonly)

Returns the value of attribute default_port.



26
27
28
# File 'lib/tapyrus/chain_params.rb', line 26

def default_port
  @default_port
end

#dns_seedsObject (readonly)

Returns the value of attribute dns_seeds.



35
36
37
# File 'lib/tapyrus/chain_params.rb', line 35

def dns_seeds
  @dns_seeds
end

#dust_relay_feeObject

Returns the value of attribute dust_relay_fee.



38
39
40
# File 'lib/tapyrus/chain_params.rb', line 38

def dust_relay_fee
  @dust_relay_fee
end

#extended_privkey_versionObject (readonly)

Returns the value of attribute extended_privkey_version.



16
17
18
# File 'lib/tapyrus/chain_params.rb', line 16

def extended_privkey_version
  @extended_privkey_version
end

#extended_pubkey_versionObject (readonly)

Returns the value of attribute extended_pubkey_version.



17
18
19
# File 'lib/tapyrus/chain_params.rb', line 17

def extended_pubkey_version
  @extended_pubkey_version
end

#magic_headObject (readonly)

Returns the value of attribute magic_head.



9
10
11
# File 'lib/tapyrus/chain_params.rb', line 9

def magic_head
  @magic_head
end

#max_moneyObject (readonly)

Returns the value of attribute max_money.



32
33
34
# File 'lib/tapyrus/chain_params.rb', line 32

def max_money
  @max_money
end

#message_magicObject (readonly)

Returns the value of attribute message_magic.



10
11
12
# File 'lib/tapyrus/chain_params.rb', line 10

def message_magic
  @message_magic
end

#networkObject (readonly)

Returns the value of attribute network.



8
9
10
# File 'lib/tapyrus/chain_params.rb', line 8

def network
  @network
end

#p2sh_versionObject (readonly)

Returns the value of attribute p2sh_version.



12
13
14
# File 'lib/tapyrus/chain_params.rb', line 12

def p2sh_version
  @p2sh_version
end

#privkey_versionObject (readonly)

Returns the value of attribute privkey_version.



15
16
17
# File 'lib/tapyrus/chain_params.rb', line 15

def privkey_version
  @privkey_version
end

#proof_of_work_limitObject (readonly)

Returns the value of attribute proof_of_work_limit.



34
35
36
# File 'lib/tapyrus/chain_params.rb', line 34

def proof_of_work_limit
  @proof_of_work_limit
end

#protocol_versionObject (readonly)

Returns the value of attribute protocol_version.



28
29
30
# File 'lib/tapyrus/chain_params.rb', line 28

def protocol_version
  @protocol_version
end

#retarget_intervalObject (readonly)

Returns the value of attribute retarget_interval.



29
30
31
# File 'lib/tapyrus/chain_params.rb', line 29

def retarget_interval
  @retarget_interval
end

#retarget_timeObject (readonly)

Returns the value of attribute retarget_time.



30
31
32
# File 'lib/tapyrus/chain_params.rb', line 30

def retarget_time
  @retarget_time
end

#rpc_portObject (readonly)

Returns the value of attribute rpc_port.



27
28
29
# File 'lib/tapyrus/chain_params.rb', line 27

def rpc_port
  @rpc_port
end

#target_spacingObject (readonly)

Returns the value of attribute target_spacing.



31
32
33
# File 'lib/tapyrus/chain_params.rb', line 31

def target_spacing
  @target_spacing
end

Class Method Details

.devObject

development genesis



46
47
48
# File 'lib/tapyrus/chain_params.rb', line 46

def self.dev
  init('dev')
end

.prodObject

production genesis



41
42
43
# File 'lib/tapyrus/chain_params.rb', line 41

def self.prod
  init('prod')
end

Instance Method Details

#dev?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/tapyrus/chain_params.rb', line 54

def dev?
  network == 'dev'
end

#prod?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/tapyrus/chain_params.rb', line 50

def prod?
  network == 'prod'
end