@n1xyz/nord-ts 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen/common.js +1 -1
- package/dist/gen/nord.js +1 -1
- package/dist/idl/bridge.js +237 -10
- package/dist/nord/api/metrics.js +101 -7
- package/dist/nord/api/queries.d.ts +7 -42
- package/dist/nord/api/queries.js +15 -93
- package/dist/nord/client/Nord.d.ts +11 -42
- package/dist/nord/client/Nord.js +13 -52
- package/docs/classes/Nord.html +41 -41
- package/docs/classes/NordError.html +8 -8
- package/docs/classes/NordUser.html +37 -37
- package/docs/classes/NordWebSocketClient.html +34 -34
- package/docs/classes/SolanaBridgeClient.html +22 -22
- package/docs/classes/Subscriber.html +3 -3
- package/docs/enums/FillMode.html +2 -2
- package/docs/enums/KeyType.html +2 -2
- package/docs/enums/MetricPeriod.html +2 -2
- package/docs/enums/PdaSeedType.html +2 -2
- package/docs/enums/PeakTpsPeriodUnit.html +2 -2
- package/docs/enums/Side.html +2 -2
- package/docs/enums/WebSocketMessageType.html +2 -2
- package/docs/functions/actionQueryRollman.html +1 -1
- package/docs/functions/actionsQueryRollman.html +1 -1
- package/docs/functions/aggregateMetrics-1.html +1 -1
- package/docs/functions/assert.html +1 -1
- package/docs/functions/bigIntToProtoU128.html +1 -1
- package/docs/functions/blockQueryRollman.html +1 -1
- package/docs/functions/blockSummaryQueryRollman.html +1 -1
- package/docs/functions/bridgeToBN.html +1 -1
- package/docs/functions/bufferToHex.html +1 -1
- package/docs/functions/cancelOrder.html +1 -1
- package/docs/functions/checkPubKeyLength.html +1 -1
- package/docs/functions/checkedFetch.html +1 -1
- package/docs/functions/createSession.html +1 -1
- package/docs/functions/decodeLengthDelimited.html +1 -1
- package/docs/functions/encodeLengthDelimited.html +1 -1
- package/docs/functions/fillModeToProtoFillMode.html +1 -1
- package/docs/functions/findMarket.html +1 -1
- package/docs/functions/findPda.html +1 -1
- package/docs/functions/findToken.html +1 -1
- package/docs/functions/fromBN.html +1 -1
- package/docs/functions/getAccount.html +1 -1
- package/docs/functions/getActionNonce.html +1 -1
- package/docs/functions/getCurrentTps.html +1 -1
- package/docs/functions/getInfo.html +1 -1
- package/docs/functions/getMedianLatency.html +1 -1
- package/docs/functions/getOrderbook.html +1 -1
- package/docs/functions/getPeakTps.html +1 -1
- package/docs/functions/getTimestamp.html +1 -1
- package/docs/functions/getTotalTransactions.html +1 -1
- package/docs/functions/getTrades.html +1 -1
- package/docs/functions/getUserAccountIds.html +1 -1
- package/docs/functions/hexToBuffer.html +1 -1
- package/docs/functions/initWebSocketClient.html +1 -1
- package/docs/functions/keypairFromPrivateKey.html +1 -1
- package/docs/functions/makeSigningFunction.html +1 -1
- package/docs/functions/makeWalletSignFn.html +1 -1
- package/docs/functions/marketsStats.html +1 -1
- package/docs/functions/optExpect.html +1 -1
- package/docs/functions/optMap.html +1 -1
- package/docs/functions/optUnwrap.html +1 -1
- package/docs/functions/panic.html +1 -1
- package/docs/functions/placeOrder.html +1 -1
- package/docs/functions/queryAction.html +1 -1
- package/docs/functions/queryBlock.html +1 -1
- package/docs/functions/queryLastNBlocks.html +1 -1
- package/docs/functions/queryPrometheus.html +1 -1
- package/docs/functions/queryRecentActions.html +1 -1
- package/docs/functions/queryRecentBlocks.html +1 -1
- package/docs/functions/revokeSession.html +1 -1
- package/docs/functions/shortenPublicKey.html +1 -1
- package/docs/functions/signAction.html +1 -1
- package/docs/functions/toBN.html +1 -1
- package/docs/functions/toScaledU128.html +1 -1
- package/docs/functions/toScaledU64.html +1 -1
- package/docs/functions/transfer.html +1 -1
- package/docs/functions/withdraw.html +1 -1
- package/docs/interfaces/Account.html +2 -2
- package/docs/interfaces/ActionInfo.html +2 -2
- package/docs/interfaces/ActionNonceResponse.html +2 -2
- package/docs/interfaces/ActionQuery.html +2 -2
- package/docs/interfaces/ActionResponse.html +2 -2
- package/docs/interfaces/ActionsExtendedInfo.html +2 -2
- package/docs/interfaces/ActionsQuery.html +2 -2
- package/docs/interfaces/ActionsResponse.html +2 -2
- package/docs/interfaces/AggregateMetrics.html +2 -2
- package/docs/interfaces/BlockFacts.html +5 -5
- package/docs/interfaces/BlockQuery.html +2 -2
- package/docs/interfaces/BlockResponse.html +2 -2
- package/docs/interfaces/BlockSummary.html +2 -2
- package/docs/interfaces/BlockSummaryResponse.html +2 -2
- package/docs/interfaces/DeltaEvent.html +2 -2
- package/docs/interfaces/DepositSplParams.html +5 -5
- package/docs/interfaces/Info.html +2 -2
- package/docs/interfaces/Market.html +2 -2
- package/docs/interfaces/MarketStats.html +2 -2
- package/docs/interfaces/MarketsStatsResponse.html +2 -2
- package/docs/interfaces/NordConfig.html +7 -7
- package/docs/interfaces/NordWebSocketClientEvents.html +2 -2
- package/docs/interfaces/NordWebSocketEvents.html +2 -2
- package/docs/interfaces/Order.html +2 -2
- package/docs/interfaces/OrderInfo.html +2 -2
- package/docs/interfaces/OrderbookEntry.html +2 -2
- package/docs/interfaces/OrderbookQuery.html +2 -2
- package/docs/interfaces/OrderbookResponse.html +2 -2
- package/docs/interfaces/OrderbookSubscription.html +18 -18
- package/docs/interfaces/PerpMarketStats.html +2 -2
- package/docs/interfaces/RollmanActionExtendedInfo.html +2 -2
- package/docs/interfaces/RollmanActionInfo.html +2 -2
- package/docs/interfaces/RollmanActionResponse.html +2 -2
- package/docs/interfaces/RollmanActionsResponse.html +2 -2
- package/docs/interfaces/RollmanBlockResponse.html +2 -2
- package/docs/interfaces/SPLTokenInfo.html +5 -5
- package/docs/interfaces/SolanaBridgeConfig.html +5 -5
- package/docs/interfaces/StateFacts.html +5 -5
- package/docs/interfaces/SubscriberConfig.html +2 -2
- package/docs/interfaces/TimestampResponse.html +2 -2
- package/docs/interfaces/Token.html +2 -2
- package/docs/interfaces/TokenInfo.html +2 -2
- package/docs/interfaces/Trade.html +2 -2
- package/docs/interfaces/TradeSubscription.html +18 -18
- package/docs/interfaces/Trades.html +2 -2
- package/docs/interfaces/TradesQuery.html +2 -2
- package/docs/interfaces/TradesResponse.html +2 -2
- package/docs/interfaces/TransferParams.html +4 -4
- package/docs/interfaces/UserAccountIdsQuery.html +2 -2
- package/docs/interfaces/UserAccountIdsResponse.html +2 -2
- package/docs/interfaces/WebSocketDeltaUpdate.html +2 -2
- package/docs/interfaces/WebSocketSubscription.html +2 -2
- package/docs/interfaces/WebSocketTradeUpdate.html +2 -2
- package/docs/interfaces/WebSocketUserUpdate.html +2 -2
- package/docs/interfaces/WithdrawalClaim.html +7 -7
- package/docs/interfaces/WithdrawalParams.html +4 -4
- package/docs/types/BigIntValue.html +1 -1
- package/docs/types/WebSocketMessage.html +1 -1
- package/docs/variables/DEBUG_KEYS.html +1 -1
- package/docs/variables/DEFAULT_FUNDING_AMOUNTS.html +1 -1
- package/docs/variables/DEV_TOKEN_INFOS.html +1 -1
- package/docs/variables/DEV_URL.html +1 -1
- package/docs/variables/MAX_BUFFER_LEN.html +1 -1
- package/docs/variables/SESSION_TTL.html +1 -1
- package/docs/variables/WEBSERVER_DEV_URL.html +1 -1
- package/docs/variables/ZERO_DECIMAL.html +1 -1
- package/docs/variables/_private.html +1 -1
- package/package.json +1 -1
- package/src/gen/common.ts +1 -1
- package/src/gen/nord.ts +1 -1
- package/src/idl/bridge.ts +238 -11
- package/src/nord/api/queries.ts +16 -113
- package/src/nord/client/Nord.ts +15 -64
- package/test.ts +107 -0
package/dist/nord/api/queries.js
CHANGED
|
@@ -1,72 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryBlock = queryBlock;
|
|
4
|
-
exports.queryLastNBlocks = queryLastNBlocks;
|
|
5
|
-
exports.queryRecentBlocks = queryRecentBlocks;
|
|
6
3
|
exports.queryAction = queryAction;
|
|
7
4
|
exports.queryRecentActions = queryRecentActions;
|
|
8
|
-
exports.
|
|
9
|
-
exports.blockSummaryQueryRollman = blockSummaryQueryRollman;
|
|
5
|
+
exports.getLastActionId = getLastActionId;
|
|
10
6
|
exports.actionQueryRollman = actionQueryRollman;
|
|
11
7
|
exports.actionsQueryRollman = actionsQueryRollman;
|
|
12
8
|
const utils_1 = require("../../utils");
|
|
13
9
|
const NordError_1 = require("../utils/NordError");
|
|
14
|
-
/**
|
|
15
|
-
* Query a specific block
|
|
16
|
-
*
|
|
17
|
-
* @param webServerUrl - Base URL for the Nord web server
|
|
18
|
-
* @param query - Block query parameters
|
|
19
|
-
* @returns Block response
|
|
20
|
-
* @throws {NordError} If the request fails
|
|
21
|
-
*/
|
|
22
|
-
async function queryBlock(webServerUrl, query) {
|
|
23
|
-
try {
|
|
24
|
-
const params = new URLSearchParams();
|
|
25
|
-
if (query.block_number !== undefined) {
|
|
26
|
-
params.append("block_height", query.block_number.toString());
|
|
27
|
-
}
|
|
28
|
-
const response = await (0, utils_1.checkedFetch)(`${webServerUrl}/block?${params.toString()}`);
|
|
29
|
-
return await response.json();
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
throw new NordError_1.NordError("Failed to query block", { cause: error });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Query the last N blocks
|
|
37
|
-
*
|
|
38
|
-
* @param webServerUrl - Base URL for the Nord web server
|
|
39
|
-
* @returns Block response for the last N blocks
|
|
40
|
-
* @throws {NordError} If the request fails
|
|
41
|
-
*/
|
|
42
|
-
async function queryLastNBlocks(webServerUrl) {
|
|
43
|
-
try {
|
|
44
|
-
const response = await (0, utils_1.checkedFetch)(`${webServerUrl}/blocks`);
|
|
45
|
-
return await response.json();
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
throw new NordError_1.NordError("Failed to query last N blocks", { cause: error });
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Query recent blocks
|
|
53
|
-
*
|
|
54
|
-
* @param webServerUrl - Base URL for the Nord web server
|
|
55
|
-
* @param last_n - Number of recent blocks to query
|
|
56
|
-
* @returns Block summary response
|
|
57
|
-
* @throws {NordError} If the request fails
|
|
58
|
-
*/
|
|
59
|
-
async function queryRecentBlocks(webServerUrl, last_n) {
|
|
60
|
-
try {
|
|
61
|
-
const response = await (0, utils_1.checkedFetch)(`${webServerUrl}/blocks_summary?last_n=${last_n}`);
|
|
62
|
-
return await response.json();
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
throw new NordError_1.NordError(`Failed to query recent blocks (last ${last_n})`, {
|
|
66
|
-
cause: error,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
10
|
/**
|
|
71
11
|
* Query a specific action
|
|
72
12
|
*
|
|
@@ -92,57 +32,39 @@ async function queryAction(webServerUrl, query) {
|
|
|
92
32
|
* Query recent actions
|
|
93
33
|
*
|
|
94
34
|
* @param webServerUrl - Base URL for the Nord web server
|
|
95
|
-
* @param
|
|
35
|
+
* @param from - Starting action index
|
|
36
|
+
* @param to - Ending action index
|
|
96
37
|
* @returns Actions response
|
|
97
38
|
* @throws {NordError} If the request fails
|
|
98
39
|
*/
|
|
99
|
-
async function queryRecentActions(webServerUrl,
|
|
40
|
+
async function queryRecentActions(webServerUrl, from, to) {
|
|
100
41
|
try {
|
|
101
|
-
const response = await (0, utils_1.checkedFetch)(`${webServerUrl}/actions?
|
|
42
|
+
const response = await (0, utils_1.checkedFetch)(`${webServerUrl}/actions?from=${from}&to=${to}`);
|
|
102
43
|
return await response.json();
|
|
103
44
|
}
|
|
104
45
|
catch (error) {
|
|
105
|
-
throw new NordError_1.NordError(`Failed to query recent actions (
|
|
46
|
+
throw new NordError_1.NordError(`Failed to query recent actions (from ${from} to ${to})`, {
|
|
106
47
|
cause: error,
|
|
107
48
|
});
|
|
108
49
|
}
|
|
109
50
|
}
|
|
110
51
|
/**
|
|
111
|
-
*
|
|
52
|
+
* Get the last action ID
|
|
112
53
|
*
|
|
113
54
|
* @param webServerUrl - Base URL for the Nord web server
|
|
114
|
-
* @
|
|
115
|
-
* @returns Rollman block response
|
|
55
|
+
* @returns Last action ID
|
|
116
56
|
* @throws {NordError} If the request fails
|
|
117
57
|
*/
|
|
118
|
-
async function
|
|
58
|
+
async function getLastActionId(webServerUrl) {
|
|
119
59
|
try {
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
const response = await (0, utils_1.checkedFetch)(`${webServerUrl}/rollman/block?${params.toString()}`);
|
|
125
|
-
return await response.json();
|
|
60
|
+
const response = await (0, utils_1.checkedFetch)(`${webServerUrl}/last_actionid`);
|
|
61
|
+
const data = await response.json();
|
|
62
|
+
return data.last_actionid;
|
|
126
63
|
}
|
|
127
64
|
catch (error) {
|
|
128
|
-
throw new NordError_1.NordError("Failed to
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Query block summaries from Rollman
|
|
133
|
-
*
|
|
134
|
-
* @param webServerUrl - Base URL for the Nord web server
|
|
135
|
-
* @param last_n - Number of recent blocks to query
|
|
136
|
-
* @returns Block summary response
|
|
137
|
-
* @throws {NordError} If the request fails
|
|
138
|
-
*/
|
|
139
|
-
async function blockSummaryQueryRollman(webServerUrl, last_n) {
|
|
140
|
-
try {
|
|
141
|
-
const response = await (0, utils_1.checkedFetch)(`${webServerUrl}/rollman/blocks_summary?last_n=${last_n}`);
|
|
142
|
-
return await response.json();
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
throw new NordError_1.NordError(`Failed to query Rollman block summaries (last ${last_n})`, { cause: error });
|
|
65
|
+
throw new NordError_1.NordError("Failed to get last action ID", {
|
|
66
|
+
cause: error,
|
|
67
|
+
});
|
|
146
68
|
}
|
|
147
69
|
}
|
|
148
70
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "events";
|
|
2
|
-
import { Account, ActionQuery, ActionResponse, ActionsResponse, AggregateMetrics,
|
|
2
|
+
import { Account, ActionQuery, ActionResponse, ActionsResponse, AggregateMetrics, Info, Market, MarketsStatsResponse, NordConfig, OrderbookQuery, OrderbookResponse, PeakTpsPeriodUnit, RollmanActionResponse, RollmanActionsResponse, Token, TradesQuery, TradesResponse, UserAccountIdsQuery, UserAccountIdsResponse } from "../../types";
|
|
3
3
|
import { NordWebSocketClient } from "../../websocket/index";
|
|
4
4
|
import { OrderbookSubscription, TradeSubscription } from "../models/Subscriber";
|
|
5
5
|
/**
|
|
@@ -116,29 +116,6 @@ export declare class Nord {
|
|
|
116
116
|
* @throws {NordError} If the request fails
|
|
117
117
|
*/
|
|
118
118
|
marketsStats(): Promise<MarketsStatsResponse>;
|
|
119
|
-
/**
|
|
120
|
-
* Query a specific block
|
|
121
|
-
*
|
|
122
|
-
* @param query - Block query parameters
|
|
123
|
-
* @returns Block response
|
|
124
|
-
* @throws {NordError} If the request fails
|
|
125
|
-
*/
|
|
126
|
-
queryBlock(query: BlockQuery): Promise<BlockResponse>;
|
|
127
|
-
/**
|
|
128
|
-
* Query the last N blocks
|
|
129
|
-
*
|
|
130
|
-
* @returns Block response for the last N blocks
|
|
131
|
-
* @throws {NordError} If the request fails
|
|
132
|
-
*/
|
|
133
|
-
queryLastNBlocks(): Promise<BlockResponse>;
|
|
134
|
-
/**
|
|
135
|
-
* Query recent blocks
|
|
136
|
-
*
|
|
137
|
-
* @param last_n - Number of recent blocks to query
|
|
138
|
-
* @returns Block summary response
|
|
139
|
-
* @throws {NordError} If the request fails
|
|
140
|
-
*/
|
|
141
|
-
queryRecentBlocks(last_n: number): Promise<BlockSummaryResponse>;
|
|
142
119
|
/**
|
|
143
120
|
* Query a specific action
|
|
144
121
|
*
|
|
@@ -150,11 +127,19 @@ export declare class Nord {
|
|
|
150
127
|
/**
|
|
151
128
|
* Query recent actions
|
|
152
129
|
*
|
|
153
|
-
* @param
|
|
130
|
+
* @param from - Starting action index
|
|
131
|
+
* @param to - Ending action index
|
|
154
132
|
* @returns Actions response
|
|
155
133
|
* @throws {NordError} If the request fails
|
|
156
134
|
*/
|
|
157
|
-
queryRecentActions(
|
|
135
|
+
queryRecentActions(from: number, to: number): Promise<ActionsResponse>;
|
|
136
|
+
/**
|
|
137
|
+
* Get the last action ID
|
|
138
|
+
*
|
|
139
|
+
* @returns Last action ID
|
|
140
|
+
* @throws {NordError} If the request fails
|
|
141
|
+
*/
|
|
142
|
+
getLastActionId(): Promise<number>;
|
|
158
143
|
/**
|
|
159
144
|
* Fetch aggregate metrics from the Nord API
|
|
160
145
|
*
|
|
@@ -195,22 +180,6 @@ export declare class Nord {
|
|
|
195
180
|
* @throws {NordError} If the request fails
|
|
196
181
|
*/
|
|
197
182
|
getTotalTransactions(): Promise<number>;
|
|
198
|
-
/**
|
|
199
|
-
* Query a block from Rollman
|
|
200
|
-
*
|
|
201
|
-
* @param query - Block query parameters
|
|
202
|
-
* @returns Rollman block response
|
|
203
|
-
* @throws {NordError} If the request fails
|
|
204
|
-
*/
|
|
205
|
-
blockQueryRollman(query: BlockQuery): Promise<RollmanBlockResponse>;
|
|
206
|
-
/**
|
|
207
|
-
* Query block summaries from Rollman
|
|
208
|
-
*
|
|
209
|
-
* @param last_n - Number of recent blocks to query
|
|
210
|
-
* @returns Block summary response
|
|
211
|
-
* @throws {NordError} If the request fails
|
|
212
|
-
*/
|
|
213
|
-
blockSummaryQueryRollman(last_n: number): Promise<BlockSummaryResponse>;
|
|
214
183
|
/**
|
|
215
184
|
* Query an action from Rollman
|
|
216
185
|
*
|
package/dist/nord/client/Nord.js
CHANGED
|
@@ -184,35 +184,6 @@ class Nord {
|
|
|
184
184
|
async marketsStats() {
|
|
185
185
|
return market.marketsStats(this.webServerUrl);
|
|
186
186
|
}
|
|
187
|
-
/**
|
|
188
|
-
* Query a specific block
|
|
189
|
-
*
|
|
190
|
-
* @param query - Block query parameters
|
|
191
|
-
* @returns Block response
|
|
192
|
-
* @throws {NordError} If the request fails
|
|
193
|
-
*/
|
|
194
|
-
async queryBlock(query) {
|
|
195
|
-
return queries.queryBlock(this.webServerUrl, query);
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Query the last N blocks
|
|
199
|
-
*
|
|
200
|
-
* @returns Block response for the last N blocks
|
|
201
|
-
* @throws {NordError} If the request fails
|
|
202
|
-
*/
|
|
203
|
-
async queryLastNBlocks() {
|
|
204
|
-
return queries.queryLastNBlocks(this.webServerUrl);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Query recent blocks
|
|
208
|
-
*
|
|
209
|
-
* @param last_n - Number of recent blocks to query
|
|
210
|
-
* @returns Block summary response
|
|
211
|
-
* @throws {NordError} If the request fails
|
|
212
|
-
*/
|
|
213
|
-
async queryRecentBlocks(last_n) {
|
|
214
|
-
return queries.queryRecentBlocks(this.webServerUrl, last_n);
|
|
215
|
-
}
|
|
216
187
|
/**
|
|
217
188
|
* Query a specific action
|
|
218
189
|
*
|
|
@@ -226,12 +197,22 @@ class Nord {
|
|
|
226
197
|
/**
|
|
227
198
|
* Query recent actions
|
|
228
199
|
*
|
|
229
|
-
* @param
|
|
200
|
+
* @param from - Starting action index
|
|
201
|
+
* @param to - Ending action index
|
|
230
202
|
* @returns Actions response
|
|
231
203
|
* @throws {NordError} If the request fails
|
|
232
204
|
*/
|
|
233
|
-
async queryRecentActions(
|
|
234
|
-
return queries.queryRecentActions(this.webServerUrl,
|
|
205
|
+
async queryRecentActions(from, to) {
|
|
206
|
+
return queries.queryRecentActions(this.webServerUrl, from, to);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Get the last action ID
|
|
210
|
+
*
|
|
211
|
+
* @returns Last action ID
|
|
212
|
+
* @throws {NordError} If the request fails
|
|
213
|
+
*/
|
|
214
|
+
async getLastActionId() {
|
|
215
|
+
return queries.getLastActionId(this.webServerUrl);
|
|
235
216
|
}
|
|
236
217
|
/**
|
|
237
218
|
* Fetch aggregate metrics from the Nord API
|
|
@@ -283,26 +264,6 @@ class Nord {
|
|
|
283
264
|
async getTotalTransactions() {
|
|
284
265
|
return metrics.getTotalTransactions(this.webServerUrl);
|
|
285
266
|
}
|
|
286
|
-
/**
|
|
287
|
-
* Query a block from Rollman
|
|
288
|
-
*
|
|
289
|
-
* @param query - Block query parameters
|
|
290
|
-
* @returns Rollman block response
|
|
291
|
-
* @throws {NordError} If the request fails
|
|
292
|
-
*/
|
|
293
|
-
async blockQueryRollman(query) {
|
|
294
|
-
return queries.blockQueryRollman(this.webServerUrl, query);
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Query block summaries from Rollman
|
|
298
|
-
*
|
|
299
|
-
* @param last_n - Number of recent blocks to query
|
|
300
|
-
* @returns Block summary response
|
|
301
|
-
* @throws {NordError} If the request fails
|
|
302
|
-
*/
|
|
303
|
-
async blockSummaryQueryRollman(last_n) {
|
|
304
|
-
return queries.blockSummaryQueryRollman(this.webServerUrl, last_n);
|
|
305
|
-
}
|
|
306
267
|
/**
|
|
307
268
|
* Query an action from Rollman
|
|
308
269
|
*
|