Skip to content

Commit 70c342b

Browse files
committed
fix: add @shardeum-foundation/api-specs and rpc.discover support
1 parent 5cc205e commit 70c342b

File tree

3 files changed

+15
-22
lines changed

3 files changed

+15
-22
lines changed

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
2727
"author": "thantsintoe",
2828
"license": "ISC",
2929
"dependencies": {
30-
"@shardeum-foundation/lib-archiver-discovery": "1.3.0-prerelease.1",
31-
"@shardeum-foundation/lib-crypto-utils": "4.3.0-prerelease.1",
32-
"@shardeum-foundation/lib-types": "1.4.0-prerelease.2",
3330
"@ethereumjs/rlp": "5.0.2",
3431
"@ethereumjs/tx": "3.4.0",
3532
"@ethereumjs/util": "9.0.2",
3633
"@ethersproject/bignumber": "5.7.0",
3734
"@hapi/sntp": "4.0.0",
35+
"@shardeum-foundation/api-specs": "^1.0.1",
36+
"@shardeum-foundation/lib-archiver-discovery": "1.3.0-prerelease.1",
37+
"@shardeum-foundation/lib-crypto-utils": "4.3.0-prerelease.1",
38+
"@shardeum-foundation/lib-types": "1.4.0-prerelease.2",
3839
"axios": "1.6.1",
3940
"better-sqlite3": "7.6.2",
4041
"body-parser": "1.19.0",

src/methods/rpcDiscover.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1-
const openRPCDocument = {
2-
openrpc: '1.2.4',
3-
info: {
4-
title: 'Shardeum JSON RPC',
5-
version: '1.0',
6-
description: 'Shardeum JSON RPC',
7-
contact: {
8-
name: 'Shardeum',
9-
url: 'https://shardeum.org',
10-
}
11-
},
12-
servers: [
13-
{
14-
url: 'https://api.shardeum.org',
15-
}
16-
],
17-
methods: []
18-
}
1+
import ShardeumOpenRPCDocument from "@shardeum-foundation/api-specs"
192

203
const rpcDiscover = async (): Promise<unknown> => {
21-
return openRPCDocument
4+
return ShardeumOpenRPCDocument
225
}
236

247
export default rpcDiscover

0 commit comments

Comments
 (0)