Repository navigation
Expand file tree
/
Copy pathrpc.http
More file actions
385 lines (318 loc) · 6.79 KB
/
Copy pathrpc.http
File metadata and controls
385 lines (318 loc) · 6.79 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
# 使用VScode插件:`REST Client`
@url = https://httprentgpu.dbcwallet.io:9002
@url2 = https://httpinfo.dbcwallet.io
@controller = 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
@stash = 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY
@machine_id = d43aab0afce785c28105b79785f377363781892d4c3fdc5f1f2049c16fb26c42
@renter = 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY
@committee = 5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY
###
# 1.1 查询某个资金账户控制的所有机器
# 参数:[资金账户 (stash account)]
POST {{url2}} HTTP/1.1
content-type: application/json
{
"jsonrpc":"2.0",
"id":1,
"method":"onlineProfile_getStakerInfo",
"params": ["{{stash}}"]
}
###
# 1.2 查询机器某个 Era 获得收益
# 参数:[机器ID,EraIndex]
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getMachineEraReward",
"params": ["{{machine_id}}", 1]
}
###
# 1.3 查询机器某个 Era 解锁收益
# 参数:[机器ID,EraIndex]
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getMachineEraReleasedReward",
"params": ["{{machine_id}}", 1]
}
###
# 1.4 查询资金账户某个 Era 获得收益
# 参数:[资金账户,EraIndex]
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getStashEraReward",
"params": ["{{stash}}", 1]
}
###
# 1.5. 查询资金账户某个 Era 解锁奖励
# 参数:[资金账户,EraIndex]
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getStashEraReward",
"params": ["{{stash}}", 1]
}
###
# 1.6. 查询机器详细信息
# 参数:[机器ID]
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc":"2.0",
"id":1,
"method":"onlineProfile_getMachineInfo",
"params": ["{{machine_id}}"]
}
###
# 1.7. 查看矿工个数
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getStakerNum",
"params": []
}
###
# 1.8. 查看所有机器列表
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getMachineList",
"params": []
}
###
# 1.9 查看 onlineProfile 模块统计信息
POST {{url2}} HTTP/1.1
content-type: application/json
{
"jsonrpc":"2.0",
"id":1,
"method":"onlineProfile_getOpInfo",
"params": []
}
###
# 1.10 获取账户链上身份
# 参数:[账户]
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getStakerIdentity",
"params": ["{{stash}}"]
}
###
# 1.11 获取矿工统计信息
# 参数:[pageIndex, count]
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getStakerListInfo",
"params": [0, 5]
}
###
# 1.12 按位置获取统计信息
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineProfile_getPosGpuInfo",
"params": []
}
###
# 2.1 committee_getCommitteeList
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "committee_getCommitteeList",
"params": []
}
###
# 3.1 获取机器分配的委员会列表
# 参数:[机器ID]
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc":"2.0",
"id":1,
"method":"onlineCommittee_getMachineCommitteeList",
"params": ["{{machine_id}}"]
}
###
# 3.2 获取委员会对机器的审核时间
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineCommittee_getCommitteeOps",
"params": ["{{committee}}", "{{machine_id}}"]
}
###
# 3.3 获取委员会所有派单的机器列表
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "onlineCommittee_getCommitteeMachineList",
"params": ["{{committee}}"]
}
###
# 4.1 查看机器的租用信息
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "rentMachine_getRentOrder",
"params": [1]
}
###
# 4.2 查看某个账户租用的机器列表
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "rentMachine_getRentList",
"params": ["{{renter}}"]
}
# 新增API
###
# 返回是否是机器租用人
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "rentMachine_isMachineRenter",
"params": ["{{machine_id}}", "{{renter}}"]
}
###
# 获取机器对应的租用ID
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "rentMachine_getMachineRentId",
"params": ["{{machine_id}}"]
}
###
# 5.1 获取 delegated-staking Agent 账本(SCALE bytes)
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_getDelegatedAgent",
"params": ["{{stash}}"]
}
###
# 5.2 获取 delegated-staking Delegator 状态(SCALE bytes)
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_getDelegatorState",
"params": ["{{renter}}"]
}
###
# 5.3 获取 delegated-staking Agent 数量
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_getDelegatedAgentCount",
"params": []
}
###
# 5.4 获取 delegated-staking 总委托额
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_getTotalDelegatedStake",
"params": []
}
###
# 5.5 列举 delegated-staking Agent(返回 SCALE bytes)
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_listDelegatedAgents",
"params": [20]
}
###
# 5.6 列举某 Agent 的 delegator(返回 SCALE bytes)
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_listAgentDelegators",
"params": ["{{stash}}", 20]
}
###
# 5.7 查询 stash 对应 legacy controller
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_getLegacyController",
"params": ["{{stash}}"]
}
###
# 5.8 查询 controller 对应 legacy stash
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_getLegacyStash",
"params": ["{{stash}}"]
}
###
# 5.9 列举 legacy stash/controller 对(返回 SCALE bytes)
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_listLegacyControllerPairs",
"params": [20]
}
###
# 5.10 查询 legacy stash/controller 对总数
POST {{url}} HTTP/1.1
content-type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "dbc3_getLegacyControllerCount",
"params": []
}