@quicknode/sdk 2.4.2 → 2.6.0
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 +1 -1
- package/cjs/index.js +43 -3
- package/esm/core/chains.js +42 -2
- package/esm/lib/constants.js +1 -1
- package/esm/solana/solana.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ We recommend using the example application to develop
|
|
|
69
69
|
|
|
70
70
|
Run `nx test libs-sdk` to execute the tests via [Jest](https://jestjs.io).
|
|
71
71
|
|
|
72
|
-
API responses are recorded using [polly.js](https://github.com/Netflix/pollyjs). You can re-record live requests by passing in an API key, copy `.env.test.example` to `.env.test` and fill out with your API key
|
|
72
|
+
API responses are recorded using [polly.js](https://github.com/Netflix/pollyjs). You can re-record live requests by passing in an API key, copy `.env.test.example` to `.env.test` and fill out with your API key and re-record tests `nx test libs-sdk -- -u`
|
|
73
73
|
|
|
74
74
|
<br>
|
|
75
75
|
|
package/cjs/index.js
CHANGED
|
@@ -288,7 +288,7 @@ const qnChainToViemChain = {
|
|
|
288
288
|
['gnosis']: chains.gnosis,
|
|
289
289
|
'ethereum-goerli': chains.goerli,
|
|
290
290
|
'harmony-mainnet': chains.harmonyOne,
|
|
291
|
-
[ETH_MAINNET_NETWORK]: chains.mainnet,
|
|
291
|
+
[ETH_MAINNET_NETWORK]: chains.mainnet, // The URL doesn't actually contain this
|
|
292
292
|
'mantle-mainnet': chains.mantle,
|
|
293
293
|
'mantle-sepolia': chains.mantleSepoliaTestnet,
|
|
294
294
|
['optimism']: chains.optimism,
|
|
@@ -306,6 +306,46 @@ const qnChainToViemChain = {
|
|
|
306
306
|
'sei-arctic': chains.seiDevnet,
|
|
307
307
|
'ethereum-sepolia': chains.sepolia,
|
|
308
308
|
'ethereum-holesky': chains.holesky,
|
|
309
|
+
'0g-mainnet': chains.zeroGMainnet,
|
|
310
|
+
'0g-galileo': chains.zeroGTestnet,
|
|
311
|
+
'abstract-testnet': chains.abstractTestnet,
|
|
312
|
+
'abstract-mainnet': chains.abstract,
|
|
313
|
+
'b3-mainnet': chains.b3,
|
|
314
|
+
'b3-sepolia': chains.b3Sepolia,
|
|
315
|
+
'flare-mainnet': chains.flare,
|
|
316
|
+
'flare-coston2': chains.flareTestnet,
|
|
317
|
+
'gravity-alpham': chains.gravity,
|
|
318
|
+
'hemi-testnet': chains.hemiSepolia,
|
|
319
|
+
'hemi-mainnet': chains.hemi,
|
|
320
|
+
'hype-testnet': chains.hyperliquidEvmTestnet,
|
|
321
|
+
'imx-testnet': chains.immutableZkEvmTestnet,
|
|
322
|
+
'imx-mainnet': chains.immutableZkEvm,
|
|
323
|
+
'ink-mainnet': chains.ink,
|
|
324
|
+
'ink-sepolia': chains.inkSepolia,
|
|
325
|
+
'joc-mainnet': chains.jocMainnet,
|
|
326
|
+
'kaia-kairos': chains.kairos,
|
|
327
|
+
'kaia-mainnet': chains.kaia,
|
|
328
|
+
'linea-mainnet': chains.linea,
|
|
329
|
+
'monad-mainnet': chains.monad,
|
|
330
|
+
'monad-testnet': chains.monadTestnet,
|
|
331
|
+
'morph-mainnet': chains.morph,
|
|
332
|
+
'nomina-mainnet': chains.nomina,
|
|
333
|
+
'peaq-mainnet': chains.peaq,
|
|
334
|
+
'plasma-testnet': chains.plasmaTestnet,
|
|
335
|
+
'plasma-mainnet': chains.plasma,
|
|
336
|
+
'soneium-mainnet': chains.soneium,
|
|
337
|
+
'sonic-mainnet': chains.sonic,
|
|
338
|
+
'story-aeneid': chains.storyAeneid,
|
|
339
|
+
'story-mainnet': chains.story,
|
|
340
|
+
'unichain-mainnet': chains.unichain,
|
|
341
|
+
'unichain-sepolia': chains.unichainSepolia,
|
|
342
|
+
'vana-moksha': chains.vanaMoksha,
|
|
343
|
+
'vana-mainnet': chains.vana,
|
|
344
|
+
'worldchain-mainnet': chains.worldchain,
|
|
345
|
+
'worldchain-sepolia': chains.worldchainSepolia,
|
|
346
|
+
'xai-mainnet': chains.xai,
|
|
347
|
+
'xai-testnet': chains.xaiTestnet,
|
|
348
|
+
'xlayer-mainnet': chains.xLayer,
|
|
309
349
|
};
|
|
310
350
|
function chainNameFromEndpoint(endpointUrl) {
|
|
311
351
|
let hostnameParts;
|
|
@@ -348,7 +388,7 @@ function setupGlobalFetch() {
|
|
|
348
388
|
}
|
|
349
389
|
|
|
350
390
|
// Ideally we read directly from package.json, but ran into some packaging issues with that
|
|
351
|
-
const PACKAGE_VERSION = '2.
|
|
391
|
+
const PACKAGE_VERSION = '2.6.0';
|
|
352
392
|
|
|
353
393
|
// Headers to use in RPC clients
|
|
354
394
|
function getClientHeaders() {
|
|
@@ -418,7 +458,7 @@ class Solana {
|
|
|
418
458
|
web3_js.ComputeBudgetProgram.setComputeUnitPrice({
|
|
419
459
|
microLamports: 1,
|
|
420
460
|
}),
|
|
421
|
-
web3_js.ComputeBudgetProgram.setComputeUnitLimit({ units:
|
|
461
|
+
web3_js.ComputeBudgetProgram.setComputeUnitLimit({ units: 1_400_000 }),
|
|
422
462
|
...transaction.instructions,
|
|
423
463
|
];
|
|
424
464
|
// eslint-disable-next-line prefer-const
|
package/esm/core/chains.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QNInvalidEndpointUrl } from '../lib/errors/QNInvalidEnpointUrl.js';
|
|
2
2
|
import { QNChainNotSupported } from '../lib/errors/QNChainNotSupported.js';
|
|
3
|
-
import { arbitrum, arbitrumGoerli, arbitrumSepolia, arbitrumNova, avalanche, avalancheFuji, base, baseGoerli, baseSepolia, berachainTestnet, blast, blastSepolia, bsc, bscTestnet, celo, cyber, cyberTestnet, fantom, gnosis, goerli, harmonyOne, mainnet, mantle, mantleSepoliaTestnet, optimism, optimismGoerli, optimismSepolia, polygon, scroll, scrollSepolia, polygonMumbai, polygonAmoy, polygonZkEvm, polygonZkEvmTestnet, sei, seiDevnet, sepolia, holesky } from 'viem/chains';
|
|
3
|
+
import { arbitrum, arbitrumGoerli, arbitrumSepolia, arbitrumNova, avalanche, avalancheFuji, base, baseGoerli, baseSepolia, berachainTestnet, blast, blastSepolia, bsc, bscTestnet, celo, cyber, cyberTestnet, fantom, gnosis, goerli, harmonyOne, mainnet, mantle, mantleSepoliaTestnet, optimism, optimismGoerli, optimismSepolia, polygon, scroll, scrollSepolia, polygonMumbai, polygonAmoy, polygonZkEvm, polygonZkEvmTestnet, sei, seiDevnet, sepolia, holesky, zeroGMainnet, zeroGTestnet, abstractTestnet, abstract, b3, b3Sepolia, flare, flareTestnet, gravity, hemiSepolia, hemi, hyperliquidEvmTestnet, immutableZkEvmTestnet, immutableZkEvm, ink, inkSepolia, jocMainnet, kairos, kaia, linea, monad, monadTestnet, morph, nomina, peaq, plasmaTestnet, plasma, soneium, sonic, storyAeneid, story, unichain, unichainSepolia, vanaMoksha, vana, worldchain, worldchainSepolia, xai, xaiTestnet, xLayer } from 'viem/chains';
|
|
4
4
|
|
|
5
5
|
const ETH_MAINNET_NETWORK = 'ethereum-mainnet';
|
|
6
6
|
const qnChainToViemChain = {
|
|
@@ -26,7 +26,7 @@ const qnChainToViemChain = {
|
|
|
26
26
|
['gnosis']: gnosis,
|
|
27
27
|
'ethereum-goerli': goerli,
|
|
28
28
|
'harmony-mainnet': harmonyOne,
|
|
29
|
-
[ETH_MAINNET_NETWORK]: mainnet,
|
|
29
|
+
[ETH_MAINNET_NETWORK]: mainnet, // The URL doesn't actually contain this
|
|
30
30
|
'mantle-mainnet': mantle,
|
|
31
31
|
'mantle-sepolia': mantleSepoliaTestnet,
|
|
32
32
|
['optimism']: optimism,
|
|
@@ -44,6 +44,46 @@ const qnChainToViemChain = {
|
|
|
44
44
|
'sei-arctic': seiDevnet,
|
|
45
45
|
'ethereum-sepolia': sepolia,
|
|
46
46
|
'ethereum-holesky': holesky,
|
|
47
|
+
'0g-mainnet': zeroGMainnet,
|
|
48
|
+
'0g-galileo': zeroGTestnet,
|
|
49
|
+
'abstract-testnet': abstractTestnet,
|
|
50
|
+
'abstract-mainnet': abstract,
|
|
51
|
+
'b3-mainnet': b3,
|
|
52
|
+
'b3-sepolia': b3Sepolia,
|
|
53
|
+
'flare-mainnet': flare,
|
|
54
|
+
'flare-coston2': flareTestnet,
|
|
55
|
+
'gravity-alpham': gravity,
|
|
56
|
+
'hemi-testnet': hemiSepolia,
|
|
57
|
+
'hemi-mainnet': hemi,
|
|
58
|
+
'hype-testnet': hyperliquidEvmTestnet,
|
|
59
|
+
'imx-testnet': immutableZkEvmTestnet,
|
|
60
|
+
'imx-mainnet': immutableZkEvm,
|
|
61
|
+
'ink-mainnet': ink,
|
|
62
|
+
'ink-sepolia': inkSepolia,
|
|
63
|
+
'joc-mainnet': jocMainnet,
|
|
64
|
+
'kaia-kairos': kairos,
|
|
65
|
+
'kaia-mainnet': kaia,
|
|
66
|
+
'linea-mainnet': linea,
|
|
67
|
+
'monad-mainnet': monad,
|
|
68
|
+
'monad-testnet': monadTestnet,
|
|
69
|
+
'morph-mainnet': morph,
|
|
70
|
+
'nomina-mainnet': nomina,
|
|
71
|
+
'peaq-mainnet': peaq,
|
|
72
|
+
'plasma-testnet': plasmaTestnet,
|
|
73
|
+
'plasma-mainnet': plasma,
|
|
74
|
+
'soneium-mainnet': soneium,
|
|
75
|
+
'sonic-mainnet': sonic,
|
|
76
|
+
'story-aeneid': storyAeneid,
|
|
77
|
+
'story-mainnet': story,
|
|
78
|
+
'unichain-mainnet': unichain,
|
|
79
|
+
'unichain-sepolia': unichainSepolia,
|
|
80
|
+
'vana-moksha': vanaMoksha,
|
|
81
|
+
'vana-mainnet': vana,
|
|
82
|
+
'worldchain-mainnet': worldchain,
|
|
83
|
+
'worldchain-sepolia': worldchainSepolia,
|
|
84
|
+
'xai-mainnet': xai,
|
|
85
|
+
'xai-testnet': xaiTestnet,
|
|
86
|
+
'xlayer-mainnet': xLayer,
|
|
47
87
|
};
|
|
48
88
|
function chainNameFromEndpoint(endpointUrl) {
|
|
49
89
|
let hostnameParts;
|
package/esm/lib/constants.js
CHANGED
package/esm/solana/solana.js
CHANGED
|
@@ -39,7 +39,7 @@ class Solana {
|
|
|
39
39
|
ComputeBudgetProgram.setComputeUnitPrice({
|
|
40
40
|
microLamports: 1,
|
|
41
41
|
}),
|
|
42
|
-
ComputeBudgetProgram.setComputeUnitLimit({ units:
|
|
42
|
+
ComputeBudgetProgram.setComputeUnitLimit({ units: 1_400_000 }),
|
|
43
43
|
...transaction.instructions,
|
|
44
44
|
];
|
|
45
45
|
// eslint-disable-next-line prefer-const
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"directory": "packages/libs/sdk"
|
|
7
7
|
},
|
|
8
8
|
"license": "MIT",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.6.0",
|
|
10
10
|
"main": "./cjs/index.js",
|
|
11
11
|
"module": "./esm/index.js",
|
|
12
12
|
"types": "./index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@solana/web3.js": "^1.91",
|
|
16
16
|
"cross-fetch": "^3.1.6",
|
|
17
17
|
"tslib": "^2.5.3",
|
|
18
|
-
"viem": "^2.
|
|
18
|
+
"viem": "^2.43.1",
|
|
19
19
|
"zod": "^3.21.4"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|