SDK Initialization

To initialize the SDK, you need to provide your API key and the RPC URL of the blockchain network.

import { initKorSDK } from '@kor_protocol/core-sdk';

const apiKey = 'your-api-key';
const rpcUrl = 'https://your-rpc-url';
const origin  = 'sandbox-origin-url'

const korSDK = initKorSDK(apiKey, {rpcUrl, chain, origin});
  1. API Key: Your unique identifier used to authenticate requests to the KOR Protocol backend. Please fill this form to obtain an api key https://u0d76il5b5y.typeform.com/korSDKsignup.

  2. RPC URL: This is the URL of the blockchain network you are connecting to. It could be the URL of a public or private Ethereum node.

  3. Chain: This is the id of the chain on which operations should be performed. *Note: Currently only base sepolia (chain id: 84532) is supported.

  4. Origin: Initializes the module in a sandbox/production environment. For sandbox environment use https://dq9c2zl6kih9v.cloudfront.net/kor-sdk-api

By using the initialiseKorSDK method from the @kor_protocol/core-sdk package, you can create an instance of the SDK by providing these parameters. This instance will allow you to interact with the KOR Protocol APIs and perform various KOR Protocol operations.

Last updated