0.2.0 • Published 1 year ago

@pomelo-io/eosnlogin-api v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

eosnlogin-api-js

Library to interact with EOSN Account API

Quickstart

> npm i @pomelo-io/eosnlogin-api
import { createClient } from "@pomelo-io/eosnlogin-api"
const client = createClient( {
    baseUrl: "https://api.account.eosnation.io/v1",
    securityData: {
        authToken: "Bearer <your admin token>"
    }
});

client.on('users:progress', progress => {
    process.stdout.write('.');
});

// simple get User request
const grant = await client.getUser("5232244.eosn");

// all params - see https://account-dev.eosnation.io/swagger/index.html
const users = await client.raw().admin.usersList({
    "kyc_status[]": "REQUESTED",
});

// update auth token
client.setAuthToken("Bearer <your admin token>");

Example

> node example.js
0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago