A Ruby implementation of the BRC-100 wallet interface for managing UTXO lifecycle, transaction construction, broadcasting, and proof management.
Be the first to ask Simon Bettison something.
What do you think? ...
A Ruby implementation of the BRC-100 wallet interface — managing UTXO lifecycle, transaction construction, broadcasting, and proof management for BSV applications.
Built on the BSV Ruby SDK for all cryptographic operations (signing, key derivation, script handling, BEEF serialization). The wallet handles state transitions and data integrity: which outputs are spendable, which inputs are locked, which transactions are proven, and which proofs are valid.
Earn XP for sharing
Sign in to get a personal referral link and earn XP every time someone visits through your link.
No reviews yet — be the first.
```ruby
gem 'bsv-wallet'
gem 'bsv-wallet-postgres'
require 'bsv-wallet-postgres'
# Connect to PostgreSQL
db = Sequel.connect('postgres://localhost/my_wallet')
BSV::Wallet::Postgres.connect(db)
# Compose the wallet
engine = BSV::Wallet::Engine.new(
store: BSV::Wallet::Postgres::Store.new,
utxo_pool: BSV::Wallet::Postgres::UTXOPool.new(store: store),
broadcast_queue: BSV::Wallet::Postgres::BroadcastQueue.new(arc_client: arc),
proof_store: BSV::Wallet::Postgres::ProofStore.new,
key_deriver: BSV::Wallet::KeyDeriver.new(private_key),
network: :mainnet
)
# Create a transaction (BRC-100 createAction)
result = engine.create_action(
description: 'payment to merchant',
outputs: [
{ satoshis: 5000, locking_script: recipient_script, basket: 'payments' }
],
labels: ['merchant']
)
# result[:txid] — 32-byte wire-order wtxid
# result[:tx] — Atomic BEEF binary (BRC-95)
```