Skip to content

Conversation

@voltrevo
Copy link

Basic test:

// 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 :)

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