Set up the SDK

After installing the SDK, you first need to set it up.

To begin, initialize and configure the dKit SDK:

import { createDoritoKit } from '@doritokit/sdk'

const doritoKitClient = createDoritoKit({
  config: {
    stagenet?: boolean;
    /**
     * @required for AVAX & BSC
     */
    covalentApiKey?: string;
    /**
     * @required for ETH
     */
    ethplorerApiKey?: string;
    /**
     * @required for BTC, LTC, DOGE & BCH
     */
    utxoApiKey?: string;
  };
})

Connecting a wallet

doritoKit offers multiple wallet connection options, including Keystore, Phantom, Keplr, Metamask and hardware wallets. These options are defined in the WalletOption enum.

Here’s an example of connectWallet, which allows your dApp’s frontend to connect to any supported wallet:

Last updated