Gathering detailed insights and metrics for eosjs-api
Gathering detailed insights and metrics for eosjs-api
Gathering detailed insights and metrics for eosjs-api
Gathering detailed insights and metrics for eosjs-api
Application programming interface to EOS blockchain nodes.
npm install eosjs-api
Typescript
Module System
Node Version
NPM Version
73.4
Supply Chain
98.1
Quality
78
Maintenance
50
Vulnerability
99.6
License
JavaScript (96.25%)
Shell (3.65%)
Dockerfile (0.1%)
Total Downloads
728,985
Last Day
29
Last Week
277
Last Month
1,189
Last Year
20,523
177 Stars
164 Commits
87 Forks
43 Watchers
19 Branches
4 Contributors
Updated on Jul 29, 2024
Minified
Minified + Gzipped
Latest Version
7.0.4
Package Id
eosjs-api@7.0.4
Size
49.78 kB
NPM Version
6.2.0
Node Version
10.9.0
Published on
Sep 11, 2018
Cumulative downloads
Total Downloads
Last Day
-14.7%
29
Compared to previous day
Last Week
28.8%
277
Compared to previous week
Last Month
-14.6%
1,189
Compared to previous month
Last Year
-23%
20,523
Compared to previous year
Application programming interface to EOS blockchain nodes. This is for read-only API calls. If you need to sign transactions use eosjs instead.
npm install eosjs-api
1<html> 2<head> 3 <meta charset="utf-8"> 4 <!-- 5 sha512-n3CgU6w9TJVf/pVIMHYhk3Gxv8lEQYjVrSSTLXvEBENLF+CQd1Kp0jxXj09yGUOkWerdv2mJlh1Mnz3aRfYqWw== lib/eos-api.js 6 sha512-Cj2FQb94MMtDPgHb1R1577pEMjYhc+P5pNgv1/QwoJD9ntuR9rnWlqJACS/xNniNK5cFS6Y6CpQlHWpzWUeEbw== lib/eos-api.min.js 7 sha512-4C6oDKarS8DaXO99o342USbeQwqW98qik+QSzVGfof939gUpIyRDCnbGIGQAIkLNpYZIV4XanmRy3wcis6UW8w== lib/eos-api.min.js.map 8 --> 9 <script src="https://cdn.jsdelivr.net/npm/eosjs-api@7.0.4/lib/eos-api.min.js" 10 integrity="sha512-LLDsX/GdVZYA82k9TVz3zUxSjvaX8s5b1FJm64W51JGxLFKI2z+ljqYQtsUZIOxh9pSUqvLA5HCoxXqdRxusKw==" 11 crossorigin="anonymous"></script> 12 13</head> 14<body> 15 See console object: EosApi 16</body> 17</html>
Run nodeos
1EosApi = require('eosjs-api') // Or EosApi = require('./src') 2 3eos = EosApi() // // 127.0.0.1:8888 4 5// Any API call without a callback parameter will print documentation: description, 6// parameters, return value, and possible errors. All methods and documentation 7// are created from JSON files in eosjs/json/api/v1.. 8eos.getInfo() 9 10// A Promise is returned if a callback is not provided. 11eos.getInfo({}).then(result => console.log(result)) 12eos.getBlock(1).then(result => console.log(result)) 13 14// For callbacks instead of Promises provide a callback 15callback = (err, res) => {err ? console.error(err) : console.log(res)} 16 17// The server does not expect any parameters only the callback is needed 18eos.getInfo(callback) 19 20// Parameters are added before the callback 21eos.getBlock(1, callback) 22 23// Parameters can be an object 24eos.getBlock({block_num_or_id: 1}, callback) 25eos.getBlock({block_num_or_id: 1}).then(result => console.log(result))
1EosApi = require('eosjs-api') // Or EosApi = require('./src') 2 3// everything is optional 4options = { 5 httpEndpoint: 'http://127.0.0.1:8888', // default, null for cold-storage 6 verbose: false, // API logging 7 logger: { // Default logging functions 8 log: config.verbose ? console.log : null, 9 error: config.verbose ? console.error : null 10 }, 11 fetchConfiguration: {} 12} 13 14eos = EosApi(options)
During testing, an error may be expected and checked as follows:
1options.logger = { 2 error: err => { 3 assert.equal(err, 'expected error') 4 done() 5 } 6}
1options.fetchConfiguration = { 2 credentials: 'same-origin' 3}
Every eosjs-api request will run fetch with this configuration:
1fetch('https://example.com', { 2 credentials: 'same-origin' 3})
Node and browser (es2015)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
69 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More