diff --git a/README.md b/README.md index 2c1d241..d0539f8 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,15 @@ Here is the demo to get you started; you can get more information in the [SDK do ### For Onchain Storage + To use certain Onchain Storage features (upload, payment, minting), you will need to set up the web3 environment first. + + - Setup Web3 + + ```js + await mcs.setupWeb3(, ) + console.log(mcs.web3Initialized) // true + ``` + - Upload File to Onchain storage ```js diff --git a/sdk-test/mcs.test.js b/sdk-test/mcs.test.js index ea9ac8b..0ce547a 100644 --- a/sdk-test/mcs.test.js +++ b/sdk-test/mcs.test.js @@ -36,9 +36,8 @@ describe('MCS SDK', function () { it('Should initialize SDK', async () => { mcs = await mcsSDK.initialize({ - accessToken: process.env.CALI_ACCESS_TOKEN, - apiKey: process.env.CALI_API_KEY, - chainName: 'polygon.mumbai', + accessToken: process.env.ACCESS_TOKEN, + apiKey: process.env.API_KEY, }) expect(mcs) @@ -46,7 +45,7 @@ describe('MCS SDK', function () { it('Should setup web3', async () => { expect(mcs.walletAddress).to.be.undefined - await mcs.setupWeb3(process.env.PRIVATE_KEY, process.env.RPC_URL) + await mcs.setupWeb3(process.env.PRIVATE_KEY) expect(mcs.walletAddress) }) diff --git a/sdk/README.md b/sdk/README.md index e2e5a6c..d0539f8 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -107,8 +107,19 @@ Here is the demo to get you started; you can get more information in the [SDK do Optionally, you can pass `privateKey` to use the onChain Storage upload and payment functions and pass `rpcUrl` if you wish to use your own RPC URL (this SDK uses https://polygon-rpc.com/ by default). + This SDK is also compatiable with our calibration environment on the Mumbai testnet. Use `chainName: 'polygon.mumbai'` and generate a new API KEY from [calibration-mcs.filswan.com/](https://calibration-mcs.filswan.com/) + ### For Onchain Storage + To use certain Onchain Storage features (upload, payment, minting), you will need to set up the web3 environment first. + + - Setup Web3 + + ```js + await mcs.setupWeb3(, ) + console.log(mcs.web3Initialized) // true + ``` + - Upload File to Onchain storage ```js