feat(examples): add Transaction Review webhook reference server - #69
feat(examples): add Transaction Review webhook reference server#69devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: ndavis <arbreperdu@gmail.com>
Original prompt from ndavis
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment failed with the following error: |
Summary
Adds a runnable reference server for Dynamic's Transaction Review webhooks, relocated from
dynamic-labs/redcoastPR #10613 (a customer-facing example that shouldn't ship inside the redcoast monorepo). Pairs with the new docs page: https://docs.dynamic.xyz/overview/wallets/embedded-wallets/mpc/transaction-reviewNew standalone example
examples/nodejs-transaction-review-webhook/(Express +tsx, no@dynamic-labsdeps — it's a webhook receiver):src/server.ts—POST /webhookthat:x-dynamic-signature(HMAC-SHA256, timing-safe) againstWEBHOOK_SECRET; missing/wrong →401 { proceed: false, reason: "Invalid signature" }x-dynamic-response-signature)?mode=allow|deny|slow|crashfor exercising the approve path, denials, timeouts (failure policy), and transport failuressrc/keygen.ts— generates an Ed25519 keypair and prints the public PEM to paste into the dashboardREADME.md,.env.example,tsconfig.json,package.json,pnpm-lock.yamlAdapted from the redcoast source: doc links now point at
docs.dynamic.xyz, install/scripts usepnpm(matching siblingnodejs-*examples), and the dashboard nav wording is aligned to Wallets → Transaction Review (the redcoast copy was internally inconsistent —keygen/README said "Embedded Wallets → Advanced Settings").Verified locally
tsc --noEmitclean.200 { proceed: true }with a populatedx-dynamic-response-signature; bad signature →401;?mode=deny→{ proceed: false, reason: ... }.(
pnpm <script>is blocked in the CI sandbox by a supply-chain policy that treats esbuild's ignored build script as fatal;tsxruns fine directly. Not an issue for end users.)Link to Devin session: https://dynamicxyz.devinenterprise.com/sessions/c8159805dae849e683126df58ce473cf
Requested by: @doctorloaf