new MiningRigRentals(apiSettings)
instantiate a MRR api using this constructor
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
apiSettings |
Object |
Properties
|
- Source:
Members
createError
Utility function to provide users with in depth error messaging for debugging
- Source:
Methods
(async) addPoolToProfile(options) → {Promise.<Object>}
Add a pool to the profile
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Returns:
//return example { success: true, data: { id: '23136', success: true, message: 'Updated' } }
- Type:
- Promise.<Object>
(async) addPoolToRentals(rentalIDs, options) → {Promise.<Object>}
Add a pool on one or more rentals
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rentalIDs |
number | Array.<number> |
Rental IDs |
||||||||||||||||||||||||
options |
Object |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) addPoolToRigs(rigIDs, options) → {Promise.<Object>}
Add a pool on one or more rigs
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rigIDs |
number | Array.<number> |
Rig IDs |
||||||||||||||||||||||||
options |
Object |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) applyPoolProfileToRentals(rentalIDs, profileID) → {Promise.<Object>}
Apply a pool profile to one or more rentals
Parameters:
Name | Type | Description |
---|---|---|
rentalIDs |
number | Array.<number> |
rental IDs |
profileID |
number |
Profile ID to apply -- see /account/profile |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) applyPoolToRigs(rigIDs, profileID) → {Promise.<Object>}
Apply a pool profile to one or more rigs
Parameters:
Name | Type | Description |
---|---|---|
rigIDs |
number | Array.<number> |
Rig IDs |
profileID |
number |
Profile ID to apply -- see /account/profile |
- Source:
Returns:
- Type:
- Promise.<Object>
createHMACSignature(endpoint, nonce, versionopt, paramsopt) → {string}
Create a SHA1 HMAC signature required for every mrr api call (see more at 'https://www.miningrigrentals.com/apidocv2')
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
endpoint |
string |
the endpoint your wish to hit without the trailing slash |
||
nonce |
number |
a nonce that increments with each call |
||
version |
string |
<optional> |
'v2' |
MRR API version number (which version of the api you want to hit) |
params |
Object |
<optional> |
An object of parameters. Only needed if hitting the v1 API (used for creating the signature) |
- Source:
Returns:
hmacSig - the HMAC signature in hex
- Type:
- string
(async) createPool(options) → {Promise.<Object>}
Create a pool
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) createPoolProfile(name, algo) → {Promise.<Object>}
Create a pool profile
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
Name of the profile |
algo |
string |
Algo of the profile -> see /info/algos |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) createRental(options) → {Promise.<Object>}
Create a new rental
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) createRig(optionsopt) → {Promise.<Object>}
Create a Rig
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) deletePoolOnRentals(rentalIDs, priority) → {Promise.<Object>}
Delete a pool on one or more rentals
Parameters:
Name | Type | Description |
---|---|---|
rentalIDs |
number | Array.<number> |
Rental IDs |
priority |
number |
0-4 -- can be passed in after pool/ instead.eg /rig/17/pool/0 |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) deletePoolOnRigs(rigIDs, priority) → {Promise.<Object>}
Delete a pool on one or more rigs
Parameters:
Name | Type | Description |
---|---|---|
rigIDs |
number | Array.<number> |
Rig IDs |
priority |
number |
0-4 -- can be passed in after pool/ instead.eg /rig/17/pool/0 |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) deletePoolProfile(id) → {Promise.<Object>}
Delete a specific pool profile
Parameters:
Name | Type | Description |
---|---|---|
id |
number |
Pool Profile ID |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) deletePools(poolIDs) → {Promise.<Object>}
Delete 1 or more pools
Parameters:
Name | Type | Description |
---|---|---|
poolIDs |
number | Array.<number> |
Pool IDS to delete |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) deleteRigs(rigIDs) → {Promise.<Object>}
Delete 1 or more rigs by ID
Parameters:
Name | Type | Description |
---|---|---|
rigIDs |
number | Array.<number> |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) extendRental(rigIDs, options) → {Promise.<Object>}
For rig owners: extend a rental to donate time to the renter -- Assuming an active rental is in progress.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
rigIDs |
number | Array.<number> |
IDs of the Rigs you wish to extend @ToDo: unclear if rig ID or rental ID needed |
|||||||||
options |
Object |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
generateNonce() → {number}
Generate a nonce needed to build the HMAC signature
- Source:
Returns:
- the current UNIX time + the previous Nonce
- Type:
- number
(async) getAccount() → {Promise.<Object>}
Retrieve account information
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getAccountBalance() → {Promise.<Object>}
Retrieve account balances
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getAlgo(algo, currencyopt) → {Promise.<Object>}
Get statistics for an algo (suggested price, unit information, current rented hash/etc)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
algo |
string |
the name of the algorithm you wish to search by. Ex: 'scrypt' |
||
currency |
string |
<optional> |
'BTC' |
Currency to use for price info. Options: BTC, ETH, LTC, DASH |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getAlgos(algo, currencyopt) → {Promise.<Object>}
Get all algos and statistics for them (suggested price, unit information, current rented hash/etc)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
algo |
string |
algo to search on |
||
currency |
string |
<optional> |
'BTC' |
Currency to use for price info *Ticker. Options: BTC, ETH, LTC, DASH |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getPoolProfile(id) → {Promise.<Object>}
Get a specific pool profile
Parameters:
Name | Type | Description |
---|---|---|
id |
number |
ID of the pool profile |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getPoolProfiles(algoopt) → {Promise.<Object>}
List all pool profiles, or list by algo
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
algo |
string |
<optional> |
Algo to filter -- see /info/algos |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getPools() → {Promise.<Object>}
Get saved pools
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getPoolsByID(ids) → {Promise.<Object>}
Get pools by ID
Parameters:
Name | Type | Description |
---|---|---|
ids |
number | Array.<number> |
pool ids |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getPoolsByRentalID(rentalIDs) → {Promise.<Object>}
List pools assigned to one or more rentals.
Parameters:
Name | Type | Description |
---|---|---|
rentalIDs |
number | Array.<number> |
Rental IDs |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getPoolsFromRigs(rigIDs) → {Promise.<Object>}
List pools assigned to one or more rigs
Parameters:
Name | Type | Description |
---|---|---|
rigIDs |
number | Array.<number> |
Rig IDs |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getRentalById(ids) → {Promise.<Object>}
Get information on rentals by rental ID.
Parameters:
Name | Type | Description |
---|---|---|
ids |
number | Array.<number> |
Rental IDs |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getRentals(optionsopt) → {Promise.<Object>}
Lists rentals
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
input fields/query parameters Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getRigs(options) → {Promise.<Object>}
Search for rigs on a specified algo. This is identical to the main rig list pages.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
input fields/query parameters Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getRigsByID(rigIDs) → {Promise.<Object>}
Get 1 or more rigs by ID
Parameters:
Name | Type | Description |
---|---|---|
rigIDs |
number | Array.<number> |
Rig IDs |
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getServers() → {Promise.<Object>}
Get a list of MRR rig servers
- Source:
Returns:
- Type:
- Promise.<Object>
(async) getTransactions(optionsopt) → {Promise.<Object>}
List/search transaction history
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
initAPI(endpoint, paramsopt, versionopt) → {AxiosInstance}
Initialize a new instance of axios with desired endpoint
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
endpoint |
string |
the endpoint you wish to hit WITHOUT THE TRAILING SLASH; ex: /rig/14 |
||
params |
Object |
<optional> |
extra parameters to be passed along to the API |
|
version |
string |
<optional> |
'v2' |
specify the mining rig rental api version you want to hit; defaults v2 |
- Source:
Returns:
- Type:
- AxiosInstance
(async) listMyRigs(optionsopt) → {Promise.<Object>}
List my rigs
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) replacePoolOnRigs(rigIDs, options) → {Promise.<Object>}
Replace a pool on one or more rigs
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rigIDs |
number | Array.<number> |
Rig IDs |
||||||||||||||||||||||||
options |
Object |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) updatePoolOnProfile(options) → {Promise.<Object>}
Update or replace a pool to a profile... **Poor MRR Documentation
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) updatePoolOnRentals(rentalIDs, options) → {Promise.<Object>}
Update a pool on one or more rentals
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rentalIDs |
number | Array.<number> |
Rental IDs |
||||||||||||||||||||||||
options |
Object |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) updatePools(poolIDs, optionsopt) → {Promise.<Object>}
Update saved pools
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
poolIDs |
number | Array.<number> |
IDs of the pools you wish to update |
|||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) updateRigsByID(rigIDs, optionsopt) → {Promise.<Object>}
Update 1 or more rigs by ID
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rigIDs |
number | Array.<number> |
Rig ID(s) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Properties
|
- Source:
Returns:
- Type:
- Promise.<Object>
(async) whoami() → {Promise.<Object>}
Test connectivity and return information about you
- Source:
Returns:
- Type:
- Promise.<Object>