Module: BSV::Wallet::Interface::Store
- Included in:
- Store::Memory
- Defined in:
- lib/bsv/wallet/interface/store.rb
Overview
Duck-typed storage interface for wallet persistence.
Include this module in storage adapters and override all methods. The default implementations raise NotImplementedError.
Instance Method Summary collapse
- #count_actions(_query) ⇒ Object
- #count_certificates(_query) ⇒ Object
- #count_outputs(_query) ⇒ Object
- #delete_action(_txid) ⇒ Object
- #delete_certificate(type:, serial_number:, certifier:) ⇒ Object
- #delete_output(_outpoint) ⇒ Object
- #find_actions(_query) ⇒ Object
- #find_certificates(_query) ⇒ Object
- #find_outputs(_query) ⇒ Object
- #find_proof(_txid) ⇒ Object
- #find_setting(_key) ⇒ Object
- #find_spendable_outputs(basket: nil, min_satoshis: nil, sort_order: :desc) ⇒ Object
- #find_transaction(_txid) ⇒ Object
- #lock_utxos(_outpoints, reference:, no_send: false) ⇒ Object
- #release_stale_pending!(timeout: 300) ⇒ Object
- #store_action(_action_data) ⇒ Object
- #store_certificate(_cert_data) ⇒ Object
- #store_output(_output_data) ⇒ Object
- #store_proof(_txid, _bump_hex) ⇒ Object
- #store_setting(_key, _value) ⇒ Object
- #store_transaction(_txid, _tx_hex) ⇒ Object
- #update_action_status(_txid, _new_status) ⇒ Object
- #update_output_basket(_outpoint, _new_basket) ⇒ Object
- #update_output_state(_outpoint, _new_state, pending_reference: nil, no_send: nil) ⇒ Object
Instance Method Details
#count_actions(_query) ⇒ Object
43 44 45 |
# File 'lib/bsv/wallet/interface/store.rb', line 43 def count_actions(_query) raise NotImplementedError, "#{self.class}#count_actions not implemented" end |
#count_certificates(_query) ⇒ Object
51 52 53 |
# File 'lib/bsv/wallet/interface/store.rb', line 51 def count_certificates(_query) raise NotImplementedError, "#{self.class}#count_certificates not implemented" end |
#count_outputs(_query) ⇒ Object
47 48 49 |
# File 'lib/bsv/wallet/interface/store.rb', line 47 def count_outputs(_query) raise NotImplementedError, "#{self.class}#count_outputs not implemented" end |
#delete_action(_txid) ⇒ Object
75 76 77 |
# File 'lib/bsv/wallet/interface/store.rb', line 75 def delete_action(_txid) raise NotImplementedError, "#{self.class}#delete_action not implemented" end |
#delete_certificate(type:, serial_number:, certifier:) ⇒ Object
39 40 41 |
# File 'lib/bsv/wallet/interface/store.rb', line 39 def delete_certificate(type:, serial_number:, certifier:) raise NotImplementedError, "#{self.class}#delete_certificate not implemented" end |
#delete_output(_outpoint) ⇒ Object
27 28 29 |
# File 'lib/bsv/wallet/interface/store.rb', line 27 def delete_output(_outpoint) raise NotImplementedError, "#{self.class}#delete_output not implemented" end |
#find_actions(_query) ⇒ Object
15 16 17 |
# File 'lib/bsv/wallet/interface/store.rb', line 15 def find_actions(_query) raise NotImplementedError, "#{self.class}#find_actions not implemented" end |
#find_certificates(_query) ⇒ Object
35 36 37 |
# File 'lib/bsv/wallet/interface/store.rb', line 35 def find_certificates(_query) raise NotImplementedError, "#{self.class}#find_certificates not implemented" end |
#find_outputs(_query) ⇒ Object
23 24 25 |
# File 'lib/bsv/wallet/interface/store.rb', line 23 def find_outputs(_query) raise NotImplementedError, "#{self.class}#find_outputs not implemented" end |
#find_proof(_txid) ⇒ Object
59 60 61 |
# File 'lib/bsv/wallet/interface/store.rb', line 59 def find_proof(_txid) raise NotImplementedError, "#{self.class}#find_proof not implemented" end |
#find_setting(_key) ⇒ Object
103 104 105 |
# File 'lib/bsv/wallet/interface/store.rb', line 103 def find_setting(_key) raise NotImplementedError, "#{self.class}#find_setting not implemented" end |
#find_spendable_outputs(basket: nil, min_satoshis: nil, sort_order: :desc) ⇒ Object
91 92 93 |
# File 'lib/bsv/wallet/interface/store.rb', line 91 def find_spendable_outputs(basket: nil, min_satoshis: nil, sort_order: :desc) raise NotImplementedError, "#{self.class}#find_spendable_outputs not implemented" end |
#find_transaction(_txid) ⇒ Object
67 68 69 |
# File 'lib/bsv/wallet/interface/store.rb', line 67 def find_transaction(_txid) raise NotImplementedError, "#{self.class}#find_transaction not implemented" end |
#lock_utxos(_outpoints, reference:, no_send: false) ⇒ Object
87 88 89 |
# File 'lib/bsv/wallet/interface/store.rb', line 87 def lock_utxos(_outpoints, reference:, no_send: false) raise NotImplementedError, "#{self.class}#lock_utxos not implemented" end |
#release_stale_pending!(timeout: 300) ⇒ Object
95 96 97 |
# File 'lib/bsv/wallet/interface/store.rb', line 95 def release_stale_pending!(timeout: 300) raise NotImplementedError, "#{self.class}#release_stale_pending! not implemented" end |
#store_action(_action_data) ⇒ Object
11 12 13 |
# File 'lib/bsv/wallet/interface/store.rb', line 11 def store_action(_action_data) raise NotImplementedError, "#{self.class}#store_action not implemented" end |
#store_certificate(_cert_data) ⇒ Object
31 32 33 |
# File 'lib/bsv/wallet/interface/store.rb', line 31 def store_certificate(_cert_data) raise NotImplementedError, "#{self.class}#store_certificate not implemented" end |
#store_output(_output_data) ⇒ Object
19 20 21 |
# File 'lib/bsv/wallet/interface/store.rb', line 19 def store_output(_output_data) raise NotImplementedError, "#{self.class}#store_output not implemented" end |
#store_proof(_txid, _bump_hex) ⇒ Object
55 56 57 |
# File 'lib/bsv/wallet/interface/store.rb', line 55 def store_proof(_txid, _bump_hex) raise NotImplementedError, "#{self.class}#store_proof not implemented" end |
#store_setting(_key, _value) ⇒ Object
99 100 101 |
# File 'lib/bsv/wallet/interface/store.rb', line 99 def store_setting(_key, _value) raise NotImplementedError, "#{self.class}#store_setting not implemented" end |
#store_transaction(_txid, _tx_hex) ⇒ Object
63 64 65 |
# File 'lib/bsv/wallet/interface/store.rb', line 63 def store_transaction(_txid, _tx_hex) raise NotImplementedError, "#{self.class}#store_transaction not implemented" end |
#update_action_status(_txid, _new_status) ⇒ Object
71 72 73 |
# File 'lib/bsv/wallet/interface/store.rb', line 71 def update_action_status(_txid, _new_status) raise NotImplementedError, "#{self.class}#update_action_status not implemented" end |
#update_output_basket(_outpoint, _new_basket) ⇒ Object
79 80 81 |
# File 'lib/bsv/wallet/interface/store.rb', line 79 def update_output_basket(_outpoint, _new_basket) raise NotImplementedError, "#{self.class}#update_output_basket not implemented" end |
#update_output_state(_outpoint, _new_state, pending_reference: nil, no_send: nil) ⇒ Object
83 84 85 |
# File 'lib/bsv/wallet/interface/store.rb', line 83 def update_output_state(_outpoint, _new_state, pending_reference: nil, no_send: nil) raise NotImplementedError, "#{self.class}#update_output_state not implemented" end |