Skip to content

Support keynet via tor js#5083

Open
voltrevo wants to merge 6 commits intoethers-io:mainfrom
voltrevo:support-keynet-via-tor-js
Open

Support keynet via tor js#5083
voltrevo wants to merge 6 commits intoethers-io:mainfrom
voltrevo:support-keynet-via-tor-js

Conversation

@voltrevo
Copy link
Copy Markdown

@voltrevo voltrevo commented Dec 22, 2025

Basic test (UPDATE: keynet service no longer available):

// test.ts

import { JsonRpcProvider } from './src.ts'

(async () => {
    const provider = new JsonRpcProvider('http://jyn6dehf3ttu4lblc7tr3i23xqsz76dn2du6keptg5kyo3r6mur36vad.keynet/ethereum')
    const blockNo = await provider.getBlockNumber();

    console.log(blockNo);
    process.exit(0);
})().catch(e => {
    console.error(e);
    process.exit(1);
});
dev-vm ➜ ethers.js git:(support-keynet-via-tor-js) ✗ npx tsx test.ts
NOTICE: tor-js is experimental software: https://github.com/voltrevo/tor-js/issues/4
24065513

Before merging/releasing this, we should probably fix:

  • wss://snowflake.pse.dev is hardcoded as the snowflake bridge
    • (This can be changed with tor.configure but that's not exposed in the ethers api)
    • I believe the plan is for there to be a few of these hosted by commercial RPC providers
    • tor-js should be configured with all of them, randomize, and do failover

That will not change this PR very much though, so I'm hoping we can sync on expectations and get a tentative OK here :)

@voltrevo
Copy link
Copy Markdown
Author

I've taken down the keynet service in the example to save costs. Let me know if you'd like me to create a new one.

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.

1 participant