OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Bitcoin Lib

Bitcoin Lib is a Scala library that wraps ACINQ’s Kotlin Bitcoin library and provides Bitcoin protocol functions, including block and transaction parsing, Base58 encoding and decoding, transaction creation and validation, and script operations.

Independent OpenViST project profile, based on linked sources.

Bitcoin Lib — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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.bits dependency used for the hexadecimal literal in the example.

Steps

  1. Start the Scala console with mvn scala:console.

  2. Import fr.acinq.bitcoin._, fr.acinq.bitcoin.scalacompat.Crypto._, and scodec.bits._.

  3. Create a PrivateKey from the documented hexadecimal example and obtain its publicKey.

  4. 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.
Evidence and transparency

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