From ebc0a986605c1466d5974dd746972acd9cb1042b Mon Sep 17 00:00:00 2001 From: Pablo Maldonado Date: Thu, 16 Jan 2025 12:29:34 +0000 Subject: [PATCH 1/3] feat(svm): add codama clients Signed-off-by: Pablo Maldonado --- .gitignore | 2 + package.json | 7 +- scripts/svm/utils/generate-svm-clients.ts | 23 + scripts/svm/utils/rename-clients-imports.ts | 22 + src/svm/clients/index.ts | 2 + src/svm/index.ts | 1 + yarn.lock | 635 +++++++++++++++++++- 7 files changed, 688 insertions(+), 4 deletions(-) create mode 100644 scripts/svm/utils/generate-svm-clients.ts create mode 100644 scripts/svm/utils/rename-clients-imports.ts create mode 100644 src/svm/clients/index.ts diff --git a/.gitignore b/.gitignore index 99c25217f..6863cfc85 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ target test-ledger idls src/svm/assets +src/svm/clients/* +!src/svm/clients/index.ts diff --git a/package.json b/package.json index 0c6d267b3..2ae459b9d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "lint-fix": "yarn prettier --write **/*.js **/*.ts ./programs/**/*.rs ./contracts**/*.sol && cargo +nightly fmt --all && cargo clippy", "clean-fast": "for dir in node_modules cache cache-zk artifacts artifacts-zk dist typechain; do mv \"${dir}\" \"_${dir}\"; rm -rf \"_${dir}\" &; done", "clean": "rm -rf node_modules cache cache-zk artifacts artifacts-zk dist typechain", - "generate-svm-assets": "sh ./scripts/generate-svm-assets.sh", + "generate-svm-assets": "sh ./scripts/generate-svm-assets.sh && yarn generate-svm-clients", + "generate-svm-clients": "yarn ts-node ./scripts/svm/utils/generate-svm-clients.ts && yarn ts-node ./scripts/svm/utils/rename-clients-imports.ts", "build-evm": "hardhat compile", "build-svm": "echo 'Generating IDLs...' && anchor build > /dev/null 2>&1 || true && anchor run generateExternalTypes && anchor build", "build-ts": "tsc && rsync -a --include '*/' --include '*.d.ts' --exclude '*' ./typechain ./dist/", @@ -54,6 +55,7 @@ "@solana-developers/helpers": "^2.4.0", "@solana/spl-token": "^0.4.6", "@solana/web3.js": "^1.31.0", + "@solana/web3-v2.js": "npm:@solana/web3.js@2", "@types/yargs": "^17.0.33", "@uma/common": "^2.37.3", "@uma/contracts-node": "^0.4.17", @@ -65,6 +67,9 @@ "zksync-web3": "^0.14.3" }, "devDependencies": { + "@codama/nodes-from-anchor": "^1.1.0", + "@codama/renderers-js": "^1.1.1", + "codama": "^1.2.0", "@consensys/linea-sdk": "^0.1.6", "@matterlabs/hardhat-zksync-deploy": "^0.6.3", "@matterlabs/hardhat-zksync-solc": "^1.1.4", diff --git a/scripts/svm/utils/generate-svm-clients.ts b/scripts/svm/utils/generate-svm-clients.ts new file mode 100644 index 000000000..218f51937 --- /dev/null +++ b/scripts/svm/utils/generate-svm-clients.ts @@ -0,0 +1,23 @@ +import { createFromRoot } from "codama"; +import { rootNodeFromAnchor, AnchorIdl } from "@codama/nodes-from-anchor"; +import { renderVisitor as renderJavaScriptVisitor } from "@codama/renderers-js"; +import { SvmSpokeIdl, MulticallHandlerIdl } from "../../../src/svm/assets"; +import path from "path"; + +let codama = createFromRoot(rootNodeFromAnchor(SvmSpokeIdl as AnchorIdl)); +export const clientsPath = path.join(__dirname, "..", "..", "..", "src", "svm", "clients"); + +codama.accept(renderJavaScriptVisitor(path.join(clientsPath, "SvmSpoke"))); + +codama = createFromRoot(rootNodeFromAnchor(MulticallHandlerIdl as AnchorIdl)); +codama.accept(renderJavaScriptVisitor(path.join(clientsPath, "MulticallHandler"))); + +// codama = createFromRoot(rootNodeFromAnchor(MessageTransmitterIdl as AnchorIdl)); +// codama.accept( +// renderJavaScriptVisitor(path.join(clientsPath, "MessageTransmitter")) +// ); + +// codama = createFromRoot(rootNodeFromAnchor(TokenMessengerMinterIdl as AnchorIdl)); +// codama.accept( +// renderJavaScriptVisitor(path.join(clientsPath, "TokenMessengerMinter")) +// ); diff --git a/scripts/svm/utils/rename-clients-imports.ts b/scripts/svm/utils/rename-clients-imports.ts new file mode 100644 index 000000000..162878420 --- /dev/null +++ b/scripts/svm/utils/rename-clients-imports.ts @@ -0,0 +1,22 @@ +import { clientsPath } from "./generate-svm-clients"; + +const fs = require("fs"); +const path = require("path"); + +function replaceInFiles(dir: string): void { + const files = fs.readdirSync(dir); + files.forEach((file: string) => { + const filePath = path.join(dir, file); + const stat = fs.statSync(filePath); + + if (stat.isDirectory()) { + replaceInFiles(filePath); + } else if (file.endsWith(".ts")) { + const fileContent = fs.readFileSync(filePath, "utf8"); + const updatedContent = fileContent.replace("@solana/web3.js", "@solana/web3-v2.js"); + fs.writeFileSync(filePath, updatedContent); + } + }); +} + +replaceInFiles(clientsPath); diff --git a/src/svm/clients/index.ts b/src/svm/clients/index.ts new file mode 100644 index 000000000..cdb539f16 --- /dev/null +++ b/src/svm/clients/index.ts @@ -0,0 +1,2 @@ +export * from "./MulticallHandler"; +export * from "./SvmSpoke"; diff --git a/src/svm/index.ts b/src/svm/index.ts index 8276197e4..e74a2da64 100644 --- a/src/svm/index.ts +++ b/src/svm/index.ts @@ -9,3 +9,4 @@ export * from "./assets"; export * from "./constants"; export * from "./helpers"; export * from "./cctpHelpers"; +export * from "./clients"; diff --git a/yarn.lock b/yarn.lock index 188a32aa4..fc69ef4bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -287,6 +287,88 @@ "@chainsafe/persistent-merkle-tree" "^0.4.2" case "^1.6.3" +"@codama/errors@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@codama/errors/-/errors-1.2.0.tgz#5292fac4f61cde9f98f453f178f647edd8f804a8" + integrity sha512-7cLTgu1UpDkvDIx+9WclYaQr4vuFxnRYlZ5GFhZ0vP3QPlhj2FORwDC+crUy+YzboNKL7tGg53CAOpF61HnEpg== + dependencies: + "@codama/node-types" "1.2.0" + chalk "^5.4.1" + commander "^12.1.0" + +"@codama/node-types@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@codama/node-types/-/node-types-1.2.0.tgz#7669e68b43a523cf3ff165129417173046927cc7" + integrity sha512-r/gBY8vi2tsrThtT1uKXQvI2c7Zv3hJH/+a35JJS/pkkt2tsAgX45/9TQWMepiGECfak8OhiMmqb+Naf+qDg4w== + +"@codama/nodes-from-anchor@1.1.0", "@codama/nodes-from-anchor@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@codama/nodes-from-anchor/-/nodes-from-anchor-1.1.0.tgz#9ee635921cc206ef8957dca4ec61a54976852e4c" + integrity sha512-cEe3tsQMZU8y3YJOi0HOSbsZcTiKP0AxC4XVMFmFJjJe8lKWZW6hghxKG9N4YyryujtZkSGvdpxk+rnmd12Lwg== + dependencies: + "@codama/errors" "1.2.0" + "@codama/nodes" "1.2.0" + "@codama/visitors" "1.2.0" + "@noble/hashes" "^1.6.1" + +"@codama/nodes@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@codama/nodes/-/nodes-1.2.0.tgz#db0911f9295321413781d36d067d79721623d3d2" + integrity sha512-3wb449llwUOYpHlIxKAwNFpJpazOTrpC3fhoFd3l0gSVKq77qz1IbYq8M3mVxNLSnXv8bHNrW0BCenyzjO1e2g== + dependencies: + "@codama/errors" "1.2.0" + "@codama/node-types" "1.2.0" + +"@codama/renderers-core@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@codama/renderers-core/-/renderers-core-1.0.2.tgz#a670ca5a63a3c72a0fe55026572daeb21e4fb87b" + integrity sha512-feDqtNB0PIocgrDIPdG0mdv+l28VEA64gExg1NdR2aiydp0LxpBrU5gnPOqxiZ2et4ARtt9yGU959CYdzqh2Qg== + dependencies: + "@codama/errors" "1.2.0" + "@codama/nodes" "1.2.0" + "@codama/visitors-core" "1.2.0" + +"@codama/renderers-js@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@codama/renderers-js/-/renderers-js-1.1.1.tgz#3b7d35f123e4b355f7595dee8f8fdb64004895cb" + integrity sha512-lAsZkFswL7FI59wgzenVRgK2Hcw0u9bkMk+BMupoFQlOs29xZb3xihtL2CBfEsvzLbHdq/XdDSypiVfuD6A3Cg== + dependencies: + "@codama/errors" "1.2.0" + "@codama/nodes" "1.2.0" + "@codama/nodes-from-anchor" "1.1.0" + "@codama/renderers-core" "1.0.2" + "@codama/visitors-core" "1.2.0" + "@solana/codecs-strings" rc + nunjucks "^3.2.4" + prettier "^3.4.2" + +"@codama/validators@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@codama/validators/-/validators-1.2.0.tgz#12b6425f69e7a1fcf718f31f515e982b4565f027" + integrity sha512-/HV7aMgzm93vUqPsnWnDYUPx3hz6i1GxmY3CrW0Ivo0hoyR73Es4t48jYcIjYBb4bqQlO2eTfWuXUEAjwTsCAA== + dependencies: + "@codama/errors" "1.2.0" + "@codama/nodes" "1.2.0" + "@codama/visitors-core" "1.2.0" + +"@codama/visitors-core@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@codama/visitors-core/-/visitors-core-1.2.0.tgz#f52fb376c705cb3d13a814e13c856c8a2185f599" + integrity sha512-sr8+xGx+QPAMedBY0wT5W0HAQJypBWNPGWKPImNg5t3Da1DC5oofrW3JHmqtSUHDdFbDXtagcEZ32DGqJFJ5hA== + dependencies: + "@codama/errors" "1.2.0" + "@codama/nodes" "1.2.0" + json-stable-stringify "^1.2.1" + +"@codama/visitors@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@codama/visitors/-/visitors-1.2.0.tgz#04d73fada915464338b6426876febe08defa7d7d" + integrity sha512-3edQ1aCVdzYK6eNSUSCgs+P4SJ0UyrVpU7s1ykQog1El//ZkjGJNAAjyuCuA4EMuKxDW0sQa9RXkPfIJSxpa6g== + dependencies: + "@codama/errors" "1.2.0" + "@codama/nodes" "1.2.0" + "@codama/visitors-core" "1.2.0" + "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -1694,6 +1776,11 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== +"@noble/hashes@^1.6.1": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.0.tgz#5d9e33af2c7d04fee35de1519b80c958b2e35e39" + integrity sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w== + "@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" @@ -2415,6 +2502,35 @@ bs58 "^6.0.0" dotenv "^16.4.5" +"@solana/accounts@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/accounts/-/accounts-2.0.0.tgz#4d5806079a69d1a15bc85eb4072913cf848ae8f7" + integrity sha512-1CE4P3QSDH5x+ZtSthMY2mn/ekROBnlT3/4f3CHDJicDvLQsgAq2yCvGHsYkK3ZA0mxhFLuhJVjuKASPnmG1rQ== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/rpc-spec" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/addresses@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/addresses/-/addresses-2.0.0.tgz#d1b01a38e0b48d7e4fea223821655a0c2b903c28" + integrity sha512-8n3c/mUlH1/z+pM8e7OJ6uDSXw26Be0dgYiokiqblO66DGQ0d+7pqFUFZ5pEGjJ9PU2lDTSfY8rHf4cemOqwzQ== + dependencies: + "@solana/assertions" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + +"@solana/assertions@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/assertions/-/assertions-2.0.0.tgz#b02fc874a890f252c4595a0e35deeb1719d5f02b" + integrity sha512-NyPPqZRNGXs/GAjfgsw7YS6vCTXWt4ibXveS+ciy5sdmp/0v3pA6DlzYjleF9Sljrew0IiON15rjaXamhDxYfQ== + dependencies: + "@solana/errors" "2.0.0" + "@solana/buffer-layout-utils@^0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@solana/buffer-layout-utils/-/buffer-layout-utils-0.2.0.tgz#b45a6cab3293a2eb7597cceb474f229889d875ca" @@ -2432,6 +2548,13 @@ dependencies: buffer "~6.0.3" +"@solana/codecs-core@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0.tgz#31d4a6acce9ac49f786939c4e564adf9a68c56ef" + integrity sha512-qCG+3hDU5Pm8V6joJjR4j4Zv9md1z0RaecniNDIkEglnxmOUODnmPLWbtOjnDylfItyuZeDihK8hkewdj8cUtw== + dependencies: + "@solana/errors" "2.0.0" + "@solana/codecs-core@2.0.0-preview.4": version "2.0.0-preview.4" resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-preview.4.tgz#770826105f2f884110a21662573e7a2014654324" @@ -2446,6 +2569,22 @@ dependencies: "@solana/errors" "2.0.0-rc.1" +"@solana/codecs-core@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.0.0-rc.4.tgz#c4280d68877a078df4b430871db159f95534fcd3" + integrity sha512-JIrTSps032mSE3wBxW3bXOqWfoy4CMy1CX/XeVCijyh5kLVxZTSDIdRTYdePdL1yzaOZF1Xysvt1DhOUgBdM+A== + dependencies: + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs-data-structures@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0.tgz#0a06b8646634dcf44a7b1d968fe8d9218c3cb745" + integrity sha512-N98Y4jsrC/XeOgqrfsGqcOFIaOoMsKdAxOmy5oqVaEN67YoGSLNC9ROnqamOAOrsZdicTWx9/YLKFmQi9DPh1A== + dependencies: + "@solana/codecs-core" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/codecs-data-structures@2.0.0-preview.4": version "2.0.0-preview.4" resolved "https://registry.yarnpkg.com/@solana/codecs-data-structures/-/codecs-data-structures-2.0.0-preview.4.tgz#f8a2470982a9792334737ea64000ccbdff287247" @@ -2464,6 +2603,14 @@ "@solana/codecs-numbers" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" +"@solana/codecs-numbers@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0.tgz#c08250968fa1cbfab076367b650269271061c646" + integrity sha512-r66i7VzJO1MZkQWZIAI6jjJOFVpnq0+FIabo2Z2ZDtrArFus/SbSEv543yCLeD2tdR/G/p+1+P5On10qF50Y1Q== + dependencies: + "@solana/codecs-core" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/codecs-numbers@2.0.0-preview.4": version "2.0.0-preview.4" resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-preview.4.tgz#6a53b456bb7866f252d8c032c81a92651e150f66" @@ -2480,6 +2627,23 @@ "@solana/codecs-core" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" +"@solana/codecs-numbers@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.0.0-rc.4.tgz#ad95848d64dbaab4f6f0935d042df00802c84bba" + integrity sha512-ZJR7TaUO65+3Hzo3YOOUCS0wlzh17IW+j0MZC2LCk1R0woaypRpHKj4iSMYeQOZkMxsd9QT3WNvjFrPC2qA6Sw== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs-strings@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0.tgz#46e728adee9a4737c3ee811af452948aab31cbd4" + integrity sha512-dNqeCypsvaHcjW86H0gYgAZGGkKVBeKVeh7WXlOZ9kno7PeQ2wNkpccyzDfuzaIsKv+HZUD3v/eo86GCvnKazQ== + dependencies: + "@solana/codecs-core" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/codecs-strings@2.0.0-preview.4": version "2.0.0-preview.4" resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-preview.4.tgz#4d06bb722a55a5d04598d362021bfab4bd446760" @@ -2498,6 +2662,26 @@ "@solana/codecs-numbers" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" +"@solana/codecs-strings@rc": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/codecs-strings/-/codecs-strings-2.0.0-rc.4.tgz#6a9223c074ab2422a7da3a8fc60cd398c6b8e167" + integrity sha512-LGfK2RL0BKjYYUfzu2FG/gTgCsYOMz9FKVs2ntji6WneZygPxJTV5W98K3J8Rl0JewpCSCFQH3xjLSHBJUS0fA== + dependencies: + "@solana/codecs-core" "2.0.0-rc.4" + "@solana/codecs-numbers" "2.0.0-rc.4" + "@solana/errors" "2.0.0-rc.4" + +"@solana/codecs@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0.tgz#2a3f272932eebad5b8592e6263b068c7d0761e7f" + integrity sha512-xneIG5ppE6WIGaZCK7JTys0uLhzlnEJUdBO8nRVIyerwH6aqCfb0fGe7q5WNNYAVDRSxC0Pc1TDe1hpdx3KWmQ== + dependencies: + "@solana/codecs-core" "2.0.0" + "@solana/codecs-data-structures" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/options" "2.0.0" + "@solana/codecs@2.0.0-preview.4": version "2.0.0-preview.4" resolved "https://registry.yarnpkg.com/@solana/codecs/-/codecs-2.0.0-preview.4.tgz#a1923cc78a6f64ebe656c7ec6335eb6b70405b22" @@ -2520,6 +2704,14 @@ "@solana/codecs-strings" "2.0.0-rc.1" "@solana/options" "2.0.0-rc.1" +"@solana/errors@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0.tgz#31c87baaf4b19aaa2a1d8bbc4dfa6efd449d7bbe" + integrity sha512-IHlaPFSy4lvYco1oHJ3X8DbchWwAwJaL/4wZKnF1ugwZ0g0re8wbABrqNOe/jyZ84VU9Z14PYM8W9oDAebdJbw== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + "@solana/errors@2.0.0-preview.4": version "2.0.0-preview.4" resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-preview.4.tgz#056ba76b6dd900dafa70117311bec3aef0f5250b" @@ -2536,6 +2728,52 @@ chalk "^5.3.0" commander "^12.1.0" +"@solana/errors@2.0.0-rc.4": + version "2.0.0-rc.4" + resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.0.0-rc.4.tgz#4a5aa0d82206b07f31e729262f47def34397ac61" + integrity sha512-0PPaMyB81keEHG/1pnyEuiBVKctbXO641M2w3CIOrYT/wzjunfF0FTxsqq9wYJeYo0AyiefCKGgSPs6wiY2PpQ== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + +"@solana/fast-stable-stringify@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/fast-stable-stringify/-/fast-stable-stringify-2.0.0.tgz#ac06b304ee3e050c171bcbe885e91772e22e06fb" + integrity sha512-EsIx9z+eoxOmC+FpzhEb+H67CCYTbs/omAqXD4EdEYnCHWrI1li1oYBV+NoKzfx8fKlX+nzNB7S/9kc4u7Etpw== + +"@solana/functional@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/functional/-/functional-2.0.0.tgz#6e2468cc2ec334ee3c39609130520b3a5c8f9bc0" + integrity sha512-Sj+sLiUTimnMEyGnSLGt0lbih2xPDUhxhonnrIkPwA+hjQ3ULGHAxeevHU06nqiVEgENQYUJ5rCtHs4xhUFAkQ== + +"@solana/instructions@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/instructions/-/instructions-2.0.0.tgz#4062a2211b376dc2a9cc5a25ad50f1de0ea44e5b" + integrity sha512-MiTEiNF7Pzp+Y+x4yadl2VUcNHboaW5WP52psBuhHns3GpbbruRv5efMpM9OEQNe1OsN+Eg39vjEidX55+P+DQ== + dependencies: + "@solana/errors" "2.0.0" + +"@solana/keys@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/keys/-/keys-2.0.0.tgz#b4b31815265a003b8840028979e83e1b723ee02c" + integrity sha512-SSLSX8BXRvfLKBqsmBghmlhMKpwHeWd5CHi5zXgTS1BRrtiU6lcrTVC9ie6B+WaNNq7oe3e6K5bdbhu3fFZ+0g== + dependencies: + "@solana/assertions" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + +"@solana/options@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0.tgz#0dbbecd8511c1e600cad8615a836c6e06c3191d5" + integrity sha512-OVc4KnYosB8oAukQ/htgrxXSxlUP6gUu5Aau6d/BgEkPQzWd/Pr+w91VWw3i3zZuu2SGpedbyh05RoJBe/hSXA== + dependencies: + "@solana/codecs-core" "2.0.0" + "@solana/codecs-data-structures" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/options@2.0.0-preview.4": version "2.0.0-preview.4" resolved "https://registry.yarnpkg.com/@solana/options/-/options-2.0.0-preview.4.tgz#212d35d1da87c7efb13de4d3569ad9eb070f013d" @@ -2558,6 +2796,163 @@ "@solana/codecs-strings" "2.0.0-rc.1" "@solana/errors" "2.0.0-rc.1" +"@solana/programs@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/programs/-/programs-2.0.0.tgz#1c0fa1c98a8cf6fab3ac722fe768e110057eeaf9" + integrity sha512-JPIKB61pWfODnsvEAaPALc6vR5rn7kmHLpFaviWhBtfUlEVgB8yVTR0MURe4+z+fJCPRV5wWss+svA4EeGDYzQ== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/errors" "2.0.0" + +"@solana/promises@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/promises/-/promises-2.0.0.tgz#81c8ee7c706ea4c46892022666da51bb9da921ef" + integrity sha512-4teQ52HDjK16ORrZe1zl+Q9WcZdQ+YEl0M1gk59XG7D0P9WqaVEQzeXGnKSCs+Y9bnB1u5xCJccwpUhHYWq6gg== + +"@solana/rpc-api@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-api/-/rpc-api-2.0.0.tgz#84ab27beb3ec7416bc1aa263281a582060953450" + integrity sha512-1FwitYxwADMF/6zKP2kNXg8ESxB6GhNBNW1c4f5dEmuXuBbeD/enLV3WMrpg8zJkIaaYarEFNbt7R7HyFzmURQ== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/rpc-parsed-types" "2.0.0" + "@solana/rpc-spec" "2.0.0" + "@solana/rpc-transformers" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" + +"@solana/rpc-parsed-types@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-parsed-types/-/rpc-parsed-types-2.0.0.tgz#b83840981ce816142681d4f091a314300d4b10ab" + integrity sha512-VCeY/oKVEtBnp8EDOc5LSSiOeIOLFIgLndcxqU0ij/cZaQ01DOoHbhluvhZtU80Z3dUeicec8TiMgkFzed+WhQ== + +"@solana/rpc-spec-types@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-spec-types/-/rpc-spec-types-2.0.0.tgz#49e46188f77aeeda0cf6f0e40117e2ba4a35cc14" + integrity sha512-G2lmhFhgtxMQd/D6B04BHGE7bm5dMZdIPQNOqVGhzNAVjrmyapD3JN2hKAbmaYPe97wLfZERw0Ux1u4Y6q7TqA== + +"@solana/rpc-spec@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-spec/-/rpc-spec-2.0.0.tgz#d0cbacd1c1dcb1a98d240488afd1e63878e7b17b" + integrity sha512-1uIDzj7vocCUqfOifjv1zAuxQ53ugiup/42edVFoQLOnJresoEZLL6WjnsJq4oCTccEAvGhUBI1WWKeZTGNxFQ== + dependencies: + "@solana/errors" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + +"@solana/rpc-subscriptions-api@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-api/-/rpc-subscriptions-api-2.0.0.tgz#bd2e8ce566e9bf530d678ea4733472e1da5890af" + integrity sha512-NAJQvSFXYIIf8zxsMFBCkSbZNZgT32pzPZ1V6ZAd+U2iDEjx3L+yFwoJgfOcHp8kAV+alsF2lIsGBlG4u+ehvw== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/rpc-subscriptions-spec" "2.0.0" + "@solana/rpc-transformers" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" + +"@solana/rpc-subscriptions-channel-websocket@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-channel-websocket/-/rpc-subscriptions-channel-websocket-2.0.0.tgz#7bff107b03cafe7ead1cf3801d9ed8078a01217c" + integrity sha512-hSQDZBmcp2t+gLZsSBqs/SqVw4RuNSC7njiP46azyzW7oGg8X2YPV36AHGsHD12KPsc0UpT1OAZ4+AN9meVKww== + dependencies: + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/rpc-subscriptions-spec" "2.0.0" + "@solana/subscribable" "2.0.0" + +"@solana/rpc-subscriptions-spec@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions-spec/-/rpc-subscriptions-spec-2.0.0.tgz#b476b449d917134476001c22c54fbeb69bfae4cb" + integrity sha512-VXMiI3fYtU1PkVVTXL87pcY48ZY8aCi1N6FqtxSP2xg/GASL01j1qbwyIL1OvoCqGyRgIxdd/YfaByW9wmWBhA== + dependencies: + "@solana/errors" "2.0.0" + "@solana/promises" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/subscribable" "2.0.0" + +"@solana/rpc-subscriptions@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-subscriptions/-/rpc-subscriptions-2.0.0.tgz#c512b261a428f550510fe855bb751c0638547d4f" + integrity sha512-AdwMJHMrhlj7q1MPjZmVcKq3iLqMW3N0MT8kzIAP2vP+8o/d6Fn4aqGxoz2Hlfn3OYIZoYStN2VBtwzbcfEgMA== + dependencies: + "@solana/errors" "2.0.0" + "@solana/fast-stable-stringify" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/promises" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/rpc-subscriptions-api" "2.0.0" + "@solana/rpc-subscriptions-channel-websocket" "2.0.0" + "@solana/rpc-subscriptions-spec" "2.0.0" + "@solana/rpc-transformers" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/subscribable" "2.0.0" + +"@solana/rpc-transformers@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-transformers/-/rpc-transformers-2.0.0.tgz#592f7a2cc18378bf29248d059d1142897edf497f" + integrity sha512-H6tN0qcqzUangowsLLQtYXKJsf1Roe3/qJ1Cy0gv9ojY9uEvNbJqpeEj+7blv0MUZfEe+rECAwBhxxRKPMhYGw== + dependencies: + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/rpc-transport-http@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-transport-http/-/rpc-transport-http-2.0.0.tgz#87aecad790dfefe723262778b3c3be73d9a35426" + integrity sha512-UJLhKhhxDd1OPi8hb2AenHsDm1mofCBbhWn4bDCnH2Q3ulwYadUhcNqNbxjJPQ774VNhAf53SSI5A6PQo8IZSQ== + dependencies: + "@solana/errors" "2.0.0" + "@solana/rpc-spec" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + undici-types "^6.20.0" + +"@solana/rpc-types@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc-types/-/rpc-types-2.0.0.tgz#332989671606914f9ab0d196cb94e83f626bef34" + integrity sha512-o1ApB9PYR0A3XjVSOh//SOVWgjDcqMlR3UNmtqciuREIBmWqnvPirdOa5EJxD3iPhfA4gnNnhGzT+tMDeDW/Kw== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + +"@solana/rpc@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/rpc/-/rpc-2.0.0.tgz#afc43a9be80f9c9b254da30bb31c2b3f34025c66" + integrity sha512-TumQ9DFRpib/RyaIqLVfr7UjqSo7ldfzpae0tgjM93YjbItB4Z0VcUXc3uAFvkeYw2/HIMb46Zg43mkUwozjDg== + dependencies: + "@solana/errors" "2.0.0" + "@solana/fast-stable-stringify" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/rpc-api" "2.0.0" + "@solana/rpc-spec" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/rpc-transformers" "2.0.0" + "@solana/rpc-transport-http" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/signers@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/signers/-/signers-2.0.0.tgz#896f5e0fc17ea8e47042cfcb1c24b225cb8def3d" + integrity sha512-JEYJS3x/iKkqPV/3b1nLpX9lHib21wQKV3fOuu1aDLQqmX9OYKrnIIITYdnFDhmvGhpEpkkbPnqu7yVaFIBYsQ== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/instructions" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" + "@solana/spl-token-group@^0.0.5": version "0.0.5" resolved "https://registry.yarnpkg.com/@solana/spl-token-group/-/spl-token-group-0.0.5.tgz#f955dcca782031c85e862b2b46878d1bb02db6c2" @@ -2592,6 +2987,94 @@ dependencies: buffer "^6.0.3" +"@solana/subscribable@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/subscribable/-/subscribable-2.0.0.tgz#6476bf253395c077f9fdbd4a9b83011734a86b06" + integrity sha512-Ex7d2GnTSNVMZDU3z6nKN4agRDDgCgBDiLnmn1hmt0iFo3alr3gRAqiqa7qGouAtYh9/29pyc8tVJCijHWJPQQ== + dependencies: + "@solana/errors" "2.0.0" + +"@solana/sysvars@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/sysvars/-/sysvars-2.0.0.tgz#60f1e3b918bfdd34420f1ca2d6458cc2538d16b7" + integrity sha512-8D4ajKcCYQsTG1p4k30lre2vjxLR6S5MftUGJnIaQObDCzGmaeA9GRti4Kk4gSPWVYFTBoj1ASx8EcEXaB3eIQ== + dependencies: + "@solana/accounts" "2.0.0" + "@solana/codecs" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/transaction-confirmation@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/transaction-confirmation/-/transaction-confirmation-2.0.0.tgz#53385e31f94ab6b1f35c25576cb478f383476c81" + integrity sha512-JkTw5gXLiqQjf6xK0fpVcoJ/aMp2kagtFSD/BAOazdJ3UYzOzbzqvECt6uWa3ConcMswQ2vXalVtI7ZjmYuIeg== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/promises" "2.0.0" + "@solana/rpc" "2.0.0" + "@solana/rpc-subscriptions" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" + +"@solana/transaction-messages@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/transaction-messages/-/transaction-messages-2.0.0.tgz#ad362eb7f4a14efab31e5dfaa65f24959030d8f8" + integrity sha512-Uc6Fw1EJLBrmgS1lH2ZfLAAKFvprWPQQzOVwZS78Pv8Whsk7tweYTK6S0Upv0nHr50rGpnORJfmdBrXE6OfNGg== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-data-structures" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/instructions" "2.0.0" + "@solana/rpc-types" "2.0.0" + +"@solana/transactions@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/transactions/-/transactions-2.0.0.tgz#c27cb998e2c701fc49bda2cc5ca896e6067840dc" + integrity sha512-VfdTE+59WKvuBG//6iE9RPjAB+ZT2kLgY2CDHabaz6RkH6OjOkMez9fWPVa3Xtcus+YQWN1SnQoryjF/xSx04w== + dependencies: + "@solana/addresses" "2.0.0" + "@solana/codecs-core" "2.0.0" + "@solana/codecs-data-structures" "2.0.0" + "@solana/codecs-numbers" "2.0.0" + "@solana/codecs-strings" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/instructions" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/transaction-messages" "2.0.0" + +"@solana/web3-v2.js@npm:@solana/web3.js@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-2.0.0.tgz#192918343982e1964269b3adb2567532c1e12c89" + integrity sha512-x+ZRB2/r5tVK/xw8QRbAfgPcX51G9f2ifEyAQ/J5npOO+6+MPeeCjtr5UxHNDAYs9Ypo0PN+YJATCO4vhzQJGg== + dependencies: + "@solana/accounts" "2.0.0" + "@solana/addresses" "2.0.0" + "@solana/codecs" "2.0.0" + "@solana/errors" "2.0.0" + "@solana/functional" "2.0.0" + "@solana/instructions" "2.0.0" + "@solana/keys" "2.0.0" + "@solana/programs" "2.0.0" + "@solana/rpc" "2.0.0" + "@solana/rpc-parsed-types" "2.0.0" + "@solana/rpc-spec-types" "2.0.0" + "@solana/rpc-subscriptions" "2.0.0" + "@solana/rpc-types" "2.0.0" + "@solana/signers" "2.0.0" + "@solana/sysvars" "2.0.0" + "@solana/transaction-confirmation" "2.0.0" + "@solana/transaction-messages" "2.0.0" + "@solana/transactions" "2.0.0" + "@solana/web3.js@^1.31.0", "@solana/web3.js@^1.32.0", "@solana/web3.js@^1.68.0", "@solana/web3.js@^1.95.2": version "1.95.3" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.95.3.tgz#70b5f4d76823f56b5af6403da51125fffeb65ff3" @@ -3502,6 +3985,11 @@ JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" +a-sync-waterfall@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz#75b6b6aa72598b497a125e7a2770f14f4c8a1fa7" + integrity sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA== + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -3922,7 +4410,7 @@ arrify@^2.0.0, arrify@^2.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== -asap@~2.0.6: +asap@^2.0.3, asap@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= @@ -5221,6 +5709,14 @@ cachedown@1.0.0: abstract-leveldown "^2.4.1" lru-cache "^3.2.0" +call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.0, call-bind@^1.0.2, call-bind@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -5240,6 +5736,24 @@ call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +call-bind@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.2" + +call-bound@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.3.tgz#41cfd032b593e39176a71533ab4f384aa04fd681" + integrity sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA== + dependencies: + call-bind-apply-helpers "^1.0.1" + get-intrinsic "^1.2.6" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -5422,6 +5936,11 @@ chalk@^5.3.0: resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== +chalk@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.4.1.tgz#1b48bf0963ec158dce2aacf69c093ae2dd2092d8" + integrity sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w== + change-case@3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" @@ -5716,6 +6235,16 @@ clone@2.1.2, clone@^2.0.0, clone@^2.1.1: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= +codama@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/codama/-/codama-1.2.0.tgz#4938890145fa557f2e9ce232a43fb39a378be0fe" + integrity sha512-cGcaArn/XhAo+hp3wPfFq6Gnirj+cjfQQheOyYBSeHSNQSpstcGKwoaQROPYJAYT32LNn9DdlNPowv7pXVwWcA== + dependencies: + "@codama/errors" "1.2.0" + "@codama/nodes" "1.2.0" + "@codama/validators" "1.2.0" + "@codama/visitors" "1.2.0" + code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -5843,6 +6372,11 @@ commander@^2.15.0, commander@^2.19.0, commander@^2.20.3: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + commander@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" @@ -6674,6 +7208,15 @@ drbg.js@^1.0.1: create-hash "^1.1.2" create-hmac "^1.1.4" +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -6948,11 +7491,23 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-object-atoms@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" @@ -8807,6 +9362,22 @@ get-intrinsic@^1.2.4: has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.7.tgz#dcfcb33d3272e15f445d15124bc0a216189b9044" + integrity sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + function-bind "^1.1.2" + get-proto "^1.0.0" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + get-iterator@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/get-iterator/-/get-iterator-1.0.2.tgz#cd747c02b4c084461fac14f48f6b45a80ed25c82" @@ -8817,6 +9388,14 @@ get-port@^3.1.0: resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" integrity sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw= +get-proto@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -9085,6 +9664,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + got@12.1.0: version "12.1.0" resolved "https://registry.yarnpkg.com/got/-/got-12.1.0.tgz#099f3815305c682be4fd6b0ee0726d8e4c6b0af4" @@ -9374,6 +9958,11 @@ has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + has-to-string-tag-x@^1.2.0: version "1.4.1" resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" @@ -9456,7 +10045,7 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasown@^2.0.0: +hasown@^2.0.0, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -10720,6 +11309,17 @@ json-stable-stringify@^1.0.1: dependencies: jsonify "~0.0.0" +json-stable-stringify@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.2.1.tgz#addb683c2b78014d0b78d704c2fcbdf0695a60e2" + integrity sha512-Lp6HbbBgosLmJbjx0pBLbgvx68FaFU1sdkmBuckmhhJ88kL13OA51CDtR2yJB50eCNMH9wRqtQNNiAqQH4YXnA== + dependencies: + call-bind "^1.0.8" + call-bound "^1.0.3" + isarray "^2.0.5" + jsonify "^0.0.1" + object-keys "^1.1.1" + json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -10774,6 +11374,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -11449,6 +12054,11 @@ match-all@^1.2.6: resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + mcl-wasm@^0.7.1: version "0.7.9" resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" @@ -12490,6 +13100,15 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" +nunjucks@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/nunjucks/-/nunjucks-3.2.4.tgz#f0878eef528ce7b0aa35d67cc6898635fd74649e" + integrity sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ== + dependencies: + a-sync-waterfall "^1.0.0" + asap "^2.0.3" + commander "^5.1.0" + oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -13387,6 +14006,11 @@ prettier@^2.3.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== +prettier@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f" + integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ== + pretty-quick@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-2.0.2.tgz#4e44d6489ed513ef111bee501f63688d854584e6" @@ -14584,7 +15208,7 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -set-function-length@^1.2.1: +set-function-length@^1.2.1, set-function-length@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== @@ -16199,6 +16823,11 @@ underscore@~1.13.2: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== +undici-types@^6.20.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + undici@^5.14.0: version "5.21.0" resolved "https://registry.yarnpkg.com/undici/-/undici-5.21.0.tgz#b00dfc381f202565ab7f52023222ab862bb2494f" From 703581e1daec9715a45c7c9a27f35edc0a11fa29 Mon Sep 17 00:00:00 2001 From: Pablo Maldonado Date: Thu, 16 Jan 2025 12:48:38 +0000 Subject: [PATCH 2/3] fix: renaming Signed-off-by: Pablo Maldonado --- scripts/svm/utils/generate-svm-clients.ts | 5 +++-- scripts/svm/utils/rename-clients-imports.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/svm/utils/generate-svm-clients.ts b/scripts/svm/utils/generate-svm-clients.ts index 218f51937..4afcd643d 100644 --- a/scripts/svm/utils/generate-svm-clients.ts +++ b/scripts/svm/utils/generate-svm-clients.ts @@ -3,12 +3,13 @@ import { rootNodeFromAnchor, AnchorIdl } from "@codama/nodes-from-anchor"; import { renderVisitor as renderJavaScriptVisitor } from "@codama/renderers-js"; import { SvmSpokeIdl, MulticallHandlerIdl } from "../../../src/svm/assets"; import path from "path"; - -let codama = createFromRoot(rootNodeFromAnchor(SvmSpokeIdl as AnchorIdl)); export const clientsPath = path.join(__dirname, "..", "..", "..", "src", "svm", "clients"); +// Generate SvmSpoke clients +let codama = createFromRoot(rootNodeFromAnchor(SvmSpokeIdl as AnchorIdl)); codama.accept(renderJavaScriptVisitor(path.join(clientsPath, "SvmSpoke"))); +// Generate MulticallHandler clients codama = createFromRoot(rootNodeFromAnchor(MulticallHandlerIdl as AnchorIdl)); codama.accept(renderJavaScriptVisitor(path.join(clientsPath, "MulticallHandler"))); diff --git a/scripts/svm/utils/rename-clients-imports.ts b/scripts/svm/utils/rename-clients-imports.ts index 162878420..de7b9a03e 100644 --- a/scripts/svm/utils/rename-clients-imports.ts +++ b/scripts/svm/utils/rename-clients-imports.ts @@ -1,8 +1,8 @@ -import { clientsPath } from "./generate-svm-clients"; - const fs = require("fs"); const path = require("path"); +const clientsPath = path.join(__dirname, "..", "..", "..", "src", "svm", "clients"); + function replaceInFiles(dir: string): void { const files = fs.readdirSync(dir); files.forEach((file: string) => { From 06316e6237bf7f0810182110ee61dcef38ee93e1 Mon Sep 17 00:00:00 2001 From: Pablo Maldonado Date: Thu, 16 Jan 2025 12:53:19 +0000 Subject: [PATCH 3/3] fix: client exports Signed-off-by: Pablo Maldonado --- src/svm/clients/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/svm/clients/index.ts b/src/svm/clients/index.ts index cdb539f16..6ef5ec1af 100644 --- a/src/svm/clients/index.ts +++ b/src/svm/clients/index.ts @@ -1,2 +1,4 @@ -export * from "./MulticallHandler"; -export * from "./SvmSpoke"; +import * as MulticallHandlerClient from "./MulticallHandler"; +import * as SvmSpokeClient from "./SvmSpoke"; + +export { MulticallHandlerClient, SvmSpokeClient };