Feature/webhook callback#1
Merged
AkshatGada merged 12 commits intomainfrom Feb 17, 2026
Merged
Conversation
wallet create --wait starts a temp HTTP server on localhost, adds callbackUrl to the connector URL, and the connector UI POSTs the encrypted ciphertext directly back. Eliminates copy/paste of the ~8000-char blob, solving Telegram's 4096-char truncation issue. - Extract shared decryptAndSaveSession() helper - Add walletCreateAndWait() with CORS, timeout, body limit - Relax connector UI callback validation for localhost - Update SKILL.md with webhook callback docs Entire-Checkpoint: 7be724092f02
Tailwind CSS v4, lucide-react icons, Inter/JetBrains Mono fonts, animated cards, gradient borders, pulse glow, staggered balance rows, Polygon logo in brand header, and polished post-approval state. Entire-Checkpoint: 411d50197102
…hook callback Entire-Checkpoint: eb0ae5f29980
Entire-Checkpoint: 8a5d540efcbc
Dependency Upgrades
package.json: All @0xsequence/* packages bumped from 3.0.0-beta.15 → 3.0.0-beta.16, added @0xsequence/dapp-client-cli@0.1.2
connector-ui/package.json: @0xsequence/dapp-client and @0xsequence/wallet-primitives bumped from 3.0.0-beta.12 → 3.0.0-beta.16
New Shared Wrapper
lib/dapp-client.mjs (NEW): Shared DappClient wrapper using StateManager + FileSequenceStorage + FileSessionStorage from @0xsequence/dapp-client-cli. Derives passphrase from existing ~/.polygon-agent/.encryption-key (zero new config). Exports runDappClientTx() with the full 3-tier fee options fallback.
Refactored Files
cli/commands/operations.mjs: Removed ~180 lines of duplicated KeychainSequenceStorage, MapSessionStorage, defaultNodesUrl(), and runDappClientTx(). Now imports from shared wrapper.
cli/commands/registry.mjs: Removed ~180 lines of identical duplication. Call sites transformed from runRegistryTx({ contractAddress, data }) to runDappClientTx({ chainId: 137, transactions: [{ to, value: 0n, }] }).
lib/storage.mjs: Added state/dapp-client-cli to subdirectories, fixed recursive: true for nested dir creation.
Verification
npm install — 0 vulnerabilities
pnpm install && pnpm build — connector-ui TypeScript compiles and Vite build succeeds
wallet list — works correctly
All three refactored modules load with correct exports
Entire-Checkpoint: b0a0572fdc36
Feature/webhook callback
Pass spending limits and contract whitelist params through to the connector UI URL so ecosystem wallet sessions are created with proper authorization scope. Without these, sessions default to bare-bones permissions and agents cannot transact. New CLI flags: --native-limit, --usdc-limit, --usdt-limit, --token-limit (repeatable), --usdc-to/--usdc-amount, --contract (repeatable). Also adds getArgs() helper for repeatable args.
Fixes identified by comparing polygon-agent-kit with the upstream Sequence ecosystem CLI and Trails CLI: - Pass preferNativeFee: true in sendNative, sendToken, and swap to avoid selecting ERC20 fee tokens the wallet may not hold - Add session expiry check before transactions (clear error instead of cryptic relayer failure) - Fix balances indexer request body to match upstream format (filter.accountAddresses, contractStatus: VERIFIED) and handle multiple response shapes - Validate --usdc-to/--usdc-amount requires both or neither - Add TRAILS_TOKEN_MAP_JSON env override for swap token resolution - Add --direct flag to send-native (bypass ValueForwarder) - Add fetch debug logger (POLYGON_AGENT_DEBUG_FETCH=1) - Add fee options debug dump (POLYGON_AGENT_DEBUG_FEE=1) Entire-Checkpoint: f8dce7c84761
| if (typeof origFetch !== 'function') return | ||
|
|
||
| const redact = (s) => String(s).slice(0, 40000) | ||
| const log = (line) => fs.appendFileSync(logPath, `[${new Date().toISOString()}] ${line}\n`, 'utf8') |
Check warning
Code scanning / CodeQL
Network data written to file Medium
- Add parsing of contracts parameter (comma-separated addresses) - Add contract whitelist permissions to session (target + empty rules) - Fix: include dynamicTokenPermissions in session config (was built but never used) Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 932500bceae5
Document token limit flags (--native-limit, --usdc-limit, --usdt-limit, --token-limit), contract whitelist (--contract), one-off ERC20 permissions (--usdc-to/--usdc-amount), --direct flag for send-native, swap slippage, debug env vars, and updated troubleshooting entries.
…ient format Add session permission flags, --direct flag, debug env vars, expanded commands table. Trimmed verbose output examples for agent context efficiency. Entire-Checkpoint: a88b80be687b
This was referenced Apr 28, 2026
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.
No description provided.