Skip to content

Bcode SDK

This documentation is for the new BcodeSDK v1. It's ment to be used with Bcode Platform to handle the API request.

Initialization

In order to use the SDk you must register at Bcode or Bcode Demo. After all the sign up process you can create a API token. The credential you've created will be used to login in the BcodeSDK.

In config you can specify:

  • env: DEV | DEMO | PROD
  • debugMode: true | false (It enables verbose log)
  • rpcProvider: You can specify custom RPC for the selected network the one inserted is free and has rate limit

In order to use the new versione you have to specify the version as "v1".

const { BcodeSDK } = require("@bcode-tech/bcode-sdk");

(async () => {
  const configParams: { env: "DEV" | "DEMO" | "PROD", debugMode: boolean } = {
    env: "DEV",
    debugMode: true,
  };

  const sdk = BcodeSDK.create({
    email: "your@email.com",
    password: "your-secure-password",
    config: configParams,
    version: "v1",
  });

  await sdk.init();
})();

That's all you need to initialize BcodeSDK, now you can interact with your contracts.