From 740f9af9af4574cfe03e6b092ef64f09dfead3ea Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sat, 10 Feb 2024 11:40:19 +0100 Subject: [PATCH] [doc] additional rest api doc for accelerator --- .../src/app/docs/api-docs/api-docs-data.ts | 123 +++++++++++++++++- 1 file changed, 117 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index d2cfc0926..621f14595 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -9885,7 +9885,7 @@ export const restApiDocsData = [ type: "endpoint", category: "accelerator", httpRequestMethod: "GET", - fragment: "get-deposit-history", + fragment: "accelerator-deposit-history", title: "GET Deposit History", description: { default: "
Returns a list of deposits made as prepayment for the accelerator service.
" @@ -9933,7 +9933,7 @@ export const restApiDocsData = [ type: "endpoint", category: "accelerator", httpRequestMethod: "GET", - fragment: "balance", + fragment: "accelerator-balance", title: "GET Available Balance", description: { default: "Returns your currently available balance, currently locked funds, and total fees paid so far.
" @@ -9967,7 +9967,7 @@ export const restApiDocsData = [ type: "endpoint", category: "accelerator", httpRequestMethod: "POST", - fragment: "estimate", + fragment: "accelerator-estimate", title: "POST Calculate Estimated Costs", description: { default: "Returns estimated costs to accelerate a transaction.
" @@ -10011,7 +10011,7 @@ export const restApiDocsData = [ type: "endpoint", category: "accelerator", httpRequestMethod: "POST", - fragment: "accelerate", + fragment: "accelerator-accelerate", title: "POST Accelerate A Transaction", description: { default: "Send a request to accelerate a transaction.
" @@ -10039,9 +10039,9 @@ export const restApiDocsData = [ { options: { officialOnly: true }, type: "endpoint", - category: "history", + category: "accelerator", httpRequestMethod: "GET", - fragment: "history", + fragment: "accelerator-history", title: "GET Acceleration History", description: { default: "Return the history of previous acceleration requests.
Pass one of the following for :status
: all
, requested
, accelerating
, mined
, completed
, failed
.
Pass true
in :details
to get a detailed history
of the acceleration request.
Return the list of currently accelerated transactions.
" + }, + urlString: "/v1/services/accelerator/accelerations", + showConditions: [""], + showJsExamples: showJsExamplesDefaultFalse, + codeExample: { + default: { + codeTemplate: { + curl: `/api/v1/services/accelerator/accelerations`, + commonJS: ``, + esModule: `` + }, + codeSampleMainnet: { + esModule: [], + commonJS: [], + curl: [], + headers: '', + response: `[ + { + "txid": "8a183c8ae929a2afb857e7f2acd440aaefdf2797f8f7eab1c5f95ff8602abc81", + "added": 1707558316, + "feeDelta": 3500, + "effectiveVsize": 111, + "effectiveFee": 1671, + "pools": [ + 111 + ] + }, + { + "txid": "6097f295e21bdd8d725bd8d9ad4dd72b05bd795dc648bfef52150a9b2b7f7a45", + "added": 1707560464, + "feeDelta": 60000, + "effectiveVsize": 812, + "effectiveFee": 7790, + "pools": [ + 111 + ] + } +]`, + }, + } + } + }, + { + options: { officialOnly: true }, + type: "endpoint", + category: "accelerator", + httpRequestMethod: "GET", + fragment: "accelerator-public-history", + title: "GET Acceleration History", + description: { + default: `Return a list of accelerated transactions. + Filters can be applied such as
status
: all
, requested
, accelerating
, mined
, completed
, failed
timeframe
: 24h
, 3d
, 1w
, 1m
, 3m
, 6m
, 1y
, 2y
, 3y
, all
poolUniqueId
: any id from https://github.com/mempool/mining-pools/blob/master/pools-v2.json
+ blockHash
: a block hash
+ blockHeight
: a block height
+ page
: the requested page number if using pagination
+ pageLength
: the page lenght if using pagination
+