Skip to content

KavaClient constructor is out of date #112

@cipherzzz

Description

@cipherzzz

Summary

I expected to be able to run the samples to initialize a KavaClient using the README

import Kava from '@kava-labs/javascript-sdk';

const initialize = async () => {
  const mnemonic = 'secret words that unlock a kava address';
  const testnetUrl = 'https://api.data-testnet-14000.kava.io'; // testnet REST api endpoint

  // Declare a new Kava client, set wallet, and initialize
  const client = new Kava.KavaClient(testnetUrl);
  client.setWallet(mnemonic);
  client.setBroadcastMode('async');
  await client.initChain();
};

const main = () => {
  initialize()
    .then((client) => console.log(client))
    .catch((error) => console.log(error));
};

main();

Outcome

The KavaClient expects two constructor arguments and not one - it also seems that rpc is labeled as rcp
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions