Skip to content

Conversation

@amilz
Copy link
Contributor

@amilz amilz commented Oct 16, 2025

Description

Introduces rpcSubscriptionsUrl to the SvmConfig that we introduced in #416. Though the existing logic includes public websocket endpoints and sensible/common default rules (replace 'http' with 'ws' to derive a websocket url from RPC endpoint), sometimes operators have websocket endpoints that do not comply with that assumption. In particular, the local test validator operates on different ports so the simple text replace does not work (http://127.0.0.1:8899 currently maps to ws://127.0.0.1:8899 but actually needs port 8900).

The primary upgrade here is to getRpcSubscriptions to allow custom URLs when passed with some simple helper functions for readability/reusability.

I have also shared/reviewed with @notorious-d-e-v (thank you 🙏).

Tests

Updated:

  • typescript/packages/x402/src/shared/svm/rpc.test.ts
  • typescript/packages/x402/src/schemes/exact/svm/facilitator/settle.test.ts

Checklist

  • I have formatted and linted my code
  • All new and existing tests pass
  • My commits are signed (required for merge) -- you may need to rebase if you initially pushed unsigned commits

@cb-heimdall
Copy link

cb-heimdall commented Oct 16, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel
Copy link

vercel bot commented Oct 16, 2025

@amilz is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@notorious-d-e-v
Copy link
Contributor

@CarsonRoscoe please let us know if this looks good or needs more work.

Think it's ready for merge

@amilz
Copy link
Contributor Author

amilz commented Nov 13, 2025

@CarsonRoscoe - wondering if you could take a look at this one when you get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants