Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@eoscafe/light-api
Advanced tools
Using Yarn:
yarn add @eoscafe/light-api
or using NPM:
npm install --save @eoscafe/light-api
CommonJS
const { JsonRpc } = require("@eoscafe/light-api")
const fetch = require("isomorphic-fetch")
const endpoint = "https://api.light.xeos.me"
const rpc = new JsonRpc(endpoint, { fetch, chain: "eos" })
TypeScript
import { JsonRpc } from "@eoscafe/light-api"
import fetch from "isomorphic-fetch"
const endpoint = "https://api.light.xeos.me"
const rpc = new JsonRpc(endpoint, { fetch, chain: "eos" })
JsonRpc
endpoint
string LIGHT API endpointconst endpoint = "https://api.light.xeos.me"
const rpc = new JsonRpc(endpoint, { fetch, chain: "eos" })
[GET /api/account]
Retrieve all token balances, resources and authorization information for an account:
accountName
string name of accountReturns Promise<GetAccount> account
[GET /api/accinfo]
Retrieve all resources and authorization information for an account:
accountName
string name of accountReturns Promise<GetAccountInfo> account
[GET /api/balances]
Retrieve only token balances for an account
accountName
string name of accountReturns Promise<GetBalances> balances
[GET /api/key]
Retrieve all accounts in all known EOS networks dependent on a public key:
key
string public keyReturns Promise<GetKeyAccounts> accounts
[GET /api/networks]
Retrieve all accounts in all known EOS networks dependent on a public key:
Returns Promise<GetNetworks> accounts
[GET /api/sync]
returns a plain text with delay in seconds that this server's blockchain database is behind the real time, and a status: OK if the delay is within 180 seconds, or 'OUT_OF_SYNC' otherwise.
Returns Promise<string> get sync
[GET /api/tokenbalance]
returns a plain text with numeric output indicating the token balance. Zero is returned if the token is not present or does not exist.
Returns Promise<string> token balance
[GET /api/topholders]
returns top NUM holders of a specified token in a JSON array containing arrays of (account, amount) pairs. NUM must not be less than 10 or more than 1000.
contract
string token contracttoken
string token symbolnum
string number of top holders (min 10, max 1000)Returns Promise<string> token balance
[GET /api/usercount]
returns a plain text with total number of accounts in the network.
Returns Promise<string> token balance
[GET /api/topram]
returns top NUM RAM buyers in a JSON array containing arrays of (account, bytes) pairs. NUM must not be less than 10 or more than 1000.
num
string number of top holders (min 10, max 1000)Returns Promise<GetTopRam> top ram holders
[GET /api/topstake]
returns top NUM RAM buyers in a JSON array containing arrays of (account, bytes) pairs. NUM must not be less than 10 or more than 1000.
num
string returns top NUM stake holders by sum of CPU and Net stakes, in a JSON array containing arrays of (account, cpu_weight, net_weight) tuples. NUM must not be less than 10 or more than 1000.Returns Promise<GetTopStake> top stake holders
[GET /api/codehash]
retrieves all accounts in all known EOS networks by contract hash.
hash
num
string returns top NUM stake holders by sum of CPU and Net stakes, in a JSON array containing arrays of (account, cpu_weight, net_weight) tuples. NUM must not be less than 10 or more than 1000.Returns Promise<GetCodehash> accounts
[GET /api/holdercount]
returns a plaintext integer indicating the number of accounts with positive balance for a specified token.
[GET /api/account]
Retrieve all token balances, resources and authorization information for an account:
accountName
string name of accountReturns Promise<GetAccount> account
[GET /api/accinfo]
Retrieve all resources and authorization information for an account:
accountName
string name of accountReturns Promise<GetAccountInfo> account
[GET /api/balances]
Retrieve only token balances for an account
accountName
string name of accountReturns Promise<GetBalances> balances
[GET /api/key]
Retrieve all accounts in all known EOS networks dependent on a public key:
key
string public keyReturns Promise<GetKeyAccounts> accounts
[GET /api/networks]
Retrieve all accounts in all known EOS networks dependent on a public key:
Returns Promise<GetNetworks> accounts
[GET /api/sync]
returns a plain text with delay in seconds that this server's blockchain database is behind the real time, and a status: OK if the delay is within 180 seconds, or 'OUT_OF_SYNC' otherwise.
Returns Promise<string> get sync
[GET /api/tokenbalance]
returns a plain text with numeric output indicating the token balance. Zero is returned if the token is not present or does not exist.
Returns Promise<string> token balance
[GET /api/topholders]
returns top NUM holders of a specified token in a JSON array containing arrays of (account, amount) pairs. NUM must not be less than 10 or more than 1000.
contract
string token contracttoken
string token symbolnum
string number of top holders (min 10, max 1000)Returns Promise<string> token balance
[GET /api/usercount]
returns a plain text with total number of accounts in the network.
Returns Promise<string> token balance
[GET /api/topram]
returns top NUM RAM buyers in a JSON array containing arrays of (account, bytes) pairs. NUM must not be less than 10 or more than 1000.
num
string number of top holders (min 10, max 1000)Returns Promise<GetTopRam> top ram holders
[GET /api/topstake]
returns top NUM RAM buyers in a JSON array containing arrays of (account, bytes) pairs. NUM must not be less than 10 or more than 1000.
num
string returns top NUM stake holders by sum of CPU and Net stakes, in a JSON array containing arrays of (account, cpu_weight, net_weight) tuples. NUM must not be less than 10 or more than 1000.Returns Promise<GetTopStake> top stake holders
[GET /api/codehash]
retrieves all accounts in all known EOS networks by contract hash.
hash
num
string returns top NUM stake holders by sum of CPU and Net stakes, in a JSON array containing arrays of (account, cpu_weight, net_weight) tuples. NUM must not be less than 10 or more than 1000.Returns Promise<GetCodehash> accounts
[GET /api/holdercount]
returns a plaintext integer indicating the number of accounts with positive balance for a specified token.
FAQs
Light API HTTP Javascript library
The npm package @eoscafe/light-api receives a total of 0 weekly downloads. As such, @eoscafe/light-api popularity was classified as not popular.
We found that @eoscafe/light-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.