Module: BSV::Wallet::Interface::BRC100
- Included in:
- ProtoWallet
- Defined in:
- lib/bsv/wallet/interface/brc100.rb
Instance Method Summary collapse
-
#abort_action(reference:, originator: nil) ⇒ Object
Aborts a transaction that has not yet been finalized.
-
#acquire_certificate(type:, certifier:, acquisition_protocol:, fields:, serial_number: nil, revocation_outpoint: nil, signature: nil, certifier_url: nil, keyring_revealer: nil, keyring_for_subject: nil, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Acquires an identity certificate from a certifier or by direct receipt.
-
#authenticated?(originator: nil) ⇒ Boolean
Checks whether the user is authenticated.
-
#create_action(description:, input_beef: nil, inputs: nil, outputs: nil, lock_time: nil, version: nil, labels: nil, sign_and_process: true, accept_delayed_broadcast: true, trust_self: nil, known_txids: nil, return_txid_only: false, no_send: false, no_send_change: nil, send_with: nil, randomize_outputs: true, originator: nil) ⇒ Hash
Creates a new Bitcoin transaction.
-
#create_hmac(data:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Creates an HMAC for the provided data.
-
#create_signature(protocol_id:, key_id:, data: nil, hash_to_directly_sign: nil, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Creates a digital signature (ECDSA) for data or a pre-computed hash.
-
#decrypt(ciphertext:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Decrypts ciphertext using derived keys.
-
#discover_by_attributes(attributes:, limit: 10, offset: 0, seek_permission: true, originator: nil) ⇒ Object
Discovers certificates matching specific attribute values.
-
#discover_by_identity_key(identity_key:, limit: 10, offset: 0, seek_permission: true, originator: nil) ⇒ Object
Discovers certificates issued to a given identity key.
-
#encrypt(plaintext:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Encrypts plaintext using derived keys.
-
#get_header_for_height(height:, originator: nil) ⇒ Object
Returns the 80-byte block header at the given height.
-
#get_height(originator: nil) ⇒ Object
Returns the current blockchain height.
-
#get_network(originator: nil) ⇒ Object
Returns the network (:mainnet or :testnet).
-
#get_public_key(identity_key: false, protocol_id: nil, key_id: nil, privileged: false, privileged_reason: nil, counterparty: nil, for_self: false, seek_permission: true, originator: nil) ⇒ Hash
Retrieves a derived or identity public key.
-
#get_version(originator: nil) ⇒ Object
Returns the wallet version string.
-
#internalize_action(tx:, outputs:, description:, labels: nil, seek_permission: true, originator: nil) ⇒ Object
Internalizes a transaction — labels it, pays outputs to the wallet balance, inserts outputs into baskets, and/or tags them.
-
#list_actions(labels:, label_query_mode: :any, include_labels: false, include_inputs: false, include_input_source_locking_scripts: false, include_input_unlocking_scripts: false, include_outputs: false, include_output_locking_scripts: false, limit: 10, offset: 0, seek_permission: true, originator: nil) ⇒ Hash
Lists transactions matching the specified labels.
-
#list_certificates(certifiers:, types:, limit: 10, offset: 0, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Lists identity certificates filtered by certifier(s) and type(s).
-
#list_outputs(basket:, tags: nil, tag_query_mode: :any, include: nil, include_custom_instructions: false, include_tags: false, include_labels: false, limit: 10, offset: 0, seek_permission: true, originator: nil) ⇒ Hash
Lists spendable outputs in a basket.
-
#prove_certificate(certificate:, fields_to_reveal:, verifier:, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Proves select fields of a certificate to a verifier.
-
#relinquish_certificate(type:, serial_number:, certifier:, originator: nil) ⇒ Object
Removes a certificate from the wallet.
-
#relinquish_output(basket:, output:, originator: nil) ⇒ Object
Removes an output from a basket without spending it.
-
#reveal_counterparty_key_linkage(counterparty:, verifier:, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Reveals key linkage with a counterparty to a verifier, across all interactions.
-
#reveal_specific_key_linkage(counterparty:, verifier:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Reveals key linkage for a specific protocol and key interaction.
-
#sign_action(spends:, reference:, accept_delayed_broadcast: true, return_txid_only: false, no_send: false, send_with: nil, originator: nil) ⇒ Object
Signs a transaction previously created with #create_action.
-
#verify_hmac(data:, hmac:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Verifies an HMAC against the provided data.
-
#verify_signature(signature:, protocol_id:, key_id:, data: nil, hash_to_directly_verify: nil, privileged: false, privileged_reason: nil, counterparty: nil, for_self: false, seek_permission: true, originator: nil) ⇒ Object
Verifies a digital signature against data or a pre-computed hash.
-
#wait_for_authentication(originator: nil) ⇒ Object
Blocks until the user is authenticated.
Instance Method Details
#abort_action(reference:, originator: nil) ⇒ Object
Aborts a transaction that has not yet been finalized.
62 63 64 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 62 def abort_action(reference:, originator: nil) raise NotImplementedError end |
#acquire_certificate(type:, certifier:, acquisition_protocol:, fields:, serial_number: nil, revocation_outpoint: nil, signature: nil, certifier_url: nil, keyring_revealer: nil, keyring_for_subject: nil, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Acquires an identity certificate from a certifier or by direct receipt.
188 189 190 191 192 193 194 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 188 def acquire_certificate(type:, certifier:, acquisition_protocol:, fields:, serial_number: nil, revocation_outpoint: nil, signature: nil, certifier_url: nil, keyring_revealer: nil, keyring_for_subject: nil, privileged: false, privileged_reason: nil, originator: nil) raise NotImplementedError end |
#authenticated?(originator: nil) ⇒ Boolean
Checks whether the user is authenticated.
234 235 236 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 234 def authenticated?(originator: nil) raise NotImplementedError end |
#create_action(description:, input_beef: nil, inputs: nil, outputs: nil, lock_time: nil, version: nil, labels: nil, sign_and_process: true, accept_delayed_broadcast: true, trust_self: nil, known_txids: nil, return_txid_only: false, no_send: false, no_send_change: nil, send_with: nil, randomize_outputs: true, originator: nil) ⇒ Hash
Creates a new Bitcoin transaction.
42 43 44 45 46 47 48 49 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 42 def create_action(description:, input_beef: nil, inputs: nil, outputs: nil, lock_time: nil, version: nil, labels: nil, sign_and_process: true, accept_delayed_broadcast: true, trust_self: nil, known_txids: nil, return_txid_only: false, no_send: false, no_send_change: nil, send_with: nil, randomize_outputs: true, originator: nil) raise NotImplementedError end |
#create_hmac(data:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Creates an HMAC for the provided data.
153 154 155 156 157 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 153 def create_hmac(data:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) raise NotImplementedError end |
#create_signature(protocol_id:, key_id:, data: nil, hash_to_directly_sign: nil, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Creates a digital signature (ECDSA) for data or a pre-computed hash.
167 168 169 170 171 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 167 def create_signature(protocol_id:, key_id:, data: nil, hash_to_directly_sign: nil, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) raise NotImplementedError end |
#decrypt(ciphertext:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Decrypts ciphertext using derived keys.
146 147 148 149 150 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 146 def decrypt(ciphertext:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) raise NotImplementedError end |
#discover_by_attributes(attributes:, limit: 10, offset: 0, seek_permission: true, originator: nil) ⇒ Object
Discovers certificates matching specific attribute values.
226 227 228 229 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 226 def discover_by_attributes(attributes:, limit: 10, offset: 0, seek_permission: true, originator: nil) raise NotImplementedError end |
#discover_by_identity_key(identity_key:, limit: 10, offset: 0, seek_permission: true, originator: nil) ⇒ Object
Discovers certificates issued to a given identity key.
218 219 220 221 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 218 def discover_by_identity_key(identity_key:, limit: 10, offset: 0, seek_permission: true, originator: nil) raise NotImplementedError end |
#encrypt(plaintext:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Encrypts plaintext using derived keys.
139 140 141 142 143 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 139 def encrypt(plaintext:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) raise NotImplementedError end |
#get_header_for_height(height:, originator: nil) ⇒ Object
Returns the 80-byte block header at the given height.
251 252 253 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 251 def get_header_for_height(height:, originator: nil) raise NotImplementedError end |
#get_height(originator: nil) ⇒ Object
Returns the current blockchain height.
246 247 248 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 246 def get_height(originator: nil) raise NotImplementedError end |
#get_network(originator: nil) ⇒ Object
Returns the network (:mainnet or :testnet).
256 257 258 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 256 def get_network(originator: nil) raise NotImplementedError end |
#get_public_key(identity_key: false, protocol_id: nil, key_id: nil, privileged: false, privileged_reason: nil, counterparty: nil, for_self: false, seek_permission: true, originator: nil) ⇒ Hash
Retrieves a derived or identity public key.
115 116 117 118 119 120 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 115 def get_public_key(identity_key: false, protocol_id: nil, key_id: nil, privileged: false, privileged_reason: nil, counterparty: nil, for_self: false, seek_permission: true, originator: nil) raise NotImplementedError end |
#get_version(originator: nil) ⇒ Object
Returns the wallet version string.
261 262 263 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 261 def get_version(originator: nil) raise NotImplementedError end |
#internalize_action(tx:, outputs:, description:, labels: nil, seek_permission: true, originator: nil) ⇒ Object
Internalizes a transaction — labels it, pays outputs to the wallet balance, inserts outputs into baskets, and/or tags them.
87 88 89 90 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 87 def internalize_action(tx:, outputs:, description:, labels: nil, seek_permission: true, originator: nil) raise NotImplementedError end |
#list_actions(labels:, label_query_mode: :any, include_labels: false, include_inputs: false, include_input_source_locking_scripts: false, include_input_unlocking_scripts: false, include_outputs: false, include_output_locking_scripts: false, limit: 10, offset: 0, seek_permission: true, originator: nil) ⇒ Hash
Lists transactions matching the specified labels.
69 70 71 72 73 74 75 76 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 69 def list_actions(labels:, label_query_mode: :any, include_labels: false, include_inputs: false, include_input_source_locking_scripts: false, include_input_unlocking_scripts: false, include_outputs: false, include_output_locking_scripts: false, limit: 10, offset: 0, seek_permission: true, originator: nil) raise NotImplementedError end |
#list_certificates(certifiers:, types:, limit: 10, offset: 0, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Lists identity certificates filtered by certifier(s) and type(s).
197 198 199 200 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 197 def list_certificates(certifiers:, types:, limit: 10, offset: 0, privileged: false, privileged_reason: nil, originator: nil) raise NotImplementedError end |
#list_outputs(basket:, tags: nil, tag_query_mode: :any, include: nil, include_custom_instructions: false, include_tags: false, include_labels: false, limit: 10, offset: 0, seek_permission: true, originator: nil) ⇒ Hash
Lists spendable outputs in a basket.
96 97 98 99 100 101 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 96 def list_outputs(basket:, tags: nil, tag_query_mode: :any, include: nil, include_custom_instructions: false, include_tags: false, include_labels: false, limit: 10, offset: 0, seek_permission: true, originator: nil) raise NotImplementedError end |
#prove_certificate(certificate:, fields_to_reveal:, verifier:, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Proves select fields of a certificate to a verifier.
207 208 209 210 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 207 def prove_certificate(certificate:, fields_to_reveal:, verifier:, privileged: false, privileged_reason: nil, originator: nil) raise NotImplementedError end |
#relinquish_certificate(type:, serial_number:, certifier:, originator: nil) ⇒ Object
Removes a certificate from the wallet.
213 214 215 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 213 def relinquish_certificate(type:, serial_number:, certifier:, originator: nil) raise NotImplementedError end |
#relinquish_output(basket:, output:, originator: nil) ⇒ Object
Removes an output from a basket without spending it.
104 105 106 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 104 def relinquish_output(basket:, output:, originator: nil) raise NotImplementedError end |
#reveal_counterparty_key_linkage(counterparty:, verifier:, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Reveals key linkage with a counterparty to a verifier, across all interactions.
123 124 125 126 127 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 123 def reveal_counterparty_key_linkage(counterparty:, verifier:, privileged: false, privileged_reason: nil, originator: nil) raise NotImplementedError end |
#reveal_specific_key_linkage(counterparty:, verifier:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, originator: nil) ⇒ Object
Reveals key linkage for a specific protocol and key interaction.
130 131 132 133 134 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 130 def reveal_specific_key_linkage(counterparty:, verifier:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, originator: nil) raise NotImplementedError end |
#sign_action(spends:, reference:, accept_delayed_broadcast: true, return_txid_only: false, no_send: false, send_with: nil, originator: nil) ⇒ Object
Signs a transaction previously created with #create_action.
55 56 57 58 59 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 55 def sign_action(spends:, reference:, accept_delayed_broadcast: true, return_txid_only: false, no_send: false, send_with: nil, originator: nil) raise NotImplementedError end |
#verify_hmac(data:, hmac:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) ⇒ Object
Verifies an HMAC against the provided data.
160 161 162 163 164 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 160 def verify_hmac(data:, hmac:, protocol_id:, key_id:, privileged: false, privileged_reason: nil, counterparty: nil, seek_permission: true, originator: nil) raise NotImplementedError end |
#verify_signature(signature:, protocol_id:, key_id:, data: nil, hash_to_directly_verify: nil, privileged: false, privileged_reason: nil, counterparty: nil, for_self: false, seek_permission: true, originator: nil) ⇒ Object
Verifies a digital signature against data or a pre-computed hash.
174 175 176 177 178 179 180 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 174 def verify_signature(signature:, protocol_id:, key_id:, data: nil, hash_to_directly_verify: nil, privileged: false, privileged_reason: nil, counterparty: nil, for_self: false, seek_permission: true, originator: nil) raise NotImplementedError end |
#wait_for_authentication(originator: nil) ⇒ Object
Blocks until the user is authenticated.
239 240 241 |
# File 'lib/bsv/wallet/interface/brc100.rb', line 239 def wait_for_authentication(originator: nil) raise NotImplementedError end |