EstuaryClient.DealsApi
All URIs are relative to https://api.estuary.tech
Method | HTTP request | Description |
---|---|---|
dealEstimatePost | POST /deal/estimate | Estimate the cost of a deal |
dealInfoDealidGet | GET /deal/info/{dealid} | Get Deal Info |
dealProposalPropcidGet | GET /deal/proposal/{propcid} | Get Proposal |
dealQueryMinerGet | GET /deal/query/{miner} | Query Ask |
dealStatusByProposalPropcidGet | GET /deal/status-by-proposal/{propcid} | Get Deal Status by PropCid |
dealStatusMinerPropcidGet | GET /deal/status/{miner}/{propcid} | Deal Status |
dealTransferInProgressGet | GET /deal/transfer/in-progress | Transfer In Progress |
dealsFailuresGet | GET /deals/failures | Get storage failures for user |
dealsMakeMinerPost | POST /deals/make/{miner} | Make Deal |
dealsStatusDealGet | GET /deals/status/{deal} | Get Deal Status |
publicDealsFailuresGet | GET /public/deals/failures | Get storage failures |
publicMinersStorageQueryMinerGet | GET /public/miners/storage/query/{miner} | Query Ask |
Estimate the cost of a deal
This endpoint estimates the cost of a deal
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var body = new EstuaryClient.MainEstimateDealBody(); // MainEstimateDealBody | The size of the deal in bytes, the replication factor, and the duration of the deal in blocks
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealEstimatePost(body, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | MainEstimateDealBody | The size of the deal in bytes, the replication factor, and the duration of the deal in blocks |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Get Deal Info
This endpoint returns the deal info for a deal
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var dealid = 56; // Number | Deal ID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealInfoDealidGet(dealid, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
dealid | Number | Deal ID |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Get Proposal
This endpoint returns the proposal for a deal
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var propcid = "propcid_example"; // String | Proposal CID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealProposalPropcidGet(propcid, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
propcid | String | Proposal CID |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Query Ask
This endpoint returns the ask for a given CID
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var miner = "miner_example"; // String | CID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealQueryMinerGet(miner, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
miner | String | CID |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Get Deal Status by PropCid
Get Deal Status by PropCid
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var propcid = "propcid_example"; // String | PropCid
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealStatusByProposalPropcidGet(propcid, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
propcid | String | PropCid |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Deal Status
This endpoint returns the status of a deal
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var miner = "miner_example"; // String | Miner
var propcid = "propcid_example"; // String | Proposal CID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealStatusMinerPropcidGet(miner, propcid, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
miner | String | Miner | |
propcid | String | Proposal CID |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Transfer In Progress
This endpoint returns the in-progress transfers
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealTransferInProgressGet(callback);
Parameters
This endpoint does not need any parameter.
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Get storage failures for user
This endpoint returns a list of storage failures for user
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealsFailuresGet(callback);
Parameters
This endpoint does not need any parameter.
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Make Deal
This endpoint makes a deal for a given content and miner
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var miner = "miner_example"; // String | Miner
var dealRequest = "dealRequest_example"; // String | Deal Request
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealsMakeMinerPost(miner, dealRequest, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
miner | String | Miner | |
dealRequest | String | Deal Request |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Get Deal Status
This endpoint returns the status of a deal
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var deal = 56; // Number | Deal ID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.dealsStatusDealGet(deal, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
deal | Number | Deal ID |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Get storage failures
This endpoint returns a list of storage failures
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.publicDealsFailuresGet(callback);
Parameters
This endpoint does not need any parameter.
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Query Ask
This endpoint returns the ask for a given CID
Example
var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';
var apiInstance = new EstuaryClient.DealsApi();
var miner = "miner_example"; // String | CID
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.publicMinersStorageQueryMinerGet(miner, callback);
Parameters
Name | Type | Description | Notes |
---|---|---|---|
miner | String | CID |
Return type
null (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json