Class: BSV::Wallet::WalletWireTransceiver

Inherits:
Object
  • Object
show all
Includes:
Interface::BRC100
Defined in:
lib/bsv/wallet/wallet_wire_transceiver.rb

Overview

Client-side BRC-103 transceiver.

Implements every Interface::BRC100 method by serialising the call arguments to a binary request frame, transmitting it over a WalletWire, unframing the result, and deserialising the payload back to a Ruby hash.

Thread safety: each call is independent. The wire transport is the synchronisation boundary — concurrent calls are serialised only if the underlying wire implementation serialises them.

Examples:

In-process loopback (testing / same-process use)

proto     = BSV::Wallet::ProtoWallet.new(key)
processor = BSV::Wallet::WalletWireProcessor.new(proto)
client    = BSV::Wallet::WalletWireTransceiver.new(processor)
client.get_public_key(identity_key: true)
#=> { public_key: "02..." }

Over HTTP

wire   = BSV::Wallet::Substrates::HTTPWalletWire.new(base_url: 'https://wallet.example')
client = BSV::Wallet::WalletWireTransceiver.new(wire)

Instance Method Summary collapse

Methods included from Interface::BRC100

#abort_action, #acquire_certificate, #authenticated?, #create_action, #create_hmac, #create_signature, #decrypt, #discover_by_attributes, #discover_by_identity_key, #encrypt, #get_header_for_height, #get_height, #get_network, #get_public_key, #get_version, #internalize_action, #list_actions, #list_certificates, #list_outputs, #prove_certificate, #relinquish_certificate, #relinquish_output, #reveal_counterparty_key_linkage, #reveal_specific_key_linkage, #sign_action, #verify_hmac, #verify_signature, #wait_for_authentication

Constructor Details

#initialize(wire) ⇒ WalletWireTransceiver

Returns a new instance of WalletWireTransceiver.

Parameters:



29
30
31
# File 'lib/bsv/wallet/wallet_wire_transceiver.rb', line 29

def initialize(wire)
  @wire = wire
end