@n1xyz/nord-ts 0.0.14 → 0.0.15
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/.prettierignore +1 -0
- package/README.md +9 -6
- package/dist/bridge/client.d.ts +8 -7
- package/dist/bridge/client.js +38 -37
- package/dist/bridge/index.d.ts +1 -2
- package/dist/bridge/index.js +2 -2
- package/dist/bridge/types.d.ts +5 -3
- package/dist/bridge/types.js +3 -1
- package/dist/gen/nord.d.ts +66 -5
- package/dist/gen/nord.js +449 -22
- package/dist/idl/bridge.json +1493 -0
- package/dist/idl/index.d.ts +585 -0
- package/dist/idl/index.js +8 -0
- package/dist/nord/api/core.js +7 -5
- package/dist/nord/api/metrics.js +7 -4
- package/dist/nord/client/Nord.d.ts +19 -5
- package/dist/nord/client/Nord.js +50 -23
- package/dist/nord/client/NordUser.js +4 -7
- package/dist/types.d.ts +3 -3
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Nord.html +99 -100
- package/docs/classes/NordError.html +6 -6
- package/docs/classes/NordUser.html +48 -53
- package/docs/classes/NordWebSocketClient.html +6 -11
- package/docs/classes/SolanaBridgeClient.html +23 -23
- 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 +3 -3
- 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/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/{queryLastNBlocks.html → getLastActionId.html} +3 -3
- 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 +9 -9
- 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/queryPrometheus.html +1 -1
- package/docs/functions/queryRecentActions.html +4 -3
- 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/hierarchy.html +1 -1
- package/docs/index.html +2 -2
- 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 +19 -9
- package/docs/interfaces/NordWebSocketClientEvents.html +2 -2
- package/docs/interfaces/NordWebSocketEvents.html +3 -3
- 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 +5 -5
- 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 +3 -2
- package/docs/interfaces/Trade.html +2 -2
- package/docs/interfaces/TradeSubscription.html +5 -5
- 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/WebSocketAccountUpdate.html +6 -0
- package/docs/interfaces/WebSocketDeltaUpdate.html +3 -3
- package/docs/interfaces/WebSocketSubscription.html +3 -3
- package/docs/interfaces/WebSocketTradeUpdate.html +3 -3
- package/docs/interfaces/WithdrawalClaim.html +7 -7
- package/docs/interfaces/WithdrawalParams.html +4 -4
- package/docs/modules.html +1 -1
- package/docs/types/BigIntValue.html +1 -1
- package/docs/types/SubscriptionPattern.html +4 -0
- package/docs/types/SubscriptionType.html +2 -0
- 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/idl-generate.sh +4 -0
- package/package.json +4 -3
- package/src/bridge/client.ts +54 -43
- package/src/bridge/index.ts +1 -2
- package/src/bridge/types.ts +5 -3
- package/src/gen/nord.ts +518 -19
- package/src/idl/bridge.json +1493 -0
- package/src/idl/index.ts +2 -0
- package/src/nord/api/core.ts +1 -3
- package/src/nord/api/metrics.ts +2 -0
- package/src/nord/client/Nord.ts +49 -13
- package/src/nord/client/NordUser.ts +32 -49
- package/src/types.ts +2 -2
- package/docs/functions/blockQueryRollman.html +0 -6
- package/docs/functions/blockSummaryQueryRollman.html +0 -6
- package/docs/functions/queryBlock.html +0 -6
- package/docs/functions/queryRecentBlocks.html +0 -6
- package/docs/interfaces/WebSocketUserUpdate.html +0 -6
- package/src/idl/bridge.ts +0 -929
package/src/idl/index.ts
ADDED
package/src/nord/api/core.ts
CHANGED
|
@@ -65,9 +65,7 @@ export async function getAccount(
|
|
|
65
65
|
accountId: number,
|
|
66
66
|
): Promise<Account> {
|
|
67
67
|
try {
|
|
68
|
-
const response = await checkedFetch(
|
|
69
|
-
`${webServerUrl}/account?account_id=${accountId}`,
|
|
70
|
-
);
|
|
68
|
+
const response = await checkedFetch(`${webServerUrl}/account/${accountId}`);
|
|
71
69
|
return await response.json();
|
|
72
70
|
} catch (error) {
|
|
73
71
|
throw new NordError(`Failed to get account ${accountId}`, { cause: error });
|
package/src/nord/api/metrics.ts
CHANGED
|
@@ -99,6 +99,7 @@ function calculateTps(text: string): number {
|
|
|
99
99
|
*/
|
|
100
100
|
function calculatePeakTps(text: string): number {
|
|
101
101
|
// For peak TPS, we'll use a simple heuristic: 2x the current TPS estimate
|
|
102
|
+
// TODO: fix this
|
|
102
103
|
return calculateTps(text) * 2;
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -109,6 +110,7 @@ function calculatePeakTps(text: string): number {
|
|
|
109
110
|
* @returns Average latency in seconds
|
|
110
111
|
*/
|
|
111
112
|
function extractLatency(text: string): number {
|
|
113
|
+
// TODO: fix - using average for latency is kinda wack. ok to merge for now but should change.
|
|
112
114
|
const latencySum = extractSummaryValue(text, "nord_requests_ok_latency_sum");
|
|
113
115
|
const latencyCount = extractSummaryValue(
|
|
114
116
|
text,
|
package/src/nord/client/Nord.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "events";
|
|
2
|
+
import { Connection, PublicKey } from "@solana/web3.js";
|
|
2
3
|
import {
|
|
3
4
|
Account,
|
|
4
5
|
ActionQuery,
|
|
@@ -55,8 +56,11 @@ export class Nord {
|
|
|
55
56
|
/** Base URL for the Nord web server */
|
|
56
57
|
public readonly webServerUrl: string;
|
|
57
58
|
|
|
58
|
-
/**
|
|
59
|
-
public readonly
|
|
59
|
+
/** Bridge verification key */
|
|
60
|
+
public readonly bridgeVk: string;
|
|
61
|
+
|
|
62
|
+
/** Optional Solana program ID (will be derived from bridgeVk) */
|
|
63
|
+
private _solanaProgramId!: string;
|
|
60
64
|
|
|
61
65
|
/** Solana RPC URL */
|
|
62
66
|
public readonly solanaUrl: string;
|
|
@@ -75,26 +79,26 @@ export class Nord {
|
|
|
75
79
|
*
|
|
76
80
|
* @param config - Configuration options for the Nord client
|
|
77
81
|
* @param config.webServerUrl - Base URL for the Nord web server
|
|
78
|
-
* @param config.
|
|
82
|
+
* @param config.bridgeVk - Bridge verification key
|
|
79
83
|
* @param config.solanaUrl - Solana cluster URL
|
|
80
84
|
* @throws {Error} If required configuration is missing
|
|
81
85
|
*/
|
|
82
|
-
constructor(
|
|
83
|
-
if (!webServerUrl) {
|
|
86
|
+
constructor(config: NordConfig) {
|
|
87
|
+
if (!config.webServerUrl) {
|
|
84
88
|
throw new NordError("webServerUrl is required");
|
|
85
89
|
}
|
|
86
90
|
|
|
87
|
-
if (!
|
|
88
|
-
throw new NordError("
|
|
91
|
+
if (!config.bridgeVk) {
|
|
92
|
+
throw new NordError("bridgeVk is required");
|
|
89
93
|
}
|
|
90
94
|
|
|
91
|
-
if (!solanaUrl) {
|
|
95
|
+
if (!config.solanaUrl) {
|
|
92
96
|
throw new NordError("solanaUrl is required");
|
|
93
97
|
}
|
|
94
98
|
|
|
95
|
-
this.webServerUrl = webServerUrl;
|
|
96
|
-
this.
|
|
97
|
-
this.solanaUrl = solanaUrl;
|
|
99
|
+
this.webServerUrl = config.webServerUrl;
|
|
100
|
+
this.bridgeVk = config.bridgeVk;
|
|
101
|
+
this.solanaUrl = config.solanaUrl;
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
/**
|
|
@@ -204,17 +208,49 @@ export class Nord {
|
|
|
204
208
|
*
|
|
205
209
|
* @param nordConfig - Configuration options for the Nord client
|
|
206
210
|
* @param nordConfig.webServerUrl - Base URL for the Nord web server
|
|
207
|
-
* @param nordConfig.
|
|
211
|
+
* @param nordConfig.bridgeVk - Bridge verification key
|
|
208
212
|
* @param nordConfig.solanaUrl - Solana cluster URL
|
|
209
213
|
* @returns Initialized Nord client
|
|
210
214
|
* @throws {NordError} If initialization fails
|
|
211
215
|
*/
|
|
212
216
|
public static async initNord(nordConfig: NordConfig): Promise<Nord> {
|
|
213
217
|
const nord = new Nord(nordConfig);
|
|
214
|
-
await nord.
|
|
218
|
+
await nord.init();
|
|
215
219
|
return nord;
|
|
216
220
|
}
|
|
217
221
|
|
|
222
|
+
/**
|
|
223
|
+
* Initialize the Nord client by deriving program ID and fetching info
|
|
224
|
+
* @private
|
|
225
|
+
*/
|
|
226
|
+
private async init(): Promise<void> {
|
|
227
|
+
const connection = new Connection(this.solanaUrl);
|
|
228
|
+
const bridgeVkPubkey = new PublicKey(this.bridgeVk);
|
|
229
|
+
|
|
230
|
+
const bridgeAccount = await connection.getAccountInfo(bridgeVkPubkey);
|
|
231
|
+
if (!bridgeAccount) {
|
|
232
|
+
throw new NordError(`Bridge account ${this.bridgeVk} not found`);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
this._solanaProgramId = bridgeAccount.owner.toString();
|
|
236
|
+
await this.fetchNordInfo();
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Get the Solana program ID derived from bridge VK
|
|
241
|
+
*
|
|
242
|
+
* @returns Program ID string
|
|
243
|
+
* @throws {NordError} If program ID hasn't been initialized
|
|
244
|
+
*/
|
|
245
|
+
public getSolanaProgramId(): string {
|
|
246
|
+
if (!this._solanaProgramId) {
|
|
247
|
+
throw new NordError(
|
|
248
|
+
"Solana program ID not initialized. Have you called Nord.initNord()?",
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
return this._solanaProgramId;
|
|
252
|
+
}
|
|
253
|
+
|
|
218
254
|
/**
|
|
219
255
|
* Get market statistics
|
|
220
256
|
*
|
|
@@ -300,7 +300,7 @@ export class NordUser {
|
|
|
300
300
|
if (
|
|
301
301
|
!this.getSolanaPublicKey() ||
|
|
302
302
|
!this.connection ||
|
|
303
|
-
!this.nord.
|
|
303
|
+
!this.nord.getSolanaProgramId()
|
|
304
304
|
) {
|
|
305
305
|
throw new NordError(
|
|
306
306
|
"Solana public key, connection, and program ID are required to initialize bridge client",
|
|
@@ -331,9 +331,10 @@ export class NordUser {
|
|
|
331
331
|
this.bridgeClient = new SolanaBridgeClient(
|
|
332
332
|
{
|
|
333
333
|
rpcUrl: this.connection.rpcEndpoint,
|
|
334
|
-
programId: this.nord.
|
|
334
|
+
programId: this.nord.getSolanaProgramId(),
|
|
335
335
|
commitment: "confirmed",
|
|
336
336
|
tokenInfos: this.splTokenInfos,
|
|
337
|
+
bridgeVk: this.nord.bridgeVk,
|
|
337
338
|
},
|
|
338
339
|
wallet,
|
|
339
340
|
);
|
|
@@ -462,16 +463,6 @@ export class NordUser {
|
|
|
462
463
|
const mint = new PublicKey(tokenInfo.mint);
|
|
463
464
|
// Get the user's token account
|
|
464
465
|
const fromAccount = await this.getAssociatedTokenAccount(mint);
|
|
465
|
-
|
|
466
|
-
// Get the bridge's token account
|
|
467
|
-
const [authority] = await this.bridgeClient.findAuthorityPda();
|
|
468
|
-
const toAccount = await getAssociatedTokenAddress(
|
|
469
|
-
mint,
|
|
470
|
-
authority,
|
|
471
|
-
true,
|
|
472
|
-
TOKEN_2022_PROGRAM_ID,
|
|
473
|
-
);
|
|
474
|
-
|
|
475
466
|
// Convert amount to BN with proper decimals
|
|
476
467
|
const amountBN = utilsToBN(amount, tokenInfo.precision);
|
|
477
468
|
|
|
@@ -480,7 +471,6 @@ export class NordUser {
|
|
|
480
471
|
amount: amountBN,
|
|
481
472
|
mint,
|
|
482
473
|
fromAccount,
|
|
483
|
-
toAccount,
|
|
484
474
|
});
|
|
485
475
|
} catch (error) {
|
|
486
476
|
throw new NordError(
|
|
@@ -588,23 +578,23 @@ export class NordUser {
|
|
|
588
578
|
* @throws {NordError} If the operation fails
|
|
589
579
|
*/
|
|
590
580
|
async fetchInfo(): Promise<void> {
|
|
591
|
-
|
|
581
|
+
type OpenOrder = {
|
|
592
582
|
orderId: number;
|
|
593
|
-
size: number;
|
|
594
|
-
price: number;
|
|
595
583
|
marketId: number;
|
|
596
584
|
side: "ask" | "bid";
|
|
597
|
-
|
|
585
|
+
size: number;
|
|
586
|
+
price: number;
|
|
587
|
+
originalOrderSize: number;
|
|
598
588
|
clientOrderId?: number | null;
|
|
599
|
-
}
|
|
589
|
+
};
|
|
600
590
|
|
|
601
|
-
|
|
591
|
+
type Balance = {
|
|
602
592
|
tokenId: number;
|
|
603
593
|
token: string;
|
|
604
594
|
amount: number;
|
|
605
|
-
}
|
|
595
|
+
};
|
|
606
596
|
|
|
607
|
-
|
|
597
|
+
type Position = {
|
|
608
598
|
marketId: number;
|
|
609
599
|
openOrders: number;
|
|
610
600
|
perp?: {
|
|
@@ -616,9 +606,9 @@ export class NordUser {
|
|
|
616
606
|
isLong: boolean;
|
|
617
607
|
};
|
|
618
608
|
actionId: number;
|
|
619
|
-
}
|
|
609
|
+
};
|
|
620
610
|
|
|
621
|
-
|
|
611
|
+
type Margins = {
|
|
622
612
|
omf: number;
|
|
623
613
|
mf: number;
|
|
624
614
|
imf: number;
|
|
@@ -627,32 +617,31 @@ export class NordUser {
|
|
|
627
617
|
pon: number;
|
|
628
618
|
pn: number;
|
|
629
619
|
bankruptcy: boolean;
|
|
630
|
-
}
|
|
620
|
+
};
|
|
631
621
|
|
|
632
|
-
|
|
622
|
+
type Account = {
|
|
633
623
|
updateId: number;
|
|
634
|
-
orders:
|
|
624
|
+
orders: OpenOrder[];
|
|
635
625
|
positions: Position[];
|
|
636
626
|
balances: Balance[];
|
|
637
627
|
margins: Margins;
|
|
638
|
-
|
|
639
|
-
accountId: number;
|
|
640
|
-
}
|
|
628
|
+
};
|
|
641
629
|
|
|
642
630
|
if (this.accountIds !== undefined) {
|
|
643
|
-
const accountsData
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
631
|
+
const accountsData: (Account & { accountId: number })[] =
|
|
632
|
+
await Promise.all(
|
|
633
|
+
this.accountIds.map(async (accountId) => {
|
|
634
|
+
const response = await checkedFetch(
|
|
635
|
+
`${this.nord.webServerUrl}/account/${accountId}`,
|
|
636
|
+
);
|
|
637
|
+
const accountData = (await response.json()) as Account;
|
|
638
|
+
// Ensure we have the correct accountId
|
|
639
|
+
return {
|
|
640
|
+
...accountData,
|
|
641
|
+
accountId,
|
|
642
|
+
};
|
|
643
|
+
}),
|
|
644
|
+
);
|
|
656
645
|
|
|
657
646
|
for (const accountData of accountsData) {
|
|
658
647
|
// Process balances
|
|
@@ -667,13 +656,7 @@ export class NordUser {
|
|
|
667
656
|
|
|
668
657
|
// Process orders
|
|
669
658
|
this.orders[accountData.accountId] = accountData.orders.map(
|
|
670
|
-
(order: {
|
|
671
|
-
orderId: number;
|
|
672
|
-
side: string;
|
|
673
|
-
size: number;
|
|
674
|
-
price: number;
|
|
675
|
-
marketId: number;
|
|
676
|
-
}) => {
|
|
659
|
+
(order: OpenOrder) => {
|
|
677
660
|
return {
|
|
678
661
|
orderId: order.orderId,
|
|
679
662
|
isLong: order.side === "bid",
|
package/src/types.ts
CHANGED
|
@@ -35,8 +35,8 @@ export type SubscriptionPattern = `${SubscriptionType}@${string}` | string;
|
|
|
35
35
|
export interface NordConfig {
|
|
36
36
|
/** Base URL for the Nord web server */
|
|
37
37
|
webServerUrl: string;
|
|
38
|
-
/**
|
|
39
|
-
|
|
38
|
+
/** Bridge verification key */
|
|
39
|
+
bridgeVk: string;
|
|
40
40
|
/** Solana cluster URL */
|
|
41
41
|
solanaUrl: string;
|
|
42
42
|
/** Whether to initialize WebSockets on creation, defaults to true */
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>blockQueryRollman | @n1xyz/nord-ts</title><meta name="description" content="Documentation for @n1xyz/nord-ts"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@n1xyz/nord-ts</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@n1xyz/nord-ts</a></li><li><a href="blockQueryRollman.html">blockQueryRollman</a></li></ul><h1>Function blockQueryRollman</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="blockqueryrollman" class="tsd-anchor"></a><span class="tsd-kind-call-signature">blockQueryRollman</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">webServerUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">query</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/BlockQuery.html" class="tsd-signature-type tsd-kind-interface">BlockQuery</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/RollmanBlockResponse.html" class="tsd-signature-type tsd-kind-interface">RollmanBlockResponse</a><span class="tsd-signature-symbol">></span><a href="#blockqueryrollman" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Query a block from Rollman</p>
|
|
2
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">webServerUrl</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base URL for the Nord web server</p>
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">query</span>: <a href="../interfaces/BlockQuery.html" class="tsd-signature-type tsd-kind-interface">BlockQuery</a></span><div class="tsd-comment tsd-typography"><p>Block query parameters</p>
|
|
4
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/RollmanBlockResponse.html" class="tsd-signature-type tsd-kind-interface">RollmanBlockResponse</a><span class="tsd-signature-symbol">></span></h4><p>Rollman block response</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the request fails</p>
|
|
6
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/nord/api/queries.ts#L143">src/nord/api/queries.ts:143</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@n1xyz/nord-ts</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>blockSummaryQueryRollman | @n1xyz/nord-ts</title><meta name="description" content="Documentation for @n1xyz/nord-ts"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@n1xyz/nord-ts</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@n1xyz/nord-ts</a></li><li><a href="blockSummaryQueryRollman.html">blockSummaryQueryRollman</a></li></ul><h1>Function blockSummaryQueryRollman</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="blocksummaryqueryrollman" class="tsd-anchor"></a><span class="tsd-kind-call-signature">blockSummaryQueryRollman</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">webServerUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">last_n</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/BlockSummaryResponse.html" class="tsd-signature-type tsd-kind-interface">BlockSummaryResponse</a><span class="tsd-signature-symbol">></span><a href="#blocksummaryqueryrollman" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Query block summaries from Rollman</p>
|
|
2
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">webServerUrl</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base URL for the Nord web server</p>
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">last_n</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of recent blocks to query</p>
|
|
4
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/BlockSummaryResponse.html" class="tsd-signature-type tsd-kind-interface">BlockSummaryResponse</a><span class="tsd-signature-symbol">></span></h4><p>Block summary response</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the request fails</p>
|
|
6
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/nord/api/queries.ts#L170">src/nord/api/queries.ts:170</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@n1xyz/nord-ts</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>queryBlock | @n1xyz/nord-ts</title><meta name="description" content="Documentation for @n1xyz/nord-ts"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@n1xyz/nord-ts</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@n1xyz/nord-ts</a></li><li><a href="queryBlock.html">queryBlock</a></li></ul><h1>Function queryBlock</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="queryblock" class="tsd-anchor"></a><span class="tsd-kind-call-signature">queryBlock</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">webServerUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">query</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/BlockQuery.html" class="tsd-signature-type tsd-kind-interface">BlockQuery</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/BlockResponse.html" class="tsd-signature-type tsd-kind-interface">BlockResponse</a><span class="tsd-signature-symbol">></span><a href="#queryblock" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Query a specific block</p>
|
|
2
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">webServerUrl</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base URL for the Nord web server</p>
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">query</span>: <a href="../interfaces/BlockQuery.html" class="tsd-signature-type tsd-kind-interface">BlockQuery</a></span><div class="tsd-comment tsd-typography"><p>Block query parameters</p>
|
|
4
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/BlockResponse.html" class="tsd-signature-type tsd-kind-interface">BlockResponse</a><span class="tsd-signature-symbol">></span></h4><p>Block response</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the request fails</p>
|
|
6
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/nord/api/queries.ts#L23">src/nord/api/queries.ts:23</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@n1xyz/nord-ts</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>queryRecentBlocks | @n1xyz/nord-ts</title><meta name="description" content="Documentation for @n1xyz/nord-ts"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@n1xyz/nord-ts</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@n1xyz/nord-ts</a></li><li><a href="queryRecentBlocks.html">queryRecentBlocks</a></li></ul><h1>Function queryRecentBlocks</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="queryrecentblocks" class="tsd-anchor"></a><span class="tsd-kind-call-signature">queryRecentBlocks</span><span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">webServerUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">last_n</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/BlockSummaryResponse.html" class="tsd-signature-type tsd-kind-interface">BlockSummaryResponse</a><span class="tsd-signature-symbol">></span><a href="#queryrecentblocks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Query recent blocks</p>
|
|
2
|
-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">webServerUrl</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base URL for the Nord web server</p>
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">last_n</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Number of recent blocks to query</p>
|
|
4
|
-
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/BlockSummaryResponse.html" class="tsd-signature-type tsd-kind-interface">BlockSummaryResponse</a><span class="tsd-signature-symbol">></span></h4><p>Block summary response</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the request fails</p>
|
|
6
|
-
</div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/nord/api/queries.ts#L68">src/nord/api/queries.ts:68</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@n1xyz/nord-ts</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WebSocketUserUpdate | @n1xyz/nord-ts</title><meta name="description" content="Documentation for @n1xyz/nord-ts"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@n1xyz/nord-ts</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@n1xyz/nord-ts</a></li><li><a href="WebSocketUserUpdate.html">WebSocketUserUpdate</a></li></ul><h1>Interface WebSocketUserUpdate</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>WebSocket user update message</p>
|
|
2
|
-
</div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">WebSocketUserUpdate</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="WebSocketUserUpdate.html#account">account</a><span class="tsd-signature-symbol">:</span> <a href="Account.html" class="tsd-signature-type tsd-kind-interface">Account</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="WebSocketUserUpdate.html#timestamp">timestamp</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="WebSocketUserUpdate.html#type">type</a><span class="tsd-signature-symbol">:</span> <a href="../enums/WebSocketMessageType.html#userupdate" class="tsd-signature-type tsd-kind-enum-member">UserUpdate</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="WebSocketUserUpdate.html#userid">userId</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/types.ts#L453">src/types.ts:453</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="WebSocketUserUpdate.html#account" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>account</span></a>
|
|
3
|
-
<a href="WebSocketUserUpdate.html#timestamp" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>timestamp</span></a>
|
|
4
|
-
<a href="WebSocketUserUpdate.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a>
|
|
5
|
-
<a href="WebSocketUserUpdate.html#userid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Id</span></a>
|
|
6
|
-
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="account" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>account</span><a href="#account" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">account</span><span class="tsd-signature-symbol">:</span> <a href="Account.html" class="tsd-signature-type tsd-kind-interface">Account</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/types.ts#L456">src/types.ts:456</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="timestamp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>timestamp</span><a href="#timestamp" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">timestamp</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/types.ts#L457">src/types.ts:457</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <a href="../enums/WebSocketMessageType.html#userupdate" class="tsd-signature-type tsd-kind-enum-member">UserUpdate</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/types.ts#L454">src/types.ts:454</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="userid" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>user<wbr/>Id</span><a href="#userid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">userId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord-ts/blob/f2620fa3c3fd6c29fd140ee792bf23daeed79f91/src/types.ts#L455">src/types.ts:455</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#account" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>account</span></a><a href="#timestamp" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>timestamp</span></a><a href="#type" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a><a href="#userid" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Id</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@n1xyz/nord-ts</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|