quicknode-solana-kit 1.0.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.
Files changed (70) hide show
  1. package/README.md +495 -0
  2. package/dist/addons.d.ts +3 -0
  3. package/dist/addons.d.ts.map +1 -0
  4. package/dist/addons.js +128 -0
  5. package/dist/addons.js.map +1 -0
  6. package/dist/assets/das.d.ts +8 -0
  7. package/dist/assets/das.d.ts.map +1 -0
  8. package/dist/assets/das.js +74 -0
  9. package/dist/assets/das.js.map +1 -0
  10. package/dist/assets/index.d.ts +2 -0
  11. package/dist/assets/index.d.ts.map +1 -0
  12. package/dist/assets/index.js +11 -0
  13. package/dist/assets/index.js.map +1 -0
  14. package/dist/index.d.ts +40 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +128 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/streaming/index.d.ts +2 -0
  19. package/dist/streaming/index.d.ts.map +1 -0
  20. package/dist/streaming/index.js +8 -0
  21. package/dist/streaming/index.js.map +1 -0
  22. package/dist/streaming/watcher.d.ts +5 -0
  23. package/dist/streaming/watcher.d.ts.map +1 -0
  24. package/dist/streaming/watcher.js +89 -0
  25. package/dist/streaming/watcher.js.map +1 -0
  26. package/dist/swap/index.d.ts +2 -0
  27. package/dist/swap/index.d.ts.map +1 -0
  28. package/dist/swap/index.js +8 -0
  29. package/dist/swap/index.js.map +1 -0
  30. package/dist/swap/jupiter.d.ts +16 -0
  31. package/dist/swap/jupiter.d.ts.map +1 -0
  32. package/dist/swap/jupiter.js +57 -0
  33. package/dist/swap/jupiter.js.map +1 -0
  34. package/dist/transactions/index.d.ts +3 -0
  35. package/dist/transactions/index.d.ts.map +1 -0
  36. package/dist/transactions/index.js +10 -0
  37. package/dist/transactions/index.js.map +1 -0
  38. package/dist/transactions/priority-fees.d.ts +4 -0
  39. package/dist/transactions/priority-fees.d.ts.map +1 -0
  40. package/dist/transactions/priority-fees.js +30 -0
  41. package/dist/transactions/priority-fees.js.map +1 -0
  42. package/dist/transactions/smart-transaction.d.ts +17 -0
  43. package/dist/transactions/smart-transaction.d.ts.map +1 -0
  44. package/dist/transactions/smart-transaction.js +112 -0
  45. package/dist/transactions/smart-transaction.js.map +1 -0
  46. package/dist/types/errors.d.ts +61 -0
  47. package/dist/types/errors.d.ts.map +1 -0
  48. package/dist/types/errors.js +139 -0
  49. package/dist/types/errors.js.map +1 -0
  50. package/dist/types/index.d.ts +211 -0
  51. package/dist/types/index.d.ts.map +1 -0
  52. package/dist/types/index.js +6 -0
  53. package/dist/types/index.js.map +1 -0
  54. package/dist/utils/addon-guard.d.ts +25 -0
  55. package/dist/utils/addon-guard.d.ts.map +1 -0
  56. package/dist/utils/addon-guard.js +67 -0
  57. package/dist/utils/addon-guard.js.map +1 -0
  58. package/dist/utils/helpers.d.ts +10 -0
  59. package/dist/utils/helpers.d.ts.map +1 -0
  60. package/dist/utils/helpers.js +49 -0
  61. package/dist/utils/helpers.js.map +1 -0
  62. package/dist/utils/http.d.ts +4 -0
  63. package/dist/utils/http.d.ts.map +1 -0
  64. package/dist/utils/http.js +88 -0
  65. package/dist/utils/http.js.map +1 -0
  66. package/dist/utils/index.d.ts +4 -0
  67. package/dist/utils/index.d.ts.map +1 -0
  68. package/dist/utils/index.js +20 -0
  69. package/dist/utils/index.js.map +1 -0
  70. package/package.json +82 -0
@@ -0,0 +1,10 @@
1
+ import { Connection, PublicKey } from '@solana/web3.js';
2
+ import type { QNConfig } from '../types';
3
+ export declare function createConnection(config: QNConfig): Connection;
4
+ export declare function validateConfig(config: QNConfig): void;
5
+ export declare function toPublicKey(address: string | PublicKey): PublicKey;
6
+ export declare function sleep(ms: number): Promise<void>;
7
+ export declare function backoffMs(attempt: number): number;
8
+ export declare function lamportsToSol(lamports: number): string;
9
+ export declare function shortenAddress(address: string, chars?: number): string;
10
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,QAAQ,GAAG,UAAU,CAK7D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAOrD;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAOlE;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,CAEjE"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createConnection = createConnection;
4
+ exports.validateConfig = validateConfig;
5
+ exports.toPublicKey = toPublicKey;
6
+ exports.sleep = sleep;
7
+ exports.backoffMs = backoffMs;
8
+ exports.lamportsToSol = lamportsToSol;
9
+ exports.shortenAddress = shortenAddress;
10
+ const web3_js_1 = require("@solana/web3.js");
11
+ const errors_1 = require("../types/errors");
12
+ function createConnection(config) {
13
+ return new web3_js_1.Connection(config.endpointUrl, {
14
+ commitment: (config.commitment ?? 'confirmed'),
15
+ confirmTransactionInitialTimeout: config.timeout ?? 30_000,
16
+ });
17
+ }
18
+ function validateConfig(config) {
19
+ if (!config.endpointUrl) {
20
+ throw new errors_1.InvalidEndpointError('(empty)');
21
+ }
22
+ if (!config.endpointUrl.startsWith('http')) {
23
+ throw new errors_1.InvalidEndpointError(config.endpointUrl);
24
+ }
25
+ }
26
+ function toPublicKey(address) {
27
+ if (address instanceof web3_js_1.PublicKey)
28
+ return address;
29
+ try {
30
+ return new web3_js_1.PublicKey(address);
31
+ }
32
+ catch {
33
+ throw new Error(`Invalid Solana address: "${address}"`);
34
+ }
35
+ }
36
+ function sleep(ms) {
37
+ return new Promise(r => setTimeout(r, ms));
38
+ }
39
+ function backoffMs(attempt) {
40
+ // 300ms, 600ms, 1200ms, 2400ms, 4800ms — capped at 10s
41
+ return Math.min(300 * Math.pow(2, attempt), 10_000);
42
+ }
43
+ function lamportsToSol(lamports) {
44
+ return (lamports / 1_000_000_000).toFixed(6);
45
+ }
46
+ function shortenAddress(address, chars = 4) {
47
+ return `${address.slice(0, chars)}...${address.slice(-chars)}`;
48
+ }
49
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":";;AAIA,4CAKC;AAED,wCAOC;AAED,kCAOC;AAED,sBAEC;AAED,8BAGC;AAED,sCAEC;AAED,wCAEC;AA5CD,6CAAyE;AAEzE,4CAAuD;AAEvD,SAAgB,gBAAgB,CAAC,MAAgB;IAC/C,OAAO,IAAI,oBAAU,CAAC,MAAM,CAAC,WAAW,EAAE;QACxC,UAAU,EAAuB,CAAC,MAAM,CAAC,UAAU,IAAI,WAAW,CAAe;QACjF,gCAAgC,EAAE,MAAM,CAAC,OAAO,IAAI,MAAM;KAC3D,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,cAAc,CAAC,MAAgB;IAC7C,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACxB,MAAM,IAAI,6BAAoB,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,6BAAoB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED,SAAgB,WAAW,CAAC,OAA2B;IACrD,IAAI,OAAO,YAAY,mBAAS;QAAE,OAAO,OAAO,CAAC;IACjD,IAAI,CAAC;QACH,OAAO,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,4BAA4B,OAAO,GAAG,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC;AAED,SAAgB,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,SAAS,CAAC,OAAe;IACvC,uDAAuD;IACvD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,SAAgB,aAAa,CAAC,QAAgB;IAC5C,OAAO,CAAC,QAAQ,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,cAAc,CAAC,OAAe,EAAE,KAAK,GAAG,CAAC;IACvD,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AACjE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function rpcPost<T>(url: string, method: string, params: unknown, timeoutMs?: number): Promise<T>;
2
+ export declare function httpGet<T>(url: string, timeoutMs?: number): Promise<T>;
3
+ export declare function httpPost<T>(url: string, body: unknown, timeoutMs?: number): Promise<T>;
4
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAEA,wBAAsB,OAAO,CAAC,CAAC,EAC7B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,SAAS,SAAS,GACjB,OAAO,CAAC,CAAC,CAAC,CA0BZ;AAED,wBAAsB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAc5E;AAED,wBAAsB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAmB5F"}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rpcPost = rpcPost;
4
+ exports.httpGet = httpGet;
5
+ exports.httpPost = httpPost;
6
+ const errors_1 = require("../types/errors");
7
+ async function rpcPost(url, method, params, timeoutMs = 30_000) {
8
+ const controller = new AbortController();
9
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
10
+ let res;
11
+ try {
12
+ res = await fetch(url, {
13
+ method: 'POST',
14
+ headers: { 'Content-Type': 'application/json' },
15
+ body: JSON.stringify({ jsonrpc: '2.0', id: Date.now(), method, params }),
16
+ signal: controller.signal,
17
+ });
18
+ }
19
+ catch (err) {
20
+ clearTimeout(timer);
21
+ const msg = err instanceof Error ? err.message : String(err);
22
+ if (msg.includes('abort'))
23
+ throw new errors_1.RPCError(method, 0, `Timed out after ${timeoutMs}ms`);
24
+ throw new errors_1.RPCError(method, 0, msg);
25
+ }
26
+ finally {
27
+ clearTimeout(timer);
28
+ }
29
+ const text = await res.text();
30
+ if (!res.ok)
31
+ throw new errors_1.RPCError(method, res.status, text);
32
+ let data;
33
+ try {
34
+ data = JSON.parse(text);
35
+ }
36
+ catch {
37
+ throw new errors_1.RPCError(method, res.status, `Invalid JSON: ${text.slice(0, 200)}`);
38
+ }
39
+ if (data.error)
40
+ throw new errors_1.RPCError(method, res.status, `${data.error.code}: ${data.error.message}`);
41
+ return data.result;
42
+ }
43
+ async function httpGet(url, timeoutMs = 30_000) {
44
+ const controller = new AbortController();
45
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
46
+ let res;
47
+ try {
48
+ res = await fetch(url, { headers: { 'Content-Type': 'application/json' }, signal: controller.signal });
49
+ }
50
+ catch (err) {
51
+ clearTimeout(timer);
52
+ throw new Error(`GET ${url} failed: ${err instanceof Error ? err.message : String(err)}`);
53
+ }
54
+ finally {
55
+ clearTimeout(timer);
56
+ }
57
+ if (!res.ok) {
58
+ const b = await res.text();
59
+ throw new Error(`GET ${url} HTTP ${res.status}: ${b.slice(0, 200)}`);
60
+ }
61
+ return res.json();
62
+ }
63
+ async function httpPost(url, body, timeoutMs = 30_000) {
64
+ const controller = new AbortController();
65
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
66
+ let res;
67
+ try {
68
+ res = await fetch(url, {
69
+ method: 'POST',
70
+ headers: { 'Content-Type': 'application/json' },
71
+ body: JSON.stringify(body),
72
+ signal: controller.signal,
73
+ });
74
+ }
75
+ catch (err) {
76
+ clearTimeout(timer);
77
+ throw new Error(`POST ${url} failed: ${err instanceof Error ? err.message : String(err)}`);
78
+ }
79
+ finally {
80
+ clearTimeout(timer);
81
+ }
82
+ if (!res.ok) {
83
+ const e = await res.text();
84
+ throw new Error(`POST ${url} HTTP ${res.status}: ${e.slice(0, 200)}`);
85
+ }
86
+ return res.json();
87
+ }
88
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":";;AAEA,0BA+BC;AAED,0BAcC;AAED,4BAmBC;AAtED,4CAA2C;AAEpC,KAAK,UAAU,OAAO,CAC3B,GAAW,EACX,MAAc,EACd,MAAe,EACf,SAAS,GAAG,MAAM;IAElB,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,U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AC,EAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;IAClH,OAAO,GAAG,CAAC,IAAI,EAAgB,CAAC;AAClC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { createConnection, validateConfig, toPublicKey, sleep, backoffMs, lamportsToSol, shortenAddress } from './helpers';
2
+ export { rpcPost, httpGet, httpPost } from './http';
3
+ export { requireAddOn, isAddOnEnabled, ADD_ON_META } from './addon-guard';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3H,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ADD_ON_META = exports.isAddOnEnabled = exports.requireAddOn = exports.httpPost = exports.httpGet = exports.rpcPost = exports.shortenAddress = exports.lamportsToSol = exports.backoffMs = exports.sleep = exports.toPublicKey = exports.validateConfig = exports.createConnection = void 0;
4
+ var helpers_1 = require("./helpers");
5
+ Object.defineProperty(exports, "createConnection", { enumerable: true, get: function () { return helpers_1.createConnection; } });
6
+ Object.defineProperty(exports, "validateConfig", { enumerable: true, get: function () { return helpers_1.validateConfig; } });
7
+ Object.defineProperty(exports, "toPublicKey", { enumerable: true, get: function () { return helpers_1.toPublicKey; } });
8
+ Object.defineProperty(exports, "sleep", { enumerable: true, get: function () { return helpers_1.sleep; } });
9
+ Object.defineProperty(exports, "backoffMs", { enumerable: true, get: function () { return helpers_1.backoffMs; } });
10
+ Object.defineProperty(exports, "lamportsToSol", { enumerable: true, get: function () { return helpers_1.lamportsToSol; } });
11
+ Object.defineProperty(exports, "shortenAddress", { enumerable: true, get: function () { return helpers_1.shortenAddress; } });
12
+ var http_1 = require("./http");
13
+ Object.defineProperty(exports, "rpcPost", { enumerable: true, get: function () { return http_1.rpcPost; } });
14
+ Object.defineProperty(exports, "httpGet", { enumerable: true, get: function () { return http_1.httpGet; } });
15
+ Object.defineProperty(exports, "httpPost", { enumerable: true, get: function () { return http_1.httpPost; } });
16
+ var addon_guard_1 = require("./addon-guard");
17
+ Object.defineProperty(exports, "requireAddOn", { enumerable: true, get: function () { return addon_guard_1.requireAddOn; } });
18
+ Object.defineProperty(exports, "isAddOnEnabled", { enumerable: true, get: function () { return addon_guard_1.isAddOnEnabled; } });
19
+ Object.defineProperty(exports, "ADD_ON_META", { enumerable: true, get: function () { return addon_guard_1.ADD_ON_META; } });
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,qCAA2H;AAAlH,2GAAA,gBAAgB,OAAA;AAAE,yGAAA,cAAc,OAAA;AAAE,sGAAA,WAAW,OAAA;AAAE,gGAAA,KAAK,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,wGAAA,aAAa,OAAA;AAAE,yGAAA,cAAc,OAAA;AACvG,+BAAoD;AAA3C,+FAAA,OAAO,OAAA;AAAE,+FAAA,OAAO,OAAA;AAAE,gGAAA,QAAQ,OAAA;AACnC,6CAA0E;AAAjE,2GAAA,YAAY,OAAA;AAAE,6GAAA,cAAc,OAAA;AAAE,0GAAA,WAAW,OAAA"}
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "quicknode-solana-kit",
3
+ "version": "1.0.0",
4
+ "description": "Unified TypeScript SDK for all QuickNode Solana add-ons — Priority Fees, Jito, Metaplex DAS, Jupiter, Yellowstone",
5
+ "keywords": [
6
+ "solana",
7
+ "quicknode",
8
+ "rpc",
9
+ "priority-fees",
10
+ "jito",
11
+ "metaplex",
12
+ "das",
13
+ "jupiter",
14
+ "yellowstone",
15
+ "nft",
16
+ "defi",
17
+ "web3",
18
+ "blockchain",
19
+ "typescript"
20
+ ],
21
+ "homepage": "https://github.com/RachitSrivastava12/quicknode-solana-starter#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/RachitSrivastava12/quicknode-solana-starter/issues"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/RachitSrivastava12/quicknode-solana-starter.git"
28
+ },
29
+ "license": "MIT",
30
+ "author": "Rachit",
31
+ "type": "commonjs",
32
+ "exports": {
33
+ ".": {
34
+ "require": "./dist/index.js",
35
+ "types": "./dist/index.d.ts"
36
+ }
37
+ },
38
+ "main": "./dist/index.js",
39
+ "types": "./dist/index.d.ts",
40
+ "directories": {
41
+ "example": "examples"
42
+ },
43
+ "files": [
44
+ "dist",
45
+ "README.md",
46
+ "LICENSE"
47
+ ],
48
+ "scripts": {
49
+ "build": "tsc",
50
+ "dev": "tsc --watch",
51
+ "test": "jest --forceExit",
52
+ "test:coverage": "jest --coverage --forceExit",
53
+ "check": "npx ts-node src/cli/check.ts",
54
+ "example:tx": "npx ts-node examples/1-smart-transaction.ts",
55
+ "example:nft": "npx ts-node examples/2-nft-queries.ts",
56
+ "example:stream": "npx ts-node examples/3-live-streaming.ts",
57
+ "example:swap": "npx ts-node examples/4-jupiter-swap.ts",
58
+ "example:all": "npx ts-node examples/run-all.ts"
59
+ },
60
+ "dependencies": {
61
+ "@solana/web3.js": "^1.95.4",
62
+ "@solana/spl-token": "^0.4.9",
63
+ "bs58": "^5.0.0",
64
+ "dotenv": "^16.4.5",
65
+ "chalk": "^4.1.2"
66
+ },
67
+ "devDependencies": {
68
+ "typescript": "^5.4.5",
69
+ "ts-node": "^10.9.2",
70
+ "@types/node": "^20.14.9",
71
+ "@types/bs58": "^4.0.4",
72
+ "jest": "^29.7.0",
73
+ "@types/jest": "^29.5.12",
74
+ "ts-jest": "^29.2.2"
75
+ },
76
+ "peerDependencies": {
77
+ "@solana/web3.js": "^1.95.4"
78
+ },
79
+ "engines": {
80
+ "node": ">=18.0.0"
81
+ }
82
+ }