Context
The Vybe x402 gateway (x402-api.vybenetwork.xyz) now advertises payment options on both Solana mainnet and Base mainnet in every 402 challenge — see PR vybenetwork/x402-vybe-gateway#29. The 402 accepts[] array carries two entries:
Coinbase's CDP facilitator settles both — the gateway is chain-agnostic for verify/settle.
What this SDK is missing
Today src/http.ts registers only ExactSvmScheme:
const scheme = new ExactSvmScheme(signer, ctx.rpcUrl ? { rpcUrl: ctx.rpcUrl } : undefined);
const x402 = new x402Client().register(info.network as any, scheme);
So an EVM-only agent using VybeClient can't pay — x402Client.payOrThrow(...) finds no matching scheme for the EVM entry in accepts[] and falls back to a 402 error. They'd have to drop down to raw @x402/fetch + @x402/evm.
Proposed shape (v0.2.0)
Extend the wallet/client surface so a single VybeClient can hold either or both:
const client = new VybeClient({
wallet: { solana: loadKeypair(...), evm: { privateKey: "0x..." } },
// or wallet: loadKeypair(...) for back-compat (still Solana-only)
});
Internally, register both schemes against x402Client:
const x402 = new x402Client();
if (solanaSigner) x402.register("solana:*", new ExactSvmScheme(solanaSigner, opts));
if (evmSigner) x402.register("eip155:*", new ExactEvmScheme(evmSigner));
The auto-selector picks the first accept whose network matches a registered scheme. Solana clients keep working; EVM clients work for the first time; dual-wallet clients use the gateway's preferred chain (server controls the accepts[] order — Solana first today, configurable).
Out of scope
- Cross-chain routing logic (let server decide via
accepts[] order).
- Polygon / Arbitrum / World — same pattern, but the gateway only advertises Base today. Adding them is a one-line gateway change when needed; client SDK should already handle them via
eip155:* registration.
Not blocking
The current 0.1.1 release still works fine for Solana flows after the gateway swap. This is a feature-add, not a bug fix.
Acceptance
Context
The Vybe x402 gateway (
x402-api.vybenetwork.xyz) now advertises payment options on both Solana mainnet and Base mainnet in every 402 challenge — see PR vybenetwork/x402-vybe-gateway#29. The 402accepts[]array carries two entries:Coinbase's CDP facilitator settles both — the gateway is chain-agnostic for verify/settle.
What this SDK is missing
Today
src/http.tsregisters onlyExactSvmScheme:So an EVM-only agent using
VybeClientcan't pay —x402Client.payOrThrow(...)finds no matching scheme for the EVM entry inaccepts[]and falls back to a 402 error. They'd have to drop down to raw@x402/fetch+@x402/evm.Proposed shape (v0.2.0)
Extend the wallet/client surface so a single
VybeClientcan hold either or both:Internally, register both schemes against
x402Client:The auto-selector picks the first accept whose
networkmatches a registered scheme. Solana clients keep working; EVM clients work for the first time; dual-wallet clients use the gateway's preferred chain (server controls theaccepts[]order — Solana first today, configurable).Out of scope
accepts[]order).eip155:*registration.Not blocking
The current
0.1.1release still works fine for Solana flows after the gateway swap. This is a feature-add, not a bug fix.Acceptance
VybeClientaccepts eitherWallet(Solana, back-compat) or{ solana?, evm? }x402Clientwhen both are providedx402-api.vybenetwork.xyz/v4/marketssucceeds on Base (test against Base Sepolia first via the gateway's devnet config)