Package org.bitcoinj.testing
Class MockAltNetwork
- java.lang.Object
-
- org.bitcoinj.testing.MockAltNetwork
-
-
Constructor Summary
Constructors Constructor Description MockAltNetwork()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexceedsMaxMoney(Monetary monetary)Check if an amount exceeds the maximum allowed for a network (if the network has one)booleanhasMaxMoney()Does this network have a fixed maximum number of coinsjava.lang.Stringid()The dot-seperated string id for this network.intlegacyAddressHeader()Header byte of base58 encoded legacy P2PKH addresses for this network.intlegacyP2SHHeader()Header byte of base58 encoded legacy P2SH addresses for this network.MonetarymaxMoney()Maximum number of coins for this network as aMonetaryvalue.java.lang.StringsegwitAddressHrp()Human-readable part (HRP) of bech32 encoded segwit addresses for this network.java.lang.StringuriScheme()The URI scheme for this network.
-
-
-
Method Detail
-
id
public java.lang.String id()
Description copied from interface:NetworkThe dot-seperated string id for this network. For example"org.bitcoin.production"
-
legacyAddressHeader
public int legacyAddressHeader()
Description copied from interface:NetworkHeader byte of base58 encoded legacy P2PKH addresses for this network.- Specified by:
legacyAddressHeaderin interfaceNetwork- Returns:
- header byte as an
int. - See Also:
LegacyAddress.AddressHeader
-
legacyP2SHHeader
public int legacyP2SHHeader()
Description copied from interface:NetworkHeader byte of base58 encoded legacy P2SH addresses for this network.- Specified by:
legacyP2SHHeaderin interfaceNetwork- Returns:
- header byte as an
int. - See Also:
LegacyAddress.P2SHHeader
-
segwitAddressHrp
public java.lang.String segwitAddressHrp()
Description copied from interface:NetworkHuman-readable part (HRP) of bech32 encoded segwit addresses for this network.- Specified by:
segwitAddressHrpin interfaceNetwork- Returns:
- HRP (lowercase)
-
uriScheme
public java.lang.String uriScheme()
Description copied from interface:NetworkThe URI scheme for this network. SeeBitcoinNetwork.uriScheme().
-
hasMaxMoney
public boolean hasMaxMoney()
Description copied from interface:NetworkDoes this network have a fixed maximum number of coins- Specified by:
hasMaxMoneyin interfaceNetwork- Returns:
trueif this network has a fixed maximum number of coins
-
maxMoney
public Monetary maxMoney()
Description copied from interface:NetworkMaximum number of coins for this network as aMonetaryvalue. Where not applicable, a very large number of coins is returned instead (e.g. the main coin issue for Dogecoin).
-
exceedsMaxMoney
public boolean exceedsMaxMoney(Monetary monetary)
Description copied from interface:NetworkCheck if an amount exceeds the maximum allowed for a network (if the network has one)- Specified by:
exceedsMaxMoneyin interfaceNetwork- Parameters:
monetary- A monetary amount- Returns:
- true if too big, false if an allowed amount
-
-