Skip to content

Commit

Permalink
docs: endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Jan 3, 2024
1 parent 2700642 commit b64a131
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/api/mempool/get-fee-priorities.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"all": {
"no_priority": 3000,
"low_priority": 3000,
"medium_priority": 6000,
"high_priority": 401199
},
"token_transfer": {
"no_priority": 3000,
"low_priority": 3000,
"medium_priority": 6000,
"high_priority": 401199
},
"smart_contract": {
"no_priority": 837500,
"low_priority": 925000,
"medium_priority": 1012500,
"high_priority": 1082500
},
"contract_call": {
"no_priority": 3000,
"low_priority": 10368,
"medium_priority": 100000,
"high_priority": 1000000
}
}
107 changes: 107 additions & 0 deletions docs/api/mempool/get-fee-priorities.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"description": "GET request that returns fee priorities from mempool transactions",
"title": "MempoolFeePriorities",
"type": "object",
"additionalProperties": false,
"required": [
"all"
],
"properties": {
"all": {
"type": "object",
"additionalProperties": false,
"required": [
"no_priority",
"low_priority",
"medium_priority",
"high_priority"
],
"properties": {
"no_priority": {
"type": "integer"
},
"low_priority": {
"type": "integer"
},
"medium_priority": {
"type": "integer"
},
"high_priority": {
"type": "integer"
}
}
},
"token_transfer": {
"type": "object",
"additionalProperties": false,
"required": [
"no_priority",
"low_priority",
"medium_priority",
"high_priority"
],
"properties": {
"no_priority": {
"type": "integer"
},
"low_priority": {
"type": "integer"
},
"medium_priority": {
"type": "integer"
},
"high_priority": {
"type": "integer"
}
}
},
"smart_contract": {
"type": "object",
"additionalProperties": false,
"required": [
"no_priority",
"low_priority",
"medium_priority",
"high_priority"
],
"properties": {
"no_priority": {
"type": "integer"
},
"low_priority": {
"type": "integer"
},
"medium_priority": {
"type": "integer"
},
"high_priority": {
"type": "integer"
}
}
},
"contract_call": {
"type": "object",
"additionalProperties": false,
"required": [
"no_priority",
"low_priority",
"medium_priority",
"high_priority"
],
"properties": {
"no_priority": {
"type": "integer"
},
"low_priority": {
"type": "integer"
},
"medium_priority": {
"type": "integer"
},
"high_priority": {
"type": "integer"
}
}
}
}
}
30 changes: 30 additions & 0 deletions docs/generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export type SchemaMergeRootStub =
| GetStxSupplyLegacyFormatResponse
| GetStxTotalSupplyPlainResponse
| GetStxSupplyResponse
| MempoolFeePriorities
| MicroblockListResponse
| UnanchoredTransactionListResponse
| RosettaAccountBalanceRequest
Expand Down Expand Up @@ -1694,6 +1695,35 @@ export interface GetStxSupplyResponse {
*/
block_height: number;
}
/**
* GET request that returns fee priorities from mempool transactions
*/
export interface MempoolFeePriorities {
all: {
no_priority: number;
low_priority: number;
medium_priority: number;
high_priority: number;
};
token_transfer?: {
no_priority: number;
low_priority: number;
medium_priority: number;
high_priority: number;
};
smart_contract?: {
no_priority: number;
low_priority: number;
medium_priority: number;
high_priority: number;
};
contract_call?: {
no_priority: number;
low_priority: number;
medium_priority: number;
high_priority: number;
};
}
/**
* GET request that returns microblocks
*/
Expand Down
20 changes: 20 additions & 0 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ tags:
externalDocs:
description: Hiro Documentation - Transactions
url: https://docs.hiro.so/get-started/transactions
- name: Mempool
description: Endpoints to obtain Mempool information

paths:
/extended/v1/faucets/stx:
Expand Down Expand Up @@ -296,6 +298,24 @@ paths:
example:
$ref: ./api/transaction/get-mempool-transactions.example.json

/extended/v2/mempool/fees:
get:
summary: Get mempool transaction fee priorities
tags:
- Mempool
operationId: get_mempool_fee_priorities
description: |
Returns estimated fee priorities (in micro-STX) for all transactions that are currently in the mempool. Also returns priorities separated by transaction type.
responses:
200:
description: Mempool fee priorities
content:
application/json:
schema:
$ref: ./api/transaction/get-mempool-transactions.schema.json
example:
$ref: ./api/transaction/get-mempool-transactions.example.json

/extended/v1/tx/mempool/dropped:
get:
summary: Get dropped mempool transactions
Expand Down

0 comments on commit b64a131

Please sign in to comment.