Skip to content

[Cart] Add high-level CLI workflows - #136

Draft
KeeganEad wants to merge 11 commits into
keegan/cli-v2/release-recipientsfrom
keegan/cli-v2/cart
Draft

[Cart] Add high-level CLI workflows#136
KeeganEad wants to merge 11 commits into
keegan/cli-v2/release-recipientsfrom
keegan/cli-v2/cart

Conversation

@KeeganEad

@KeeganEad KeeganEad commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Cart listing create, cancel, cancel-root, and invalidate-nonce commands
  • add Cart checkout with repeatable listing digests, preview mode, consent-aware approvals, and SDK bundle verification
  • pin the independent-Variant rare-sdk PR docs: update docs for offers, listings, currencies; bump to 0.4.1 #14 head
  • add deterministic built-CLI coverage plus live Rare API and Sepolia coverage
  • deploy and index fresh collections/tokens through the public Variant catalog without authenticated Product/SKU fixture writes
  • verify settlement entitlements and OrderLineSettled receipts against API preparations
  • add live ERC-1155 transfer and mint-to coverage, plus isolated ERC-721 mint-to coverage
  • add a maximum-size live Cart checkout under the current adjustment model: 9 listing items, 19 order lines, and 9 fulfillment actions
  • add multi-seller USDC checkout coverage across ETH and RARE settlement currencies
  • add a secondary-sale ERC-2981 royalty fixture with distinct creator/royalty recipient, secondary seller, and buyer; assert prepared seller proceeds, royalty lines, exact recipient deltas, receipt values, and final ownership
  • make live wallet selection capable of reserving a buyer with sufficient token balance and retry transient read-only catalog polling

Stack

Depends on #135.

SDK dependency: superrare/rare-sdk#14.

Validation

  • npm test: 29 files passed, 173 tests passed, 2 skipped
  • npm run typecheck (via npm test)
  • npm run test:typecheck (via npm test)
  • npm run lint -- --no-cache
  • git diff --check
  • live Sepolia ERC1155_TRANSFER (fulfillment kind 3): passed
  • live Sepolia ERC1155_MINT_TO (fulfillment kind 5): passed
  • live Sepolia maximum checkout (9 listings / 19 order lines / 9 actions): passed
  • live Sepolia secondary ERC-2981 royalty checkout: passed (1 test in 85.81 seconds)

Live integration status

The successful live runs exercised public catalog lookup, Listing Root publication, API checkout preparation, signed purchase execution, exact ERC-1155 balance changes, and Cart settlement/fulfillment receipt events.

After the Rare API deployment completed, the isolated secondary royalty fixture passed end to end: fresh deployment, mint-to-secondary ownership, nonzero ERC-2981 creator quote, explicit Cart approval, Listing Root publication, checkout preparation, exact 90% seller proceeds and 10% creator royalty lines, signed purchase execution, exact recipient ETH balance deltas, exact OrderLineSettled receipt values, and final buyer ownership.

The full-suite rerun also exposed a sequencing incompatibility: Rare API now rejects /v1/cart/listings/preview with HTTP 409 when Cart does not already have NFT approval. The CLI/SDK listing flow relies on preview to determine required approvals before --yes performs them, so fresh unapproved ERC-721/ERC-1155 listings cannot currently reach auto-approval. The royalty fixture explicitly preapproves Cart as a setup precondition and therefore verifies the downstream royalty behavior independently.

ERC721_MINT_TO remains independently covered by the live suite but the latest run timed out waiting for a catalog SKU for the seeded lazy ERC-721 token. Quote-change-during-checkout coverage remains owned by Rare API because the live CLI fixture has no safe supported mechanism to mutate the royalty quote mid-order.

@KeeganEad KeeganEad changed the title keegan/cli v2/cart [Cart] Add high-level CLI workflows Aug 28, 2026
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