An SDK to interact with DeSo APIs
WARNING: Project is under heavy development, expect breakage until this warning is removed.
yarn add deso.js
or
npm install --save deso.js
See full usage in code docs: documentation
import { Deso } from "deso.js";
const deso = new Deso({ baseUrl: "https://node.deso.org/api" });
const fetchProfile = async (publicKey: string) => {
const response = await deso.getSingleProfile({ publicKey });
return response['Profile'];
};
import { Identity } from "deso.js";
const identity = Identity.init();
const login = async () => {
const payload = await identity.login({ accessLevel: 2 });
const publicKey = payload.publicKeyAdded;
return publicKey;
};
A sample app can be found in /example
Running example code project:
yarn example
Navigate to http://localhost:3000
Navigate to http://localhost:3000/login
Install dependencies:
Depends on node.js
& yarn
yarn install
Build output:
yarn build
MIT