Conversation
Plan covers F8.2 (BRC-100 substrates), F8.11 (WireFormat translator), F8.12 (list_actions/list_outputs include flags), and F8.16 (AuthFetch certificate issuance). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…448) Add post-fetch field stripping in WalletClient#list_actions and #list_outputs. Two new private methods (strip_action_fields, strip_output_fields) remove fields when the corresponding include flag is absent or false, matching the TS SDK's BooleanDefaultFalse behaviour. Stripping is non-destructive (dup before delete). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nce (#453) Replace plain Net::HTTP::Post in acquire_via_issuance with BSV::Auth::AuthFetch so certificate issuance participates in the BRC-103/104 mutual authentication and 402 payment flows. Add lazy auth_fetch_client helper (memoised on first call). Update certificate_spec to mock AuthFetch#fetch instead of mock_http. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rsion (#447) - Add `BSV::WireFormat` with `to_wire`, `from_wire`, `snake_to_camel`, `camel_to_snake` - Deep conversion recurses into nested hashes and arrays; only keys are converted - Lookup table covers BRC-100/BRC-103 keys including acronyms (protocolID, keyID, inputBEEF) - Refactor AuthMiddleware: remove 4 private conversion methods, delegate to WireFormat - Refactor SimplifiedFetchTransport: remove 2 constants + 4 private methods, delegate to WireFormat Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rt (#450) Adds BSV::Wallet::Substrates::HTTPWalletWire — a single-method wire transport that parses call codes from binary frames, maps them to camelCase URL paths, and POSTs octet-stream payloads to a remote wallet endpoint via Net::HTTP. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…#449) Implements BSV::Wallet::Substrates::HTTPWalletJSON — a full WalletInterface implementation that delegates all 28 BRC-100 methods to a remote wallet server via POST #{base_url}/#{camelCaseMethodName} with JSON bodies. Uses BSV::WireFormat for deep key conversion at JSON boundaries, and maps structured error codes (5/6/7) to the correct Ruby exception subclasses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ansport (#451) Implements BSV::Wallet::Substrates::WalletWireTransceiver — a full BRC-100 Interface implementation that serialises all 28 method calls via Wire::Serializer, transmits binary frames through a duck-typed wire transport (e.g. HTTPWalletWire), and deserialises the response. Error frames raise WalletError. Originator may be set at construction and overridden per-call. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mote wallet communication (#452) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use receive_messages instead of multiple stubs - Move local variable inside example to avoid leaky scope - Add expectation to endpoint routing examples Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Deep conversion via WireFormat.to_wire/from_wire recurses into nested hashes, mangling base64 certificate type identifiers in requested_certificates.types (e.g. "dHlwZUFBQQ==" becomes "d_hlw_z_u_f_b_q_q=="). The old AuthMiddleware and SimplifiedFetchTransport code used shallow (top-level only) conversion. Add shallow_to_wire/shallow_from_wire methods that convert only top-level keys, preserving nested user-data keys unchanged. Switch both auth handshake paths to use the shallow variants. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…flags
- HTTPWalletJSON: add comment explaining why per-call originator is
ignored (matches TS SDK — HTTP substrates identify by connection,
not per call; wire substrates encode originator per message)
- HTTPWalletJSON: let JSON::ParserError propagate on 2xx responses
instead of silently returning {}. Error responses still degrade
gracefully when body is unparseable.
- strip_action_fields: combine input sub-field stripping into a single
pass instead of iterating twice when both source_locking_script and
unlocking_script flags are false
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BSV::WireFormatmodule for shared camelCase/snake_case key conversion, refactoring duplicated code from AuthMiddleware and SimplifiedFetchTransport (F8.11)include_labels,include_inputs,include_outputs, etc.) inlist_actionsandlist_outputswith post-fetch field stripping (F8.12)HTTPWalletJSON(JSON-over-HTTP),HTTPWalletWire(binary wire transport),WalletWireTransceiver(Interface adapter) (F8.2)substrate:constructor parameter toWalletClientfor remote wallet communication (F8.2)Net::HTTPwithAuthFetchfor BRC-104 authenticated certificate issuance (F8.16)Test plan
bundle exec rake) -- 4902 examples, 0 failuresbundle exec rubocop) -- 377 files, 0 offencesSub-issues
Closes #445