Package org.bitcoinj.base
package org.bitcoinj.base
The
base
package provides foundational types for bitcoinj. These types must have
minimal dependencies. The criteria for allowed dependencies for base
types are:
- No dependencies on other packages of bitcoinj
- No API dependencies on external libraries other than the core JDK and
slf4j-api
Temporary exception: In the 0.17 release, we are allowing some dependencies on other packages, e.g. to
NetworkParameters
or to Guava provided that those references are in deprecated methods.
This smooths migration by allowing users to, for example, replace import org.bitcoinj.core.Address
with
import org.bitcoinj.base.Address
as first step of conversion and then remove usages of the deprecated methods
of Address
in a second step.
The base package makes bitcoinj more modular as it breaks circular dependencies between existing packages and provides
a "zero-dependency" foundation for the other packages. In a future release base
will be
split into a separate JAR/module (tentatively bitcoinj-base
.)
-
ClassDescriptionInterface for addresses, e.g.Functional interface for parsing an
Address
.Interface implemented by custom address parser providers.Base58 is a way to encode Bitcoin addresses (or arbitrary data) as alphanumeric strings.Implementation of the Bech32 encoding.Binary data in 5-bits-per-byte format as used in Bech32 encoding/decoding.Bech32 data in 5-bit byte format withBech32.Encoding
and human-readable part (HRP) information.Enumeration of known Bech32 encoding format types: Bech32 and Bech32m.A convenientenum
representation of a Bitcoin network.Represents a monetary Bitcoin value.A Bitcoin address looks like 1MsScoe2fTJoq4ZPdQgqyhgWeoNamYPevy and is derived from an elliptic curve public key plus a set of network parameters.Address header of legacy P2PKH addresses for standard Bitcoin networks.Address header of legacy P2SH addresses for standard Bitcoin networks.Classes implementing this interface represent a monetary value, such as a Bitcoin or fiat amount.Interface for a generic Bitcoin-like cryptocurrency network.Supported Bitcoin script types and their script identifier strings.Implementation of native segwit addresses.Human-readable part (HRP) of Segwit addresses for standard Bitcoin networks.ASha256Hash
wraps abyte[]
so thatSha256Hash.equals(java.lang.Object)
andSha256Hash.hashCode()
work correctly, allowing it to be used as a key in a map.A variable-length encoded unsigned integer using Satoshi's encoding (a.k.a.