Practical overview
When it fits
Use it when a Scala application needs Bitcoin protocol parsing or transaction and script functionality. For retrieving data from the Bitcoin network, the project describes pairing the library with bitcoind.
Who it is for
- Scala developers adding Bitcoin protocol handling to an application.
- Teams building Bitcoin block or transaction inspection and indexing tools that use bitcoind for network access.
- Developers prototyping transaction, script, key or address functionality.
Documented uses
- Parse Bitcoin block headers, blocks and transactions.
- Encode and decode Base58 data.
- Create, serialize, deserialize, sign and validate transactions.
- Parse and execute scripts and work with documented standard script types.
- Use BIP 32 and BIP 39 key functionality and formats including PSBT and Bech32m.
Requirements & limits
The repository is public and identifies the project as Apache-2.0 licensed. Its README documents a Maven dependency for the Scala 2.13 artifact.
- The Scala-facing library wraps functionality implemented in Kotlin; Scala wrappers are in the fr.acinq.bitcoin.scalacompat namespace.
- The library is not a full Bitcoin node and does not replace bitcoind for network retrieval.
- The README describes JNI bindings for libsecp256k1 and lists included native libraries for 64-bit Linux, Windows and macOS.
- The README directs developers to the repository’s unit tests and bitcoin-kmp tests for usage samples.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Use Bitcoin-lib's Scala console for Base58 encoding
Derive a public key from a private key and Base58Check-encode its public-key hash.
Before you start
- Maven and a Scala environment with bitcoin-lib available; the README demonstrates
mvn scala:console. - The
scodec.bitsdependency used for the hexadecimal literal in the example.
Steps
Start the Scala console with
mvn scala:console.Import
fr.acinq.bitcoin._,fr.acinq.bitcoin.scalacompat.Crypto._, andscodec.bits._.Create a
PrivateKeyfrom the documented hexadecimal example and obtain itspublicKey.Call
Base58Check.encode(Base58.Prefix.PubkeyAddress, pub.hash160)to encode the public-key hash.
Expected outcome
The README's example produces the Base58Check address `1J7mdg5rbQyUHENYdx39WVWK7fsLpEoXZy`.
Guide limitations
- The example uses a fixed private-key value; do not treat it as a secure key for funds.
- The library is not a full Bitcoin node; its stated objective is to support applications that rely on bitcoind for network access.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- ACINQ/bitcoin-lib · Official homepage title · retained in its source language

