Skip to content

docs(swidge): add BOB Gateway swidge module - #208

Draft
nud3l wants to merge 1 commit into
tetherto:mainfrom
bob-collective:docs/swidge-gateway
Draft

docs(swidge): add BOB Gateway swidge module#208
nud3l wants to merge 1 commit into
tetherto:mainfrom
bob-collective:docs/swidge-gateway

Conversation

@nud3l

@nud3l nud3l commented Jul 14, 2026

Copy link
Copy Markdown

Adds documentation for @gobob/wdk-protocol-swidge-gateway, a community swidge provider for native BTC routes.

BTC is spent and received on Bitcoin L1 — no wrapped-BTC intermediary, no custodian, and keys never leave the WDK account. The module implements the full SwidgeProtocol interface and registers through WDK core like any other provider.

What it covers

Route Support
BTC → tokens on Ethereum, Base, Arbitrum, BSC (USDT, USDC, ETH, wBTC, cbBTC, XAUT) Supported
Tokens on EVM → native BTC Supported (approval required)
BTC → USDT on Tron Destination only
EVM ↔ EVM Inherited swap() / bridge()

Pages added

Under /sdk/swidge-modules/swidge-gateway/, mirroring the structure of the existing Rhino.fi module:

  • index — overview, supported routes, execution model
  • configuration — source chain, slippage, affiliate fees, BTC fee rate, API access, ERC-4337 paymaster
  • usage — install, register, discover, quote, onramp, offramp, EVM↔EVM, status, errors
  • api-reference — constructor, methods, route options, status mapping, error codes

Listed in all-modules, swidge-modules, and community-modules, and added to the sidebar in custom-tree.ts.

Two things integrators need, called out explicitly in the docs: the gateway broadcasts the Bitcoin transaction on onramp routes (the module does not), and the Gateway API applies a country blocklist (including the US and UK) that returns 403 — which affects CI as well as production.

Verified against the published package

Every code sample in the usage guide follows the registerProtocol wiring, which we confirmed end-to-end against mainnet using the published 0.2.0 from npm:

getSwidgeProtocol("gateway") -> GatewaySwidge
LIVE QUOTE (0.001 BTC -> USDT@ethereum)
  toTokenAmount: 63884707 (USDT, 6dp) = 63.884707

Note on the "Released provider modules" table

The table in swidge-modules/index.mdx was missing Rhino.fi (it lists only Orchestra, though Rhino.fi is documented and appears in all-modules). I added that row alongside ours — happy to drop it if you'd rather keep this PR to a single module.

Verification

  • npm run check:meta — pass
  • npm run check:links — pass (264 files, 1420 internal links, 739 anchors, 0 broken)

npm run build could not be run locally: it requires @tetherto/docs-seo-schema from GitHub Packages, which returns 401 without Tether org authentication. The new pages resolve as routes under the link checker and the nav entry mirrors the adjacent Rhino.fi folder exactly, but the Next.js build and OG generation are unverified on our side and will need CI.

Adds documentation for @gobob/wdk-protocol-swidge-gateway, a community
swidge provider for native BTC routes to and from tokens on EVM chains
and Tron. BTC is spent and received on Bitcoin L1 — no wrapped-BTC
intermediary, no custodian, and keys never leave the WDK account.

New pages under /sdk/swidge-modules/swidge-gateway/:
- index (overview, supported routes, execution model)
- configuration (source chain, slippage, affiliate fees, BTC fee rate,
  API access, ERC-4337 paymaster)
- usage (install, register, discover, quote, onramp, offramp, EVM↔EVM,
  status, errors)
- api-reference (constructor, methods, route options, status mapping,
  error codes)

Also listed in all-modules, swidge-modules, and community-modules, and
added to the sidebar tree. The swidge-modules "Released provider modules"
table was missing Rhino.fi, so that row is added alongside ours.

Verified: check:meta and check:links pass (264 files, 1420 internal links
and 739 anchors, 0 broken). `npm run build` could not be run locally — it
requires @tetherto/docs-seo-schema from GitHub Packages, which needs
authentication.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nud3l
nud3l marked this pull request as draft July 14, 2026 15:42

@ihsraham ihsraham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few comments to resolve while this remains in draft, covering the missing reference page, write-flow safety, and community wording.

<Card title="Usage" href="/sdk/swidge-modules/swidge-gateway/usage">
Install the package, register the module, quote a route, approve, execute, and poll status.
</Card>
<Card title="API Reference" href="/sdk/swidge-modules/swidge-gateway/api-reference">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be better to include api-reference.mdx before keeping this card and the matching sidebar entry? The route is missing from the PR, so the link check currently fails.

fromTokenAmount: 10000000n // 10 USDT (6 decimals)
}

const approval = await fromBase.getRequiredApproval(options)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could this flow quote first, display the approval spender and amount alongside the route fees, and ask for confirmation before approve() and swidge()? The EVM-to-EVM example below should follow the same quote-before-write sequence.

schemaType: TechArticle
---

The BOB Gateway Swidge module lets WDK accounts quote and execute **native Bitcoin** swap and bridge routes through [BOB Gateway](https://gobob.xyz) using the shared `SwidgeProtocol` interface.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be better to add the standard community-module warning used by the community index and Orchestra overview? This module is listed as community-maintained, so the overview should make that distinction clear.


The BOB Gateway Swidge module lets WDK accounts quote and execute **native Bitcoin** swap and bridge routes through [BOB Gateway](https://gobob.xyz) using the shared `SwidgeProtocol` interface.

Use this module when an app needs to move real BTC in or out of tokens on EVM chains and Tron. Bitcoin is spent and received on Bitcoin L1 — there is no wrapped-BTC intermediary and no custodian, and keys never leave the WDK account.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we describe the observable mechanics here instead of using “real BTC”, “no custodian”, and “keys never leave”? “Native BTC on Bitcoin L1, signed through the WDK account, with settlement handled by Gateway” feels closer to the neutral style used elsewhere in the docs.

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.

2 participants