Skip to content

Commit bf8241d

Browse files
authored
docs(tx): fmt (#30)
1 parent 1ea604c commit bf8241d

11 files changed

+210
-415
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
build/
12
node_modules
23
.next
34
.DS_Store
@@ -6,4 +7,6 @@ dist
67
examples
78
.docusaurus
89
.cache-loader
9-
packages
10+
packages
11+
tmp/
12+

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "external/libsushi"]
2+
path = external/libsushi
3+
url = https://github.com/manifoldfinance/libsushi

docs/transaction-status.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
2+
title: Transaction Status
3+
description: API Endpoint for Querying your Transaction Status
4+
version: v2022.05
25
sidebar_position: 5
36
---
47

@@ -8,7 +11,10 @@ sidebar_position: 5
811
912
Transactions that you submit to OpenMEV won't be observable in the public mempool.
1013

11-
:::caution This documentation refers to the latest version of OpenMEV ([v2.0.0-draft](#)), which is still being drafted :::
14+
<!-- prettier-ignore -->
15+
:::caution
16+
This documentation refers to the latest version of OpenMEV ([v2.0.0-draft](#)), which is still being drafted
17+
:::
1218

1319
## Potential statuses
1420

@@ -47,7 +53,7 @@ To check the status of your transactions query the OpenMEV API Endpoint. Respons
4753

4854
## Typescript Library
4955

50-
```typescript
56+
```ts twoslash
5157
// @see {@link https://github.com/manifoldfinance/libsushi/blob/master/src/SushiGuard/index.ts}
5258
/**
5359
* @package OpenMevTxState
@@ -63,6 +69,28 @@ To check the status of your transactions query the OpenMEV API Endpoint. Respons
6369
*
6470
*/
6571

72+
/**
73+
* @export
74+
* @interface JsonRpcError
75+
*/
76+
export interface JsonRpcError {
77+
code: number;
78+
message: string;
79+
data?: unknown;
80+
}
81+
82+
/**
83+
* @export
84+
* @interface JsonRpcResponse
85+
* @template T
86+
*/
87+
export interface JsonRpcResponse<T> {
88+
jsonrpc: '2.0';
89+
id?: number | string | null;
90+
result?: T;
91+
error?: JsonRpcError;
92+
}
93+
6694
export enum PrivateTxState {
6795
UNCHECKED = 'UNCHECKED',
6896
PROCESSING = 'PROCESSING',
@@ -87,3 +115,4 @@ export interface PrivateTxStatus {
87115
relayResponses?: RelayResponses;
88116
}
89117
```
118+

docusaurus.config.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
const lightCodeTheme = require('prism-react-renderer/themes/github');
55
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
6+
//require.resolve('docusaurus-plugin-typedoc');
67

78
// With JSDoc @type annotations, IDEs can provide config autocompletion
89
/** @type {import('@docusaurus/types').DocusaurusConfig} */
@@ -19,9 +20,21 @@ module.exports = {
1920
projectName: 'docs',
2021
plugins: [
2122
[
22-
require.resolve('@cmfcmf/docusaurus-search-local'),
23+
'docusaurus-plugin-typedoc',
2324
{
24-
indexBlog: false,
25+
entryPoints: ['./external/libsushi/src/index.ts'],
26+
tsconfig: ['./external/libsushi/tsconfig.json'],
27+
id: "LibSushi",
28+
readme: "none",
29+
out: "api/libsushi",
30+
categorizeByGroup: false,
31+
includeVersion: true,
32+
indexTitle: "LibSushi",
33+
sidebar: {
34+
categoryLabel: "library",
35+
readmeLabel: "library",
36+
collapsed: true,
37+
},
2538
},
2639
],
2740
],

external/libsushi

Submodule libsushi added at 71a07cb

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,20 @@
1717
"typecheck": "tsc"
1818
},
1919
"dependencies": {
20+
"@algolia/client-search": "^4.9.1",
2021
"@cmfcmf/docusaurus-search-local": "^0.10.0",
2122
"@docusaurus/core": "2.0.0-beta.18",
2223
"@docusaurus/preset-classic": "2.0.0-beta.18",
2324
"@mdx-js/react": "^1.6.22",
2425
"clsx": "^1.1.1",
26+
"docusaurus-plugin-typedoc": "^0.17.5",
2527
"docusaurus-preset-shiki-twoslash": "^1.1.37",
2628
"ethers": "^5.6.8",
2729
"prism-react-renderer": "^1.3.1",
2830
"react": "^17.0.2",
29-
"react-dom": "^17.0.2"
31+
"react-dom": "^17.0.2",
32+
"typedoc": "^0.22.15",
33+
"typedoc-plugin-markdown": "^3.12.1"
3034
},
3135
"devDependencies": {
3236
"@docusaurus/module-type-aliases": "2.0.0-beta.18",

0 commit comments

Comments
 (0)