Catch up with TAIP-17/18 renames and add TAIP-20 memo helpers#39
Merged
Conversation
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>
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
The
prds/taipssubmodule was bumped frome24811e→c8dd72c(56 upstream commits). Two protocol-breaking renames advanced from Draft to Review status, and one new additive spec landed:Escrowmessage renamed toLock(Capture stays). Status advanced to Review.Exchangemessage renamed toRFQ(Quote stays). Status advanced to Review.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-14supportedAssetsunion, TAIP-15 v2 Connect with constraints. Out of scope: TAIP-19 ISO 20022 mapping (documentation-only).Approach
Escrow→Lock,Exchange→Rfq. BothEscrowandExchangeretained aspub typealiases so downstream callers keep compiling.tap_message_enum.rsaccepts both legacy and new URIs (#Escrowand#Lockboth produceTapMessage::Lock; same for#Exchange/#RFQ→TapMessage::Rfq).tap-msg/src/utils/memo_hash.rsmodule withtap_memo_hash,encode_text_memo,encode_binary_memo,verify_text_memo,verify_binary_memo.@taprsvp/typesv2.1.0 (which only shipsLock/RFQ); localtype Escrow = Lockandtype Exchange = RFQaliases preserve the existing public API.createExchangeMessageretained as a re-export ofcreateRfqMessage.Backward compatibility
A peer running an older release that emits
https://tap.rsvp/schema/1.0#Escrowor#Exchangeon 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 --checkcleanRUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --releasecleanRUSTFLAGS="-D warnings" cargo test --workspace --all-targets --releaseall suites pass (including renamedtest_vectors_validationagainstlock/fixtures)cd tap-ts && npm test— 134/134 passtap-msg/tests/lock_tests.rscover legacy#EscrowURI dispatching toTapMessage::LockandEscrowtype alias compilingtap-msg/tests/rfq_tests.rscover the same for#Exchange→TapMessage::Rfqtap-msg/tests/memo_hash_tests.rsexercise the TAIP-20 reference vector (SHA-256("3fa85f64-...-afa6")) and reject malformed memos (uppercase hex, truncated hex, wrong version prefix)🤖 Generated with Claude Code