RiskScoringApi - JavaScript client for risk_scoring_api. This is an API that provides whitebox risk scoring. This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0
- Package version: 1.0
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen
For Node.js
npm install --save januusio/cryptowallet_risk_scoring_js
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Here's an example of using the library with Node.js:
const RiskScoringApi = require('cryptowallet_risk_scoring_js');
const api = new RiskScoringApi.DefaultApi();
const address = "0xbb0ea877a85df253ccc312b80c644da31443abfd";
const callback = function (error, data, response) {
if (error) {
console.error(error);
} else {
console.log(data);
}
};
api.scoreEthAddressGet(address, callback);
All URIs are relative to https://risk.charybdis.januus.io/
Class | Method | HTTP request | Description |
---|---|---|---|
RiskScoringApi.DefaultApi | scoreBtcAddressGet | GET /score/btc/{address} | |
RiskScoringApi.DefaultApi | scoreEthAddressGet | GET /score/eth/{address} | |
RiskScoringApi.DefaultApi | scoreOtherAddressGet | GET /score/other/{address} |
- RiskScoringApi.Offsets
- RiskScoringApi.Reason
- RiskScoringApi.RiskElaboration
- RiskScoringApi.RiskReport
- RiskScoringApi.RiskScores
All endpoints do not require authorization.