ProvableHQ / sdk

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

Adding in support for mainnet #897

Closed Pauan closed 2 months ago

Pauan commented 4 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 3 months 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 3 months 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 3 months 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!