Repository navigation
docs: add Fast Bridge overview, endpoints, errors and how-to - #222
Draft
claude[bot] wants to merge 1 commit into
Draft
claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
…w-to Documents the /v1/bridge HTTP API from pimlicolabs/paymaster#819 and the stack below it: supported routes and limits, authorization types, the request lifecycle, POST /execute, POST /execute/sync, GET /status and GET /addresses, rejection and leg error codes, and a how-to for bridging USDC from Base to Arbitrum with a recipient, calls or Permit2. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EUrMSxtSGtC5AzeK4kVTpB
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Requested by Kristof Gazso · Slack thread
Before: the docs have no page for Fast Bridge. The
/v1/bridgeAPI in the paymaster (the stack ending in pimlicolabs/paymaster#819) has no public reference, and the payments guides say Pimlico doesn't move funds between chains.After: a new Fast Bridge section under References, with an overview, an endpoints reference and an errors reference, plus a how-to under Guides → Payments:
docs/pages/references/fast-bridge/index.mdx: what it is, supported chains and tokens with the 1,000-token per-request cap, theeip3009/permit2/solana-transactionauthorizations, recipient vs calls delivery, and the request lifecycle and statuses.docs/pages/references/fast-bridge/endpoints.mdx:POST /execute,POST /execute/sync(timeout, 1 to 300 s, default 30),GET /status/{requestId},GET /addresses, every body field, and the bridge status object.docs/pages/references/fast-bridge/errors.mdx: rejection codes with their HTTP statuses and fixes, and the origin and destination leg error codes.docs/pages/guides/how-to/payments/bridge-usdc-with-fast-bridge.mdxanddocs/snippets/payments/fast-bridge.ts: Base → Arbitrum USDC with a signedReceiveWithAuthorization, then thecallsand Permit2 (BSC) variants.fastBridgeSidebarinsidebars/references.ts, a Fast Bridge entry in the References sidebar and top nav invocs.config.ts, and the how-to inpaymentsSidebar.How: everything is taken from the code on the paymaster bridge branches:
src/fast-bridge/api/{routes,schema,errors,status,validate}.ts,fastBridgeConfigs.ts,bridge.tsand the legs. Nothing comes from a spec. The destination op is prepared while the origin is in flight (#819), which is described in "How a request runs". The prepare/send/cancel RPC methods #819 adds are left out: they're internal and gated likepimlico_sendUserOperationNow./addressesuses the current field names onfeat/fast-bridge-status(approvalAddress,multicaller).pnpm buildpasses,biome lintis clean on the changed TS files, and the snippet typechecks withtsc --strict.Source: pimlicolabs/paymaster#819 (stacked on #818).
Open questions
/v1/bridgeroute to Pimlico's own API keys and adds aNOT_ENABLED(403) code, which isn't documented here. Should these docs wait for public access, or ship with a beta or allowlist note?/addressesfield names. #819 still returns{ spender, caller }, butfeat/fast-bridge-status(b0dfffe) renamed them to{ approvalAddress, multicaller }. The docs use the new names. Please confirm they're final.https://api.pimlico.io/v1/bridge, since the paymaster service also serves/v2/accountthere. Please confirm.pendingwith funds in the Reserve.refundedexists in the type, but no refund flow is implemented yet (TODO inbridge.ts). The docs say that plainly. Is that what we want public, or do refunds land first?feeis hard-coded to0(TODO "per-user fee in bps"). The docs describe the field without naming a rate. Withcalls, clients encode amounts before they knowamountOut, so a non-zero fee will need a quote endpoint or guidance.GET /addresses/solanain #821 returns. Should I add that endpoint once #821 merges? The Solana origin is described here, but no endpoint gives those addresses yet.approvalAddressandmulticallerout of the docs because they come from env (/addresses). Should we publish the production values?multicalleraren't returned. Please confirm, and confirm whethercalls[].value(native value) is usable, since the multicaller isn't funded with native tokens.4663, USDG) for the table.Generated by Claude Code