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

Instance Method Details

#count_actions(_query) ⇒ Object

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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