Skip to content

Catch up with TAIP-17/18 renames and add TAIP-20 memo helpers#39

Merged
pelle merged 9 commits into
mainfrom
feat/taip-spec-catchup
May 5, 2026
Merged

Catch up with TAIP-17/18 renames and add TAIP-20 memo helpers#39
pelle merged 9 commits into
mainfrom
feat/taip-spec-catchup

Conversation

@pelle
Copy link
Copy Markdown
Contributor

@pelle pelle commented May 5, 2026

Summary

The prds/taips submodule was bumped from e24811ec8dd72c (56 upstream commits). Two protocol-breaking renames advanced from Draft to Review status, and one new additive spec landed:

  • TAIP-17: Escrow message renamed to Lock (Capture stays). Status advanced to Review.
  • TAIP-18: Exchange message renamed to RFQ (Quote stays). Status advanced to Review.
  • TAIP-20 (new): On-chain transfer correlation via SHA-256(transfer_id) carried in chain memo fields. No new message types — pure utility.

Other spec changes already covered by existing tap-rs code: TAIP-3 transactionValue, TAIP-14 supportedAssets union, TAIP-15 v2 Connect with constraints. Out of scope: TAIP-19 ISO 20022 mapping (documentation-only).

Approach

  • Hard renames in tap-msg: EscrowLock, ExchangeRfq. Both Escrow and Exchange retained as pub type aliases so downstream callers keep compiling.
  • Dispatcher in tap_message_enum.rs accepts both legacy and new URIs (#Escrow and #Lock both produce TapMessage::Lock; same for #Exchange/#RFQTapMessage::Rfq).
  • New tap-msg/src/utils/memo_hash.rs module with tap_memo_hash, encode_text_memo, encode_binary_memo, verify_text_memo, verify_binary_memo.
  • tap-ts bumped to @taprsvp/types v2.1.0 (which only ships Lock/RFQ); local type Escrow = Lock and type Exchange = RFQ aliases preserve the existing public API. createExchangeMessage retained as a re-export of createRfqMessage.
  • TAIP-19 ISO 20022 spec is documentation-only; no Rust changes required.

Backward compatibility

A peer running an older release that emits https://tap.rsvp/schema/1.0#Escrow or #Exchange on the wire continues to interoperate — both URIs dispatch to the new variants. Outgoing messages always use the new canonical URIs.

Test plan

  • cargo fmt --all --check clean
  • RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --release clean
  • RUSTFLAGS="-D warnings" cargo test --workspace --all-targets --release all suites pass (including renamed test_vectors_validation against lock/ fixtures)
  • cd tap-ts && npm test — 134/134 pass
  • New tests in tap-msg/tests/lock_tests.rs cover legacy #Escrow URI dispatching to TapMessage::Lock and Escrow type alias compiling
  • New tests in tap-msg/tests/rfq_tests.rs cover the same for #ExchangeTapMessage::Rfq
  • New tests in tap-msg/tests/memo_hash_tests.rs exercise the TAIP-20 reference vector (SHA-256("3fa85f64-...-afa6")) and reject malformed memos (uppercase hex, truncated hex, wrong version prefix)

🤖 Generated with Claude Code

pelle and others added 9 commits May 4, 2026 15:46
Pulls in 56 upstream commits including:
- TAIP-17 Escrow renamed to Lock (status: Review)
- TAIP-18 Exchange renamed to RFQ (status: Review)
- TAIP-19 ISO 20022 mapping (new)
- TAIP-20 on-chain memo-hash correlation (new)
- TAIP-3 transactionValue field (already implemented in tap-rs)
- TAIP-14 supportedAssets union (already implemented)
- TAIP-15 v2 Connect with constraints (already implemented)
- Test vectors renamed: escrow/ → lock/

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- lock_tests.rs: Lock/Capture flows, #Lock URI on the wire, dispatcher
  accepts both #Lock and legacy #Escrow URIs, Escrow type alias works.
- rfq_tests.rs: Rfq/Quote, #RFQ URI, dispatcher accepts both #RFQ and
  legacy #Exchange URIs, Exchange type alias works.
- memo_hash_tests.rs: tap_memo_hash, encode_text_memo, encode_binary_memo,
  verify_text_memo, verify_binary_memo against the TAIP-20 reference
  vector (SHA-256 of UUID 3fa85f64-...-afa6).
- escrow_tests.rs deleted — fully covered by lock_tests.rs via alias.

Tests fail to compile until the implementation lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
TAIP-17 advanced from Draft to Review and renamed Escrow → Lock; TAIP-18
did the same renaming Exchange → RFQ. Both keep the on-the-wire body
shape unchanged. TAIP-20 (new, additive) defines a SHA-256 correlation
primitive between TAP transfers and on-chain settlements.

tap-msg
- Rename message/escrow.rs → message/lock.rs; struct Escrow → Lock;
  message_type URI #Escrow → #Lock; pub type Escrow = Lock retained for
  downstream callers.
- Rename message/exchange.rs → message/rfq.rs; struct Exchange → Rfq;
  message_type URI #Exchange → #RFQ; pub type Exchange = Rfq retained.
- TapMessage enum: Escrow variant → Lock(Lock); Exchange variant →
  Rfq(Rfq). Dispatcher accepts both legacy and new URIs for each.
- Add utils/memo_hash.rs with tap_memo_hash, encode_text_memo,
  encode_binary_memo, verify_text_memo, verify_binary_memo.

tap-agent
- test_vectors_validation now imports Lock and matches both #Lock and
  #Escrow URIs so the renamed test-vectors/lock/ fixtures parse.

tap-ts
- Bump @taprsvp/types from ^1.9.0 to ^2.1.0 (Lock/RFQ types upstream).
- Local type Escrow = Lock and Exchange = RFQ aliases preserve the
  existing public API.
- createRfqMessage replaces createExchangeMessage internals (now emits
  #RFQ); createExchangeMessage retained as a re-export alias.
- TAP_MESSAGE_TYPES, SUPPORTED_MESSAGE_TYPES, isTAPMessage URI list,
  and tests cover both old and new names.

Tests
- lock_tests.rs (new, replaces escrow_tests.rs), rfq_tests.rs,
  memo_hash_tests.rs added with backward-compat dispatch coverage.
- All cargo fmt/clippy/test --workspace checks pass with
  RUSTFLAGS="-D warnings"; tap-ts npm test 134/134 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pre-1.0 minor bump aligned with the renamed TAIP-17/18 message types,
new TAIP-20 helpers, and the @taprsvp/types v2 dependency upgrade.

- Workspace version 0.6.0 → 0.7.0 across all crates and inter-crate
  dependency declarations
- tap-ts: 0.6.0-SNAPSHOT → 0.7.0-SNAPSHOT
- CHANGELOG.md and tap-ts/CHANGELOG.md updated with the catch-up entry
- tap-agent::verification: collapse three nested `match`/`if` patterns
  into match guards to satisfy clippy::collapsible-match (a newer rustc
  on CI runners surfaced these as errors with -D warnings)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous lockfile was missing transitive deps surfaced by the
@taprsvp/types ^2.1.0 upgrade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous lockfile was generated by npm 11 on Node 24 and contained
metadata that npm 10 (used in CI) treated as missing entries. CI uses
Node 20 per .github/workflows/ci.yml.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The lockfile generated on darwin-arm64 only listed
@rollup/rollup-darwin-arm64; CI on linux/amd64 then failed at
`npm test` with "Cannot find module @rollup/rollup-linux-x64-gnu"
(npm/cli#4828). Regenerated under node:20-bullseye on linux/amd64
so all platform-specific optional binaries are recorded; verified
`npm ci && npm test` still passes on macOS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
platform binaries are listed

The previous regen still only recorded @rollup/rollup-darwin-arm64
because npm 10's default behaviour skips other-platform optional
deps even on linux/amd64. Re-running with --include=optional in
node:20-bullseye now records all 21 rollup platform packages
including @rollup/rollup-linux-x64-gnu, which the CI runner needs.

Verified npm ci + npm test on macOS still passes (134/134).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pelle pelle merged commit be9507c into main May 5, 2026
3 checks passed
@pelle pelle deleted the feat/taip-spec-catchup branch May 5, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant