Skip to content

feat: add custody-separated Peer Cash extension - #1707

Open
ADWilkinson wants to merge 2 commits into
daydreamsai:masterfrom
ADWilkinson:feat/peer-cash-extension
Open

feat: add custody-separated Peer Cash extension#1707
ADWilkinson wants to merge 2 commits into
daydreamsai:masterfrom
ADWilkinson:feat/peer-cash-extension

Conversation

@ADWilkinson

@ADWilkinson ADWilkinson commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Closes #1708.

  • add @lucid-agents/peer-cash, a native Lucid extension that contributes runtime.peerCash
  • cover capability discovery, 30-day corridor demand, market-rate estimates, unsigned cash-out preparation, receipt finalization, order reads, withdrawal, top-up, and restricted-platform access policy preparation
  • add package documentation, the Lucid package reference, navigation, and a Changesets release entry for 0.1.0

Security boundary

This package does not accept private keys, sign transactions, or broadcast them. Mutating methods return JSON-safe unsigned Base transaction plans. The host wallet must inspect, sign, submit, and confirm each transaction in order. That keeps Lucid wallet connectors, account-abstraction policies, and external signers in control of custody.

Why this is Lucid-native

Lucid uses typed runtime slices. This implementation follows the current extension kernel, exposes one peerCash runtime directly, and leaves entrypoint selection and wallet policy to the host application.

Validation

  • bun test — 1,498 passed, 58 environment-gated skips, 0 failed
  • bun run build:packages
  • bun run type-check
  • bun run test:docs
  • bun test packages\/peer-cash\/src\/__tests__\/peer-cash.test.ts — 11 passed
  • package build and declaration generation
  • package dry-run pack with all export targets present
  • pre-commit lint, typecheck, and format gates

The tests exercise the public Lucid builder/runtime interface and mock only the external Peer SDK boundary.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@ADWilkinson
ADWilkinson force-pushed the feat/peer-cash-extension branch from a5a664f to 1b5e570 Compare August 14, 2026 13:21
@ADWilkinson

Copy link
Copy Markdown
Author

Quality review update:

  • declared the extension as Node-only with Node.js 22 or newer, matching the Peer Cash SDK runtime instead of advertising browser portability
  • widened the payee input to support structured identity-attestation data required by identity-gated payout handles
  • added a structured-payee regression test and clarified the restricted-platform flow in the README

The 11 focused tests, typecheck, package build, portability check, and repository pre-commit gates pass. Both commits are GitHub-verified. The PR is mergeable and awaiting maintainer review.

@ADWilkinson

Copy link
Copy Markdown
Author

Still current on this branch. Happy to rebase if the extension layout moved.

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.

Add a Lucid-native Peer Cash extension

1 participant