https://github.com/fgimenez/blabla
https://github.com/fgimenez/blabla
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fgimenez/blabla
- Owner: fgimenez
- License: mit
- Created: 2018-10-16T07:56:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-16T07:56:42.000Z (over 7 years ago)
- Last Synced: 2025-02-01T11:11:06.504Z (over 1 year ago)
- Language: JavaScript
- Size: 51.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://circleci.com/gh/ConsenSys/armlet)
[](https://coveralls.io/github/ConsenSys/armlet?branch=master)
# Armlet, a Mythril Platform API client
Armlet is a Node.js client for the Mythril Platform API.
# Usage
Install with:
```
$ npm i armlet
```
Here is a small example of how you might use this client. For
demonstration purposes, we'll set an Mythril Platform API key and
EMAIL as environment variables:
```console
$ export MYTHRIL_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
$ export EMAIL=me@example.com
```
Then get the Mythril Platform analysis results with the promise returned by
the exposed function:
```javascript
const armlet = require('armlet')
const client = new armlet.Client(
{
apiKey: process.env.MYTHRIL_API_KEY,
userEmail: process.env.EMAIL // adjust this
})
client.analyze({bytecode: '0xf6'})
.then(issues => {
console.log(issues)
}).catch(err => {
console.log(err)
})
```
You can also specify the timeout in milliseconds to wait for the analysis to be
done (the default is 10 seconds). For instance, to wait up to 5 seconds:
```javascript
client.analyze({bytecode: , timeout: 5000})
.then(issues => {
console.log(issues)
}).catch(err => {
console.log(err)
})
```
See the example directory for some simple but runnable examples of how
to use the client.
For more info join the Mythril community at [Discord](https://discord.gg/kktn8Wt).