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 d79c23e4a..9461a2271 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -9878,16 +9878,179 @@ export const restApiDocsData = [ }, { type: "category", - category: "accelerator", - fragment: "accelerator", - title: "Accelerator", + category: "accelerator-public", + fragment: "accelerator-public", + title: "Accelerator (Public)", showConditions: [""], options: { officialOnly: true }, }, { options: { officialOnly: true }, type: "endpoint", - category: "accelerator", + category: "accelerator-public", + httpRequestMethod: "POST", + fragment: "accelerator-estimate", + title: "POST Calculate Estimated Costs", + description: { + default: "
Returns estimated costs to accelerate a transaction. Optionally set the api_key
header to get customized estimation.
Returns all transactions currently being accelerated.
" + }, + 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-public", + httpRequestMethod: "GET", + fragment: "accelerator-public-history", + title: "GET Acceleration History", + description: { + default: `Returns all past accelerated transactions. + Filters can be applied:
status
: all
, requested
, accelerating
, mined
, completed
, failed
timeframe
: 24h
, 3d
, 1w
, 1m
, 3m
, 6m
, 1y
, 2y
, 3y
, 4y
, all
poolUniqueId
: any id from https://github.com/mempool/mining-pools/blob/master/pools-v2.json. Note: This will return all acceleration requests accepted by the pool but the the listed transactions may have been mined by another pool.
+ blockHash
: a block hash
+ blockHeight
: a block height
+ page
: the requested page number if using pagination (min: 1)
+ pageLength
: the page lenght if using pagination (min: 1, max: 50)
+ Returns estimated costs to accelerate a transaction.
" - }, - urlString: "/v1/services/accelerator/estimate", - showConditions: [""], - showJsExamples: showJsExamplesDefaultFalse, - codeExample: { - default: { - codeTemplate: { - curl: `%{1}" "[[hostname]][[baseNetworkUrl]]/api/v1/services/accelerator/estimate`, //custom interpolation technique handled in replaceCurlPlaceholder() - commonJS: ``, - esModule: `` - }, - codeSampleMainnet: { - esModule: [], - commonJS: [], - curl: ["txInput=ee13ebb99632377c15c94980357f674d285ac413452050031ea6dcd3e9b2dc29"], - headers: "api_key: stacksats", - response: `{ - "txSummary": { - "txid": "ee13ebb99632377c15c94980357f674d285ac413452050031ea6dcd3e9b2dc29", - "effectiveVsize": 154, - "effectiveFee": 154, - "ancestorCount": 1 - }, - "cost": 3850, - "targetFeeRate": 26, - "nextBlockFee": 4004, - "userBalance": 99900000, - "mempoolBaseFee": 40000, - "vsizeFee": 50000, - "hasAccess": true -}`, - }, - } - } - }, - { - options: { officialOnly: true }, - type: "endpoint", - category: "accelerator", + category: "accelerator-private", httpRequestMethod: "POST", fragment: "accelerator-accelerate", title: "POST Accelerate A Transaction", @@ -10043,10 +10162,10 @@ export const restApiDocsData = [ { options: { officialOnly: true }, type: "endpoint", - category: "accelerator", + category: "accelerator-private", httpRequestMethod: "GET", fragment: "accelerator-history", - title: "GET Private Acceleration History", + title: "GET Acceleration History", description: { default: "Returns the user's past 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.
Returns all transactions currently being accelerated.
" - }, - 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 Public Acceleration History", - description: { - default: `Returns all past accelerated transactions. - Filters can be applied:
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
-