EstuaryClient.DealsApi
All URIs are relative to //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 |
dealTransferStatusPost | POST /deal/transfer/status | Transfer Status |
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 |
dealEstimatePost
'String' dealEstimatePost(body)
Estimate the cost of a deal
This endpoint estimates the cost of a deal
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let body = new EstuaryClient.ApiEstimateDealBody(); // ApiEstimateDealBody | The size of the deal in bytes, the replication factor, and the duration of the deal in blocks
apiInstance.dealEstimatePost(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | ApiEstimateDealBody | The size of the deal in bytes, the replication factor, and the duration of the deal in blocks |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: /
- Accept: application/json
dealInfoDealidGet
'String' dealInfoDealidGet(dealid)
Get Deal Info
This endpoint returns the deal info for a deal
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let dealid = 56; // Number | Deal ID
apiInstance.dealInfoDealidGet(dealid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
dealid | Number | Deal ID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
dealProposalPropcidGet
'String' dealProposalPropcidGet(propcid)
Get Proposal
This endpoint returns the proposal for a deal
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let propcid = "propcid_example"; // String | Proposal CID
apiInstance.dealProposalPropcidGet(propcid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
propcid | String | Proposal CID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
dealQueryMinerGet
'String' dealQueryMinerGet(miner)
Query Ask
This endpoint returns the ask for a given CID
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let miner = "miner_example"; // String | CID
apiInstance.dealQueryMinerGet(miner, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
miner | String | CID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
dealStatusByProposalPropcidGet
'String' dealStatusByProposalPropcidGet(propcid)
Get Deal Status by PropCid
Get Deal Status by PropCid
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let propcid = "propcid_example"; // String | PropCid
apiInstance.dealStatusByProposalPropcidGet(propcid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
propcid | String | PropCid |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
dealStatusMinerPropcidGet
'String' dealStatusMinerPropcidGet(miner, propcid)
Deal Status
This endpoint returns the status of a deal
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let miner = "miner_example"; // String | Miner
let propcid = "propcid_example"; // String | Proposal CID
apiInstance.dealStatusMinerPropcidGet(miner, propcid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
miner | String | Miner | |
propcid | String | Proposal CID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
dealTransferInProgressGet
'String' dealTransferInProgressGet()
Transfer In Progress
This endpoint returns the in-progress transfers
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
apiInstance.dealTransferInProgressGet((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
This endpoint does not need any parameter.
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
dealTransferStatusPost
'String' dealTransferStatusPost(body)
Transfer Status
This endpoint returns the status of a transfer
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let body = new EstuaryClient.ApiChannelIDParam(); // ApiChannelIDParam | Channel ID
apiInstance.dealTransferStatusPost(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | ApiChannelIDParam | Channel ID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: /
- Accept: application/json
dealsFailuresGet
'String' dealsFailuresGet()
Get storage failures for user
This endpoint returns a list of storage failures for user
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
apiInstance.dealsFailuresGet((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
This endpoint does not need any parameter.
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
dealsMakeMinerPost
'String' dealsMakeMinerPost(body, miner)
Make Deal
This endpoint makes a deal for a given content and miner
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let body = "body_example"; // String | Deal Request
let miner = "miner_example"; // String | Miner
apiInstance.dealsMakeMinerPost(body, miner, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | String | Deal Request | |
miner | String | Miner |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: /
- Accept: application/json
dealsStatusDealGet
'String' dealsStatusDealGet(deal)
Get Deal Status
This endpoint returns the status of a deal
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let deal = 56; // Number | Deal ID
apiInstance.dealsStatusDealGet(deal, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
deal | Number | Deal ID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
publicDealsFailuresGet
'String' publicDealsFailuresGet()
Get storage failures
This endpoint returns a list of storage failures
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
apiInstance.publicDealsFailuresGet((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
This endpoint does not need any parameter.
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
publicMinersStorageQueryMinerGet
'String' publicMinersStorageQueryMinerGet(miner)
Query Ask
This endpoint returns the ask for a given CID
Example
import {EstuaryClient} from 'estuary-client';
let defaultClient = EstuaryClient.ApiClient.instance;
// Configure API key authorization: bearerAuth
let 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';
let apiInstance = new EstuaryClient.DealsApi();
let miner = "miner_example"; // String | CID
apiInstance.publicMinersStorageQueryMinerGet(miner, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Parameters
Name | Type | Description | Notes |
---|---|---|---|
miner | String | CID |
Return type
'String'
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json