Class WrappedTestNetParams
java.lang.Object
org.bitcoinj.core.NetworkParameters
org.bitcoinj.params.AbstractBitcoinNetParams
org.bitcoinj.params.TestNet3Params
com.barbantfintech.tools.common.cryptojdk.netparams.WrappedTestNetParams
- All Implemented Interfaces:
IWrappedNetParams
public class WrappedTestNetParams
extends org.bitcoinj.params.TestNet3Params
implements IWrappedNetParams
Wrapped implementation of TestNet parameters for the library.
This class extends the TestNetParams
class and implements the
IWrappedNetParams
interface, providing the necessary network parameters
for test network operations.
The class encapsulates the test network parameters and provides methods to retrieve network-specific information such as network ID, name, and coin ID.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bitcoinj.core.NetworkParameters
org.bitcoinj.core.NetworkParameters.ProtocolVersion
-
Field Summary
Fields inherited from class org.bitcoinj.params.TestNet3Params
TESTNET_MAJORITY_ENFORCE_BLOCK_UPGRADE, TESTNET_MAJORITY_REJECT_BLOCK_OUTDATED, TESTNET_MAJORITY_WINDOW
Fields inherited from class org.bitcoinj.params.AbstractBitcoinNetParams
BITCOIN_SCHEME, genesisBlock, REWARD_HALVING_INTERVAL
Fields inherited from class org.bitcoinj.core.NetworkParameters
addressHeader, addrSeeds, BIP16_ENFORCE_TIME, bip32HeaderP2PKHpriv, bip32HeaderP2PKHpub, bip32HeaderP2WPKHpriv, bip32HeaderP2WPKHpub, checkpoints, defaultSerializer, dnsSeeds, dumpedPrivateKeyHeader, httpSeeds, id, ID_MAINNET, ID_REGTEST, ID_TESTNET, ID_UNITTESTNET, interval, INTERVAL, majorityEnforceBlockUpgrade, majorityRejectBlockOutdated, majorityWindow, MAX_COINS, MAX_MONEY, maxTarget, p2shHeader, packetMagic, PAYMENT_PROTOCOL_ID_MAINNET, PAYMENT_PROTOCOL_ID_REGTEST, PAYMENT_PROTOCOL_ID_TESTNET, PAYMENT_PROTOCOL_ID_UNIT_TESTS, port, segwitAddressHrp, spendableCoinbaseDepth, subsidyDecreaseBlockCount, TARGET_SPACING, TARGET_TIMESPAN, targetTimespan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WrappedTestNetParams
get()
Returns the singleton instance ofWrappedTestNetParams
.void
setBIP32Headers
(String bech32, int pubKeyHash, int scriptHash, int wif, int p2pkhPub, int p2pkhPriv, int p2wpkhPub, int p2wpkhPriv) Sets the BIP32 headers for the test network parameters.Methods inherited from class org.bitcoinj.params.TestNet3Params
checkDifficultyTransitions, getGenesisBlock, getPaymentProtocolId
Methods inherited from class org.bitcoinj.params.AbstractBitcoinNetParams
getBlockInflation, getMaxMoney, getMinNonDustOutput, getMonetaryFormat, getProtocolVersionNum, getSerializer, getUriScheme, hasMaxMoney, isDifficultyTransitionPoint, isRewardHalvingPoint
Methods inherited from class org.bitcoinj.core.NetworkParameters
allowEmptyPeerChain, equals, fromID, fromPmtProtocolID, getAddressHeader, getAddrSeeds, getBip32HeaderP2PKHpriv, getBip32HeaderP2PKHpub, getBip32HeaderP2WPKHpriv, getBip32HeaderP2WPKHpub, getBlockVerificationFlags, getDefaultSerializer, getDnsSeeds, getDumpedPrivateKeyHeader, getHttpSeeds, getId, getInterval, getMajorityEnforceBlockUpgrade, getMajorityRejectBlockOutdated, getMajorityWindow, getMaxTarget, getP2SHHeader, getPacketMagic, getPort, getSegwitAddressHrp, getSpendableCoinbaseDepth, getSubsidyDecreaseBlockCount, getTargetTimespan, getTransactionVerificationFlags, hashCode, isCheckpoint, passesCheckpoint
-
Constructor Details
-
WrappedTestNetParams
public WrappedTestNetParams()
-
-
Method Details
-
get
Returns the singleton instance ofWrappedTestNetParams
.This method ensures that only one instance of
WrappedTestNetParams
is created, and provides a global point of access to it.- Returns:
- the singleton instance of
WrappedTestNetParams
.
-
setBIP32Headers
public void setBIP32Headers(String bech32, int pubKeyHash, int scriptHash, int wif, int p2pkhPub, int p2pkhPriv, int p2wpkhPub, int p2wpkhPriv) Sets the BIP32 headers for the test network parameters.This method configures several BIP32 headers required for different types of keys and addresses in the network.
- Specified by:
setBIP32Headers
in interfaceIWrappedNetParams
- Parameters:
bech32
- the Bech32 human-readable part for segregated witness addresses.pubKeyHash
- the public key hash.scriptHash
- the script hash.wif
- the Wallet Import Format (WIF).p2pkhPub
- the public key for Pay-to-PubKeyHash (P2PKH) addresses.p2pkhPriv
- the private key for Pay-to-PubKeyHash (P2PKH) addresses.p2wpkhPub
- the public key for Pay-to-Witness-PubKeyHash (P2WPKH) addresses.p2wpkhPriv
- the private key for Pay-to-Witness-PubKeyHash (P2WPKH) addresses.
-