@foxone/mixin-api
TypeScript icon, indicating that this package has built-in type declarations

0.1.37 • Public • Published

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",
  ""
);

Readme

Keywords

none

Package Sidebar

Install

npm i @foxone/mixin-api

Weekly Downloads

2

Version

0.1.37

License

GPL 3.0

Unpacked Size

182 kB

Total Files

111

Last publish

Collaborators

  • zhangyh4382
  • lyricat
  • divisey
  • bobby.li