forked from NethermindEth/juno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjuno_rpc_api.json
103 lines (103 loc) · 3.65 KB
/
juno_rpc_api.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"openrpc": "1.3.2",
"info": {
"title": "Juno RPC API",
"version": "0.1",
"description": "Provides additional (Juno specific) methods over and above the Starknet RPC API"
},
"methods": [
{
"name": "juno_version",
"summary": "The version of the Juno node hosting this API.",
"params": [],
"result": {
"name": "Juno node version",
"required": true,
"schema": {
"type": "string",
"description": "A semver-compatible version string"
}
}
},
{
"name": "juno_getTransactionStatus",
"description": "This method returns the current status of a transaction. The status is comprised of both finality and execution statuses",
"params": [
{
"name": "transaction_hash",
"description": "The hash of the requested transaction",
"required": true,
"schema": {
"$ref": "#/components/schemas/TXN_HASH"
}
}
],
"result": {
"name": "transaction status",
"required": true,
"schema": {
"type": "object",
"description": "Contains both finality and execution statuses of the requested transaction",
"properties": {
"finality_status": {
"title": "Transaction finality status",
"$ref": "#/components/schemas/TX_FINALITY_STATUS"
},
"execution_status": {
"title": "Transaction execution status",
"$ref": "#/components/schemas/TX_EXECUTION_STATUS"
}
},
"required": [
"finality_status",
"execution_status"
]
}
},
"errors": [
{
"$ref": "#/components/errors/INTERNAL_ERROR"
}
]
}
],
"components": {
"contentDescriptors": {},
"schemas": {
"FELT": {
"type": "string",
"title": "Field element",
"$comment": "A field element, represented as a string of hex digits",
"description": "A field element represented as a string of hex digits with a 0x prefix and up-to 63 hex digits",
"pattern": "^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,62})$"
},
"TXN_HASH": {
"$ref": "#/components/schemas/FELT",
"description": "The transaction hash, as assigned in Starknet",
"title": "A transaction's hash"
},
"TX_FINALITY_STATUS": {
"type": "string",
"enum": [
"ACCEPTED_ON_L1",
"ACCEPTED_ON_L2"
],
"description": "The finality status of the transaction"
},
"TX_EXECUTION_STATUS": {
"type": "string",
"enum": [
"SUCCEEDED",
"REVERTED"
],
"description": "The execution status of the transaction"
}
},
"errors": {
"INTERNAL_ERROR": {
"code": -32603,
"message": "Internal Error"
}
}
}
}