feat(connect): AntSeed Connect with signed auto-deposit state#18
Open
gabrielpoca wants to merge 3 commits into
Open
feat(connect): AntSeed Connect with signed auto-deposit state#18gabrielpoca wants to merge 3 commits into
gabrielpoca wants to merge 3 commits into
Conversation
Add the AntSeed Connect protocol (connect-core) so a web app can request
signed account info from the local seed app, and share the buyer's
auto-deposit status through it.
- connect-core: scope-driven EIP-191 request/response; scopes `address`
and `auto-deposit` (signed JSON {enabled, delegated})
- cli: `antseed connect <link>` command with consent prompt
- desktop: macOS antseed:// deep-link handler, main-process signing,
consent dialog
- seed side computes the auto-deposit state (consent from config,
delegation via eth_getCode, reusing service-auto-deposit) and signs it
into the response
- desktop: re-map @antseed/ui --as-* tokens under body.dark-theme so modal
primitives render correctly in dark mode
2babd3f to
3b22e46
Compare
Remove doc comments that only restate the field/type name, delete the (Section N) / spec 07-connect.md references from the inline docs, and replace emdashes with colons.
…ithout it The CLI connect command statically imported @antseed/service-auto-deposit, so a missing plugin would crash the whole CLI at startup instead of just the auto-deposit scope. Resolve the connect-state reader from the plugins dir at runtime the same way loader.ts loads any plugin, and move the package to devDependencies. A missing or stale plugin now degrades to delegated:false while still reporting enabled from config. Desktop keeps the plugin bundled but imports it lazily inside getAutoDepositState so a broken copy degrades instead of crashing the main process.
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.
What
Adds the AntSeed Connect protocol and uses it to share the buyer's
auto-deposit status with a web app (the funding portal), signed by the seed
app. Stacked on top of
auto-deposit-funding-portal.A portal that only reads delegation on-chain (
eth_getCode) cannot tell"auto-deposit is off" from "the user turned it on but no funds have arrived
yet" (delegation lands lazily on the first deposit). Connect lets the seed app
report its real state
{ enabled, delegated }so the portal can show accuratemessaging.
Changes
antseed://connectdeep link, single EIP-191personal_signsignature,response delivered in the redirect URL fragment. Scopes:
addressandauto-deposit(signed deterministic JSON{ enabled, delegated }). Standalone,no
@antseed/nodedependency.antseed connect <link>with a consent prompt (--yes/--print).antseed://deep-link handler with cold-start buffering, parsingand signing in the main process (the renderer only shows the request and
returns the decision), and a consent dialog.
enabledfrom config consent plusdelegatedread on-chain (eth_getCodeagainst the EIP-7702 designator),signed into the response. The on-chain read reuses
service-auto-deposit.service-auto-deposit. The CLI resolves the state reader from the plugins dirat runtime the same way
loader.tsloads any plugin (moved todevDependencies); the desktop imports it lazily. A missing or stale plugindegrades to
delegated: falsewhile still reportingenabledfrom config,instead of failing at startup.
@antseed/ui--as-*tokens underbody.dark-themeso the consent modal renders correctly in dark mode.Testing
injection, manifest parsing, response sign/verify round-trip, auto-deposit
scope round-trip).
antseed connectboots without theplugin installed, signs
{ enabled, delegated }, and the response verifies viaverifyConnectResponse(recovered signer matches, auto-deposit value parsesback). Graceful fallback confirmed when the plugin is absent/stale, and the
reader is invoked for real when a current plugin is present.
bundled copy and the fallback preserves
enabled.Notes
auto-deposit-funding-portal(stacked), notmain.