Submit a smart contract using custom parameters.
Object containing options to submit to API
Only Assertion Violations Check enabling flag
Resolves with API response, or throws error
Create an analysis submission group.
(optional) - String that defines a group name
Resolves with API response, or throws error
Get status for analysis on given UUID.
unique identifier of analysis job
Resolves with API response, or throws error
Generates authentication challenge (Metamask only for now). The Metamask flow needs to be handled on the front end since MythXJS does not have Web3 dependencies.
Ethereum address for Mythx account
Resolves with API response or throw error
Gets the array of issues from the API.
unique identifier of analysis job
Resolves with API response, or throws error
Get a single analyses group by ID.
(required) - String that defines a unique group ID
Resolves with API response, or throws error
Get API generated PDF.
Unique identifier of analysis job
Resolves with API response, or throws error
Returns API stats.
Internal only, needs admin credentials to be accessed.
@returns {Promise
Retrieve list of registred API users or just caller user object if no required permission.
Query string for detailed list (query parameters: offset, orderBy, email, ethAddress)
Resolves with API response or throw error
Returns API current version. Does not require login. @returns Resolves with API response or throw error
Perform operations on specific group.
String that defines a unique group ID
(optional) - Type of operation to be performed in the group (e.g. "seal_group")
Resolves with API response, or throws error
Get list of analyses groups.
Query string for detailed list of groups (query parameters: offset, createdBy, groupName, dateFrom, dateTo)
Resolves with API response, or throws error
Login to the API using ethAddress and password specified in the library constructor.
Ethereum address for Mythx account
Password for Ethereum address
Returns an object containing two tokens (access+refresh) that can be saved in storage.
Login to the API using metamask challenge result message.
In order to get the object containing the message use getChallenge
and handle Metamask login in the frontend.
Signature passed by provider. In case of metamask this will be returned after signing challenge.
pass a provider value for the HTTP headers. If nothing is passed defaults to MetaMask
Returns an object containing two tokens (access+refresh) that can be saved in storage.
Logout from the API.
Resolves with API response or throw error
Submit a smart contract using bytecode only. This will likely be deprecated in future.
Compiled bytecode of a smart contract for example "0xfe".
Resolves with API response, or throws error
Submit a smart contract using sourcecode only. This will likely be deprecated in future.
String containing smart contract sourcecode.
Name of the contract to submit for analysis.
Only Assertion Violations Check enabling flag
Resolves with API response, or throws errors
Generated using TypeDoc
Main service exposed to outside. Needs to be instantiated with username, password, toolName (optional) and environment (optional) fields. If no environment specified it will default to prod. Please note that this is exported as
Client
.import { Client } from 'mythxjs'
.const mythx = new Client('0x0000000000000000000000000000000000000000', 'trial', 'testTool', 'https://staging.api.mythx.io/v1/');