Installations
npm install eosjs-api
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
10.9.0
NPM Version
6.2.0
Score
58.4
Supply Chain
98.1
Quality
78
Maintenance
50
Vulnerability
99.6
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (96.25%)
Shell (3.65%)
Dockerfile (0.1%)
Developer
EOSIO
Download Statistics
Total Downloads
722,891
Last Day
48
Last Week
192
Last Month
1,973
Last Year
22,915
GitHub Statistics
177 Stars
164 Commits
87 Forks
44 Watching
19 Branches
4 Contributors
Bundle Size
43.42 kB
Minified
11.96 kB
Minified + Gzipped
Package Meta Information
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
Publised On
11 Sept 2018
Total Downloads
Cumulative downloads
Total Downloads
722,891
Last day
-15.8%
48
Compared to previous day
Last week
-27%
192
Compared to previous week
Last month
-33.9%
1,973
Compared to previous month
Last year
-55.2%
22,915
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Eos API
Application programming interface to EOS blockchain nodes. This is for read-only API calls. If you need to sign transactions use eosjs instead.
Include
- Install with:
npm install eosjs-api
- Html script tag, see releases for the correct version and its matching script integrity hash.
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>
EosApi
Run nodeos
Usage
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))
Configuration
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)
options.logger example
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}
options.fetchConfiguration example
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})
Environment
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: containerImage not pinned by hash: docker/Dockerfile:1
- Warn: npmCommand not pinned by hash: docker/run_tests.sh:17
- Info: 0 out of 1 containerImage dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Reason
67 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-hc9w-4p87-j549
- Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h
- Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2
- Warn: Project is vulnerable to: GHSA-rq8g-5pc5-wrhr
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-xf5p-87ch-gxw2
- Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj
- Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
Score
1.2
/10
Last Scanned on 2024-12-23
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