From d2b01363331c8b1c40958e3f525a57c1be5260a2 Mon Sep 17 00:00:00 2001 From: Alexandru Stefan Date: Fri, 13 Dec 2024 17:27:57 +0200 Subject: [PATCH] fix: update deprecated method --- package.json | 1 + pnpm-lock.yaml | 331 +++++++++++++++++++++++++++++++++++---------- test/test-world.ts | 7 +- 3 files changed, 261 insertions(+), 78 deletions(-) diff --git a/package.json b/package.json index 80eaa1b..42921a1 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "bs58": "^5.0.0" }, "devDependencies": { + "@anza-xyz/solana-rpc-get-stake-activation": "^1.0.1", "@jest/globals": "^29.5.0", "@solana/web3.js": "^1.91.7", "@types/bn.js": "^5.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2bba04a..61b7357 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,24 +1,28 @@ lockfileVersion: '9.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + importers: .: dependencies: '@coral-xyz/anchor': specifier: ^0.28.0 - version: 0.28.0 + version: 0.28.0(bufferutil@4.0.4)(utf-8-validate@5.0.6) '@marinade.finance/directed-stake-sdk': specifier: ^0.1.0 - version: 0.1.0(@solana/web3.js@1.92.3)(bn.js@5.2.1)(jsbi@4.3.0) + version: 0.1.0(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6))(bn.js@5.2.1)(bufferutil@4.0.4)(jsbi@4.3.0)(utf-8-validate@5.0.6) '@marinade.finance/native-staking-sdk': specifier: ^1.1.0 - version: 1.1.0 + version: 1.1.0(bufferutil@4.0.4)(utf-8-validate@5.0.6) '@solana/spl-stake-pool': specifier: ^0.6.5 - version: 0.6.5 + version: 0.6.5(bufferutil@4.0.4)(utf-8-validate@5.0.6) '@solana/spl-token-3.x': specifier: npm:@solana/spl-token@^0.3.8 - version: '@solana/spl-token@0.3.8(@solana/web3.js@1.92.3)' + version: '@solana/spl-token@0.3.8(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6))(bufferutil@4.0.4)(utf-8-validate@5.0.6)' borsh: specifier: ^0.7.0 version: 0.7.0 @@ -26,12 +30,15 @@ importers: specifier: ^5.0.0 version: 5.0.0 devDependencies: + '@anza-xyz/solana-rpc-get-stake-activation': + specifier: ^1.0.1 + version: 1.0.1(bufferutil@4.0.4)(utf-8-validate@5.0.6) '@jest/globals': specifier: ^29.5.0 version: 29.5.0 '@solana/web3.js': specifier: ^1.91.7 - version: 1.92.3 + version: 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) '@types/bn.js': specifier: ^5.1.1 version: 5.1.1 @@ -46,7 +53,7 @@ importers: version: 18.16.3 '@typescript-eslint/eslint-plugin': specifier: ^5.59.1 - version: 5.59.1(@typescript-eslint/parser@5.59.1)(eslint@8.39.0)(typescript@5.0.4) + version: 5.59.1(@typescript-eslint/parser@5.59.1(eslint@8.39.0)(typescript@5.0.4))(eslint@8.39.0)(typescript@5.0.4) '@typescript-eslint/parser': specifier: ^5.59.1 version: 5.59.1(eslint@8.39.0)(typescript@5.0.4) @@ -64,7 +71,7 @@ importers: version: 8.0.3 jest: specifier: ^29.5.0 - version: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1) + version: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)) jest-each: specifier: ^29.5.0 version: 29.5.0 @@ -73,7 +80,7 @@ importers: version: 4.3.0 lint-staged: specifier: ^13.2.2 - version: 13.2.2 + version: 13.2.2(enquirer@2.3.6) node-polyfill-webpack-plugin: specifier: ^2.0.1 version: 2.0.1(webpack@5.81.0) @@ -82,7 +89,7 @@ importers: version: 5.3.7(webpack@5.81.0) ts-jest: specifier: ^29.1.0 - version: 29.1.0(@babel/core@7.21.4)(jest@29.5.0)(typescript@5.0.4) + version: 29.1.0(@babel/core@7.21.4)(@jest/types@29.5.0)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)))(typescript@5.0.4) ts-loader: specifier: ^9.4.2 version: 9.4.2(typescript@5.0.4)(webpack@5.81.0) @@ -105,6 +112,9 @@ packages: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} + '@anza-xyz/solana-rpc-get-stake-activation@1.0.1': + resolution: {integrity: sha512-g5JiDnk6pb/8kzMiPJti2aM2DZFO6SjYaDpuOUgvPUcTWPR8oKiHvFOfG6Ixbu74g0nqAJP0IrxKUS5UI8q4OQ==} + '@babel/code-frame@7.12.11': resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} @@ -268,6 +278,10 @@ packages: resolution: {integrity: sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==} engines: {node: '>=6.9.0'} + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + engines: {node: '>=6.9.0'} + '@babel/template@7.20.7': resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==} engines: {node: '>=6.9.0'} @@ -463,10 +477,18 @@ packages: '@noble/curves@1.4.0': resolution: {integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==} + '@noble/curves@1.7.0': + resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} + engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.4.0': resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} + '@noble/hashes@1.6.0': + resolution: {integrity: sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==} + engines: {node: ^14.21.3 || >=16} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -524,6 +546,12 @@ packages: '@solana/web3.js@1.92.3': resolution: {integrity: sha512-NVBWvb9zdJIAx6X+caXaIICCEQfQaQ8ygykCjJW4u2z/sIKcvPj3ZIIllnx0MWMc3IxGq15ozGYDOQIMbwUcHw==} + '@solana/web3.js@1.95.8': + resolution: {integrity: sha512-sBHzNh7dHMrmNS5xPD1d0Xa2QffW/RXaxu/OysRXBfwTp+LYqGGmMtCYYwrHPrN5rjAmJCsQRNAwv4FM0t3B6g==} + + '@swc/helpers@0.5.15': + resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@tsconfig/node10@1.0.9': resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} @@ -605,9 +633,15 @@ packages: '@types/stack-utils@2.0.1': resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} + '@types/uuid@8.3.4': + resolution: {integrity: sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==} + '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} + '@types/ws@8.5.13': + resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} + '@types/yargs-parser@21.0.0': resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} @@ -1438,6 +1472,9 @@ packages: eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + eventemitter3@5.0.1: + resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} + events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} @@ -1832,6 +1869,11 @@ packages: engines: {node: '>=8'} hasBin: true + jayson@4.1.3: + resolution: {integrity: sha512-LtXh5aYZodBZ9Fc3j6f2w+MTNcnxteMOrb+QgIouguGOulWi0lieEkOUg+HkjjFs0DGoWDds6bi4E9hpNFLulQ==} + engines: {node: '>=8'} + hasBin: true + jest-changed-files@29.5.0: resolution: {integrity: sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2511,6 +2553,9 @@ packages: rpc-websockets@8.0.1: resolution: {integrity: sha512-PptrPRK40uQvifq5sCcObmqInVcZXhy+RRrirzdE5KUPvDI47y1wPvfckD2QzqngOU9xaPW/dT+G+b+wj6M1MQ==} + rpc-websockets@9.0.4: + resolution: {integrity: sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==} + run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -2684,6 +2729,10 @@ packages: resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==} engines: {node: '>=14.0.0'} + superstruct@2.0.2: + resolution: {integrity: sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==} + engines: {node: '>=14.0.0'} + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -2819,6 +2868,9 @@ packages: tslib@2.3.1: resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsutils@3.21.0: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -2992,6 +3044,18 @@ packages: resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + ws@7.5.10: + resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@7.5.9: resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} engines: {node: '>=8.3.0'} @@ -3061,6 +3125,14 @@ snapshots: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.18 + '@anza-xyz/solana-rpc-get-stake-activation@1.0.1(bufferutil@4.0.4)(utf-8-validate@5.0.6)': + dependencies: + '@solana/web3.js': 1.95.8(bufferutil@4.0.4)(utf-8-validate@5.0.6) + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + '@babel/code-frame@7.12.11': dependencies: '@babel/highlight': 7.18.6 @@ -3247,6 +3319,10 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 + '@babel/runtime@7.26.0': + dependencies: + regenerator-runtime: 0.14.1 + '@babel/template@7.20.7': dependencies: '@babel/code-frame': 7.21.4 @@ -3276,10 +3352,10 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@coral-xyz/anchor@0.27.0': + '@coral-xyz/anchor@0.27.0(bufferutil@4.0.4)(utf-8-validate@5.0.6)': dependencies: - '@coral-xyz/borsh': 0.27.0(@solana/web3.js@1.92.3) - '@solana/web3.js': 1.92.3 + '@coral-xyz/borsh': 0.27.0(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6)) + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) base64-js: 1.5.1 bn.js: 5.2.1 bs58: 4.0.1 @@ -3298,10 +3374,10 @@ snapshots: - encoding - utf-8-validate - '@coral-xyz/anchor@0.28.0': + '@coral-xyz/anchor@0.28.0(bufferutil@4.0.4)(utf-8-validate@5.0.6)': dependencies: - '@coral-xyz/borsh': 0.28.0(@solana/web3.js@1.92.3) - '@solana/web3.js': 1.92.3 + '@coral-xyz/borsh': 0.28.0(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6)) + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) base64-js: 1.5.1 bn.js: 5.2.1 bs58: 4.0.1 @@ -3320,15 +3396,15 @@ snapshots: - encoding - utf-8-validate - '@coral-xyz/borsh@0.27.0(@solana/web3.js@1.92.3)': + '@coral-xyz/borsh@0.27.0(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6))': dependencies: - '@solana/web3.js': 1.92.3 + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) bn.js: 5.2.1 buffer-layout: 1.2.2 - '@coral-xyz/borsh@0.28.0(@solana/web3.js@1.92.3)': + '@coral-xyz/borsh@0.28.0(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6))': dependencies: - '@solana/web3.js': 1.92.3 + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) bn.js: 5.2.1 buffer-layout: 1.2.2 @@ -3414,7 +3490,7 @@ snapshots: jest-util: 29.5.0 slash: 3.0.0 - '@jest/core@29.5.0(ts-node@10.9.1)': + '@jest/core@29.5.0(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4))': dependencies: '@jest/console': 29.5.0 '@jest/reporters': 29.5.0 @@ -3428,7 +3504,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.5.0 - jest-config: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1) + jest-config: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)) jest-haste-map: 29.5.0 jest-message-util: 29.5.0 jest-regex-util: 29.4.3 @@ -3595,10 +3671,10 @@ snapshots: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.15 - '@marinade.finance/directed-stake-sdk@0.1.0(@solana/web3.js@1.92.3)(bn.js@5.2.1)(jsbi@4.3.0)': + '@marinade.finance/directed-stake-sdk@0.1.0(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6))(bn.js@5.2.1)(bufferutil@4.0.4)(jsbi@4.3.0)(utf-8-validate@5.0.6)': dependencies: - '@coral-xyz/anchor': 0.27.0 - '@solana/web3.js': 1.92.3 + '@coral-xyz/anchor': 0.27.0(bufferutil@4.0.4)(utf-8-validate@5.0.6) + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) bn.js: 5.2.1 bs58: 5.0.0 jsbi: 4.3.0 @@ -3607,10 +3683,10 @@ snapshots: - encoding - utf-8-validate - '@marinade.finance/native-staking-sdk@1.1.0': + '@marinade.finance/native-staking-sdk@1.1.0(bufferutil@4.0.4)(utf-8-validate@5.0.6)': dependencies: - '@solana/spl-memo': 0.2.3(@solana/web3.js@1.92.3) - '@solana/web3.js': 1.92.3 + '@solana/spl-memo': 0.2.3(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6)) + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) bn.js: 5.2.1 transitivePeerDependencies: - bufferutil @@ -3621,8 +3697,14 @@ snapshots: dependencies: '@noble/hashes': 1.4.0 + '@noble/curves@1.7.0': + dependencies: + '@noble/hashes': 1.6.0 + '@noble/hashes@1.4.0': {} + '@noble/hashes@1.6.0': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3635,9 +3717,9 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - '@project-serum/borsh@0.2.5(@solana/web3.js@1.92.3)': + '@project-serum/borsh@0.2.5(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6))': dependencies: - '@solana/web3.js': 1.92.3 + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) bn.js: 5.2.1 buffer-layout: 1.2.2 @@ -3651,10 +3733,10 @@ snapshots: dependencies: '@sinonjs/commons': 2.0.0 - '@solana/buffer-layout-utils@0.2.0': + '@solana/buffer-layout-utils@0.2.0(bufferutil@4.0.4)(utf-8-validate@5.0.6)': dependencies: '@solana/buffer-layout': 4.0.1 - '@solana/web3.js': 1.92.3 + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) bigint-buffer: 1.1.5 bignumber.js: 9.1.1 transitivePeerDependencies: @@ -3666,17 +3748,17 @@ snapshots: dependencies: buffer: 6.0.3 - '@solana/spl-memo@0.2.3(@solana/web3.js@1.92.3)': + '@solana/spl-memo@0.2.3(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6))': dependencies: - '@solana/web3.js': 1.92.3 + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) buffer: 6.0.3 - '@solana/spl-stake-pool@0.6.5': + '@solana/spl-stake-pool@0.6.5(bufferutil@4.0.4)(utf-8-validate@5.0.6)': dependencies: - '@project-serum/borsh': 0.2.5(@solana/web3.js@1.92.3) + '@project-serum/borsh': 0.2.5(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6)) '@solana/buffer-layout': 4.0.1 - '@solana/spl-token': 0.1.8 - '@solana/web3.js': 1.92.3 + '@solana/spl-token': 0.1.8(bufferutil@4.0.4)(utf-8-validate@5.0.6) + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) bn.js: 5.2.1 buffer: 6.0.3 transitivePeerDependencies: @@ -3684,10 +3766,10 @@ snapshots: - encoding - utf-8-validate - '@solana/spl-token@0.1.8': + '@solana/spl-token@0.1.8(bufferutil@4.0.4)(utf-8-validate@5.0.6)': dependencies: '@babel/runtime': 7.21.0 - '@solana/web3.js': 1.92.3 + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) bn.js: 5.2.1 buffer: 6.0.3 buffer-layout: 1.2.2 @@ -3697,18 +3779,18 @@ snapshots: - encoding - utf-8-validate - '@solana/spl-token@0.3.8(@solana/web3.js@1.92.3)': + '@solana/spl-token@0.3.8(@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6))(bufferutil@4.0.4)(utf-8-validate@5.0.6)': dependencies: '@solana/buffer-layout': 4.0.1 - '@solana/buffer-layout-utils': 0.2.0 - '@solana/web3.js': 1.92.3 + '@solana/buffer-layout-utils': 0.2.0(bufferutil@4.0.4)(utf-8-validate@5.0.6) + '@solana/web3.js': 1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) buffer: 6.0.3 transitivePeerDependencies: - bufferutil - encoding - utf-8-validate - '@solana/web3.js@1.92.3': + '@solana/web3.js@1.92.3(bufferutil@4.0.4)(utf-8-validate@5.0.6)': dependencies: '@babel/runtime': 7.24.7 '@noble/curves': 1.4.0 @@ -3721,7 +3803,7 @@ snapshots: bs58: 4.0.1 buffer: 6.0.3 fast-stable-stringify: 1.0.0 - jayson: 4.1.0 + jayson: 4.1.0(bufferutil@4.0.4)(utf-8-validate@5.0.6) node-fetch: 2.7.0 rpc-websockets: 8.0.1 superstruct: 1.0.4 @@ -3730,6 +3812,32 @@ snapshots: - encoding - utf-8-validate + '@solana/web3.js@1.95.8(bufferutil@4.0.4)(utf-8-validate@5.0.6)': + dependencies: + '@babel/runtime': 7.26.0 + '@noble/curves': 1.7.0 + '@noble/hashes': 1.4.0 + '@solana/buffer-layout': 4.0.1 + agentkeepalive: 4.5.0 + bigint-buffer: 1.1.5 + bn.js: 5.2.1 + borsh: 0.7.0 + bs58: 4.0.1 + buffer: 6.0.3 + fast-stable-stringify: 1.0.0 + jayson: 4.1.3(bufferutil@4.0.4)(utf-8-validate@5.0.6) + node-fetch: 2.7.0 + rpc-websockets: 9.0.4 + superstruct: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + + '@swc/helpers@0.5.15': + dependencies: + tslib: 2.8.1 + '@tsconfig/node10@1.0.9': {} '@tsconfig/node12@1.0.11': {} @@ -3818,17 +3926,23 @@ snapshots: '@types/stack-utils@2.0.1': {} + '@types/uuid@8.3.4': {} + '@types/ws@7.4.7': dependencies: '@types/node': 18.16.3 + '@types/ws@8.5.13': + dependencies: + '@types/node': 18.16.3 + '@types/yargs-parser@21.0.0': {} '@types/yargs@17.0.24': dependencies: '@types/yargs-parser': 21.0.0 - '@typescript-eslint/eslint-plugin@4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.0.4)': + '@typescript-eslint/eslint-plugin@4.33.0(@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@5.0.4))(eslint@7.32.0)(typescript@5.0.4)': dependencies: '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@5.0.4) '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@5.0.4) @@ -3840,11 +3954,12 @@ snapshots: regexpp: 3.2.0 semver: 7.5.0 tsutils: 3.21.0(typescript@5.0.4) + optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@5.59.1(@typescript-eslint/parser@5.59.1)(eslint@8.39.0)(typescript@5.0.4)': + '@typescript-eslint/eslint-plugin@5.59.1(@typescript-eslint/parser@5.59.1(eslint@8.39.0)(typescript@5.0.4))(eslint@8.39.0)(typescript@5.0.4)': dependencies: '@eslint-community/regexpp': 4.5.0 '@typescript-eslint/parser': 5.59.1(eslint@8.39.0)(typescript@5.0.4) @@ -3858,6 +3973,7 @@ snapshots: natural-compare-lite: 1.4.0 semver: 7.5.0 tsutils: 3.21.0(typescript@5.0.4) + optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -3882,6 +3998,7 @@ snapshots: '@typescript-eslint/typescript-estree': 4.33.0(typescript@5.0.4) debug: 4.3.4 eslint: 7.32.0 + optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -3893,6 +4010,7 @@ snapshots: '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.0.4) debug: 4.3.4 eslint: 8.39.0 + optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -3914,6 +4032,7 @@ snapshots: debug: 4.3.4 eslint: 8.39.0 tsutils: 3.21.0(typescript@5.0.4) + optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -3931,6 +4050,7 @@ snapshots: is-glob: 4.0.3 semver: 7.5.0 tsutils: 3.21.0(typescript@5.0.4) + optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -3944,6 +4064,7 @@ snapshots: is-glob: 4.0.3 semver: 7.5.0 tsutils: 3.21.0(typescript@5.0.4) + optionalDependencies: typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -4352,6 +4473,7 @@ snapshots: bufferutil@4.0.4: dependencies: node-gyp-build: 4.6.0 + optional: true builtin-status-codes@3.0.0: {} @@ -4652,12 +4774,13 @@ snapshots: resolve: 1.22.2 semver: 6.3.0 - eslint-plugin-prettier@3.4.1(eslint-config-prettier@7.2.0)(eslint@7.32.0)(prettier@2.8.7): + eslint-plugin-prettier@3.4.1(eslint-config-prettier@7.2.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.7): dependencies: eslint: 7.32.0 - eslint-config-prettier: 7.2.0(eslint@7.32.0) prettier: 2.8.7 prettier-linter-helpers: 1.0.0 + optionalDependencies: + eslint-config-prettier: 7.2.0(eslint@7.32.0) eslint-scope@5.1.1: dependencies: @@ -4806,6 +4929,8 @@ snapshots: eventemitter3@4.0.7: {} + eventemitter3@5.0.1: {} + events@3.3.0: {} evp_bytestokey@1.0.3: @@ -4987,13 +5112,13 @@ snapshots: gts@3.1.1(typescript@5.0.4): dependencies: - '@typescript-eslint/eslint-plugin': 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@5.0.4) + '@typescript-eslint/eslint-plugin': 4.33.0(@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@5.0.4))(eslint@7.32.0)(typescript@5.0.4) '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@5.0.4) chalk: 4.1.2 eslint: 7.32.0 eslint-config-prettier: 7.2.0(eslint@7.32.0) eslint-plugin-node: 11.1.0(eslint@7.32.0) - eslint-plugin-prettier: 3.4.1(eslint-config-prettier@7.2.0)(eslint@7.32.0)(prettier@2.8.7) + eslint-plugin-prettier: 3.4.1(eslint-config-prettier@7.2.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.7) execa: 5.1.1 inquirer: 7.3.3 json5: 2.2.3 @@ -5174,9 +5299,13 @@ snapshots: isobject@3.0.1: {} - isomorphic-ws@4.0.1(ws@7.5.9): + isomorphic-ws@4.0.1(ws@7.5.10(bufferutil@4.0.4)(utf-8-validate@5.0.6)): + dependencies: + ws: 7.5.10(bufferutil@4.0.4)(utf-8-validate@5.0.6) + + isomorphic-ws@4.0.1(ws@7.5.9(bufferutil@4.0.4)(utf-8-validate@5.0.6)): dependencies: - ws: 7.5.9 + ws: 7.5.9(bufferutil@4.0.4)(utf-8-validate@5.0.6) istanbul-lib-coverage@3.2.0: {} @@ -5209,7 +5338,7 @@ snapshots: html-escaper: 2.0.2 istanbul-lib-report: 3.0.0 - jayson@4.1.0: + jayson@4.1.0(bufferutil@4.0.4)(utf-8-validate@5.0.6): dependencies: '@types/connect': 3.4.35 '@types/node': 12.20.55 @@ -5219,10 +5348,28 @@ snapshots: delay: 5.0.0 es6-promisify: 5.0.0 eyes: 0.1.8 - isomorphic-ws: 4.0.1(ws@7.5.9) + isomorphic-ws: 4.0.1(ws@7.5.9(bufferutil@4.0.4)(utf-8-validate@5.0.6)) json-stringify-safe: 5.0.1 uuid: 8.3.2 - ws: 7.5.9 + ws: 7.5.9(bufferutil@4.0.4)(utf-8-validate@5.0.6) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + jayson@4.1.3(bufferutil@4.0.4)(utf-8-validate@5.0.6): + dependencies: + '@types/connect': 3.4.35 + '@types/node': 12.20.55 + '@types/ws': 7.4.7 + JSONStream: 1.3.5 + commander: 2.20.3 + delay: 5.0.0 + es6-promisify: 5.0.0 + eyes: 0.1.8 + isomorphic-ws: 4.0.1(ws@7.5.10(bufferutil@4.0.4)(utf-8-validate@5.0.6)) + json-stringify-safe: 5.0.1 + uuid: 8.3.2 + ws: 7.5.10(bufferutil@4.0.4)(utf-8-validate@5.0.6) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -5257,16 +5404,16 @@ snapshots: transitivePeerDependencies: - supports-color - jest-cli@29.5.0(@types/node@18.16.3)(ts-node@10.9.1): + jest-cli@29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)): dependencies: - '@jest/core': 29.5.0(ts-node@10.9.1) + '@jest/core': 29.5.0(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)) '@jest/test-result': 29.5.0 '@jest/types': 29.5.0 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1) + jest-config: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)) jest-util: 29.5.0 jest-validate: 29.5.0 prompts: 2.4.2 @@ -5276,12 +5423,11 @@ snapshots: - supports-color - ts-node - jest-config@29.5.0(@types/node@18.16.3)(ts-node@10.9.1): + jest-config@29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)): dependencies: '@babel/core': 7.21.4 '@jest/test-sequencer': 29.5.0 '@jest/types': 29.5.0 - '@types/node': 18.16.3 babel-jest: 29.5.0(@babel/core@7.21.4) chalk: 4.1.2 ci-info: 3.8.0 @@ -5301,6 +5447,8 @@ snapshots: pretty-format: 29.5.0 slash: 3.0.0 strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 18.16.3 ts-node: 10.9.1(@types/node@18.16.3)(typescript@5.0.4) transitivePeerDependencies: - supports-color @@ -5382,7 +5530,7 @@ snapshots: jest-util: 29.5.0 jest-pnp-resolver@1.2.3(jest-resolve@29.5.0): - dependencies: + optionalDependencies: jest-resolve: 29.5.0 jest-regex-util@29.4.3: {} @@ -5529,12 +5677,12 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.5.0(@types/node@18.16.3)(ts-node@10.9.1): + jest@29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)): dependencies: - '@jest/core': 29.5.0(ts-node@10.9.1) + '@jest/core': 29.5.0(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)) '@jest/types': 29.5.0 import-local: 3.1.0 - jest-cli: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1) + jest-cli: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)) transitivePeerDependencies: - '@types/node' - supports-color @@ -5588,7 +5736,7 @@ snapshots: lines-and-columns@1.2.4: {} - lint-staged@13.2.2: + lint-staged@13.2.2(enquirer@2.3.6): dependencies: chalk: 5.2.0 cli-truncate: 3.1.0 @@ -5596,7 +5744,7 @@ snapshots: debug: 4.3.4 execa: 7.1.1 lilconfig: 2.1.0 - listr2: 5.0.8 + listr2: 5.0.8(enquirer@2.3.6) micromatch: 4.0.5 normalize-path: 3.0.0 object-inspect: 1.12.3 @@ -5607,7 +5755,7 @@ snapshots: - enquirer - supports-color - listr2@5.0.8: + listr2@5.0.8(enquirer@2.3.6): dependencies: cli-truncate: 2.1.0 colorette: 2.0.20 @@ -5617,6 +5765,8 @@ snapshots: rxjs: 7.8.0 through: 2.3.8 wrap-ansi: 7.0.0 + optionalDependencies: + enquirer: 2.3.6 loader-runner@4.3.0: {} @@ -5755,7 +5905,8 @@ snapshots: dependencies: whatwg-url: 5.0.0 - node-gyp-build@4.6.0: {} + node-gyp-build@4.6.0: + optional: true node-int64@0.4.0: {} @@ -6072,6 +6223,19 @@ snapshots: bufferutil: 4.0.4 utf-8-validate: 5.0.6 + rpc-websockets@9.0.4: + dependencies: + '@swc/helpers': 0.5.15 + '@types/uuid': 8.3.4 + '@types/ws': 8.5.13 + buffer: 6.0.3 + eventemitter3: 5.0.1 + uuid: 8.3.2 + ws: 8.13.0(bufferutil@4.0.4)(utf-8-validate@5.0.6) + optionalDependencies: + bufferutil: 4.0.4 + utf-8-validate: 5.0.6 + run-async@2.4.1: {} run-parallel@1.2.0: @@ -6244,6 +6408,8 @@ snapshots: superstruct@1.0.4: {} + superstruct@2.0.2: {} + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -6318,12 +6484,11 @@ snapshots: trim-newlines@3.0.1: {} - ts-jest@29.1.0(@babel/core@7.21.4)(jest@29.5.0)(typescript@5.0.4): + ts-jest@29.1.0(@babel/core@7.21.4)(@jest/types@29.5.0)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)))(typescript@5.0.4): dependencies: - '@babel/core': 7.21.4 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1) + jest: 29.5.0(@types/node@18.16.3)(ts-node@10.9.1(@types/node@18.16.3)(typescript@5.0.4)) jest-util: 29.5.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -6331,6 +6496,10 @@ snapshots: semver: 7.5.0 typescript: 5.0.4 yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.21.4 + '@jest/types': 29.5.0 + babel-jest: 29.5.0(@babel/core@7.21.4) ts-loader@9.4.2(typescript@5.0.4)(webpack@5.81.0): dependencies: @@ -6363,6 +6532,8 @@ snapshots: tslib@2.3.1: {} + tslib@2.8.1: {} + tsutils@3.21.0(typescript@5.0.4): dependencies: tslib: 1.14.1 @@ -6412,6 +6583,7 @@ snapshots: utf-8-validate@5.0.6: dependencies: node-gyp-build: 4.6.0 + optional: true util-deprecate@1.0.2: {} @@ -6502,8 +6674,9 @@ snapshots: tapable: 2.2.1 terser-webpack-plugin: 5.3.7(webpack@5.81.0) watchpack: 2.4.0 - webpack-cli: 5.0.2(webpack@5.81.0) webpack-sources: 3.2.3 + optionalDependencies: + webpack-cli: 5.0.2(webpack@5.81.0) transitivePeerDependencies: - '@swc/core' - esbuild @@ -6557,10 +6730,18 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 3.0.7 - ws@7.5.9: {} + ws@7.5.10(bufferutil@4.0.4)(utf-8-validate@5.0.6): + optionalDependencies: + bufferutil: 4.0.4 + utf-8-validate: 5.0.6 + + ws@7.5.9(bufferutil@4.0.4)(utf-8-validate@5.0.6): + optionalDependencies: + bufferutil: 4.0.4 + utf-8-validate: 5.0.6 ws@8.13.0(bufferutil@4.0.4)(utf-8-validate@5.0.6): - dependencies: + optionalDependencies: bufferutil: 4.0.4 utf-8-validate: 5.0.6 diff --git a/test/test-world.ts b/test/test-world.ts index ea74ee8..e90b2c6 100644 --- a/test/test-world.ts +++ b/test/test-world.ts @@ -1,4 +1,5 @@ import { AnchorProvider, BN, Wallet, web3 } from '@coral-xyz/anchor' +import { getStakeActivation } from '@anza-xyz/solana-rpc-get-stake-activation' import { Marinade, MarinadeUtils } from '../src' import { getParsedStakeAccountInfo } from '../src/util' import { Signer } from '@solana/web3.js' @@ -232,10 +233,10 @@ export async function waitForStakeAccountActivation({ // 1. waiting for the stake account to be activated { const startTime = Date.now() - let stakeStatus = await connection.getStakeActivation(stakeAccount) - while (stakeStatus.state !== 'active') { + let stakeStatus = await getStakeActivation(connection, stakeAccount) + while (stakeStatus.status !== 'active') { await sleep(1000) - stakeStatus = await connection.getStakeActivation(stakeAccount) + stakeStatus = await getStakeActivation(connection, stakeAccount) if (Date.now() - startTime > timeoutSeconds * 1000) { throw new Error( `Stake account ${stakeAccount.toBase58()} was not activated in timeout of ${timeoutSeconds} seconds`