Skip to content

Commit

Permalink
chore: added debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Jul 10, 2024
1 parent 8cac975 commit 1fee814
Show file tree
Hide file tree
Showing 7 changed files with 236 additions and 2 deletions.
4 changes: 4 additions & 0 deletions api-reference/debug/canceltx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Cancel Transaction
openapi: post /v1/debug/cancel_transaction/{txHash}
---
4 changes: 4 additions & 0 deletions api-reference/debug/pendingtxs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title : Pending Transactions
openapi: get /v1/debug/pending_transactions
---
4 changes: 4 additions & 0 deletions api-reference/debug/topology.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Topology
openapi: get /v1/debug/topology
---
2 changes: 1 addition & 1 deletion bidder-openapi-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.0",
"info": {
"title": "Bidder API",
"version": "1.0.0-alpha-oas3",
"version": "1.0.0",
"license": {
"name": "Business Source License 1.1",
"url": "https://github.com/primev/mev-commit/blob/main/LICENSE"
Expand Down
214 changes: 214 additions & 0 deletions debug-openapi-spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
{
"openapi" : "3.0.0",
"info" : {
"title" : "Debug API",
"version" : "1.0.0",
"license" : {
"name" : "Business Source License 1.1",
"url" : "https://github.com/primev/mev-commit/blob/main/LICENSE"
}
},
"paths" : {
"/v1/debug/cancel_transaction/{txHash}" : {
"post" : {
"summary" : "CancelTransaction",
"description" : "CancelTransaction is called by the provider to cancel a transaction sent from this wallet.",
"operationId" : "DebugService_CancelTransaction",
"responses" : {
"200" : {
"description" : "A successful response.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/v1CancelTransactionResponse"
}
}
}
},
"default" : {
"description" : "An unexpected error response.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/googlerpcStatus"
}
}
}
}
},
"parameters" : [ {
"name" : "txHash",
"description" : "Hex string encoding of the hash of the transaction that the bidder wants to cancel.",
"in" : "path",
"required" : true,
"schema" : {
"type" : "string"
}
} ]
}
},
"/v1/debug/pending_transactions" : {
"get" : {
"summary" : "GetPendingTransactions",
"description" : "GetPendingTransactions is called by the provider to get the pending transactions for the wallet.",
"operationId" : "DebugService_GetPendingTransactions",
"responses" : {
"200" : {
"description" : "A successful response.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/v1PendingTransactionsResponse"
}
}
}
},
"default" : {
"description" : "An unexpected error response.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/googlerpcStatus"
}
}
}
}
}
}
},
"/v1/debug/topology" : {
"get" : {
"summary" : "GetTopology",
"description" : "GetTopology is called by the user to get the topology of the node. The topology\nincludes connectivity information about the node.",
"operationId" : "DebugService_GetTopology",
"responses" : {
"200" : {
"description" : "A successful response.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/v1TopologyResponse"
}
}
}
},
"default" : {
"description" : "An unexpected error response.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/googlerpcStatus"
}
}
}
}
}
}
}
},
"components" : {
"schemas" : {
"googlerpcStatus" : {
"type" : "object",
"properties" : {
"code" : {
"type" : "integer",
"format" : "int32"
},
"message" : {
"type" : "string"
},
"details" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/protobufAny"
}
}
}
},
"protobufAny" : {
"type" : "object",
"properties" : {
"@type" : {
"type" : "string"
}
},
"additionalProperties" : { }
},
"protobufNullValue" : {
"type" : "string",
"description" : "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`."
},
"v1CancelTransactionResponse" : {
"type" : "object",
"example" : {
"txHash" : "71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8"
},
"properties" : {
"txHash" : {
"type" : "string",
"description" : "Hex string encoding of the hash of the transaction that the bidder wants to cancel.",
"pattern" : "[a-fA-F0-9]{64}"
}
},
"description" : "Hash of the cancellation transaction request.",
"title" : "Cancel response",
"required" : [ "txHash" ]
},
"v1PendingTransactionsResponse" : {
"type" : "object",
"properties" : {
"pendingTransactions" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/v1TransactionInfo"
},
"description" : "List of pending transactions in the provider provider_registry."
}
},
"description" : "Transaction info returned by the provider.",
"title" : "Pending transactions list",
"required" : [ "pendingTransactions" ]
},
"v1TopologyResponse" : {
"type" : "object",
"properties" : {
"topology" : {
"type" : "object",
"description" : "Topology of the node."
}
},
"description" : "Topology of the node.",
"title" : "Topology",
"required" : [ "topology" ]
},
"v1TransactionInfo" : {
"type" : "object",
"example" : {
"created" : "2009-11-10 23:00:00 +0000 UTC m=+0.000000001",
"nonce" : 1234,
"txHash" : "71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8"
},
"properties" : {
"txHash" : {
"type" : "string",
"description" : "Hex string encoding of the hash of the transaction that the bidder wants to include in the block.",
"pattern" : "[a-fA-F0-9]{64}"
},
"nonce" : {
"type" : "string",
"format" : "int64",
"description" : "Nonce used for the transaction."
},
"created" : {
"type" : "string",
"description" : "Time when the transaction was created."
}
},
"description" : "Transaction info returned by the provider.",
"title" : "Transaction info",
"required" : [ "txHash", "nonce", "created" ]
}
}
}
}
8 changes: 8 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@
"api-reference/bidder/cancelautodeposit",
"api-reference/bidder/cancelandwithdrawad"
]
},
{
"group": "Debug",
"pages": [
"api-reference/debug/canceltx",
"api-reference/debug/pendingtxs",
"api-reference/debug/topology"
]
}
],
"footerSocials": {
Expand Down
2 changes: 1 addition & 1 deletion provider-openapi-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi": "3.0.0",
"info": {
"title": "Provider API",
"version": "1.0.0-alpha-oas3",
"version": "1.0.0",
"license": {
"name": "Business Source License 1.1",
"url": "https://github.com/primev/mev-commit/blob/main/LICENSE"
Expand Down

0 comments on commit 1fee814

Please sign in to comment.