@foxone/mixin-api
v0.1.37
Published
FoxONE Mixin Network javascript api service
Downloads
51
Readme
Mixin API
Provide a libary for Mixin Network API calls.
Usage
install from npm:
yarn add @foxone/mixin-api
init instance and configration
import MixinAPI from "@foxone/mixin-api";
const api = new MixinAPI();
api.config({
client_id: "...",
session_id: "...",
private_key: "..."
});
// api calls
const profile = await api.endpoints.getMe();
use encrypts for jwt token generation
import { signAuthenticationToken } from "@foxone/mixin-api/encrypt";
const keys = {
client_id: "",
session_id: "",
private_key: ""
};
signAuthenticationToken(
keys.client_id,
keys.session_id,
keys.private_key,
"GET",
"/me",
""
);