@quicknode/sdk 3.1.1 → 3.2.1
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/README.md +14 -12
- package/index.d.ts +78 -8
- package/index.darwin-arm64.node +0 -0
- package/index.js +52 -52
- package/index.linux-arm64-gnu.node +0 -0
- package/index.linux-arm64-musl.node +0 -0
- package/index.linux-x64-gnu.node +0 -0
- package/index.linux-x64-musl.node +0 -0
- package/package.json +8 -8
- package/sdk.d.ts +58 -17
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ Node.js / TypeScript bindings for the Quicknode SDK.
|
|
|
4
4
|
|
|
5
5
|
This is one of four language bindings published from the same Rust core. See the [project README](https://github.com/quicknode/sdk/blob/main/README.md) for the polyglot overview, development setup, and release process.
|
|
6
6
|
|
|
7
|
+
> **Pre-1.0**: While on `0.x`, releases may contain breaking changes. Check the [release notes](https://github.com/quicknode/sdk/releases) before upgrading.
|
|
8
|
+
|
|
7
9
|
## Table of Contents
|
|
8
10
|
|
|
9
11
|
- [Installation](#installation)
|
|
@@ -1255,20 +1257,20 @@ Accessed as `qn.webhooks`. Creates webhooks from filter templates and manages th
|
|
|
1255
1257
|
| `HyperliquidWalletEventsFilter` | `hyperliquidWalletEventsFilter` |
|
|
1256
1258
|
| `StellarWalletTransactionsSourceAccountFilter` | `stellarWalletTransactionsSourceAccountFilter` |
|
|
1257
1259
|
|
|
1258
|
-
`TemplateArgs` carries the arguments
|
|
1260
|
+
`TemplateArgs` carries the arguments. Each factory method accepts either the inline template (with values) or the `*ByListTemplate` (with a pre-created list name):
|
|
1259
1261
|
|
|
1260
|
-
| Factory |
|
|
1262
|
+
| Factory | Inline template (fields) | ByList template (fields) |
|
|
1261
1263
|
|---|---|---|
|
|
1262
|
-
| `
|
|
1263
|
-
| `
|
|
1264
|
-
| `
|
|
1265
|
-
| `
|
|
1266
|
-
| `
|
|
1267
|
-
| `
|
|
1268
|
-
| `
|
|
1269
|
-
| `
|
|
1264
|
+
| `evmWalletFilter` | `EvmWalletFilterTemplate { wallets: string[] }` | `EvmWalletFilterByListTemplate { walletsListName: string }` |
|
|
1265
|
+
| `evmContractEvents` | `EvmContractEventsTemplate { contracts: string[], eventHashes: string[] }` | `EvmContractEventsByListTemplate { contractsListName: string, eventHashesListName?: string }` |
|
|
1266
|
+
| `evmAbiFilter` | `EvmAbiFilterTemplate { abi: string, contracts: string[] }` | `EvmAbiFilterByListTemplate { abiJson: string, contractsListName?: string }` |
|
|
1267
|
+
| `solanaWalletFilter` | `SolanaWalletFilterTemplate { accounts: string[] }` | `SolanaWalletFilterByListTemplate { accountsListName: string }` |
|
|
1268
|
+
| `bitcoinWalletFilter` | `BitcoinWalletFilterTemplate { wallets: string[] }` | `BitcoinWalletFilterByListTemplate { walletsListName: string }` |
|
|
1269
|
+
| `xrplWalletFilter` | `XrplWalletFilterTemplate { wallets: string[] }` | `XrplWalletFilterByListTemplate { walletsListName: string }` |
|
|
1270
|
+
| `hyperliquidWalletEventsFilter` | `HyperliquidWalletEventsFilterTemplate { wallets: string[] }` | `HyperliquidWalletEventsFilterByListTemplate { walletsListName: string }` |
|
|
1271
|
+
| `stellarWalletTransactionsFilter` | `StellarWalletTransactionsFilterTemplate { wallets: string[] }` | `StellarWalletTransactionsFilterByListTemplate { walletsListName: string }` |
|
|
1270
1272
|
|
|
1271
|
-
`WebhookDestinationAttributes`: `url` (required), `
|
|
1273
|
+
`WebhookDestinationAttributes`: `url` (required), `compression` (required — `"none"` | `"gzip"`), `security_token` (optional — auto-generated if omitted).
|
|
1272
1274
|
|
|
1273
1275
|
`WebhookStartFrom`: `Last` (resume from last delivered block) or `Latest` (start from newest).
|
|
1274
1276
|
|
|
@@ -1317,7 +1319,7 @@ import { TemplateArgs } from "quicknode-sdk";
|
|
|
1317
1319
|
const webhook = await qn.webhooks.createWebhookFromTemplate({
|
|
1318
1320
|
name: "Wallet Webhook",
|
|
1319
1321
|
network: "ethereum-mainnet",
|
|
1320
|
-
destinationAttributes: { url: "https://webhook.site/..." },
|
|
1322
|
+
destinationAttributes: { url: "https://webhook.site/...", compression: "none" },
|
|
1321
1323
|
templateArgs: TemplateArgs.evmWalletFilter({
|
|
1322
1324
|
wallets: ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],
|
|
1323
1325
|
}),
|
package/index.d.ts
CHANGED
|
@@ -59,6 +59,12 @@ export interface AzureAttributes {
|
|
|
59
59
|
blobPrefix?: string
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/** ByList form of `BitcoinWalletFilterTemplate`. */
|
|
63
|
+
export interface BitcoinWalletFilterByListTemplate {
|
|
64
|
+
/** Name of the pre-created wallets list. */
|
|
65
|
+
walletsListName: string
|
|
66
|
+
}
|
|
67
|
+
|
|
62
68
|
/** Template arguments for a Bitcoin wallet filter. */
|
|
63
69
|
export interface BitcoinWalletFilterTemplate {
|
|
64
70
|
/** Bitcoin wallet addresses to match against. */
|
|
@@ -599,6 +605,22 @@ export interface EndpointUsage {
|
|
|
599
605
|
requests?: number
|
|
600
606
|
}
|
|
601
607
|
|
|
608
|
+
/**
|
|
609
|
+
* ByList form of `EvmAbiFilterTemplate` — carries the ABI inline (the only
|
|
610
|
+
* non-list shape this template has) and optionally references a pre-created
|
|
611
|
+
* contracts list. Note the wire key is `abiJson`, distinct from the inline
|
|
612
|
+
* variant's `abi`.
|
|
613
|
+
*/
|
|
614
|
+
export interface EvmAbiFilterByListTemplate {
|
|
615
|
+
/** JSON-encoded contract ABI used to decode event data. */
|
|
616
|
+
abiJson: string
|
|
617
|
+
/**
|
|
618
|
+
* Optional name of a pre-created contracts list; when omitted, the ABI
|
|
619
|
+
* is applied to all contracts.
|
|
620
|
+
*/
|
|
621
|
+
contractsListName?: string
|
|
622
|
+
}
|
|
623
|
+
|
|
602
624
|
/**
|
|
603
625
|
* Template arguments for an EVM ABI filter: decodes and filters events for a
|
|
604
626
|
* set of contracts using a provided ABI.
|
|
@@ -611,14 +633,38 @@ export interface EvmAbiFilterTemplate {
|
|
|
611
633
|
}
|
|
612
634
|
|
|
613
635
|
/**
|
|
614
|
-
*
|
|
615
|
-
*
|
|
636
|
+
* ByList form of `EvmContractEventsTemplate` — references pre-created
|
|
637
|
+
* contract and (optionally) event-hash lists by name. Omitting
|
|
638
|
+
* `event_hashes_list_name` matches all events from the listed contracts.
|
|
639
|
+
*/
|
|
640
|
+
export interface EvmContractEventsByListTemplate {
|
|
641
|
+
/** Name of the pre-created contracts list. */
|
|
642
|
+
contractsListName: string
|
|
643
|
+
/**
|
|
644
|
+
* Optional name of a pre-created event-hashes list; when omitted, all
|
|
645
|
+
* events from the listed contracts match.
|
|
646
|
+
*/
|
|
647
|
+
eventHashesListName?: string
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Template arguments for filtering EVM contract events, scoped to a specific
|
|
652
|
+
* set of event topic hashes.
|
|
616
653
|
*/
|
|
617
654
|
export interface EvmContractEventsTemplate {
|
|
618
655
|
/** Contract addresses to watch for events. */
|
|
619
656
|
contracts: Array<string>
|
|
620
|
-
/**
|
|
621
|
-
eventHashes
|
|
657
|
+
/** Event topic hashes to restrict the filter to specific events. */
|
|
658
|
+
eventHashes: Array<string>
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* ByList form of `EvmWalletFilterTemplate` — references a pre-created
|
|
663
|
+
* wallets list by name instead of inlining the addresses.
|
|
664
|
+
*/
|
|
665
|
+
export interface EvmWalletFilterByListTemplate {
|
|
666
|
+
/** Name of the pre-created wallets list. */
|
|
667
|
+
walletsListName: string
|
|
622
668
|
}
|
|
623
669
|
|
|
624
670
|
/**
|
|
@@ -949,6 +995,12 @@ export interface HttpConfig {
|
|
|
949
995
|
headers?: Record<string, string>
|
|
950
996
|
}
|
|
951
997
|
|
|
998
|
+
/** ByList form of `HyperliquidWalletEventsFilterTemplate`. */
|
|
999
|
+
export interface HyperliquidWalletEventsFilterByListTemplate {
|
|
1000
|
+
/** Name of the pre-created wallets list. */
|
|
1001
|
+
walletsListName: string
|
|
1002
|
+
}
|
|
1003
|
+
|
|
952
1004
|
/** Template arguments for a Hyperliquid wallet-events filter. */
|
|
953
1005
|
export interface HyperliquidWalletEventsFilterTemplate {
|
|
954
1006
|
/** Hyperliquid wallet addresses to match against. */
|
|
@@ -1417,6 +1469,12 @@ export interface SingleEndpoint {
|
|
|
1417
1469
|
isMultichain: boolean
|
|
1418
1470
|
}
|
|
1419
1471
|
|
|
1472
|
+
/** ByList form of `SolanaWalletFilterTemplate`. */
|
|
1473
|
+
export interface SolanaWalletFilterByListTemplate {
|
|
1474
|
+
/** Name of the pre-created accounts list. */
|
|
1475
|
+
accountsListName: string
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1420
1478
|
/**
|
|
1421
1479
|
* Template arguments for a Solana wallet filter: matches activity for a list
|
|
1422
1480
|
* of Solana account addresses.
|
|
@@ -1426,6 +1484,12 @@ export interface SolanaWalletFilterTemplate {
|
|
|
1426
1484
|
accounts: Array<string>
|
|
1427
1485
|
}
|
|
1428
1486
|
|
|
1487
|
+
/** ByList form of `StellarWalletTransactionsFilterTemplate`. */
|
|
1488
|
+
export interface StellarWalletTransactionsFilterByListTemplate {
|
|
1489
|
+
/** Name of the pre-created wallets list. */
|
|
1490
|
+
walletsListName: string
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1429
1493
|
/**
|
|
1430
1494
|
* Template arguments for a Stellar wallet-transactions filter, matching
|
|
1431
1495
|
* transactions where the given wallets are the source account.
|
|
@@ -1800,8 +1864,8 @@ export interface WebhookDestinationAttributes {
|
|
|
1800
1864
|
url: string
|
|
1801
1865
|
/** Optional token sent with each payload so the receiver can verify authenticity; generated automatically when omitted. */
|
|
1802
1866
|
securityToken?: string
|
|
1803
|
-
/**
|
|
1804
|
-
compression
|
|
1867
|
+
/** Payload compression (`gzip` or `none`). */
|
|
1868
|
+
compression: string
|
|
1805
1869
|
}
|
|
1806
1870
|
|
|
1807
1871
|
/** Response from `get_enabled_count` for webhooks. */
|
|
@@ -1844,6 +1908,12 @@ export declare const enum WebhookTemplateId {
|
|
|
1844
1908
|
StellarWalletTransactionsSourceAccountFilter = 'StellarWalletTransactionsSourceAccountFilter'
|
|
1845
1909
|
}
|
|
1846
1910
|
|
|
1911
|
+
/** ByList form of `XrplWalletFilterTemplate`. */
|
|
1912
|
+
export interface XrplWalletFilterByListTemplate {
|
|
1913
|
+
/** Name of the pre-created wallets list. */
|
|
1914
|
+
walletsListName: string
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1847
1917
|
/** Template arguments for an XRPL wallet filter. */
|
|
1848
1918
|
export interface XrplWalletFilterTemplate {
|
|
1849
1919
|
/** XRPL wallet addresses to match against. */
|
|
@@ -2331,8 +2401,8 @@ export declare class WebhooksApiClient {
|
|
|
2331
2401
|
/**
|
|
2332
2402
|
* Creates a new webhook from a predefined filter template. Requires a
|
|
2333
2403
|
* descriptive name, a target blockchain network, and destination
|
|
2334
|
-
* attributes (URL,
|
|
2335
|
-
*
|
|
2404
|
+
* attributes (URL, compression — `gzip` or `none`, and an optional
|
|
2405
|
+
* security token — auto-generated when omitted). `template_args` carries
|
|
2336
2406
|
* template-specific configuration such as wallet addresses or contract
|
|
2337
2407
|
* filters. An optional `notification_email` receives alerts if the
|
|
2338
2408
|
* webhook terminates.
|
package/index.darwin-arm64.node
CHANGED
|
Binary file
|
package/index.js
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('@quicknode/sdk-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('@quicknode/sdk-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '3.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
80
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('@quicknode/sdk-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('@quicknode/sdk-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '3.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
96
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('@quicknode/sdk-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('@quicknode/sdk-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '3.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
117
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('@quicknode/sdk-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('@quicknode/sdk-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '3.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
133
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@quicknode/sdk-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@quicknode/sdk-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '3.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
150
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('@quicknode/sdk-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('@quicknode/sdk-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '3.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
166
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('@quicknode/sdk-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('@quicknode/sdk-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '3.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
185
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('@quicknode/sdk-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('@quicknode/sdk-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '3.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
201
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('@quicknode/sdk-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('@quicknode/sdk-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '3.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
217
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('@quicknode/sdk-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('@quicknode/sdk-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '3.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
237
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('@quicknode/sdk-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('@quicknode/sdk-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '3.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
253
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('@quicknode/sdk-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('@quicknode/sdk-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '3.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
274
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('@quicknode/sdk-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('@quicknode/sdk-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '3.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
290
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('@quicknode/sdk-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('@quicknode/sdk-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '3.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
308
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('@quicknode/sdk-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('@quicknode/sdk-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '3.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
324
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('@quicknode/sdk-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('@quicknode/sdk-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '3.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
342
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('@quicknode/sdk-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('@quicknode/sdk-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '3.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
358
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('@quicknode/sdk-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('@quicknode/sdk-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '3.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
376
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('@quicknode/sdk-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('@quicknode/sdk-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '3.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
392
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('@quicknode/sdk-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('@quicknode/sdk-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '3.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
410
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('@quicknode/sdk-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('@quicknode/sdk-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '3.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
426
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@quicknode/sdk-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('@quicknode/sdk-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '3.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
443
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@quicknode/sdk-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@quicknode/sdk-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '3.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
459
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('@quicknode/sdk-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('@quicknode/sdk-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '3.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
479
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('@quicknode/sdk-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('@quicknode/sdk-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '3.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
495
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('@quicknode/sdk-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('@quicknode/sdk-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '3.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 3.
|
|
511
|
+
if (bindingPackageVersion !== '3.2.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 3.2.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quicknode/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Quicknode SDK",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"tsx": "^4.7.0",
|
|
53
53
|
"typescript": "^5.3.0"
|
|
54
54
|
},
|
|
55
|
+
"license": "MIT",
|
|
55
56
|
"optionalDependencies": {
|
|
56
|
-
"@quicknode/sdk-linux-x64-gnu": "3.
|
|
57
|
-
"@quicknode/sdk-linux-arm64-gnu": "3.
|
|
58
|
-
"@quicknode/sdk-linux-x64-musl": "3.
|
|
59
|
-
"@quicknode/sdk-linux-arm64-musl": "3.
|
|
60
|
-
"@quicknode/sdk-darwin-arm64": "3.
|
|
61
|
-
}
|
|
62
|
-
"license": "MIT"
|
|
57
|
+
"@quicknode/sdk-linux-x64-gnu": "3.2.1",
|
|
58
|
+
"@quicknode/sdk-linux-arm64-gnu": "3.2.1",
|
|
59
|
+
"@quicknode/sdk-linux-x64-musl": "3.2.1",
|
|
60
|
+
"@quicknode/sdk-linux-arm64-musl": "3.2.1",
|
|
61
|
+
"@quicknode/sdk-darwin-arm64": "3.2.1"
|
|
62
|
+
}
|
|
63
63
|
}
|
package/sdk.d.ts
CHANGED
|
@@ -66,16 +66,28 @@ export type ListStreamsResponse = Omit<_ListStreamsResponseNode, "data"> & {
|
|
|
66
66
|
// wire's `templateArgs` to avoid `templateArgs.templateArgs.wallets`; the
|
|
67
67
|
// Node binding renames it back before the request.
|
|
68
68
|
export type TemplateArgsInput =
|
|
69
|
-
| { templateId: "evmWalletFilter"; args: EvmWalletFilterTemplate }
|
|
70
|
-
| {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
| { templateId: "
|
|
75
|
-
| {
|
|
69
|
+
| { templateId: "evmWalletFilter"; args: EvmWalletFilterTemplate | EvmWalletFilterByListTemplate }
|
|
70
|
+
| {
|
|
71
|
+
templateId: "evmContractEvents";
|
|
72
|
+
args: EvmContractEventsTemplate | EvmContractEventsByListTemplate;
|
|
73
|
+
}
|
|
74
|
+
| { templateId: "evmAbiFilter"; args: EvmAbiFilterTemplate | EvmAbiFilterByListTemplate }
|
|
75
|
+
| {
|
|
76
|
+
templateId: "solanaWalletFilter";
|
|
77
|
+
args: SolanaWalletFilterTemplate | SolanaWalletFilterByListTemplate;
|
|
78
|
+
}
|
|
79
|
+
| {
|
|
80
|
+
templateId: "bitcoinWalletFilter";
|
|
81
|
+
args: BitcoinWalletFilterTemplate | BitcoinWalletFilterByListTemplate;
|
|
82
|
+
}
|
|
83
|
+
| { templateId: "xrplWalletFilter"; args: XrplWalletFilterTemplate | XrplWalletFilterByListTemplate }
|
|
84
|
+
| {
|
|
85
|
+
templateId: "hyperliquidWalletEventsFilter";
|
|
86
|
+
args: HyperliquidWalletEventsFilterTemplate | HyperliquidWalletEventsFilterByListTemplate;
|
|
87
|
+
}
|
|
76
88
|
| {
|
|
77
89
|
templateId: "stellarWalletTransactionsSourceAccountFilter";
|
|
78
|
-
args: StellarWalletTransactionsFilterTemplate;
|
|
90
|
+
args: StellarWalletTransactionsFilterTemplate | StellarWalletTransactionsFilterByListTemplate;
|
|
79
91
|
};
|
|
80
92
|
|
|
81
93
|
// Replace the napi-generated JSON-blob templateArgs with typed unions.
|
|
@@ -270,6 +282,14 @@ export type {
|
|
|
270
282
|
XrplWalletFilterTemplate,
|
|
271
283
|
HyperliquidWalletEventsFilterTemplate,
|
|
272
284
|
StellarWalletTransactionsFilterTemplate,
|
|
285
|
+
EvmWalletFilterByListTemplate,
|
|
286
|
+
EvmContractEventsByListTemplate,
|
|
287
|
+
EvmAbiFilterByListTemplate,
|
|
288
|
+
SolanaWalletFilterByListTemplate,
|
|
289
|
+
BitcoinWalletFilterByListTemplate,
|
|
290
|
+
XrplWalletFilterByListTemplate,
|
|
291
|
+
HyperliquidWalletEventsFilterByListTemplate,
|
|
292
|
+
StellarWalletTransactionsFilterByListTemplate,
|
|
273
293
|
WebhooksApiClient,
|
|
274
294
|
// kvstore
|
|
275
295
|
KvStoreConfig,
|
|
@@ -353,16 +373,37 @@ export class QuicknodeSdk {
|
|
|
353
373
|
}
|
|
354
374
|
|
|
355
375
|
// Typed static factory methods producing each discriminated variant of
|
|
356
|
-
// TemplateArgsInput.
|
|
376
|
+
// TemplateArgsInput. Each template exposes both an inline form (passing the
|
|
377
|
+
// value template) and a by-list form (passing a *ByList template referencing
|
|
378
|
+
// a pre-created list by name). Consumers can also construct the object
|
|
379
|
+
// literal directly.
|
|
357
380
|
export const TemplateArgs: {
|
|
358
|
-
evmWalletFilter(
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
381
|
+
evmWalletFilter(
|
|
382
|
+
attrs: EvmWalletFilterTemplate | EvmWalletFilterByListTemplate
|
|
383
|
+
): Extract<TemplateArgsInput, { templateId: "evmWalletFilter" }>;
|
|
384
|
+
evmContractEvents(
|
|
385
|
+
attrs: EvmContractEventsTemplate | EvmContractEventsByListTemplate
|
|
386
|
+
): Extract<TemplateArgsInput, { templateId: "evmContractEvents" }>;
|
|
387
|
+
evmAbiFilter(
|
|
388
|
+
attrs: EvmAbiFilterTemplate | EvmAbiFilterByListTemplate
|
|
389
|
+
): Extract<TemplateArgsInput, { templateId: "evmAbiFilter" }>;
|
|
390
|
+
solanaWalletFilter(
|
|
391
|
+
attrs: SolanaWalletFilterTemplate | SolanaWalletFilterByListTemplate
|
|
392
|
+
): Extract<TemplateArgsInput, { templateId: "solanaWalletFilter" }>;
|
|
393
|
+
bitcoinWalletFilter(
|
|
394
|
+
attrs: BitcoinWalletFilterTemplate | BitcoinWalletFilterByListTemplate
|
|
395
|
+
): Extract<TemplateArgsInput, { templateId: "bitcoinWalletFilter" }>;
|
|
396
|
+
xrplWalletFilter(
|
|
397
|
+
attrs: XrplWalletFilterTemplate | XrplWalletFilterByListTemplate
|
|
398
|
+
): Extract<TemplateArgsInput, { templateId: "xrplWalletFilter" }>;
|
|
399
|
+
hyperliquidWalletEventsFilter(
|
|
400
|
+
attrs: HyperliquidWalletEventsFilterTemplate | HyperliquidWalletEventsFilterByListTemplate
|
|
401
|
+
): Extract<TemplateArgsInput, { templateId: "hyperliquidWalletEventsFilter" }>;
|
|
402
|
+
stellarWalletTransactionsFilter(
|
|
403
|
+
attrs:
|
|
404
|
+
| StellarWalletTransactionsFilterTemplate
|
|
405
|
+
| StellarWalletTransactionsFilterByListTemplate
|
|
406
|
+
): Extract<TemplateArgsInput, { templateId: "stellarWalletTransactionsSourceAccountFilter" }>;
|
|
366
407
|
};
|
|
367
408
|
|
|
368
409
|
// Typed error hierarchy. Any SDK call can throw one of these; catch
|