Class BSV::Wallet::LocalProofStore ¶
Inherits: Object Includes: BSV::Wallet::Interface::ProofStore
Default proof store — persists serialised merkle proofs via a {Store}. Requires no external services.
@example Using the default local proof store
store = BSV::Wallet::Store::Memory.new
proofs = BSV::Wallet::LocalProofStore.new(store)
proofs.store_proof(txid_hex, merkle_path)
proof = proofs.resolve_proof(txid_hex)
Public Instance Methods¶
initialize(storage) ¶
- @param
storage[Store] the underlying persistence adapter - @return [LocalProofStore] a new instance of LocalProofStore
resolve_proof(txid) ¶
Resolve and deserialise a merkle proof. - @param txid [String] hex transaction ID - @return [BSV::Transaction::MerklePath, nil] the proof, or nil if unknown
store_proof(txid, merkle_path) ¶
Serialise and store a merkle proof. - @param txid [String] hex transaction ID - @param merkle_path [BSV::Transaction::MerklePath] the proof to store - @return [void]