Module: BSV::Wallet::ProofStore

Included in:
LocalProofStore
Defined in:
lib/bsv/wallet_interface/proof_store.rb

Overview

Duck-typed interface for merkle proof persistence.

Include this module in proof store implementations and override all methods. The default implementations raise NotImplementedError.

Two implementations ship with the SDK:

Instance Method Summary collapse

Instance Method Details

#resolve_proof(_txid) ⇒ BSV::Transaction::MerklePath?

Resolve a merkle proof for a transaction.

Parameters:

  • _txid (String)

    hex transaction ID

Returns:

  • (BSV::Transaction::MerklePath, nil)

    the proof, or nil if unknown

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/bsv/wallet_interface/proof_store.rb', line 27

def resolve_proof(_txid)
  raise NotImplementedError, "#{self.class}#resolve_proof not implemented"
end

#store_proof(_txid, _merkle_path) ⇒ void

This method returns an undefined value.

Store a merkle proof for a transaction.

Parameters:

  • _txid (String)

    hex transaction ID

  • _merkle_path (BSV::Transaction::MerklePath)

    the proof to store

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/bsv/wallet_interface/proof_store.rb', line 19

def store_proof(_txid, _merkle_path)
  raise NotImplementedError, "#{self.class}#store_proof not implemented"
end