0.5.2 • Published 2 years ago

bitclout-sdk v0.5.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

bitclout-sdk

npm version

An SDK to interact with DeSo APIs


WARNING: Project is under heavy development, expect breakage until this warning is removed.


Installation

yarn add bitclout-sdk

or

npm install --save bitclout-sdk

Usage

See full usage in code docs: documentation

Bitclout

Fetch a profile

import { BitClout } from "bitclout-sdk";

const bitclout = new BitClout({ baseUrl: "https://node.deso.org/api" });

const fetchProfile = async (publicKey: string) => {
  const profile = await bitclout.getSingleProfile({
    publicKey,
  });
};

Identity

Login

import { identity } from "bitclout-sdk";

const login = async () => {
  const response = await identity.login({ accessLevel: 2 });
  const publicKey = response.publicKeyAdded;
  return publicKey;
};

Example code / Sample app

A sample app can be found in /example

Runing example code project:

yarn example

Navigate to http://localhost:3000

Identity login example

Navigate to http://localhost:3000/login

Building code for development

Install dependencies:

Depends on node.js & yarn

yarn install

Build output:

yarn build

License

MIT

0.5.2

2 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago