ProvableHQ / sdk

A Software Development Kit (SDK) for Zero-Knowledge Transactions
https://provable.tools
GNU General Public License v3.0
584 stars 468 forks source link

Adding in support for mainnet #897

Open Pauan opened 2 months ago

Pauan commented 2 months ago

This PR allows users to use either testnet or mainnet (or both).

The user imports whichever network they want to use:

import * as sdk from "@provablehq/sdk/testnet.js";
import * as sdk from "@provablehq/sdk/mainnet.js";
Pauan commented 1 month ago

I added in some end-to-end tests under the sdk/e2e folder.

Right now I just copied the Node template, so it's just doing a basic "hello world".

But over time we can add more e2e tests and flesh them out.

Pauan commented 1 month ago

Also as discussed in Slack, I got rid of Jest and replaced it with Mocha + Chai + Sinon. The unit tests work so much better now.

Pauan commented 1 month ago

The PR is ready for review now, but it can't be merged until after mainnet launches, because it relies upon mainnet URLs that just don't exist right now.

After mainnet launches, we will re-run all of the tests until they're all green!