diff --git a/.changeset/gold-knives-run.md b/.changeset/gold-knives-run.md new file mode 100644 index 00000000..01800624 --- /dev/null +++ b/.changeset/gold-knives-run.md @@ -0,0 +1,5 @@ +--- +'@solana-program/token-wrap': minor +--- + +Bump Kit to v6 diff --git a/clients/js/.prettierignore b/clients/js/.prettierignore index bc70c0df..b397d7b1 100644 --- a/clients/js/.prettierignore +++ b/clients/js/.prettierignore @@ -1,3 +1,3 @@ node_modules dist -src/generated +src/generated/** diff --git a/clients/js/CHANGELOG.md b/clients/js/CHANGELOG.md index 46197b27..526382b3 100644 --- a/clients/js/CHANGELOG.md +++ b/clients/js/CHANGELOG.md @@ -34,7 +34,7 @@ ### Major Changes - First stable release - - expose createMintTx, singleSignerWrapTx, singleSignerUnwrapTx - - provide multisig-helper builders and utilities (combinedMultisigTx, escrow creation, token-account helpers) - - ship generated TypeScript types, codecs, PDA finders and error maps - - add GitHub-Actions & Changesets configs for automated publishing + - expose createMintTx, singleSignerWrapTx, singleSignerUnwrapTx + - provide multisig-helper builders and utilities (combinedMultisigTx, escrow creation, token-account helpers) + - ship generated TypeScript types, codecs, PDA finders and error maps + - add GitHub-Actions & Changesets configs for automated publishing diff --git a/clients/js/eslint.config.mjs b/clients/js/eslint.config.mjs index 2475fbb3..3388fd91 100644 --- a/clients/js/eslint.config.mjs +++ b/clients/js/eslint.config.mjs @@ -3,20 +3,20 @@ import prettier from 'eslint-config-prettier'; import tseslint from 'typescript-eslint'; export default tseslint.config( - { - ignores: ['src/generated/**'], - }, - eslint.configs.recommended, - tseslint.configs.eslintRecommended, - tseslint.configs.strictTypeChecked, - tseslint.configs.stylisticTypeChecked, - prettier, - { - languageOptions: { - parserOptions: { - projectService: true, - tsconfigRootDir: import.meta.dirname, - }, + { + ignores: ['src/generated/**'], + }, + eslint.configs.recommended, + tseslint.configs.eslintRecommended, + tseslint.configs.strictTypeChecked, + tseslint.configs.stylisticTypeChecked, + prettier, + { + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, }, - }, ); diff --git a/clients/js/package.json b/clients/js/package.json index 91dd0320..453f198e 100644 --- a/clients/js/package.json +++ b/clients/js/package.json @@ -1,69 +1,66 @@ { - "name": "@solana-program/token-wrap", - "version": "2.3.0", - "description": "Javascript helpers for interacting with the Solana Token Wrap program", - "author": "Anza Maintainers ", - "license": "Apache-2.0", - "sideEffects": false, - "module": "./dist/src/index.mjs", - "main": "./dist/src/index.js", - "types": "./dist/types/index.d.ts", - "type": "commonjs", - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "import": "./dist/src/index.mjs", - "require": "./dist/src/index.js" + "name": "@solana-program/token-wrap", + "version": "2.3.0", + "description": "Javascript helpers for interacting with the Solana Token Wrap program", + "author": "Anza Maintainers ", + "license": "Apache-2.0", + "sideEffects": false, + "module": "./dist/src/index.mjs", + "main": "./dist/src/index.js", + "types": "./dist/types/index.d.ts", + "type": "commonjs", + "exports": { + ".": { + "types": "./dist/types/index.d.ts", + "import": "./dist/src/index.mjs", + "require": "./dist/src/index.js" + } + }, + "files": [ + "./dist/src", + "./dist/types" + ], + "scripts": { + "build": "tsc && tsup", + "build:docs": "typedoc src/index.ts", + "lint": "eslint --ext js,ts,tsx src", + "lint:fix": "eslint --fix --ext js,ts,tsx src", + "format": "prettier --write .", + "format:check": "prettier --check .", + "example:single-signer": "tsx src/examples/single-signer.ts", + "example:multisig": "tsx src/examples/multisig.ts" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/solana-program/token-wrap.git" + }, + "bugs": { + "url": "https://github.com/solana-program/token-wrap/issues" + }, + "peerDependencies": { + "@solana/kit": "^6.0.0" + }, + "dependencies": { + "@solana-program/system": "^0.11.0", + "@solana-program/token": "^0.10.0", + "@solana-program/token-2022": "^0.9.0" + }, + "devDependencies": { + "@eslint/js": "^9.39.2", + "@solana/kit": "^6.0.0", + "@tsconfig/strictest": "^2.0.8", + "@types/node": "^25.0.3", + "eslint": "^9.39.2", + "eslint-config-prettier": "^10.1.8", + "prettier": "^3.8.1", + "tsup": "^8.5.1", + "tsx": "^4.21.0", + "typedoc": "^0.28.15", + "typescript": "^5.9.3", + "typescript-eslint": "^8.49.0" } - }, - "files": [ - "./dist/src", - "./dist/types" - ], - "scripts": { - "build": "tsc && tsup", - "build:docs": "typedoc src/index.ts", - "lint": "eslint --ext js,ts,tsx src", - "lint:fix": "eslint --fix --ext js,ts,tsx src", - "format": "prettier --write .", - "format:check": "prettier --check .", - "example:single-signer": "tsx src/examples/single-signer.ts", - "example:multisig": "tsx src/examples/multisig.ts" - }, - "publishConfig": { - "access": "public", - "registry": "https://registry.npmjs.org" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/solana-program/token-wrap.git" - }, - "bugs": { - "url": "https://github.com/solana-program/token-wrap/issues" - }, - "peerDependencies": { - "@solana/kit": "^5.1.0" - }, - "dependencies": { - "@solana-program/system": "^0.10.0", - "@solana-program/token": "^0.9.0", - "@solana-program/token-2022": "^0.6.1", - "@solana/accounts": "^5.1.0", - "@solana/rpc-types": "^5.1.0" - }, - "devDependencies": { - "@eslint/js": "^9.39.2", - "@solana/kit": "^5.1.0", - "@tsconfig/strictest": "^2.0.8", - "@types/node": "^25.0.3", - "eslint": "^9.39.2", - "eslint-config-prettier": "^10.1.8", - "prettier": "^3.7.4", - "tsup": "^8.5.1", - "tsx": "^4.21.0", - "typedoc": "^0.28.15", - "typescript": "^5.9.3", - "typescript-eslint": "^8.49.0" - }, - "packageManager": "pnpm@10.15.0" } diff --git a/clients/js/pnpm-lock.yaml b/clients/js/pnpm-lock.yaml index dd1d3e24..868c48ad 100644 --- a/clients/js/pnpm-lock.yaml +++ b/clients/js/pnpm-lock.yaml @@ -60,657 +60,493 @@ importers: packages: '@esbuild/aix-ppc64@0.25.1': resolution: - { - integrity: sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==, - } + { integrity: sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ== } engines: { node: '>=18' } cpu: [ppc64] os: [aix] '@esbuild/android-arm64@0.25.1': resolution: - { - integrity: sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==, - } + { integrity: sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA== } engines: { node: '>=18' } cpu: [arm64] os: [android] '@esbuild/android-arm@0.25.1': resolution: - { - integrity: sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==, - } + { integrity: sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q== } engines: { node: '>=18' } cpu: [arm] os: [android] '@esbuild/android-x64@0.25.1': resolution: - { - integrity: sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==, - } + { integrity: sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw== } engines: { node: '>=18' } cpu: [x64] os: [android] '@esbuild/darwin-arm64@0.25.1': resolution: - { - integrity: sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==, - } + { integrity: sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ== } engines: { node: '>=18' } cpu: [arm64] os: [darwin] '@esbuild/darwin-x64@0.25.1': resolution: - { - integrity: sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==, - } + { integrity: sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA== } engines: { node: '>=18' } cpu: [x64] os: [darwin] '@esbuild/freebsd-arm64@0.25.1': resolution: - { - integrity: sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==, - } + { integrity: sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A== } engines: { node: '>=18' } cpu: [arm64] os: [freebsd] '@esbuild/freebsd-x64@0.25.1': resolution: - { - integrity: sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==, - } + { integrity: sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww== } engines: { node: '>=18' } cpu: [x64] os: [freebsd] '@esbuild/linux-arm64@0.25.1': resolution: - { - integrity: sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==, - } + { integrity: sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ== } engines: { node: '>=18' } cpu: [arm64] os: [linux] '@esbuild/linux-arm@0.25.1': resolution: - { - integrity: sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==, - } + { integrity: sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ== } engines: { node: '>=18' } cpu: [arm] os: [linux] '@esbuild/linux-ia32@0.25.1': resolution: - { - integrity: sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==, - } + { integrity: sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ== } engines: { node: '>=18' } cpu: [ia32] os: [linux] '@esbuild/linux-loong64@0.25.1': resolution: - { - integrity: sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==, - } + { integrity: sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg== } engines: { node: '>=18' } cpu: [loong64] os: [linux] '@esbuild/linux-mips64el@0.25.1': resolution: - { - integrity: sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==, - } + { integrity: sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg== } engines: { node: '>=18' } cpu: [mips64el] os: [linux] '@esbuild/linux-ppc64@0.25.1': resolution: - { - integrity: sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==, - } + { integrity: sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg== } engines: { node: '>=18' } cpu: [ppc64] os: [linux] '@esbuild/linux-riscv64@0.25.1': resolution: - { - integrity: sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==, - } + { integrity: sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ== } engines: { node: '>=18' } cpu: [riscv64] os: [linux] '@esbuild/linux-s390x@0.25.1': resolution: - { - integrity: sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==, - } + { integrity: sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ== } engines: { node: '>=18' } cpu: [s390x] os: [linux] '@esbuild/linux-x64@0.25.1': resolution: - { - integrity: sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==, - } + { integrity: sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA== } engines: { node: '>=18' } cpu: [x64] os: [linux] '@esbuild/netbsd-arm64@0.25.1': resolution: - { - integrity: sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==, - } + { integrity: sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g== } engines: { node: '>=18' } cpu: [arm64] os: [netbsd] '@esbuild/netbsd-x64@0.25.1': resolution: - { - integrity: sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==, - } + { integrity: sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA== } engines: { node: '>=18' } cpu: [x64] os: [netbsd] '@esbuild/openbsd-arm64@0.25.1': resolution: - { - integrity: sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==, - } + { integrity: sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg== } engines: { node: '>=18' } cpu: [arm64] os: [openbsd] '@esbuild/openbsd-x64@0.25.1': resolution: - { - integrity: sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==, - } + { integrity: sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw== } engines: { node: '>=18' } cpu: [x64] os: [openbsd] '@esbuild/sunos-x64@0.25.1': resolution: - { - integrity: sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==, - } + { integrity: sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg== } engines: { node: '>=18' } cpu: [x64] os: [sunos] '@esbuild/win32-arm64@0.25.1': resolution: - { - integrity: sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==, - } + { integrity: sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ== } engines: { node: '>=18' } cpu: [arm64] os: [win32] '@esbuild/win32-ia32@0.25.1': resolution: - { - integrity: sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==, - } + { integrity: sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A== } engines: { node: '>=18' } cpu: [ia32] os: [win32] '@esbuild/win32-x64@0.25.1': resolution: - { - integrity: sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==, - } + { integrity: sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg== } engines: { node: '>=18' } cpu: [x64] os: [win32] '@eslint-community/eslint-utils@4.5.1': resolution: - { - integrity: sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==, - } + { integrity: sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w== } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 '@eslint-community/regexpp@4.12.1': resolution: - { - integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==, - } + { integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== } engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 } '@eslint/config-array@0.19.2': resolution: - { - integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==, - } + { integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/config-helpers@0.1.0': resolution: - { - integrity: sha512-kLrdPDJE1ckPo94kmPPf9Hfd0DU0Jw6oKYrhe+pwSC0iTUInmTa+w6fw8sGgcfkFJGNdWOUeOaDM4quW4a7OkA==, - } + { integrity: sha512-kLrdPDJE1ckPo94kmPPf9Hfd0DU0Jw6oKYrhe+pwSC0iTUInmTa+w6fw8sGgcfkFJGNdWOUeOaDM4quW4a7OkA== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/core@0.12.0': resolution: - { - integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==, - } + { integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/eslintrc@3.3.0': resolution: - { - integrity: sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ==, - } + { integrity: sha512-yaVPAiNAalnCZedKLdR21GOGILMLKPyqSLWaAjQFvYA2i/ciDi8ArYVr69Anohb6cH2Ukhqti4aFnYyPm8wdwQ== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/js@9.22.0': resolution: - { - integrity: sha512-vLFajx9o8d1/oL2ZkpMYbkLv8nDB6yaIwFNt7nI4+I80U/z03SxmfOMsLbvWr3p7C+Wnoh//aOu2pQW8cS0HCQ==, - } + { integrity: sha512-vLFajx9o8d1/oL2ZkpMYbkLv8nDB6yaIwFNt7nI4+I80U/z03SxmfOMsLbvWr3p7C+Wnoh//aOu2pQW8cS0HCQ== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/object-schema@2.1.6': resolution: - { - integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==, - } + { integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/plugin-kit@0.2.7': resolution: - { - integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==, - } + { integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@gerrit0/mini-shiki@3.2.1': resolution: - { - integrity: sha512-HbzRC6MKB6U8kQhczz0APKPIzFHTrcqhaC7es2EXInq1SpjPVnpVSIsBe6hNoLWqqCx1n5VKiPXq6PfXnHZKOQ==, - } + { integrity: sha512-HbzRC6MKB6U8kQhczz0APKPIzFHTrcqhaC7es2EXInq1SpjPVnpVSIsBe6hNoLWqqCx1n5VKiPXq6PfXnHZKOQ== } '@humanfs/core@0.19.1': resolution: - { - integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==, - } + { integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== } engines: { node: '>=18.18.0' } '@humanfs/node@0.16.6': resolution: - { - integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==, - } + { integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== } engines: { node: '>=18.18.0' } '@humanwhocodes/module-importer@1.0.1': resolution: - { - integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==, - } + { integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== } engines: { node: '>=12.22' } '@humanwhocodes/retry@0.3.1': resolution: - { - integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==, - } + { integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== } engines: { node: '>=18.18' } '@humanwhocodes/retry@0.4.2': resolution: - { - integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==, - } + { integrity: sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ== } engines: { node: '>=18.18' } '@isaacs/cliui@8.0.2': resolution: - { - integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==, - } + { integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== } engines: { node: '>=12' } '@jridgewell/gen-mapping@0.3.8': resolution: - { - integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==, - } + { integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== } engines: { node: '>=6.0.0' } '@jridgewell/resolve-uri@3.1.2': resolution: - { - integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==, - } + { integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== } engines: { node: '>=6.0.0' } '@jridgewell/set-array@1.2.1': resolution: - { - integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==, - } + { integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== } engines: { node: '>=6.0.0' } '@jridgewell/sourcemap-codec@1.5.0': resolution: - { - integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==, - } + { integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== } '@jridgewell/trace-mapping@0.3.25': resolution: - { - integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==, - } + { integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== } '@nodelib/fs.scandir@2.1.5': resolution: - { - integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==, - } + { integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== } engines: { node: '>= 8' } '@nodelib/fs.stat@2.0.5': resolution: - { - integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==, - } + { integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== } engines: { node: '>= 8' } '@nodelib/fs.walk@1.2.8': resolution: - { - integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==, - } + { integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== } engines: { node: '>= 8' } '@pkgjs/parseargs@0.11.0': resolution: - { - integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, - } + { integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== } engines: { node: '>=14' } '@rollup/rollup-android-arm-eabi@4.36.0': resolution: - { - integrity: sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==, - } + { integrity: sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w== } cpu: [arm] os: [android] '@rollup/rollup-android-arm64@4.36.0': resolution: - { - integrity: sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==, - } + { integrity: sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg== } cpu: [arm64] os: [android] '@rollup/rollup-darwin-arm64@4.36.0': resolution: - { - integrity: sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==, - } + { integrity: sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw== } cpu: [arm64] os: [darwin] '@rollup/rollup-darwin-x64@4.36.0': resolution: - { - integrity: sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==, - } + { integrity: sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA== } cpu: [x64] os: [darwin] '@rollup/rollup-freebsd-arm64@4.36.0': resolution: - { - integrity: sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==, - } + { integrity: sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg== } cpu: [arm64] os: [freebsd] '@rollup/rollup-freebsd-x64@4.36.0': resolution: - { - integrity: sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==, - } + { integrity: sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ== } cpu: [x64] os: [freebsd] '@rollup/rollup-linux-arm-gnueabihf@4.36.0': resolution: - { - integrity: sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==, - } + { integrity: sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg== } cpu: [arm] os: [linux] '@rollup/rollup-linux-arm-musleabihf@4.36.0': resolution: - { - integrity: sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==, - } + { integrity: sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg== } cpu: [arm] os: [linux] '@rollup/rollup-linux-arm64-gnu@4.36.0': resolution: - { - integrity: sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==, - } + { integrity: sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A== } cpu: [arm64] os: [linux] '@rollup/rollup-linux-arm64-musl@4.36.0': resolution: - { - integrity: sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==, - } + { integrity: sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw== } cpu: [arm64] os: [linux] '@rollup/rollup-linux-loongarch64-gnu@4.36.0': resolution: - { - integrity: sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==, - } + { integrity: sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg== } cpu: [loong64] os: [linux] '@rollup/rollup-linux-powerpc64le-gnu@4.36.0': resolution: - { - integrity: sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==, - } + { integrity: sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg== } cpu: [ppc64] os: [linux] '@rollup/rollup-linux-riscv64-gnu@4.36.0': resolution: - { - integrity: sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==, - } + { integrity: sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA== } cpu: [riscv64] os: [linux] '@rollup/rollup-linux-s390x-gnu@4.36.0': resolution: - { - integrity: sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==, - } + { integrity: sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag== } cpu: [s390x] os: [linux] '@rollup/rollup-linux-x64-gnu@4.36.0': resolution: - { - integrity: sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==, - } + { integrity: sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ== } cpu: [x64] os: [linux] '@rollup/rollup-linux-x64-musl@4.36.0': resolution: - { - integrity: sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==, - } + { integrity: sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ== } cpu: [x64] os: [linux] '@rollup/rollup-win32-arm64-msvc@4.36.0': resolution: - { - integrity: sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==, - } + { integrity: sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A== } cpu: [arm64] os: [win32] '@rollup/rollup-win32-ia32-msvc@4.36.0': resolution: - { - integrity: sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==, - } + { integrity: sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ== } cpu: [ia32] os: [win32] '@rollup/rollup-win32-x64-msvc@4.36.0': resolution: - { - integrity: sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==, - } + { integrity: sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw== } cpu: [x64] os: [win32] '@shikijs/engine-oniguruma@3.2.1': resolution: - { - integrity: sha512-wZZAkayEn6qu2+YjenEoFqj0OyQI64EWsNR6/71d1EkG4sxEOFooowKivsWPpaWNBu3sxAG+zPz5kzBL/SsreQ==, - } + { integrity: sha512-wZZAkayEn6qu2+YjenEoFqj0OyQI64EWsNR6/71d1EkG4sxEOFooowKivsWPpaWNBu3sxAG+zPz5kzBL/SsreQ== } '@shikijs/types@3.2.1': resolution: - { - integrity: sha512-/NTWAk4KE2M8uac0RhOsIhYQf4pdU0OywQuYDGIGAJ6Mjunxl2cGiuLkvu4HLCMn+OTTLRWkjZITp+aYJv60yA==, - } + { integrity: sha512-/NTWAk4KE2M8uac0RhOsIhYQf4pdU0OywQuYDGIGAJ6Mjunxl2cGiuLkvu4HLCMn+OTTLRWkjZITp+aYJv60yA== } '@shikijs/vscode-textmate@10.0.2': resolution: - { - integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==, - } + { integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg== } '@solana-program/system@0.7.0': resolution: - { - integrity: sha512-FKTBsKHpvHHNc1ATRm7SlC5nF/VdJtOSjldhcyfMN9R7xo712Mo2jHIzvBgn8zQO5Kg0DcWuKB7268Kv1ocicw==, - } + { integrity: sha512-FKTBsKHpvHHNc1ATRm7SlC5nF/VdJtOSjldhcyfMN9R7xo712Mo2jHIzvBgn8zQO5Kg0DcWuKB7268Kv1ocicw== } peerDependencies: '@solana/kit': ^2.1.0 '@solana-program/token-2022@0.4.0': resolution: - { - integrity: sha512-rLcYyjeRq/dW62ju9X+gFYqIIRGuD4vXq6EwM9oQBoURFbFzyo12VUi6v0hNh0dRcru+kUx321qVCAfsWWV/ug==, - } + { integrity: sha512-rLcYyjeRq/dW62ju9X+gFYqIIRGuD4vXq6EwM9oQBoURFbFzyo12VUi6v0hNh0dRcru+kUx321qVCAfsWWV/ug== } peerDependencies: '@solana/kit': ^2.1.0 '@solana/sysvars': ^2.1.0 '@solana-program/token@0.5.1': resolution: - { - integrity: sha512-bJvynW5q9SFuVOZ5vqGVkmaPGA0MCC+m9jgJj1nk5m20I389/ms69ASnhWGoOPNcie7S9OwBX0gTj2fiyWpfag==, - } + { integrity: sha512-bJvynW5q9SFuVOZ5vqGVkmaPGA0MCC+m9jgJj1nk5m20I389/ms69ASnhWGoOPNcie7S9OwBX0gTj2fiyWpfag== } peerDependencies: '@solana/kit': ^2.1.0 '@solana/accounts@2.1.0': resolution: - { - integrity: sha512-1JOBiLFeIeHmGx7k1b23UWF9vM1HAh9GBMCzr5rBPrGSBs+QUgxBJ3+yrRg+UPEOSELubqo7qoOVFUKYsb1nXw==, - } + { integrity: sha512-1JOBiLFeIeHmGx7k1b23UWF9vM1HAh9GBMCzr5rBPrGSBs+QUgxBJ3+yrRg+UPEOSELubqo7qoOVFUKYsb1nXw== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/addresses@2.1.0': resolution: - { - integrity: sha512-IgiRuju2yLz14GnrysOPSNZbZQ8F+7jhx7FYZLrbKogf6NX4wy4ijLHxRsLFqP8o8aY69BZULkM9MwrSjsZi7A==, - } + { integrity: sha512-IgiRuju2yLz14GnrysOPSNZbZQ8F+7jhx7FYZLrbKogf6NX4wy4ijLHxRsLFqP8o8aY69BZULkM9MwrSjsZi7A== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/assertions@2.1.0': resolution: - { - integrity: sha512-KCYmxFRsg897Ec7yGdpc0rniOlqGD3NpicmIjWIV87uiXX5uFco4t+01sKyFlhsv4T4OgHxngMsxkfQ3AUkFVg==, - } + { integrity: sha512-KCYmxFRsg897Ec7yGdpc0rniOlqGD3NpicmIjWIV87uiXX5uFco4t+01sKyFlhsv4T4OgHxngMsxkfQ3AUkFVg== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/codecs-core@2.1.0': resolution: - { - integrity: sha512-SR7pKtmJBg2mhmkel2NeHA1pz06QeQXdMv8WJoIR9m8F/hw80K/612uaYbwTt2nkK0jg/Qn/rNSd7EcJ4SBGjw==, - } + { integrity: sha512-SR7pKtmJBg2mhmkel2NeHA1pz06QeQXdMv8WJoIR9m8F/hw80K/612uaYbwTt2nkK0jg/Qn/rNSd7EcJ4SBGjw== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/codecs-data-structures@2.1.0': resolution: - { - integrity: sha512-oDF5ek54kirqJ09q8k/qEpobBiWOhd3CkkGOTyfjsmTF/IGIigNbdYIakxV3+vudBeaNBw08y0XdBYI4JL/nqA==, - } + { integrity: sha512-oDF5ek54kirqJ09q8k/qEpobBiWOhd3CkkGOTyfjsmTF/IGIigNbdYIakxV3+vudBeaNBw08y0XdBYI4JL/nqA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/codecs-numbers@2.1.0': resolution: - { - integrity: sha512-XMu4yw5iCgQnMKsxSWPPOrGgtaohmupN3eyAtYv3K3C/MJEc5V90h74k5B1GUCiHvcrdUDO9RclNjD9lgbjFag==, - } + { integrity: sha512-XMu4yw5iCgQnMKsxSWPPOrGgtaohmupN3eyAtYv3K3C/MJEc5V90h74k5B1GUCiHvcrdUDO9RclNjD9lgbjFag== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/codecs-strings@2.1.0': resolution: - { - integrity: sha512-O/eJFLzFrHomcCR1Y5QbIqoPo7iaJaWNnIeskB4mVhVjLyjlJS4WtBP2NBRzM9uJXaXyOxxKroqqO9zFsHOpvQ==, - } + { integrity: sha512-O/eJFLzFrHomcCR1Y5QbIqoPo7iaJaWNnIeskB4mVhVjLyjlJS4WtBP2NBRzM9uJXaXyOxxKroqqO9zFsHOpvQ== } engines: { node: '>=20.18.0' } peerDependencies: fastestsmallesttextencoderdecoder: ^1.0.22 @@ -718,18 +554,14 @@ packages: '@solana/codecs@2.1.0': resolution: - { - integrity: sha512-C0TnfrpbTg7zoIFYfM65ofeL2AWEz80OsD6mjVdcTKpb1Uj7XuBuNLss3dMnatPQaL7RagD9VLA5/WfYayyteQ==, - } + { integrity: sha512-C0TnfrpbTg7zoIFYfM65ofeL2AWEz80OsD6mjVdcTKpb1Uj7XuBuNLss3dMnatPQaL7RagD9VLA5/WfYayyteQ== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/errors@2.1.0': resolution: - { - integrity: sha512-l+GxAv0Ar4d3c3PlZdA9G++wFYZREEbbRyAFP8+n8HSg0vudCuzogh/13io6hYuUhG/9Ve8ARZNamhV7UScKNw==, - } + { integrity: sha512-l+GxAv0Ar4d3c3PlZdA9G++wFYZREEbbRyAFP8+n8HSg0vudCuzogh/13io6hYuUhG/9Ve8ARZNamhV7UScKNw== } engines: { node: '>=20.18.0' } hasBin: true peerDependencies: @@ -737,126 +569,98 @@ packages: '@solana/fast-stable-stringify@2.1.0': resolution: - { - integrity: sha512-a8vR92qbe/VsvQ1BpN3PIEwnoHD2fTHEwCJh9GG58z3R15RIjk73gc0khjcdg4U1tZwTJqWkvk8SbDIgGdOgMA==, - } + { integrity: sha512-a8vR92qbe/VsvQ1BpN3PIEwnoHD2fTHEwCJh9GG58z3R15RIjk73gc0khjcdg4U1tZwTJqWkvk8SbDIgGdOgMA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/functional@2.1.0': resolution: - { - integrity: sha512-RVij8Av4F2uUOFcEC8n9lgD72e9gQMritmGHhMh+G91Xops4I6Few+oQ++XgSTiL2t3g3Cs0QZ13onZ0FL45FQ==, - } + { integrity: sha512-RVij8Av4F2uUOFcEC8n9lgD72e9gQMritmGHhMh+G91Xops4I6Few+oQ++XgSTiL2t3g3Cs0QZ13onZ0FL45FQ== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/instructions@2.1.0': resolution: - { - integrity: sha512-wfn6e7Rgm0Sw/Th1v/pXsKTvloZvAAQI7j1yc9WcIk9ngqH5p6LhqMMkrwYPB2oTk8+MMr7SZ4E+2eK2gL6ODA==, - } + { integrity: sha512-wfn6e7Rgm0Sw/Th1v/pXsKTvloZvAAQI7j1yc9WcIk9ngqH5p6LhqMMkrwYPB2oTk8+MMr7SZ4E+2eK2gL6ODA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/keys@2.1.0': resolution: - { - integrity: sha512-esY1+dlZjB18hZML5p+YPec29wi3HH0SzKx7RiqF//dI2cJ6vHfq3F+7ArbNnF6R2YCLFtl7DzS/tkqR2Xkxeg==, - } + { integrity: sha512-esY1+dlZjB18hZML5p+YPec29wi3HH0SzKx7RiqF//dI2cJ6vHfq3F+7ArbNnF6R2YCLFtl7DzS/tkqR2Xkxeg== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/kit@2.1.0': resolution: - { - integrity: sha512-vqaHROLKp89xdIbaKVG6BQ44uMN9E6/rSTeltkvquD2qdTObssafGDbAKVFjwZhlNO+sdzHDCLekGabn5VAL6A==, - } + { integrity: sha512-vqaHROLKp89xdIbaKVG6BQ44uMN9E6/rSTeltkvquD2qdTObssafGDbAKVFjwZhlNO+sdzHDCLekGabn5VAL6A== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/options@2.1.0': resolution: - { - integrity: sha512-T/vJCr8qnwK6HxriOPXCrx31IpA9ZYecxuOzQ3G74kIayED4spmpXp6PLtRYR/fo2LZ6UcgHN0qSgONnvwEweg==, - } + { integrity: sha512-T/vJCr8qnwK6HxriOPXCrx31IpA9ZYecxuOzQ3G74kIayED4spmpXp6PLtRYR/fo2LZ6UcgHN0qSgONnvwEweg== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/programs@2.1.0': resolution: - { - integrity: sha512-9Y30/yUbTR99+QRN2ukNXQQTGY68oKmVrXnh/et6StM1JF5WHvAJqBigsHG5bt6KxTISoRuncBnH/IRnDqPxKg==, - } + { integrity: sha512-9Y30/yUbTR99+QRN2ukNXQQTGY68oKmVrXnh/et6StM1JF5WHvAJqBigsHG5bt6KxTISoRuncBnH/IRnDqPxKg== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/promises@2.1.0': resolution: - { - integrity: sha512-eQJaQXA2kD4dVyifzhslV3wOvq27fwOJ4az89BQ4Cz83zPbR94xOeDShwcXrKBYqaUf6XqH5MzdEo14t4tKAFQ==, - } + { integrity: sha512-eQJaQXA2kD4dVyifzhslV3wOvq27fwOJ4az89BQ4Cz83zPbR94xOeDShwcXrKBYqaUf6XqH5MzdEo14t4tKAFQ== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-api@2.1.0': resolution: - { - integrity: sha512-4yCnHYHFlz9VffivoY5q/HVeBjT59byB2gmg7UyC3ktxD28AlF9jjsE5tJKiapAKr2J3KWm0D/rH/QwW14cGeA==, - } + { integrity: sha512-4yCnHYHFlz9VffivoY5q/HVeBjT59byB2gmg7UyC3ktxD28AlF9jjsE5tJKiapAKr2J3KWm0D/rH/QwW14cGeA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-parsed-types@2.1.0': resolution: - { - integrity: sha512-mRzHemxlWDS9p1fPQNKwL+1vEOUMG8peSUJb0X/NbM12yjowDNdzM++fkOgIyCKDPddfkcoNmNrQmr2jwjdN1Q==, - } + { integrity: sha512-mRzHemxlWDS9p1fPQNKwL+1vEOUMG8peSUJb0X/NbM12yjowDNdzM++fkOgIyCKDPddfkcoNmNrQmr2jwjdN1Q== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-spec-types@2.1.0': resolution: - { - integrity: sha512-NxcZ8piXMyCdbNUL6d36QJfL2UAQEN33StlGku0ltTVe1nrokZ5WRNjSPohU1fODlNaZzTvUFzvUkM1yGCkyzw==, - } + { integrity: sha512-NxcZ8piXMyCdbNUL6d36QJfL2UAQEN33StlGku0ltTVe1nrokZ5WRNjSPohU1fODlNaZzTvUFzvUkM1yGCkyzw== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-spec@2.1.0': resolution: - { - integrity: sha512-NPAIM5EY7Jke0mHnmoMpgCEb/nZKIo+bgVFK/u+z74gY0JnCNt0DfocStUUQtlhqSmTyoHamt3lfxp4GT2zXbA==, - } + { integrity: sha512-NPAIM5EY7Jke0mHnmoMpgCEb/nZKIo+bgVFK/u+z74gY0JnCNt0DfocStUUQtlhqSmTyoHamt3lfxp4GT2zXbA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-subscriptions-api@2.1.0': resolution: - { - integrity: sha512-de1dBRSE2CUwoZHMXQ/0v7iC+/pG0+iYY8jLHGGNxtKrYbTnV08mXQbaAMrmv2Rk8ZFmfJWbqbYZ9dRWdO3P5g==, - } + { integrity: sha512-de1dBRSE2CUwoZHMXQ/0v7iC+/pG0+iYY8jLHGGNxtKrYbTnV08mXQbaAMrmv2Rk8ZFmfJWbqbYZ9dRWdO3P5g== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-subscriptions-channel-websocket@2.1.0': resolution: - { - integrity: sha512-goJe9dv0cs967HJ382vSX8yapXgQzRHCmH323LsXrrpj/s3Eb3yUwJq7AcHgoh4gKIqyAfGybq/bE5Aa8Pcm9g==, - } + { integrity: sha512-goJe9dv0cs967HJ382vSX8yapXgQzRHCmH323LsXrrpj/s3Eb3yUwJq7AcHgoh4gKIqyAfGybq/bE5Aa8Pcm9g== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' @@ -864,153 +668,115 @@ packages: '@solana/rpc-subscriptions-spec@2.1.0': resolution: - { - integrity: sha512-Uqasfd3Tlr22lC/Vy5dToF0e68dMKPdnt4ks7FwXuPdEbNRM/TDGb0GqG+bt/d3IIrNOCA5Y8vsE0nQHGrWG/w==, - } + { integrity: sha512-Uqasfd3Tlr22lC/Vy5dToF0e68dMKPdnt4ks7FwXuPdEbNRM/TDGb0GqG+bt/d3IIrNOCA5Y8vsE0nQHGrWG/w== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-subscriptions@2.1.0': resolution: - { - integrity: sha512-dTyI03VlueE3s7mA/OBlA5l6yKUUKHMJd31tpzxV3AFnqE/QPS5NVrF/WY6pPBobLJiCP0UFOe7eR/MKP9SUCA==, - } + { integrity: sha512-dTyI03VlueE3s7mA/OBlA5l6yKUUKHMJd31tpzxV3AFnqE/QPS5NVrF/WY6pPBobLJiCP0UFOe7eR/MKP9SUCA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-transformers@2.1.0': resolution: - { - integrity: sha512-E2xPlaCu6tNO00v4HIJxJCYkoNwgVJYad5sxbIUZOQBWwXnWIcll2jUT4bWKpBGq5vFDYfkzRBr8Rco3DhfXqg==, - } + { integrity: sha512-E2xPlaCu6tNO00v4HIJxJCYkoNwgVJYad5sxbIUZOQBWwXnWIcll2jUT4bWKpBGq5vFDYfkzRBr8Rco3DhfXqg== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-transport-http@2.1.0': resolution: - { - integrity: sha512-E3UovTBid4/S8QDd9FkADVKfyG+v7CW5IqI4c27ZDKfazCsnDLLkqh98C6BvNCqi278HKBui4lI2GoFpCq89Pw==, - } + { integrity: sha512-E3UovTBid4/S8QDd9FkADVKfyG+v7CW5IqI4c27ZDKfazCsnDLLkqh98C6BvNCqi278HKBui4lI2GoFpCq89Pw== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc-types@2.1.0': resolution: - { - integrity: sha512-1ODnhmpR1X/GjB7hs4gVR3mcCagfPQV0dzq/2DNuCiMjx2snn64KP5WoAHfBEyoC9/Rb36+JpNj/hLAOikipKA==, - } + { integrity: sha512-1ODnhmpR1X/GjB7hs4gVR3mcCagfPQV0dzq/2DNuCiMjx2snn64KP5WoAHfBEyoC9/Rb36+JpNj/hLAOikipKA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/rpc@2.1.0': resolution: - { - integrity: sha512-myg9qAo6b2WKyHSMXURQykb+ZRnNEXBPLEcwRwkos8STzPPyRFg6ady2s0FCQQTtL/pVjanIU2bObZIzbMGugA==, - } + { integrity: sha512-myg9qAo6b2WKyHSMXURQykb+ZRnNEXBPLEcwRwkos8STzPPyRFg6ady2s0FCQQTtL/pVjanIU2bObZIzbMGugA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/signers@2.1.0': resolution: - { - integrity: sha512-Yq0JdJnCecRsSBshNWy+OIRmAGeVfjwIh9Z+H1jv8u8p+dJCOreKakTWuxMt5tnj3q5K1mPcak9O2PqVPZ0teA==, - } + { integrity: sha512-Yq0JdJnCecRsSBshNWy+OIRmAGeVfjwIh9Z+H1jv8u8p+dJCOreKakTWuxMt5tnj3q5K1mPcak9O2PqVPZ0teA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/subscribable@2.1.0': resolution: - { - integrity: sha512-xi12Cm889+uT5sRKnIzr7nLnHAp3hiR3dqIzrT1P7z7iEGp8OnqUQIQCHlgozFHM2cPW+6685NQXk1l1ImuJIw==, - } + { integrity: sha512-xi12Cm889+uT5sRKnIzr7nLnHAp3hiR3dqIzrT1P7z7iEGp8OnqUQIQCHlgozFHM2cPW+6685NQXk1l1ImuJIw== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/sysvars@2.1.0': resolution: - { - integrity: sha512-GXu9yS0zIebmM1Unqw/XFpYuvug03m42w98ioOPV/yiHzECggGRGpHGD9RLVYnkyz0eL4NRbnJ5dAEu/fvGe0A==, - } + { integrity: sha512-GXu9yS0zIebmM1Unqw/XFpYuvug03m42w98ioOPV/yiHzECggGRGpHGD9RLVYnkyz0eL4NRbnJ5dAEu/fvGe0A== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/transaction-confirmation@2.1.0': resolution: - { - integrity: sha512-VxOvtvs2e9h5u73PHyE2TptLAMO5x6dOXlOgvq1Nk6l3rKM2HAsd+KDpN7gjOo8/EgItMMmyEilXygWWRgpSIA==, - } + { integrity: sha512-VxOvtvs2e9h5u73PHyE2TptLAMO5x6dOXlOgvq1Nk6l3rKM2HAsd+KDpN7gjOo8/EgItMMmyEilXygWWRgpSIA== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/transaction-messages@2.1.0': resolution: - { - integrity: sha512-+GPzZHLYNFbqHKoiL8mYALp7eAXtAbI6zLViZpIM3zUbVNU3q5+FCKGv6jCBnxs+3QCbeapu+W1OyfDa6BUtTQ==, - } + { integrity: sha512-+GPzZHLYNFbqHKoiL8mYALp7eAXtAbI6zLViZpIM3zUbVNU3q5+FCKGv6jCBnxs+3QCbeapu+W1OyfDa6BUtTQ== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@solana/transactions@2.1.0': resolution: - { - integrity: sha512-QeM4sCItReeIy5LU7LhGkz7RPfMPTg/Qo8h0LSfhiJiPTOHOhElmh42vkLJmwPl83+MsKtisyPQNK6penM2nAw==, - } + { integrity: sha512-QeM4sCItReeIy5LU7LhGkz7RPfMPTg/Qo8h0LSfhiJiPTOHOhElmh42vkLJmwPl83+MsKtisyPQNK6penM2nAw== } engines: { node: '>=20.18.0' } peerDependencies: typescript: '>=5' '@tsconfig/strictest@2.0.5': resolution: - { - integrity: sha512-ec4tjL2Rr0pkZ5hww65c+EEPYwxOi4Ryv+0MtjeaSQRJyq322Q27eOQiFbuNgw2hpL4hB1/W/HBGk3VKS43osg==, - } + { integrity: sha512-ec4tjL2Rr0pkZ5hww65c+EEPYwxOi4Ryv+0MtjeaSQRJyq322Q27eOQiFbuNgw2hpL4hB1/W/HBGk3VKS43osg== } '@types/estree@1.0.6': resolution: - { - integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==, - } + { integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== } '@types/hast@3.0.4': resolution: - { - integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==, - } + { integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== } '@types/json-schema@7.0.15': resolution: - { - integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==, - } + { integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== } '@types/node@22.13.10': resolution: - { - integrity: sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==, - } + { integrity: sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw== } '@types/unist@3.0.3': resolution: - { - integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==, - } + { integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== } '@typescript-eslint/eslint-plugin@8.27.0': resolution: - { - integrity: sha512-4henw4zkePi5p252c8ncBLzLce52SEUz2Ebj8faDnuUXz2UuHEONYcJ+G0oaCF+bYCWVZtrGzq3FD7YXetmnSA==, - } + { integrity: sha512-4henw4zkePi5p252c8ncBLzLce52SEUz2Ebj8faDnuUXz2UuHEONYcJ+G0oaCF+bYCWVZtrGzq3FD7YXetmnSA== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1019,9 +785,7 @@ packages: '@typescript-eslint/parser@8.27.0': resolution: - { - integrity: sha512-XGwIabPallYipmcOk45DpsBSgLC64A0yvdAkrwEzwZ2viqGqRUJ8eEYoPz0CWnutgAFbNMPdsGGvzjSmcWVlEA==, - } + { integrity: sha512-XGwIabPallYipmcOk45DpsBSgLC64A0yvdAkrwEzwZ2viqGqRUJ8eEYoPz0CWnutgAFbNMPdsGGvzjSmcWVlEA== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1029,16 +793,12 @@ packages: '@typescript-eslint/scope-manager@8.27.0': resolution: - { - integrity: sha512-8oI9GwPMQmBryaaxG1tOZdxXVeMDte6NyJA4i7/TWa4fBwgnAXYlIQP+uYOeqAaLJ2JRxlG9CAyL+C+YE9Xknw==, - } + { integrity: sha512-8oI9GwPMQmBryaaxG1tOZdxXVeMDte6NyJA4i7/TWa4fBwgnAXYlIQP+uYOeqAaLJ2JRxlG9CAyL+C+YE9Xknw== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@typescript-eslint/type-utils@8.27.0': resolution: - { - integrity: sha512-wVArTVcz1oJOIEJxui/nRhV0TXzD/zMSOYi/ggCfNq78EIszddXcJb7r4RCp/oBrjt8n9A0BSxRMKxHftpDxDA==, - } + { integrity: sha512-wVArTVcz1oJOIEJxui/nRhV0TXzD/zMSOYi/ggCfNq78EIszddXcJb7r4RCp/oBrjt8n9A0BSxRMKxHftpDxDA== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1046,25 +806,19 @@ packages: '@typescript-eslint/types@8.27.0': resolution: - { - integrity: sha512-/6cp9yL72yUHAYq9g6DsAU+vVfvQmd1a8KyA81uvfDE21O2DwQ/qxlM4AR8TSdAu+kJLBDrEHKC5/W2/nxsY0A==, - } + { integrity: sha512-/6cp9yL72yUHAYq9g6DsAU+vVfvQmd1a8KyA81uvfDE21O2DwQ/qxlM4AR8TSdAu+kJLBDrEHKC5/W2/nxsY0A== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@typescript-eslint/typescript-estree@8.27.0': resolution: - { - integrity: sha512-BnKq8cqPVoMw71O38a1tEb6iebEgGA80icSxW7g+kndx0o6ot6696HjG7NdgfuAVmVEtwXUr3L8R9ZuVjoQL6A==, - } + { integrity: sha512-BnKq8cqPVoMw71O38a1tEb6iebEgGA80icSxW7g+kndx0o6ot6696HjG7NdgfuAVmVEtwXUr3L8R9ZuVjoQL6A== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/utils@8.27.0': resolution: - { - integrity: sha512-njkodcwH1yvmo31YWgRHNb/x1Xhhq4/m81PhtvmRngD8iHPehxffz1SNCO+kwaePhATC+kOa/ggmvPoPza5i0Q==, - } + { integrity: sha512-njkodcwH1yvmo31YWgRHNb/x1Xhhq4/m81PhtvmRngD8iHPehxffz1SNCO+kwaePhATC+kOa/ggmvPoPza5i0Q== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1072,201 +826,143 @@ packages: '@typescript-eslint/visitor-keys@8.27.0': resolution: - { - integrity: sha512-WsXQwMkILJvffP6z4U3FYJPlbf/j07HIxmDjZpbNvBJkMfvwXj5ACRkkHwBDvLBbDbtX5TdU64/rcvKJ/vuInQ==, - } + { integrity: sha512-WsXQwMkILJvffP6z4U3FYJPlbf/j07HIxmDjZpbNvBJkMfvwXj5ACRkkHwBDvLBbDbtX5TdU64/rcvKJ/vuInQ== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } acorn-jsx@5.3.2: resolution: - { - integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==, - } + { integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== } peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 acorn@8.14.1: resolution: - { - integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==, - } + { integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg== } engines: { node: '>=0.4.0' } hasBin: true ajv@6.12.6: resolution: - { - integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==, - } + { integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== } ansi-regex@5.0.1: resolution: - { - integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, - } + { integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== } engines: { node: '>=8' } ansi-regex@6.1.0: resolution: - { - integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==, - } + { integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== } engines: { node: '>=12' } ansi-styles@4.3.0: resolution: - { - integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==, - } + { integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== } engines: { node: '>=8' } ansi-styles@6.2.1: resolution: - { - integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==, - } + { integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== } engines: { node: '>=12' } any-promise@1.3.0: resolution: - { - integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==, - } + { integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== } argparse@2.0.1: resolution: - { - integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==, - } + { integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== } balanced-match@1.0.2: resolution: - { - integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, - } + { integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== } brace-expansion@1.1.11: resolution: - { - integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==, - } + { integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== } brace-expansion@2.0.1: resolution: - { - integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==, - } + { integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== } braces@3.0.3: resolution: - { - integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==, - } + { integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== } engines: { node: '>=8' } bufferutil@4.0.9: resolution: - { - integrity: sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==, - } + { integrity: sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw== } engines: { node: '>=6.14.2' } bundle-require@5.1.0: resolution: - { - integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==, - } + { integrity: sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA== } engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } peerDependencies: esbuild: '>=0.18' cac@6.7.14: resolution: - { - integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==, - } + { integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== } engines: { node: '>=8' } callsites@3.1.0: resolution: - { - integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==, - } + { integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== } engines: { node: '>=6' } chalk@4.1.2: resolution: - { - integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==, - } + { integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== } engines: { node: '>=10' } chalk@5.4.1: resolution: - { - integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==, - } + { integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w== } engines: { node: ^12.17.0 || ^14.13 || >=16.0.0 } chokidar@4.0.3: resolution: - { - integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==, - } + { integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA== } engines: { node: '>= 14.16.0' } color-convert@2.0.1: resolution: - { - integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==, - } + { integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== } engines: { node: '>=7.0.0' } color-name@1.1.4: resolution: - { - integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, - } + { integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== } commander@13.1.0: resolution: - { - integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==, - } + { integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw== } engines: { node: '>=18' } commander@4.1.1: resolution: - { - integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==, - } + { integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== } engines: { node: '>= 6' } concat-map@0.0.1: resolution: - { - integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==, - } + { integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== } consola@3.4.2: resolution: - { - integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==, - } + { integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA== } engines: { node: ^14.18.0 || >=16.10.0 } cross-spawn@7.0.6: resolution: - { - integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==, - } + { integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== } engines: { node: '>= 8' } debug@4.4.0: resolution: - { - integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==, - } + { integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== } engines: { node: '>=6.0' } peerDependencies: supports-color: '*' @@ -1276,85 +972,61 @@ packages: deep-is@0.1.4: resolution: - { - integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==, - } + { integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== } eastasianwidth@0.2.0: resolution: - { - integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==, - } + { integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== } emoji-regex@8.0.0: resolution: - { - integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==, - } + { integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== } emoji-regex@9.2.2: resolution: - { - integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==, - } + { integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== } entities@4.5.0: resolution: - { - integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==, - } + { integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== } engines: { node: '>=0.12' } esbuild@0.25.1: resolution: - { - integrity: sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==, - } + { integrity: sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ== } engines: { node: '>=18' } hasBin: true escape-string-regexp@4.0.0: resolution: - { - integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==, - } + { integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== } engines: { node: '>=10' } eslint-config-prettier@10.1.1: resolution: - { - integrity: sha512-4EQQr6wXwS+ZJSzaR5ZCrYgLxqvUjdXctaEtBqHcbkW944B1NQyO4qpdHQbXBONfwxXdkAY81HH4+LUfrg+zPw==, - } + { integrity: sha512-4EQQr6wXwS+ZJSzaR5ZCrYgLxqvUjdXctaEtBqHcbkW944B1NQyO4qpdHQbXBONfwxXdkAY81HH4+LUfrg+zPw== } hasBin: true peerDependencies: eslint: '>=7.0.0' eslint-scope@8.3.0: resolution: - { - integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==, - } + { integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } eslint-visitor-keys@3.4.3: resolution: - { - integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==, - } + { integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== } engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } eslint-visitor-keys@4.2.0: resolution: - { - integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==, - } + { integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } eslint@9.22.0: resolution: - { - integrity: sha512-9V/QURhsRN40xuHXWjV64yvrzMjcz7ZyNoF2jJFmy9j/SLk0u1OLSZgXi28MrXjymnjEGSR80WCdab3RGMDveQ==, - } + { integrity: sha512-9V/QURhsRN40xuHXWjV64yvrzMjcz7ZyNoF2jJFmy9j/SLk0u1OLSZgXi28MrXjymnjEGSR80WCdab3RGMDveQ== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } hasBin: true peerDependencies: @@ -1365,81 +1037,57 @@ packages: espree@10.3.0: resolution: - { - integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==, - } + { integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } esquery@1.6.0: resolution: - { - integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==, - } + { integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== } engines: { node: '>=0.10' } esrecurse@4.3.0: resolution: - { - integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==, - } + { integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== } engines: { node: '>=4.0' } estraverse@5.3.0: resolution: - { - integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==, - } + { integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== } engines: { node: '>=4.0' } esutils@2.0.3: resolution: - { - integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==, - } + { integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== } engines: { node: '>=0.10.0' } fast-deep-equal@3.1.3: resolution: - { - integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==, - } + { integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== } fast-glob@3.3.3: resolution: - { - integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==, - } + { integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== } engines: { node: '>=8.6.0' } fast-json-stable-stringify@2.1.0: resolution: - { - integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==, - } + { integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== } fast-levenshtein@2.0.6: resolution: - { - integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==, - } + { integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== } fastestsmallesttextencoderdecoder@1.0.22: resolution: - { - integrity: sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==, - } + { integrity: sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw== } fastq@1.19.1: resolution: - { - integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==, - } + { integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== } fdir@6.4.3: resolution: - { - integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==, - } + { integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw== } peerDependencies: picomatch: ^3 || ^4 peerDependenciesMeta: @@ -1448,429 +1096,301 @@ packages: file-entry-cache@8.0.0: resolution: - { - integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==, - } + { integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== } engines: { node: '>=16.0.0' } fill-range@7.1.1: resolution: - { - integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==, - } + { integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== } engines: { node: '>=8' } find-up@5.0.0: resolution: - { - integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==, - } + { integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== } engines: { node: '>=10' } flat-cache@4.0.1: resolution: - { - integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==, - } + { integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== } engines: { node: '>=16' } flatted@3.3.3: resolution: - { - integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==, - } + { integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== } foreground-child@3.3.1: resolution: - { - integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==, - } + { integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== } engines: { node: '>=14' } fsevents@2.3.3: resolution: - { - integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, - } + { integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== } engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } os: [darwin] get-tsconfig@4.10.0: resolution: - { - integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==, - } + { integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A== } glob-parent@5.1.2: resolution: - { - integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==, - } + { integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== } engines: { node: '>= 6' } glob-parent@6.0.2: resolution: - { - integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==, - } + { integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== } engines: { node: '>=10.13.0' } glob@10.4.5: resolution: - { - integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==, - } + { integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== } hasBin: true globals@14.0.0: resolution: - { - integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==, - } + { integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== } engines: { node: '>=18' } graphemer@1.4.0: resolution: - { - integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==, - } + { integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== } has-flag@4.0.0: resolution: - { - integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==, - } + { integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== } engines: { node: '>=8' } ignore@5.3.2: resolution: - { - integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==, - } + { integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== } engines: { node: '>= 4' } import-fresh@3.3.1: resolution: - { - integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==, - } + { integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== } engines: { node: '>=6' } imurmurhash@0.1.4: resolution: - { - integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==, - } + { integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== } engines: { node: '>=0.8.19' } is-extglob@2.1.1: resolution: - { - integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==, - } + { integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== } engines: { node: '>=0.10.0' } is-fullwidth-code-point@3.0.0: resolution: - { - integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==, - } + { integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== } engines: { node: '>=8' } is-glob@4.0.3: resolution: - { - integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==, - } + { integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== } engines: { node: '>=0.10.0' } is-number@7.0.0: resolution: - { - integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==, - } + { integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== } engines: { node: '>=0.12.0' } isexe@2.0.0: resolution: - { - integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==, - } + { integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== } jackspeak@3.4.3: resolution: - { - integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==, - } + { integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== } joycon@3.1.1: resolution: - { - integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==, - } + { integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== } engines: { node: '>=10' } js-yaml@4.1.0: resolution: - { - integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==, - } + { integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== } hasBin: true json-buffer@3.0.1: resolution: - { - integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==, - } + { integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== } json-schema-traverse@0.4.1: resolution: - { - integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==, - } + { integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== } json-stable-stringify-without-jsonify@1.0.1: resolution: - { - integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==, - } + { integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== } keyv@4.5.4: resolution: - { - integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==, - } + { integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== } levn@0.4.1: resolution: - { - integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==, - } + { integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== } engines: { node: '>= 0.8.0' } lilconfig@3.1.3: resolution: - { - integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==, - } + { integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== } engines: { node: '>=14' } lines-and-columns@1.2.4: resolution: - { - integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==, - } + { integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== } linkify-it@5.0.0: resolution: - { - integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==, - } + { integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== } load-tsconfig@0.2.5: resolution: - { - integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==, - } + { integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg== } engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } locate-path@6.0.0: resolution: - { - integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==, - } + { integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== } engines: { node: '>=10' } lodash.merge@4.6.2: resolution: - { - integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==, - } + { integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== } lodash.sortby@4.7.0: resolution: - { - integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==, - } + { integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== } lru-cache@10.4.3: resolution: - { - integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==, - } + { integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== } lunr@2.3.9: resolution: - { - integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==, - } + { integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== } markdown-it@14.1.0: resolution: - { - integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==, - } + { integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== } hasBin: true mdurl@2.0.0: resolution: - { - integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==, - } + { integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== } merge2@1.4.1: resolution: - { - integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==, - } + { integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== } engines: { node: '>= 8' } micromatch@4.0.8: resolution: - { - integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==, - } + { integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== } engines: { node: '>=8.6' } minimatch@3.1.2: resolution: - { - integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==, - } + { integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== } minimatch@9.0.5: resolution: - { - integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==, - } + { integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== } engines: { node: '>=16 || 14 >=14.17' } minipass@7.1.2: resolution: - { - integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==, - } + { integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== } engines: { node: '>=16 || 14 >=14.17' } ms@2.1.3: resolution: - { - integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==, - } + { integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== } mz@2.7.0: resolution: - { - integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==, - } + { integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== } natural-compare@1.4.0: resolution: - { - integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==, - } + { integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== } node-gyp-build@4.8.4: resolution: - { - integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==, - } + { integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ== } hasBin: true object-assign@4.1.1: resolution: - { - integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==, - } + { integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== } engines: { node: '>=0.10.0' } optionator@0.9.4: resolution: - { - integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==, - } + { integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== } engines: { node: '>= 0.8.0' } p-limit@3.1.0: resolution: - { - integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==, - } + { integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== } engines: { node: '>=10' } p-locate@5.0.0: resolution: - { - integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==, - } + { integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== } engines: { node: '>=10' } package-json-from-dist@1.0.1: resolution: - { - integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==, - } + { integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== } parent-module@1.0.1: resolution: - { - integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==, - } + { integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== } engines: { node: '>=6' } path-exists@4.0.0: resolution: - { - integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==, - } + { integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== } engines: { node: '>=8' } path-key@3.1.1: resolution: - { - integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==, - } + { integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== } engines: { node: '>=8' } path-scurry@1.11.1: resolution: - { - integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==, - } + { integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== } engines: { node: '>=16 || 14 >=14.18' } picocolors@1.1.1: resolution: - { - integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==, - } + { integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== } picomatch@2.3.1: resolution: - { - integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==, - } + { integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== } engines: { node: '>=8.6' } picomatch@4.0.2: resolution: - { - integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==, - } + { integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg== } engines: { node: '>=12' } pirates@4.0.6: resolution: - { - integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==, - } + { integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== } engines: { node: '>= 6' } postcss-load-config@6.0.1: resolution: - { - integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==, - } + { integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g== } engines: { node: '>= 18' } peerDependencies: jiti: '>=1.21.0' @@ -1889,239 +1409,171 @@ packages: prelude-ls@1.2.1: resolution: - { - integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==, - } + { integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== } engines: { node: '>= 0.8.0' } prettier@3.5.3: resolution: - { - integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==, - } + { integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw== } engines: { node: '>=14' } hasBin: true punycode.js@2.3.1: resolution: - { - integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==, - } + { integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== } engines: { node: '>=6' } punycode@2.3.1: resolution: - { - integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==, - } + { integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== } engines: { node: '>=6' } queue-microtask@1.2.3: resolution: - { - integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==, - } + { integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== } readdirp@4.1.2: resolution: - { - integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==, - } + { integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg== } engines: { node: '>= 14.18.0' } resolve-from@4.0.0: resolution: - { - integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==, - } + { integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== } engines: { node: '>=4' } resolve-from@5.0.0: resolution: - { - integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==, - } + { integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== } engines: { node: '>=8' } resolve-pkg-maps@1.0.0: resolution: - { - integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==, - } + { integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== } reusify@1.1.0: resolution: - { - integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==, - } + { integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== } engines: { iojs: '>=1.0.0', node: '>=0.10.0' } rollup@4.36.0: resolution: - { - integrity: sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==, - } + { integrity: sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q== } engines: { node: '>=18.0.0', npm: '>=8.0.0' } hasBin: true run-parallel@1.2.0: resolution: - { - integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==, - } + { integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== } semver@7.7.1: resolution: - { - integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==, - } + { integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== } engines: { node: '>=10' } hasBin: true shebang-command@2.0.0: resolution: - { - integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==, - } + { integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== } engines: { node: '>=8' } shebang-regex@3.0.0: resolution: - { - integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==, - } + { integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== } engines: { node: '>=8' } signal-exit@4.1.0: resolution: - { - integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==, - } + { integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== } engines: { node: '>=14' } source-map@0.8.0-beta.0: resolution: - { - integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==, - } + { integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA== } engines: { node: '>= 8' } string-width@4.2.3: resolution: - { - integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, - } + { integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== } engines: { node: '>=8' } string-width@5.1.2: resolution: - { - integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==, - } + { integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== } engines: { node: '>=12' } strip-ansi@6.0.1: resolution: - { - integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==, - } + { integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== } engines: { node: '>=8' } strip-ansi@7.1.0: resolution: - { - integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==, - } + { integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== } engines: { node: '>=12' } strip-json-comments@3.1.1: resolution: - { - integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==, - } + { integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== } engines: { node: '>=8' } sucrase@3.35.0: resolution: - { - integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==, - } + { integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA== } engines: { node: '>=16 || 14 >=14.17' } hasBin: true supports-color@7.2.0: resolution: - { - integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==, - } + { integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== } engines: { node: '>=8' } thenify-all@1.6.0: resolution: - { - integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==, - } + { integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== } engines: { node: '>=0.8' } thenify@3.3.1: resolution: - { - integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==, - } + { integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== } tinyexec@0.3.2: resolution: - { - integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==, - } + { integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA== } tinyglobby@0.2.12: resolution: - { - integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==, - } + { integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww== } engines: { node: '>=12.0.0' } to-regex-range@5.0.1: resolution: - { - integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==, - } + { integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== } engines: { node: '>=8.0' } tr46@1.0.1: resolution: - { - integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==, - } + { integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== } tree-kill@1.2.2: resolution: - { - integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==, - } + { integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== } hasBin: true ts-api-utils@2.0.1: resolution: - { - integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==, - } + { integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w== } engines: { node: '>=18.12' } peerDependencies: typescript: '>=4.8.4' ts-interface-checker@0.1.13: resolution: - { - integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==, - } + { integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== } tsup@8.4.0: resolution: - { - integrity: sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==, - } + { integrity: sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ== } engines: { node: '>=18' } hasBin: true peerDependencies: @@ -2141,24 +1593,18 @@ packages: tsx@4.19.3: resolution: - { - integrity: sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==, - } + { integrity: sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ== } engines: { node: '>=18.0.0' } hasBin: true type-check@0.4.0: resolution: - { - integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==, - } + { integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== } engines: { node: '>= 0.8.0' } typedoc@0.28.1: resolution: - { - integrity: sha512-Mn2VPNMaxoe/hlBiLriG4U55oyAa3Xo+8HbtEwV7F5WEOPXqtxzGuMZhJYHaqFJpajeQ6ZDUC2c990NAtTbdgw==, - } + { integrity: sha512-Mn2VPNMaxoe/hlBiLriG4U55oyAa3Xo+8HbtEwV7F5WEOPXqtxzGuMZhJYHaqFJpajeQ6ZDUC2c990NAtTbdgw== } engines: { node: '>= 18', pnpm: '>= 10' } hasBin: true peerDependencies: @@ -2166,9 +1612,7 @@ packages: typescript-eslint@8.27.0: resolution: - { - integrity: sha512-ZZ/8+Y0rRUMuW1gJaPtLWe4ryHbsPLzzibk5Sq+IFa2aOH1Vo0gPr1fbA6pOnzBke7zC2Da4w8AyCgxKXo3lqA==, - } + { integrity: sha512-ZZ/8+Y0rRUMuW1gJaPtLWe4ryHbsPLzzibk5Sq+IFa2aOH1Vo0gPr1fbA6pOnzBke7zC2Da4w8AyCgxKXo3lqA== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2176,89 +1620,63 @@ packages: typescript@5.8.2: resolution: - { - integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==, - } + { integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ== } engines: { node: '>=14.17' } hasBin: true uc.micro@2.1.0: resolution: - { - integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==, - } + { integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== } undici-types@6.20.0: resolution: - { - integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==, - } + { integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== } undici-types@7.5.0: resolution: - { - integrity: sha512-CxNFga24pkqrtk9aO4jV78tWXLZhVVU9J2/EAhBGwqJ1+tsLydMI2Vaq7wj3ba/SZL7BL8aq5rflf75DhbgkhA==, - } + { integrity: sha512-CxNFga24pkqrtk9aO4jV78tWXLZhVVU9J2/EAhBGwqJ1+tsLydMI2Vaq7wj3ba/SZL7BL8aq5rflf75DhbgkhA== } uri-js@4.4.1: resolution: - { - integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==, - } + { integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== } utf-8-validate@6.0.5: resolution: - { - integrity: sha512-EYZR+OpIXp9Y1eG1iueg8KRsY8TuT8VNgnanZ0uA3STqhHQTLwbl+WX76/9X5OY12yQubymBpaBSmMPkSTQcKA==, - } + { integrity: sha512-EYZR+OpIXp9Y1eG1iueg8KRsY8TuT8VNgnanZ0uA3STqhHQTLwbl+WX76/9X5OY12yQubymBpaBSmMPkSTQcKA== } engines: { node: '>=6.14.2' } webidl-conversions@4.0.2: resolution: - { - integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==, - } + { integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== } whatwg-url@7.1.0: resolution: - { - integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==, - } + { integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== } which@2.0.2: resolution: - { - integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==, - } + { integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== } engines: { node: '>= 8' } hasBin: true word-wrap@1.2.5: resolution: - { - integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==, - } + { integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== } engines: { node: '>=0.10.0' } wrap-ansi@7.0.0: resolution: - { - integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==, - } + { integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== } engines: { node: '>=10' } wrap-ansi@8.1.0: resolution: - { - integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==, - } + { integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== } engines: { node: '>=12' } ws@8.18.1: resolution: - { - integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==, - } + { integrity: sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w== } engines: { node: '>=10.0.0' } peerDependencies: bufferutil: ^4.0.1 @@ -2271,17 +1689,13 @@ packages: yaml@2.7.0: resolution: - { - integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==, - } + { integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA== } engines: { node: '>= 14' } hasBin: true yocto-queue@0.1.0: resolution: - { - integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==, - } + { integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== } engines: { node: '>=10' } snapshots: diff --git a/clients/js/prettier.config.mjs b/clients/js/prettier.config.mjs deleted file mode 100644 index 0bc48b6b..00000000 --- a/clients/js/prettier.config.mjs +++ /dev/null @@ -1,7 +0,0 @@ -export default { - singleQuote: true, - jsxSingleQuote: true, - printWidth: 100, - trailingComma: 'all', - arrowParens: 'avoid', -}; diff --git a/clients/js/src/create-mint.ts b/clients/js/src/create-mint.ts index 288a436f..6450d99d 100644 --- a/clients/js/src/create-mint.ts +++ b/clients/js/src/create-mint.ts @@ -1,35 +1,30 @@ import { - Address, - fetchEncodedAccount, - GetAccountInfoApi, - GetMinimumBalanceForRentExemptionApi, - Instruction, - KeyPairSigner, - Rpc, + Address, + fetchEncodedAccount, + GetAccountInfoApi, + GetMinimumBalanceForRentExemptionApi, + Instruction, + KeyPairSigner, + Rpc, } from '@solana/kit'; import { getMintSize, TOKEN_2022_PROGRAM_ADDRESS, extension } from '@solana-program/token-2022'; import { getTransferSolInstruction } from '@solana-program/system'; -import { - findBackpointerPda, - findWrappedMintPda, - getBackpointerSize, - getCreateMintInstruction, -} from './generated'; +import { findBackpointerPda, findWrappedMintPda, getBackpointerSize, getCreateMintInstruction } from './generated'; export interface CreateMintArgs { - rpc: Rpc; - unwrappedMint: Address; - wrappedTokenProgram: Address; - payer: KeyPairSigner; - idempotent: boolean; + rpc: Rpc; + unwrappedMint: Address; + wrappedTokenProgram: Address; + payer: KeyPairSigner; + idempotent: boolean; } export interface CreateMintResult { - wrappedMint: Address; - backpointer: Address; - fundedWrappedMintLamports: bigint; - fundedBackpointerLamports: bigint; - ixs: Instruction[]; + wrappedMint: Address; + backpointer: Address; + fundedWrappedMintLamports: bigint; + fundedBackpointerLamports: bigint; + ixs: Instruction[]; } // The on-chain program adds these two extensions by default. We must account for @@ -37,94 +32,94 @@ export interface CreateMintResult { // data objects, but since the size of these extensions is fixed, we can pass // dummy/default values. const DEFAULT_EXTENSIONS = [ - extension('ConfidentialTransferMint', { - autoApproveNewAccounts: true, - authority: null, - auditorElgamalPubkey: null, - }), - extension('MetadataPointer', { - authority: null, - metadataAddress: null, - }), + extension('ConfidentialTransferMint', { + autoApproveNewAccounts: true, + authority: null, + auditorElgamalPubkey: null, + }), + extension('MetadataPointer', { + authority: null, + metadataAddress: null, + }), ]; export async function createMint({ - rpc, - unwrappedMint, - wrappedTokenProgram, - payer, - idempotent = false, -}: CreateMintArgs): Promise { - const [wrappedMint] = await findWrappedMintPda({ + rpc, unwrappedMint, - wrappedTokenProgram: wrappedTokenProgram, - }); - const [backpointer] = await findBackpointerPda({ wrappedMint }); + wrappedTokenProgram, + payer, + idempotent = false, +}: CreateMintArgs): Promise { + const [wrappedMint] = await findWrappedMintPda({ + unwrappedMint, + wrappedTokenProgram: wrappedTokenProgram, + }); + const [backpointer] = await findBackpointerPda({ wrappedMint }); - const instructions: Instruction[] = []; + const instructions: Instruction[] = []; - // Fund wrapped mint account if needed - let fundedWrappedMintLamports = 0n; + // Fund wrapped mint account if needed + let fundedWrappedMintLamports = 0n; - let mintSize = BigInt(getMintSize()); - if (wrappedTokenProgram === TOKEN_2022_PROGRAM_ADDRESS) { - mintSize = BigInt(getMintSize(DEFAULT_EXTENSIONS)); - } + let mintSize = BigInt(getMintSize()); + if (wrappedTokenProgram === TOKEN_2022_PROGRAM_ADDRESS) { + mintSize = BigInt(getMintSize(DEFAULT_EXTENSIONS)); + } - const [wrappedMintAccount, wrappedMintRent] = await Promise.all([ - fetchEncodedAccount(rpc, wrappedMint), - rpc.getMinimumBalanceForRentExemption(mintSize).send(), - ]); + const [wrappedMintAccount, wrappedMintRent] = await Promise.all([ + fetchEncodedAccount(rpc, wrappedMint), + rpc.getMinimumBalanceForRentExemption(mintSize).send(), + ]); - const wrappedMintLamports = wrappedMintAccount.exists ? wrappedMintAccount.lamports : 0n; - if (wrappedMintLamports < wrappedMintRent) { - fundedWrappedMintLamports = wrappedMintRent - wrappedMintLamports; - instructions.push( - getTransferSolInstruction({ - source: payer, - destination: wrappedMint, - amount: fundedWrappedMintLamports, - }), - ); - } + const wrappedMintLamports = wrappedMintAccount.exists ? wrappedMintAccount.lamports : 0n; + if (wrappedMintLamports < wrappedMintRent) { + fundedWrappedMintLamports = wrappedMintRent - wrappedMintLamports; + instructions.push( + getTransferSolInstruction({ + source: payer, + destination: wrappedMint, + amount: fundedWrappedMintLamports, + }), + ); + } + + // Fund backpointer account if needed + let fundedBackpointerLamports = 0n; - // Fund backpointer account if needed - let fundedBackpointerLamports = 0n; + const backpointerSize = BigInt(getBackpointerSize()); + const [backpointerAccount, backpointerRent] = await Promise.all([ + fetchEncodedAccount(rpc, backpointer), + rpc.getMinimumBalanceForRentExemption(backpointerSize).send(), + ]); - const backpointerSize = BigInt(getBackpointerSize()); - const [backpointerAccount, backpointerRent] = await Promise.all([ - fetchEncodedAccount(rpc, backpointer), - rpc.getMinimumBalanceForRentExemption(backpointerSize).send(), - ]); + const backpointerLamports = backpointerAccount.exists ? backpointerAccount.lamports : 0n; + if (backpointerLamports < backpointerRent) { + fundedBackpointerLamports = backpointerRent - backpointerLamports; + instructions.push( + getTransferSolInstruction({ + source: payer, + destination: backpointer, + amount: fundedBackpointerLamports, + }), + ); + } - const backpointerLamports = backpointerAccount.exists ? backpointerAccount.lamports : 0n; - if (backpointerLamports < backpointerRent) { - fundedBackpointerLamports = backpointerRent - backpointerLamports; + // Add create_mint instruction instructions.push( - getTransferSolInstruction({ - source: payer, - destination: backpointer, - amount: fundedBackpointerLamports, - }), + getCreateMintInstruction({ + wrappedMint, + backpointer, + unwrappedMint, + wrappedTokenProgram, + idempotent, + }), ); - } - - // Add create_mint instruction - instructions.push( - getCreateMintInstruction({ - wrappedMint, - backpointer, - unwrappedMint, - wrappedTokenProgram, - idempotent, - }), - ); - return { - wrappedMint, - backpointer, - ixs: instructions, - fundedWrappedMintLamports, - fundedBackpointerLamports, - }; + return { + wrappedMint, + backpointer, + ixs: instructions, + fundedWrappedMintLamports, + fundedBackpointerLamports, + }; } diff --git a/clients/js/src/examples/multisig.ts b/clients/js/src/examples/multisig.ts index 8f4d6659..c1935990 100644 --- a/clients/js/src/examples/multisig.ts +++ b/clients/js/src/examples/multisig.ts @@ -1,56 +1,53 @@ import { - address, - appendTransactionMessageInstructions, - assertIsSendableTransaction, - assertIsTransactionWithBlockhashLifetime, - createKeyPairSignerFromBytes, - createNoopSigner, - createSolanaRpc, - createSolanaRpcSubscriptions, - createTransactionMessage, - getBase58Decoder, - getSignatureFromTransaction, - partiallySignTransactionMessageWithSigners, - pipe, - sendAndConfirmTransactionFactory, - setTransactionMessageFeePayerSigner, - setTransactionMessageLifetimeUsingBlockhash, - signTransactionMessageWithSigners, + address, + appendTransactionMessageInstructions, + assertIsSendableTransaction, + assertIsTransactionWithBlockhashLifetime, + createKeyPairSignerFromBytes, + createNoopSigner, + createSolanaRpc, + createSolanaRpcSubscriptions, + createTransactionMessage, + getBase58Decoder, + getSignatureFromTransaction, + partiallySignTransactionMessageWithSigners, + pipe, + sendAndConfirmTransactionFactory, + setTransactionMessageFeePayerSigner, + setTransactionMessageLifetimeUsingBlockhash, + signTransactionMessageWithSigners, } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '@solana-program/token-2022'; import { - findWrappedMintAuthorityPda, - findWrappedMintPda, - combinedMultisigTx, - createMint, - multisigOfflineSignUnwrap, - createEscrowAccount, - multisigOfflineSignWrap, + findWrappedMintAuthorityPda, + findWrappedMintPda, + combinedMultisigTx, + createMint, + multisigOfflineSignUnwrap, + createEscrowAccount, + multisigOfflineSignWrap, } from '../index'; import { createTokenAccount, getOwnerFromAccount } from '../utilities'; // Replace these consts with your own const PAYER_KEYPAIR_BYTES = new Uint8Array([ - 242, 30, 38, 177, 152, 71, 235, 193, 93, 30, 119, 131, 42, 186, 202, 7, 45, 250, 126, 135, 107, - 137, 38, 91, 202, 212, 12, 8, 154, 213, 163, 200, 23, 237, 17, 163, 3, 135, 34, 126, 235, 146, - 251, 18, 199, 101, 153, 249, 134, 88, 219, 68, 167, 136, 234, 195, 12, 34, 184, 85, 234, 25, 125, - 94, + 242, 30, 38, 177, 152, 71, 235, 193, 93, 30, 119, 131, 42, 186, 202, 7, 45, 250, 126, 135, 107, 137, 38, 91, 202, + 212, 12, 8, 154, 213, 163, 200, 23, 237, 17, 163, 3, 135, 34, 126, 235, 146, 251, 18, 199, 101, 153, 249, 134, 88, + 219, 68, 167, 136, 234, 195, 12, 34, 184, 85, 234, 25, 125, 94, ]); // Create using CLI: spl-token create-multisig 2 $SIGNER_1_PUBKEY $SIGNER_2_PUBKEY const MULTISIG_SPL_TOKEN = address('2XBevFsu4pnZpB9PewYKAJHNyx9dFQf3MaiGBszF5fm8'); const MULTISIG_SPL_TOKEN_2022 = address('BSdexGFqwmDGeXe4pBXVbQnqrEH5trmo9W3wqoXUQY5Y'); const SIGNER_A_KEYPAIR_BYTES = new Uint8Array([ - 210, 190, 232, 169, 113, 107, 195, 87, 14, 9, 125, 106, 41, 174, 131, 9, 29, 144, 95, 134, 68, - 123, 80, 215, 194, 30, 170, 140, 33, 175, 69, 126, 201, 176, 240, 30, 173, 145, 185, 162, 231, - 196, 71, 236, 233, 153, 42, 243, 146, 82, 70, 153, 129, 194, 156, 110, 84, 18, 71, 143, 38, 244, - 232, 58, + 210, 190, 232, 169, 113, 107, 195, 87, 14, 9, 125, 106, 41, 174, 131, 9, 29, 144, 95, 134, 68, 123, 80, 215, 194, + 30, 170, 140, 33, 175, 69, 126, 201, 176, 240, 30, 173, 145, 185, 162, 231, 196, 71, 236, 233, 153, 42, 243, 146, + 82, 70, 153, 129, 194, 156, 110, 84, 18, 71, 143, 38, 244, 232, 58, ]); const SIGNER_B_KEYPAIR_BYTES = new Uint8Array([ - 37, 161, 191, 225, 59, 192, 226, 154, 168, 4, 189, 155, 235, 240, 187, 210, 230, 176, 133, 163, 6, - 132, 229, 129, 10, 9, 67, 88, 215, 124, 195, 243, 189, 178, 12, 18, 216, 91, 154, 193, 75, 164, - 71, 224, 106, 148, 225, 156, 124, 241, 250, 51, 27, 8, 37, 111, 60, 187, 219, 161, 55, 42, 129, - 236, + 37, 161, 191, 225, 59, 192, 226, 154, 168, 4, 189, 155, 235, 240, 187, 210, 230, 176, 133, 163, 6, 132, 229, 129, + 10, 9, 67, 88, 215, 124, 195, 243, 189, 178, 12, 18, 216, 91, 154, 193, 75, 164, 71, 224, 106, 148, 225, 156, 124, + 241, 250, 51, 27, 8, 37, 111, 60, 187, 219, 161, 55, 42, 129, 236, ]); const UNWRAPPED_MINT_ADDRESS = address('F2qGWupzMUQnGfX8e25XZps8d9AGdVde8hLQT2pxsb4M'); @@ -58,241 +55,241 @@ const UNWRAPPED_TOKEN_ACCOUNT = address('94Y9pxekEm59b67PQQwvjb7wbwz689wDZ3dAwhC const AMOUNT_TO_WRAP = 100n; async function main() { - const rpc = createSolanaRpc('http://127.0.0.1:8899'); - const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); - const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }); + const rpc = createSolanaRpc('http://127.0.0.1:8899'); + const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); + const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }); - const payer = await createKeyPairSignerFromBytes(PAYER_KEYPAIR_BYTES); - const { value: blockhash } = await rpc.getLatestBlockhash().send(); + const payer = await createKeyPairSignerFromBytes(PAYER_KEYPAIR_BYTES); + const { value: blockhash } = await rpc.getLatestBlockhash().send(); - // Initialize the wrapped mint - const createMintHelper = await createMint({ - rpc, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - payer, - idempotent: true, - }); - const createMintTx = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions(createMintHelper.ixs, tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(createMintTx); - assertIsTransactionWithBlockhashLifetime(createMintTx); - await sendAndConfirm(createMintTx, { commitment: 'confirmed' }); - const createMintSignature = getSignatureFromTransaction(createMintTx); + // Initialize the wrapped mint + const createMintHelper = await createMint({ + rpc, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + payer, + idempotent: true, + }); + const createMintTx = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions(createMintHelper.ixs, tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(createMintTx); + assertIsTransactionWithBlockhashLifetime(createMintTx); + await sendAndConfirm(createMintTx, { commitment: 'confirmed' }); + const createMintSignature = getSignatureFromTransaction(createMintTx); - console.log('======== Create Mint Successful ========'); - console.log('Wrapped Mint:', createMintHelper.wrappedMint); - console.log('Backpointer:', createMintHelper.backpointer); - console.log('Funded wrapped mint lamports:', createMintHelper.fundedWrappedMintLamports); - console.log('Funded backpointer lamports:', createMintHelper.fundedBackpointerLamports); - console.log('Signature:', createMintSignature); + console.log('======== Create Mint Successful ========'); + console.log('Wrapped Mint:', createMintHelper.wrappedMint); + console.log('Backpointer:', createMintHelper.backpointer); + console.log('Funded wrapped mint lamports:', createMintHelper.fundedWrappedMintLamports); + console.log('Funded backpointer lamports:', createMintHelper.fundedBackpointerLamports); + console.log('Signature:', createMintSignature); - // === Setup accounts needed for wrap === + // === Setup accounts needed for wrap === - // Create escrow account that with hold unwrapped tokens - const createEscrowHelper = await createEscrowAccount({ - rpc, - payer, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - }); - if (createEscrowHelper.kind === 'instructions_to_create') { - const createEscrowTx = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions(createEscrowHelper.ixs, tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(createEscrowTx); - assertIsTransactionWithBlockhashLifetime(createEscrowTx); - await sendAndConfirm(createEscrowTx, { commitment: 'confirmed' }); - const createEscrowSignature = getSignatureFromTransaction(createEscrowTx); + // Create escrow account that with hold unwrapped tokens + const createEscrowHelper = await createEscrowAccount({ + rpc, + payer, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + }); + if (createEscrowHelper.kind === 'instructions_to_create') { + const createEscrowTx = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions(createEscrowHelper.ixs, tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(createEscrowTx); + assertIsTransactionWithBlockhashLifetime(createEscrowTx); + await sendAndConfirm(createEscrowTx, { commitment: 'confirmed' }); + const createEscrowSignature = getSignatureFromTransaction(createEscrowTx); - console.log('======== Create Escrow Successful ========'); - console.log('Escrow address:', createEscrowHelper.address); - console.log('Signature:', createEscrowSignature); - } else { - console.log('======== Escrow already exists, skipping creation ========'); - } + console.log('======== Create Escrow Successful ========'); + console.log('Escrow address:', createEscrowHelper.address); + console.log('Signature:', createEscrowSignature); + } else { + console.log('======== Escrow already exists, skipping creation ========'); + } - // Create recipient account where wrapped tokens will be minted to - const [wrappedMint] = await findWrappedMintPda({ - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - }); - const recipientTokenAccountHelper = await createTokenAccount({ - rpc, - payer, - mint: wrappedMint, - tokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - owner: MULTISIG_SPL_TOKEN_2022, - }); - const recipientTokenAccountTx = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions(recipientTokenAccountHelper.ixs, tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(recipientTokenAccountTx); - assertIsTransactionWithBlockhashLifetime(recipientTokenAccountTx); - await sendAndConfirm(recipientTokenAccountTx, { commitment: 'confirmed' }); + // Create recipient account where wrapped tokens will be minted to + const [wrappedMint] = await findWrappedMintPda({ + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + }); + const recipientTokenAccountHelper = await createTokenAccount({ + rpc, + payer, + mint: wrappedMint, + tokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + owner: MULTISIG_SPL_TOKEN_2022, + }); + const recipientTokenAccountTx = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions(recipientTokenAccountHelper.ixs, tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(recipientTokenAccountTx); + assertIsTransactionWithBlockhashLifetime(recipientTokenAccountTx); + await sendAndConfirm(recipientTokenAccountTx, { commitment: 'confirmed' }); - const unwrappedTokenProgram = await getOwnerFromAccount(rpc, UNWRAPPED_TOKEN_ACCOUNT); - const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ wrappedMint }); + const unwrappedTokenProgram = await getOwnerFromAccount(rpc, UNWRAPPED_TOKEN_ACCOUNT); + const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ wrappedMint }); - const { value: wrapBlockhash } = await rpc.getLatestBlockhash().send(); + const { value: wrapBlockhash } = await rpc.getLatestBlockhash().send(); - const signerA = await createKeyPairSignerFromBytes(SIGNER_A_KEYPAIR_BYTES); - const signerB = await createKeyPairSignerFromBytes(SIGNER_B_KEYPAIR_BYTES); + const signerA = await createKeyPairSignerFromBytes(SIGNER_A_KEYPAIR_BYTES); + const signerB = await createKeyPairSignerFromBytes(SIGNER_B_KEYPAIR_BYTES); - // Two signers and the payer sign the transaction independently + // Two signers and the payer sign the transaction independently - const wrapTxA = await multisigOfflineSignWrap({ - payer: createNoopSigner(payer.address), - unwrappedTokenAccount: UNWRAPPED_TOKEN_ACCOUNT, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - amount: AMOUNT_TO_WRAP, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - recipientWrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, - transferAuthority: MULTISIG_SPL_TOKEN, - wrappedMint, - wrappedMintAuthority, - unwrappedTokenProgram, - multiSigners: [signerA, createNoopSigner(signerB.address)], - blockhash: wrapBlockhash, - }); - const signedWrapTxA = await partiallySignTransactionMessageWithSigners(wrapTxA); - assertIsTransactionWithBlockhashLifetime(signedWrapTxA); + const wrapTxA = await multisigOfflineSignWrap({ + payer: createNoopSigner(payer.address), + unwrappedTokenAccount: UNWRAPPED_TOKEN_ACCOUNT, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + amount: AMOUNT_TO_WRAP, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + recipientWrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, + transferAuthority: MULTISIG_SPL_TOKEN, + wrappedMint, + wrappedMintAuthority, + unwrappedTokenProgram, + multiSigners: [signerA, createNoopSigner(signerB.address)], + blockhash: wrapBlockhash, + }); + const signedWrapTxA = await partiallySignTransactionMessageWithSigners(wrapTxA); + assertIsTransactionWithBlockhashLifetime(signedWrapTxA); - const wrapTxB = await multisigOfflineSignWrap({ - payer: createNoopSigner(payer.address), - unwrappedTokenAccount: UNWRAPPED_TOKEN_ACCOUNT, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - amount: AMOUNT_TO_WRAP, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - recipientWrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, - transferAuthority: MULTISIG_SPL_TOKEN, - wrappedMint, - wrappedMintAuthority, - unwrappedTokenProgram, - multiSigners: [createNoopSigner(signerA.address), signerB], - blockhash: wrapBlockhash, - }); - const signedWrapTxB = await partiallySignTransactionMessageWithSigners(wrapTxB); - assertIsTransactionWithBlockhashLifetime(signedWrapTxB); + const wrapTxB = await multisigOfflineSignWrap({ + payer: createNoopSigner(payer.address), + unwrappedTokenAccount: UNWRAPPED_TOKEN_ACCOUNT, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + amount: AMOUNT_TO_WRAP, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + recipientWrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, + transferAuthority: MULTISIG_SPL_TOKEN, + wrappedMint, + wrappedMintAuthority, + unwrappedTokenProgram, + multiSigners: [createNoopSigner(signerA.address), signerB], + blockhash: wrapBlockhash, + }); + const signedWrapTxB = await partiallySignTransactionMessageWithSigners(wrapTxB); + assertIsTransactionWithBlockhashLifetime(signedWrapTxB); - const wrapTxC = await multisigOfflineSignWrap({ - payer, - unwrappedTokenAccount: UNWRAPPED_TOKEN_ACCOUNT, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - amount: AMOUNT_TO_WRAP, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - recipientWrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, - transferAuthority: MULTISIG_SPL_TOKEN, - wrappedMint, - wrappedMintAuthority, - unwrappedTokenProgram, - multiSigners: [createNoopSigner(signerA.address), createNoopSigner(signerB.address)], - blockhash: wrapBlockhash, - }); - const signedWrapTxC = await partiallySignTransactionMessageWithSigners(wrapTxC); - assertIsTransactionWithBlockhashLifetime(signedWrapTxC); + const wrapTxC = await multisigOfflineSignWrap({ + payer, + unwrappedTokenAccount: UNWRAPPED_TOKEN_ACCOUNT, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + amount: AMOUNT_TO_WRAP, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + recipientWrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, + transferAuthority: MULTISIG_SPL_TOKEN, + wrappedMint, + wrappedMintAuthority, + unwrappedTokenProgram, + multiSigners: [createNoopSigner(signerA.address), createNoopSigner(signerB.address)], + blockhash: wrapBlockhash, + }); + const signedWrapTxC = await partiallySignTransactionMessageWithSigners(wrapTxC); + assertIsTransactionWithBlockhashLifetime(signedWrapTxC); - // Lastly, all signatures are combined together and broadcast + // Lastly, all signatures are combined together and broadcast - const combinedWrapTx = combinedMultisigTx({ - signedTxs: [signedWrapTxA, signedWrapTxB, signedWrapTxC], - blockhash, - }); - await sendAndConfirm(combinedWrapTx, { commitment: 'confirmed' }); + const combinedWrapTx = combinedMultisigTx({ + signedTxs: [signedWrapTxA, signedWrapTxB, signedWrapTxC], + blockhash, + }); + await sendAndConfirm(combinedWrapTx, { commitment: 'confirmed' }); - console.log('======== Multisig Wrap Successful ========'); - for (const [pubkey, signature] of Object.entries(combinedWrapTx.signatures)) { - if (signature) { - const base58Sig = getBase58Decoder().decode(signature); - console.log(`pubkey: ${pubkey}`); - console.log(`signature: ${base58Sig}`); - console.log('-----'); + console.log('======== Multisig Wrap Successful ========'); + for (const [pubkey, signature] of Object.entries(combinedWrapTx.signatures)) { + if (signature) { + const base58Sig = getBase58Decoder().decode(signature); + console.log(`pubkey: ${pubkey}`); + console.log(`signature: ${base58Sig}`); + console.log('-----'); + } } - } - // Unwraps from the token account owned by MULTISIG_SPL_TOKEN_2022 + // Unwraps from the token account owned by MULTISIG_SPL_TOKEN_2022 - const { value: unwrapBlockhash } = await rpc.getLatestBlockhash().send(); + const { value: unwrapBlockhash } = await rpc.getLatestBlockhash().send(); - const unwrapTxA = await multisigOfflineSignUnwrap({ - payer: createNoopSigner(payer.address), - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - amount: AMOUNT_TO_WRAP, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, - recipientUnwrappedToken: UNWRAPPED_TOKEN_ACCOUNT, - transferAuthority: MULTISIG_SPL_TOKEN_2022, - wrappedMint, - wrappedMintAuthority, - unwrappedTokenProgram, - multiSigners: [signerA, createNoopSigner(signerB.address)], - blockhash: unwrapBlockhash, - }); - const signedUnwrapTxA = await partiallySignTransactionMessageWithSigners(unwrapTxA); - assertIsTransactionWithBlockhashLifetime(signedUnwrapTxA); + const unwrapTxA = await multisigOfflineSignUnwrap({ + payer: createNoopSigner(payer.address), + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + amount: AMOUNT_TO_WRAP, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, + recipientUnwrappedToken: UNWRAPPED_TOKEN_ACCOUNT, + transferAuthority: MULTISIG_SPL_TOKEN_2022, + wrappedMint, + wrappedMintAuthority, + unwrappedTokenProgram, + multiSigners: [signerA, createNoopSigner(signerB.address)], + blockhash: unwrapBlockhash, + }); + const signedUnwrapTxA = await partiallySignTransactionMessageWithSigners(unwrapTxA); + assertIsTransactionWithBlockhashLifetime(signedUnwrapTxA); - const unwrapTxB = await multisigOfflineSignUnwrap({ - payer: createNoopSigner(payer.address), - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - amount: AMOUNT_TO_WRAP, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, - recipientUnwrappedToken: UNWRAPPED_TOKEN_ACCOUNT, - transferAuthority: MULTISIG_SPL_TOKEN_2022, - wrappedMint, - wrappedMintAuthority, - unwrappedTokenProgram, - multiSigners: [createNoopSigner(signerA.address), signerB], - blockhash: unwrapBlockhash, - }); - const signedUnwrapTxB = await partiallySignTransactionMessageWithSigners(unwrapTxB); - assertIsTransactionWithBlockhashLifetime(signedUnwrapTxB); + const unwrapTxB = await multisigOfflineSignUnwrap({ + payer: createNoopSigner(payer.address), + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + amount: AMOUNT_TO_WRAP, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, + recipientUnwrappedToken: UNWRAPPED_TOKEN_ACCOUNT, + transferAuthority: MULTISIG_SPL_TOKEN_2022, + wrappedMint, + wrappedMintAuthority, + unwrappedTokenProgram, + multiSigners: [createNoopSigner(signerA.address), signerB], + blockhash: unwrapBlockhash, + }); + const signedUnwrapTxB = await partiallySignTransactionMessageWithSigners(unwrapTxB); + assertIsTransactionWithBlockhashLifetime(signedUnwrapTxB); - const unwrapTxC = await multisigOfflineSignUnwrap({ - payer: payer, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - amount: AMOUNT_TO_WRAP, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, - recipientUnwrappedToken: UNWRAPPED_TOKEN_ACCOUNT, - transferAuthority: MULTISIG_SPL_TOKEN_2022, - wrappedMint, - wrappedMintAuthority, - unwrappedTokenProgram, - multiSigners: [createNoopSigner(signerA.address), createNoopSigner(signerB.address)], - blockhash: unwrapBlockhash, - }); - const signedUnwrapTxC = await partiallySignTransactionMessageWithSigners(unwrapTxC); - assertIsTransactionWithBlockhashLifetime(signedUnwrapTxC); + const unwrapTxC = await multisigOfflineSignUnwrap({ + payer: payer, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + amount: AMOUNT_TO_WRAP, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, + recipientUnwrappedToken: UNWRAPPED_TOKEN_ACCOUNT, + transferAuthority: MULTISIG_SPL_TOKEN_2022, + wrappedMint, + wrappedMintAuthority, + unwrappedTokenProgram, + multiSigners: [createNoopSigner(signerA.address), createNoopSigner(signerB.address)], + blockhash: unwrapBlockhash, + }); + const signedUnwrapTxC = await partiallySignTransactionMessageWithSigners(unwrapTxC); + assertIsTransactionWithBlockhashLifetime(signedUnwrapTxC); - const combinedUnwrapTx = combinedMultisigTx({ - signedTxs: [signedUnwrapTxA, signedUnwrapTxB, signedUnwrapTxC], - blockhash, - }); - await sendAndConfirm(combinedUnwrapTx, { commitment: 'confirmed' }); + const combinedUnwrapTx = combinedMultisigTx({ + signedTxs: [signedUnwrapTxA, signedUnwrapTxB, signedUnwrapTxC], + blockhash, + }); + await sendAndConfirm(combinedUnwrapTx, { commitment: 'confirmed' }); - console.log('======== Multisig Unwrap Successful ========'); - for (const [pubkey, signature] of Object.entries(combinedUnwrapTx.signatures)) { - if (signature) { - const base58Sig = getBase58Decoder().decode(signature); - console.log(`pubkey: ${pubkey}`); - console.log(`signature: ${base58Sig}`); - console.log('-----'); + console.log('======== Multisig Unwrap Successful ========'); + for (const [pubkey, signature] of Object.entries(combinedUnwrapTx.signatures)) { + if (signature) { + const base58Sig = getBase58Decoder().decode(signature); + console.log(`pubkey: ${pubkey}`); + console.log(`signature: ${base58Sig}`); + console.log('-----'); + } } - } } void main(); diff --git a/clients/js/src/examples/single-signer.ts b/clients/js/src/examples/single-signer.ts index 9aee8baa..432f0ea3 100644 --- a/clients/js/src/examples/single-signer.ts +++ b/clients/js/src/examples/single-signer.ts @@ -1,182 +1,175 @@ import { - address, - appendTransactionMessageInstructions, - assertIsSendableTransaction, - assertIsTransactionWithBlockhashLifetime, - createKeyPairSignerFromBytes, - createSolanaRpc, - createSolanaRpcSubscriptions, - createTransactionMessage, - getSignatureFromTransaction, - pipe, - sendAndConfirmTransactionFactory, - setTransactionMessageFeePayerSigner, - setTransactionMessageLifetimeUsingBlockhash, - signTransactionMessageWithSigners, + address, + appendTransactionMessageInstructions, + assertIsSendableTransaction, + assertIsTransactionWithBlockhashLifetime, + createKeyPairSignerFromBytes, + createSolanaRpc, + createSolanaRpcSubscriptions, + createTransactionMessage, + getSignatureFromTransaction, + pipe, + sendAndConfirmTransactionFactory, + setTransactionMessageFeePayerSigner, + setTransactionMessageLifetimeUsingBlockhash, + signTransactionMessageWithSigners, } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '@solana-program/token-2022'; -import { - createEscrowAccount, - findWrappedMintPda, - createMint, - singleSignerUnwrap, - singleSignerWrap, -} from '../index'; +import { createEscrowAccount, findWrappedMintPda, createMint, singleSignerUnwrap, singleSignerWrap } from '../index'; import { createTokenAccount } from '../utilities'; // Replace these consts with your own const PRIVATE_KEY_PAIR = new Uint8Array([ - 242, 30, 38, 177, 152, 71, 235, 193, 93, 30, 119, 131, 42, 186, 202, 7, 45, 250, 126, 135, 107, - 137, 38, 91, 202, 212, 12, 8, 154, 213, 163, 200, 23, 237, 17, 163, 3, 135, 34, 126, 235, 146, - 251, 18, 199, 101, 153, 249, 134, 88, 219, 68, 167, 136, 234, 195, 12, 34, 184, 85, 234, 25, 125, - 94, + 242, 30, 38, 177, 152, 71, 235, 193, 93, 30, 119, 131, 42, 186, 202, 7, 45, 250, 126, 135, 107, 137, 38, 91, 202, + 212, 12, 8, 154, 213, 163, 200, 23, 237, 17, 163, 3, 135, 34, 126, 235, 146, 251, 18, 199, 101, 153, 249, 134, 88, + 219, 68, 167, 136, 234, 195, 12, 34, 184, 85, 234, 25, 125, 94, ]); const UNWRAPPED_MINT_ADDRESS = address('FAbYm8kdDsyc6csvTXPMBwCJDjTVkZcvrnyVVTSF74hU'); const UNWRAPPED_TOKEN_ACCOUNT = address('4dSPDdFuTbKTuJDDtTd8SUdbH6QY42hpTPRi6RRzzsPF'); const AMOUNT_TO_WRAP = 100n; async function main() { - const rpc = createSolanaRpc('http://127.0.0.1:8899'); - const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); - const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }); - - const payer = await createKeyPairSignerFromBytes(PRIVATE_KEY_PAIR); - const { value: blockhash } = await rpc.getLatestBlockhash().send(); - - // Initialize the wrapped mint - const createMintHelper = await createMint({ - rpc, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - payer, - idempotent: true, - }); - const createMintTx = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions(createMintHelper.ixs, tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(createMintTx); - assertIsTransactionWithBlockhashLifetime(createMintTx); - await sendAndConfirm(createMintTx, { commitment: 'confirmed' }); - const createMintSignature = getSignatureFromTransaction(createMintTx); - - console.log('======== Create Mint Successful ========'); - console.log('Wrapped Mint:', createMintHelper.wrappedMint); - console.log('Backpointer:', createMintHelper.backpointer); - console.log('Funded wrapped mint lamports:', createMintHelper.fundedWrappedMintLamports); - console.log('Funded backpointer lamports:', createMintHelper.fundedBackpointerLamports); - console.log('Signature:', createMintSignature); - - // === Setup accounts needed for wrap === - - // Create escrow account that with hold unwrapped tokens - const createEscrowHelper = await createEscrowAccount({ - rpc, - payer, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - }); - if (createEscrowHelper.kind === 'instructions_to_create') { - const createEscrowTx = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions(createEscrowHelper.ixs, tx), - tx => signTransactionMessageWithSigners(tx), + const rpc = createSolanaRpc('http://127.0.0.1:8899'); + const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); + const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }); + + const payer = await createKeyPairSignerFromBytes(PRIVATE_KEY_PAIR); + const { value: blockhash } = await rpc.getLatestBlockhash().send(); + + // Initialize the wrapped mint + const createMintHelper = await createMint({ + rpc, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + payer, + idempotent: true, + }); + const createMintTx = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions(createMintHelper.ixs, tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(createMintTx); + assertIsTransactionWithBlockhashLifetime(createMintTx); + await sendAndConfirm(createMintTx, { commitment: 'confirmed' }); + const createMintSignature = getSignatureFromTransaction(createMintTx); + + console.log('======== Create Mint Successful ========'); + console.log('Wrapped Mint:', createMintHelper.wrappedMint); + console.log('Backpointer:', createMintHelper.backpointer); + console.log('Funded wrapped mint lamports:', createMintHelper.fundedWrappedMintLamports); + console.log('Funded backpointer lamports:', createMintHelper.fundedBackpointerLamports); + console.log('Signature:', createMintSignature); + + // === Setup accounts needed for wrap === + + // Create escrow account that with hold unwrapped tokens + const createEscrowHelper = await createEscrowAccount({ + rpc, + payer, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + }); + if (createEscrowHelper.kind === 'instructions_to_create') { + const createEscrowTx = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions(createEscrowHelper.ixs, tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(createEscrowTx); + assertIsTransactionWithBlockhashLifetime(createEscrowTx); + await sendAndConfirm(createEscrowTx, { commitment: 'confirmed' }); + const createEscrowSignature = getSignatureFromTransaction(createEscrowTx); + + console.log('======== Create Escrow Successful ========'); + console.log('Escrow address:', createEscrowHelper.address); + console.log('Signature:', createEscrowSignature); + } else { + console.log('======== Escrow already exists, skipping creation ========'); + } + + // Create recipient account where wrapped tokens will be minted to + const [wrappedMint] = await findWrappedMintPda({ + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + }); + const recipientTokenAccountHelper = await createTokenAccount({ + rpc, + payer, + mint: wrappedMint, + tokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + owner: payer.address, + }); + const recipientTokenAccountTx = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions(recipientTokenAccountHelper.ixs, tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(recipientTokenAccountTx); + assertIsTransactionWithBlockhashLifetime(recipientTokenAccountTx); + await sendAndConfirm(recipientTokenAccountTx, { commitment: 'confirmed' }); + + // Execute wrap + const wrapHelper = await singleSignerWrap({ + rpc, + payer, + unwrappedTokenAccount: UNWRAPPED_TOKEN_ACCOUNT, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + amount: AMOUNT_TO_WRAP, + unwrappedMint: UNWRAPPED_MINT_ADDRESS, + recipientWrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, + }); + + const wrapTx = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions(wrapHelper.ixs, tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(wrapTx); + assertIsTransactionWithBlockhashLifetime(wrapTx); + await sendAndConfirm(wrapTx, { commitment: 'confirmed' }); + const wrapSignature = getSignatureFromTransaction(wrapTx); + + console.log('======== Wrap Successful ========'); + console.log('Wrap amount:', wrapHelper.amount); + console.log('Recipient account:', wrapHelper.recipientWrappedTokenAccount); + console.log('Escrow Account:', wrapHelper.escrowAccount); + console.log('Signature:', wrapSignature); + + // execute unwrap + + const unwrapHelper = await singleSignerUnwrap({ + rpc, + payer, + wrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, + amount: AMOUNT_TO_WRAP, + recipientUnwrappedToken: UNWRAPPED_TOKEN_ACCOUNT, + }); + + const unwrapTx = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions(unwrapHelper.ixs, tx), + tx => signTransactionMessageWithSigners(tx), ); - assertIsSendableTransaction(createEscrowTx); - assertIsTransactionWithBlockhashLifetime(createEscrowTx); - await sendAndConfirm(createEscrowTx, { commitment: 'confirmed' }); - const createEscrowSignature = getSignatureFromTransaction(createEscrowTx); - - console.log('======== Create Escrow Successful ========'); - console.log('Escrow address:', createEscrowHelper.address); - console.log('Signature:', createEscrowSignature); - } else { - console.log('======== Escrow already exists, skipping creation ========'); - } - - // Create recipient account where wrapped tokens will be minted to - const [wrappedMint] = await findWrappedMintPda({ - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - }); - const recipientTokenAccountHelper = await createTokenAccount({ - rpc, - payer, - mint: wrappedMint, - tokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - owner: payer.address, - }); - const recipientTokenAccountTx = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions(recipientTokenAccountHelper.ixs, tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(recipientTokenAccountTx); - assertIsTransactionWithBlockhashLifetime(recipientTokenAccountTx); - await sendAndConfirm(recipientTokenAccountTx, { commitment: 'confirmed' }); - - // Execute wrap - const wrapHelper = await singleSignerWrap({ - rpc, - payer, - unwrappedTokenAccount: UNWRAPPED_TOKEN_ACCOUNT, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - amount: AMOUNT_TO_WRAP, - unwrappedMint: UNWRAPPED_MINT_ADDRESS, - recipientWrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, - }); - - const wrapTx = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions(wrapHelper.ixs, tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(wrapTx); - assertIsTransactionWithBlockhashLifetime(wrapTx); - await sendAndConfirm(wrapTx, { commitment: 'confirmed' }); - const wrapSignature = getSignatureFromTransaction(wrapTx); - - console.log('======== Wrap Successful ========'); - console.log('Wrap amount:', wrapHelper.amount); - console.log('Recipient account:', wrapHelper.recipientWrappedTokenAccount); - console.log('Escrow Account:', wrapHelper.escrowAccount); - console.log('Signature:', wrapSignature); - - // execute unwrap - - const unwrapHelper = await singleSignerUnwrap({ - rpc, - payer, - wrappedTokenAccount: recipientTokenAccountHelper.keyPair.address, - amount: AMOUNT_TO_WRAP, - recipientUnwrappedToken: UNWRAPPED_TOKEN_ACCOUNT, - }); - - const unwrapTx = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions(unwrapHelper.ixs, tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(unwrapTx); - assertIsTransactionWithBlockhashLifetime(unwrapTx); - await sendAndConfirm(unwrapTx, { commitment: 'confirmed' }); - const unwrapSignature = getSignatureFromTransaction(unwrapTx); - - console.log('======== Unwrap Successful ========'); - console.log('Unwrapped amount:', unwrapHelper.amount); - console.log('Recipient account:', unwrapHelper.recipientUnwrappedToken); - console.log('Signature:', unwrapSignature); + assertIsSendableTransaction(unwrapTx); + assertIsTransactionWithBlockhashLifetime(unwrapTx); + await sendAndConfirm(unwrapTx, { commitment: 'confirmed' }); + const unwrapSignature = getSignatureFromTransaction(unwrapTx); + + console.log('======== Unwrap Successful ========'); + console.log('Unwrapped amount:', unwrapHelper.amount); + console.log('Recipient account:', unwrapHelper.recipientUnwrappedToken); + console.log('Signature:', unwrapSignature); } void main(); diff --git a/clients/js/src/examples/sync-spl-to-token2022.ts b/clients/js/src/examples/sync-spl-to-token2022.ts index 611c70f5..86e8cff5 100644 --- a/clients/js/src/examples/sync-spl-to-token2022.ts +++ b/clients/js/src/examples/sync-spl-to-token2022.ts @@ -1,26 +1,22 @@ import { - address, - appendTransactionMessageInstructions, - assertIsSendableTransaction, - assertIsTransactionWithBlockhashLifetime, - createKeyPairSignerFromBytes, - createSolanaRpc, - createSolanaRpcSubscriptions, - createTransactionMessage, - getSignatureFromTransaction, - pipe, - sendAndConfirmTransactionFactory, - setTransactionMessageFeePayerSigner, - setTransactionMessageLifetimeUsingBlockhash, - signTransactionMessageWithSigners, + address, + appendTransactionMessageInstructions, + assertIsSendableTransaction, + assertIsTransactionWithBlockhashLifetime, + createKeyPairSignerFromBytes, + createSolanaRpc, + createSolanaRpcSubscriptions, + createTransactionMessage, + getSignatureFromTransaction, + pipe, + sendAndConfirmTransactionFactory, + setTransactionMessageFeePayerSigner, + setTransactionMessageLifetimeUsingBlockhash, + signTransactionMessageWithSigners, } from '@solana/kit'; import { TOKEN_2022_PROGRAM_ADDRESS } from '@solana-program/token-2022'; import { getAddressEncoder, getProgramDerivedAddress, getUtf8Encoder } from '@solana/kit'; -import { - findWrappedMintAuthorityPda, - findWrappedMintPda, - getSyncMetadataToToken2022Instruction, -} from '../index'; +import { findWrappedMintAuthorityPda, findWrappedMintPda, getSyncMetadataToToken2022Instruction } from '../index'; // ================================================================= // PREREQUISITES: @@ -34,68 +30,67 @@ import { // Replace these consts with the addresses from your setup const PRIVATE_KEY_PAIR = new Uint8Array([ - 242, 30, 38, 177, 152, 71, 235, 193, 93, 30, 119, 131, 42, 186, 202, 7, 45, 250, 126, 135, 107, - 137, 38, 91, 202, 212, 12, 8, 154, 213, 163, 200, 23, 237, 17, 163, 3, 135, 34, 126, 235, 146, - 251, 18, 199, 101, 153, 249, 134, 88, 219, 68, 167, 136, 234, 195, 12, 34, 184, 85, 234, 25, 125, - 94, + 242, 30, 38, 177, 152, 71, 235, 193, 93, 30, 119, 131, 42, 186, 202, 7, 45, 250, 126, 135, 107, 137, 38, 91, 202, + 212, 12, 8, 154, 213, 163, 200, 23, 237, 17, 163, 3, 135, 34, 126, 235, 146, 251, 18, 199, 101, 153, 249, 134, 88, + 219, 68, 167, 136, 234, 195, 12, 34, 184, 85, 234, 25, 125, 94, ]); // Source Mint: An existing SPL Token mint with Metaplex metadata const UNWRAPPED_SPL_TOKEN_MINT = address('8owJWKMiKfMKYbPmobyZAwXibNFcY7Roj6quktaeqxGL'); async function main() { - const rpc = createSolanaRpc('http://127.0.0.1:8899'); - const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); - const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }); + const rpc = createSolanaRpc('http://127.0.0.1:8899'); + const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); + const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }); - const payer = await createKeyPairSignerFromBytes(PRIVATE_KEY_PAIR); - const { value: blockhash } = await rpc.getLatestBlockhash().send(); + const payer = await createKeyPairSignerFromBytes(PRIVATE_KEY_PAIR); + const { value: blockhash } = await rpc.getLatestBlockhash().send(); - console.log('======== Syncing: SPL Token -> Token-2022 ========'); + console.log('======== Syncing: SPL Token -> Token-2022 ========'); - // To sync from an SPL Token mint, the client must resolve and provide the - // Metaplex Metadata PDA as the `sourceMetadata` account. - // Derive it using the known Metadata program and seeds: ['metadata', programId, mint] - const TOKEN_METADATA_PROGRAM_ADDRESS = address('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); - const [metaplexMetadataPda] = await getProgramDerivedAddress({ - programAddress: TOKEN_METADATA_PROGRAM_ADDRESS, - seeds: [ - getUtf8Encoder().encode('metadata'), - getAddressEncoder().encode(TOKEN_METADATA_PROGRAM_ADDRESS), - getAddressEncoder().encode(UNWRAPPED_SPL_TOKEN_MINT), - ], - }); - const [wrappedMint] = await findWrappedMintPda({ - unwrappedMint: UNWRAPPED_SPL_TOKEN_MINT, - wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, - }); - const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ - wrappedMint, - }); + // To sync from an SPL Token mint, the client must resolve and provide the + // Metaplex Metadata PDA as the `sourceMetadata` account. + // Derive it using the known Metadata program and seeds: ['metadata', programId, mint] + const TOKEN_METADATA_PROGRAM_ADDRESS = address('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); + const [metaplexMetadataPda] = await getProgramDerivedAddress({ + programAddress: TOKEN_METADATA_PROGRAM_ADDRESS, + seeds: [ + getUtf8Encoder().encode('metadata'), + getAddressEncoder().encode(TOKEN_METADATA_PROGRAM_ADDRESS), + getAddressEncoder().encode(UNWRAPPED_SPL_TOKEN_MINT), + ], + }); + const [wrappedMint] = await findWrappedMintPda({ + unwrappedMint: UNWRAPPED_SPL_TOKEN_MINT, + wrappedTokenProgram: TOKEN_2022_PROGRAM_ADDRESS, + }); + const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ + wrappedMint, + }); - const syncToT22Ix = getSyncMetadataToToken2022Instruction({ - wrappedMint, - wrappedMintAuthority, - unwrappedMint: UNWRAPPED_SPL_TOKEN_MINT, - // When the source mint is a standard SPL Token, `sourceMetadata` MUST be - // the address of its Metaplex Metadata PDA. - sourceMetadata: metaplexMetadataPda, - }); + const syncToT22Ix = getSyncMetadataToToken2022Instruction({ + wrappedMint, + wrappedMintAuthority, + unwrappedMint: UNWRAPPED_SPL_TOKEN_MINT, + // When the source mint is a standard SPL Token, `sourceMetadata` MUST be + // the address of its Metaplex Metadata PDA. + sourceMetadata: metaplexMetadataPda, + }); - const transaction = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions([syncToT22Ix], tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(transaction); - assertIsTransactionWithBlockhashLifetime(transaction); - const signature = getSignatureFromTransaction(transaction); - await sendAndConfirm(transaction, { commitment: 'confirmed' }); + const transaction = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions([syncToT22Ix], tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(transaction); + assertIsTransactionWithBlockhashLifetime(transaction); + const signature = getSignatureFromTransaction(transaction); + await sendAndConfirm(transaction, { commitment: 'confirmed' }); - console.log('Successfully synced metadata to Token-2022 mint.'); - console.log('Signature:', signature); + console.log('Successfully synced metadata to Token-2022 mint.'); + console.log('Signature:', signature); } void main(); diff --git a/clients/js/src/examples/sync-token2022-to-spl.ts b/clients/js/src/examples/sync-token2022-to-spl.ts index 78812d72..dddfe2c0 100644 --- a/clients/js/src/examples/sync-token2022-to-spl.ts +++ b/clients/js/src/examples/sync-token2022-to-spl.ts @@ -1,28 +1,24 @@ import { - address, - appendTransactionMessageInstructions, - assertIsSendableTransaction, - assertIsTransactionWithBlockhashLifetime, - createKeyPairSignerFromBytes, - createSolanaRpc, - createSolanaRpcSubscriptions, - createTransactionMessage, - getAddressEncoder, - getProgramDerivedAddress, - getSignatureFromTransaction, - getUtf8Encoder, - pipe, - sendAndConfirmTransactionFactory, - setTransactionMessageFeePayerSigner, - setTransactionMessageLifetimeUsingBlockhash, - signTransactionMessageWithSigners, + address, + appendTransactionMessageInstructions, + assertIsSendableTransaction, + assertIsTransactionWithBlockhashLifetime, + createKeyPairSignerFromBytes, + createSolanaRpc, + createSolanaRpcSubscriptions, + createTransactionMessage, + getAddressEncoder, + getProgramDerivedAddress, + getSignatureFromTransaction, + getUtf8Encoder, + pipe, + sendAndConfirmTransactionFactory, + setTransactionMessageFeePayerSigner, + setTransactionMessageLifetimeUsingBlockhash, + signTransactionMessageWithSigners, } from '@solana/kit'; import { TOKEN_PROGRAM_ADDRESS } from '@solana-program/token'; -import { - findWrappedMintAuthorityPda, - findWrappedMintPda, - getSyncMetadataToSplTokenInstruction, -} from '../index'; +import { findWrappedMintAuthorityPda, findWrappedMintPda, getSyncMetadataToSplTokenInstruction } from '../index'; // ================================================================= // PREREQUISITES: @@ -40,67 +36,66 @@ import { // Replace these consts with the addresses from your setup const PRIVATE_KEY_PAIR = new Uint8Array([ - 242, 30, 38, 177, 152, 71, 235, 193, 93, 30, 119, 131, 42, 186, 202, 7, 45, 250, 126, 135, 107, - 137, 38, 91, 202, 212, 12, 8, 154, 213, 163, 200, 23, 237, 17, 163, 3, 135, 34, 126, 235, 146, - 251, 18, 199, 101, 153, 249, 134, 88, 219, 68, 167, 136, 234, 195, 12, 34, 184, 85, 234, 25, 125, - 94, + 242, 30, 38, 177, 152, 71, 235, 193, 93, 30, 119, 131, 42, 186, 202, 7, 45, 250, 126, 135, 107, 137, 38, 91, 202, + 212, 12, 8, 154, 213, 163, 200, 23, 237, 17, 163, 3, 135, 34, 126, 235, 146, 251, 18, 199, 101, 153, 249, 134, 88, + 219, 68, 167, 136, 234, 195, 12, 34, 184, 85, 234, 25, 125, 94, ]); // Source Mint: An existing Token-2022 mint with metadata extensions const UNWRAPPED_TOKEN_2022_MINT = address('5xte8yNSUTrTtfdptekeA4QJyo8zZdanpDJojrRaXP1Y'); async function main() { - const rpc = createSolanaRpc('http://127.0.0.1:8899'); - const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); - const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }); + const rpc = createSolanaRpc('http://127.0.0.1:8899'); + const rpcSubscriptions = createSolanaRpcSubscriptions('ws://127.0.0.1:8900'); + const sendAndConfirm = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions }); - const payer = await createKeyPairSignerFromBytes(PRIVATE_KEY_PAIR); - const { value: blockhash } = await rpc.getLatestBlockhash().send(); + const payer = await createKeyPairSignerFromBytes(PRIVATE_KEY_PAIR); + const { value: blockhash } = await rpc.getLatestBlockhash().send(); - console.log('======== Syncing: Token-2022 -> SPL Token ========'); + console.log('======== Syncing: Token-2022 -> SPL Token ========'); - // Derive the wrapped SPL Token mint PDA - const [wrappedMint] = await findWrappedMintPda({ - unwrappedMint: UNWRAPPED_TOKEN_2022_MINT, - wrappedTokenProgram: TOKEN_PROGRAM_ADDRESS, - }); + // Derive the wrapped SPL Token mint PDA + const [wrappedMint] = await findWrappedMintPda({ + unwrappedMint: UNWRAPPED_TOKEN_2022_MINT, + wrappedTokenProgram: TOKEN_PROGRAM_ADDRESS, + }); - // Derive the Metaplex Metadata PDA for the wrapped mint. - const TOKEN_METADATA_PROGRAM_ADDRESS = address('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); - const [metaplexMetadataPda] = await getProgramDerivedAddress({ - programAddress: TOKEN_METADATA_PROGRAM_ADDRESS, - seeds: [ - getUtf8Encoder().encode('metadata'), - getAddressEncoder().encode(TOKEN_METADATA_PROGRAM_ADDRESS), - getAddressEncoder().encode(wrappedMint), - ], - }); + // Derive the Metaplex Metadata PDA for the wrapped mint. + const TOKEN_METADATA_PROGRAM_ADDRESS = address('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'); + const [metaplexMetadataPda] = await getProgramDerivedAddress({ + programAddress: TOKEN_METADATA_PROGRAM_ADDRESS, + seeds: [ + getUtf8Encoder().encode('metadata'), + getAddressEncoder().encode(TOKEN_METADATA_PROGRAM_ADDRESS), + getAddressEncoder().encode(wrappedMint), + ], + }); - const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ - wrappedMint, - }); + const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ + wrappedMint, + }); - const syncToSplIx = getSyncMetadataToSplTokenInstruction({ - metaplexMetadata: metaplexMetadataPda, - wrappedMint, - wrappedMintAuthority, - unwrappedMint: UNWRAPPED_TOKEN_2022_MINT, - }); + const syncToSplIx = getSyncMetadataToSplTokenInstruction({ + metaplexMetadata: metaplexMetadataPda, + wrappedMint, + wrappedMintAuthority, + unwrappedMint: UNWRAPPED_TOKEN_2022_MINT, + }); - const transaction = await pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), - tx => appendTransactionMessageInstructions([syncToSplIx], tx), - tx => signTransactionMessageWithSigners(tx), - ); - assertIsSendableTransaction(transaction); - assertIsTransactionWithBlockhashLifetime(transaction); - const signature = getSignatureFromTransaction(transaction); - await sendAndConfirm(transaction, { commitment: 'confirmed' }); + const transaction = await pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(blockhash, tx), + tx => appendTransactionMessageInstructions([syncToSplIx], tx), + tx => signTransactionMessageWithSigners(tx), + ); + assertIsSendableTransaction(transaction); + assertIsTransactionWithBlockhashLifetime(transaction); + const signature = getSignatureFromTransaction(transaction); + await sendAndConfirm(transaction, { commitment: 'confirmed' }); - console.log('Successfully synced metadata to SPL Token Metaplex account.'); - console.log('Signature:', signature); + console.log('Successfully synced metadata to SPL Token Metaplex account.'); + console.log('Signature:', signature); } void main(); diff --git a/clients/js/src/generated/accounts/backpointer.ts b/clients/js/src/generated/accounts/backpointer.ts index 59f3b61d..16c10bcc 100644 --- a/clients/js/src/generated/accounts/backpointer.ts +++ b/clients/js/src/generated/accounts/backpointer.ts @@ -7,121 +7,119 @@ */ import { - assertAccountExists, - assertAccountsExist, - combineCodec, - decodeAccount, - fetchEncodedAccount, - fetchEncodedAccounts, - getAddressDecoder, - getAddressEncoder, - getStructDecoder, - getStructEncoder, - type Account, - type Address, - type EncodedAccount, - type FetchAccountConfig, - type FetchAccountsConfig, - type FixedSizeCodec, - type FixedSizeDecoder, - type FixedSizeEncoder, - type MaybeAccount, - type MaybeEncodedAccount, + assertAccountExists, + assertAccountsExist, + combineCodec, + decodeAccount, + fetchEncodedAccount, + fetchEncodedAccounts, + getAddressDecoder, + getAddressEncoder, + getStructDecoder, + getStructEncoder, + type Account, + type Address, + type EncodedAccount, + type FetchAccountConfig, + type FetchAccountsConfig, + type FixedSizeCodec, + type FixedSizeDecoder, + type FixedSizeEncoder, + type MaybeAccount, + type MaybeEncodedAccount, } from '@solana/kit'; import { BackpointerSeeds, findBackpointerPda } from '../pdas'; +/** Account to store the address of the unwrapped mint. */ export type Backpointer = { unwrappedMint: Address }; export type BackpointerArgs = Backpointer; +/** Gets the encoder for {@link BackpointerArgs} account data. */ export function getBackpointerEncoder(): FixedSizeEncoder { - return getStructEncoder([['unwrappedMint', getAddressEncoder()]]); + return getStructEncoder([['unwrappedMint', getAddressEncoder()]]); } +/** Gets the decoder for {@link Backpointer} account data. */ export function getBackpointerDecoder(): FixedSizeDecoder { - return getStructDecoder([['unwrappedMint', getAddressDecoder()]]); + return getStructDecoder([['unwrappedMint', getAddressDecoder()]]); } -export function getBackpointerCodec(): FixedSizeCodec< - BackpointerArgs, - Backpointer -> { - return combineCodec(getBackpointerEncoder(), getBackpointerDecoder()); +/** Gets the codec for {@link Backpointer} account data. */ +export function getBackpointerCodec(): FixedSizeCodec { + return combineCodec(getBackpointerEncoder(), getBackpointerDecoder()); } export function decodeBackpointer( - encodedAccount: EncodedAccount + encodedAccount: EncodedAccount, ): Account; export function decodeBackpointer( - encodedAccount: MaybeEncodedAccount + encodedAccount: MaybeEncodedAccount, ): MaybeAccount; export function decodeBackpointer( - encodedAccount: EncodedAccount | MaybeEncodedAccount + encodedAccount: EncodedAccount | MaybeEncodedAccount, ): Account | MaybeAccount { - return decodeAccount( - encodedAccount as MaybeEncodedAccount, - getBackpointerDecoder() - ); + return decodeAccount(encodedAccount as MaybeEncodedAccount, getBackpointerDecoder()); } export async function fetchBackpointer( - rpc: Parameters[0], - address: Address, - config?: FetchAccountConfig + rpc: Parameters[0], + address: Address, + config?: FetchAccountConfig, ): Promise> { - const maybeAccount = await fetchMaybeBackpointer(rpc, address, config); - assertAccountExists(maybeAccount); - return maybeAccount; + const maybeAccount = await fetchMaybeBackpointer(rpc, address, config); + assertAccountExists(maybeAccount); + return maybeAccount; } export async function fetchMaybeBackpointer( - rpc: Parameters[0], - address: Address, - config?: FetchAccountConfig + rpc: Parameters[0], + address: Address, + config?: FetchAccountConfig, ): Promise> { - const maybeAccount = await fetchEncodedAccount(rpc, address, config); - return decodeBackpointer(maybeAccount); + const maybeAccount = await fetchEncodedAccount(rpc, address, config); + return decodeBackpointer(maybeAccount); } export async function fetchAllBackpointer( - rpc: Parameters[0], - addresses: Array
, - config?: FetchAccountsConfig + rpc: Parameters[0], + addresses: Array
, + config?: FetchAccountsConfig, ): Promise[]> { - const maybeAccounts = await fetchAllMaybeBackpointer(rpc, addresses, config); - assertAccountsExist(maybeAccounts); - return maybeAccounts; + const maybeAccounts = await fetchAllMaybeBackpointer(rpc, addresses, config); + assertAccountsExist(maybeAccounts); + return maybeAccounts; } export async function fetchAllMaybeBackpointer( - rpc: Parameters[0], - addresses: Array
, - config?: FetchAccountsConfig + rpc: Parameters[0], + addresses: Array
, + config?: FetchAccountsConfig, ): Promise[]> { - const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); - return maybeAccounts.map((maybeAccount) => decodeBackpointer(maybeAccount)); + const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config); + return maybeAccounts.map(maybeAccount => decodeBackpointer(maybeAccount)); } export function getBackpointerSize(): number { - return 32; + return 32; } export async function fetchBackpointerFromSeeds( - rpc: Parameters[0], - seeds: BackpointerSeeds, - config: FetchAccountConfig & { programAddress?: Address } = {} + rpc: Parameters[0], + seeds: BackpointerSeeds, + config: FetchAccountConfig & { programAddress?: Address } = {}, ): Promise> { - const maybeAccount = await fetchMaybeBackpointerFromSeeds(rpc, seeds, config); - assertAccountExists(maybeAccount); - return maybeAccount; + const maybeAccount = await fetchMaybeBackpointerFromSeeds(rpc, seeds, config); + assertAccountExists(maybeAccount); + return maybeAccount; } export async function fetchMaybeBackpointerFromSeeds( - rpc: Parameters[0], - seeds: BackpointerSeeds, - config: FetchAccountConfig & { programAddress?: Address } = {} + rpc: Parameters[0], + seeds: BackpointerSeeds, + config: FetchAccountConfig & { programAddress?: Address } = {}, ): Promise> { - const { programAddress, ...fetchConfig } = config; - const [address] = await findBackpointerPda(seeds, { programAddress }); - return await fetchMaybeBackpointer(rpc, address, fetchConfig); + const { programAddress, ...fetchConfig } = config; + const [address] = await findBackpointerPda(seeds, { programAddress }); + return await fetchMaybeBackpointer(rpc, address, fetchConfig); } diff --git a/clients/js/src/generated/errors/tokenWrap.ts b/clients/js/src/generated/errors/tokenWrap.ts index 7933a212..6629a86b 100644 --- a/clients/js/src/generated/errors/tokenWrap.ts +++ b/clients/js/src/generated/errors/tokenWrap.ts @@ -7,10 +7,10 @@ */ import { - isProgramError, - type Address, - type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, - type SolanaError, + isProgramError, + type Address, + type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, + type SolanaError, } from '@solana/kit'; import { TOKEN_WRAP_PROGRAM_ADDRESS } from '../programs'; @@ -32,65 +32,58 @@ export const TOKEN_WRAP_ERROR__EXTERNAL_PROGRAM_RETURNED_NO_DATA = 0xe; // 14 export const TOKEN_WRAP_ERROR__NO_SYNCING_TO_TOKEN2022 = 0xf; // 15 export type TokenWrapError = - | typeof TOKEN_WRAP_ERROR__BACKPOINTER_MISMATCH - | typeof TOKEN_WRAP_ERROR__ESCROW_IN_GOOD_STATE - | typeof TOKEN_WRAP_ERROR__ESCROW_MISMATCH - | typeof TOKEN_WRAP_ERROR__ESCROW_OWNER_MISMATCH - | typeof TOKEN_WRAP_ERROR__EXTERNAL_PROGRAM_RETURNED_NO_DATA - | typeof TOKEN_WRAP_ERROR__INVALID_BACKPOINTER_OWNER - | typeof TOKEN_WRAP_ERROR__INVALID_WRAPPED_MINT_OWNER - | typeof TOKEN_WRAP_ERROR__METADATA_POINTER_MISMATCH - | typeof TOKEN_WRAP_ERROR__METADATA_POINTER_MISSING - | typeof TOKEN_WRAP_ERROR__METADATA_POINTER_UNSET - | typeof TOKEN_WRAP_ERROR__METAPLEX_METADATA_MISMATCH - | typeof TOKEN_WRAP_ERROR__MINT_AUTHORITY_MISMATCH - | typeof TOKEN_WRAP_ERROR__NO_SYNCING_TO_TOKEN2022 - | typeof TOKEN_WRAP_ERROR__UNWRAPPED_MINT_HAS_NO_METADATA - | typeof TOKEN_WRAP_ERROR__WRAPPED_MINT_MISMATCH - | typeof TOKEN_WRAP_ERROR__ZERO_WRAP_AMOUNT; + | typeof TOKEN_WRAP_ERROR__BACKPOINTER_MISMATCH + | typeof TOKEN_WRAP_ERROR__ESCROW_IN_GOOD_STATE + | typeof TOKEN_WRAP_ERROR__ESCROW_MISMATCH + | typeof TOKEN_WRAP_ERROR__ESCROW_OWNER_MISMATCH + | typeof TOKEN_WRAP_ERROR__EXTERNAL_PROGRAM_RETURNED_NO_DATA + | typeof TOKEN_WRAP_ERROR__INVALID_BACKPOINTER_OWNER + | typeof TOKEN_WRAP_ERROR__INVALID_WRAPPED_MINT_OWNER + | typeof TOKEN_WRAP_ERROR__METADATA_POINTER_MISMATCH + | typeof TOKEN_WRAP_ERROR__METADATA_POINTER_MISSING + | typeof TOKEN_WRAP_ERROR__METADATA_POINTER_UNSET + | typeof TOKEN_WRAP_ERROR__METAPLEX_METADATA_MISMATCH + | typeof TOKEN_WRAP_ERROR__MINT_AUTHORITY_MISMATCH + | typeof TOKEN_WRAP_ERROR__NO_SYNCING_TO_TOKEN2022 + | typeof TOKEN_WRAP_ERROR__UNWRAPPED_MINT_HAS_NO_METADATA + | typeof TOKEN_WRAP_ERROR__WRAPPED_MINT_MISMATCH + | typeof TOKEN_WRAP_ERROR__ZERO_WRAP_AMOUNT; let tokenWrapErrorMessages: Record | undefined; if (process.env.NODE_ENV !== 'production') { - tokenWrapErrorMessages = { - [TOKEN_WRAP_ERROR__BACKPOINTER_MISMATCH]: `Wrapped backpointer account address does not match expected PDA`, - [TOKEN_WRAP_ERROR__ESCROW_IN_GOOD_STATE]: `The escrow account is in a good state and cannot be recreated`, - [TOKEN_WRAP_ERROR__ESCROW_MISMATCH]: `Escrow account address does not match expected ATA`, - [TOKEN_WRAP_ERROR__ESCROW_OWNER_MISMATCH]: `Unwrapped escrow token owner is not set to expected PDA`, - [TOKEN_WRAP_ERROR__EXTERNAL_PROGRAM_RETURNED_NO_DATA]: `External metadata program returned no data`, - [TOKEN_WRAP_ERROR__INVALID_BACKPOINTER_OWNER]: `Wrapped backpointer account owner is not the expected token wrap program`, - [TOKEN_WRAP_ERROR__INVALID_WRAPPED_MINT_OWNER]: `Wrapped mint account owner is not the expected token program`, - [TOKEN_WRAP_ERROR__METADATA_POINTER_MISMATCH]: `Provided source metadata account does not match pointer`, - [TOKEN_WRAP_ERROR__METADATA_POINTER_MISSING]: `Metadata pointer extension missing on mint`, - [TOKEN_WRAP_ERROR__METADATA_POINTER_UNSET]: `Metadata pointer is unset (None)`, - [TOKEN_WRAP_ERROR__METAPLEX_METADATA_MISMATCH]: `Metaplex metadata account address does not match expected PDA`, - [TOKEN_WRAP_ERROR__MINT_AUTHORITY_MISMATCH]: `Wrapped mint authority does not match expected PDA`, - [TOKEN_WRAP_ERROR__NO_SYNCING_TO_TOKEN2022]: `Instruction can only be used with spl-token wrapped mints`, - [TOKEN_WRAP_ERROR__UNWRAPPED_MINT_HAS_NO_METADATA]: `Unwrapped mint does not have the TokenMetadata extension`, - [TOKEN_WRAP_ERROR__WRAPPED_MINT_MISMATCH]: `Wrapped mint account address does not match expected PDA`, - [TOKEN_WRAP_ERROR__ZERO_WRAP_AMOUNT]: `Wrap amount should be positive`, - }; + tokenWrapErrorMessages = { + [TOKEN_WRAP_ERROR__BACKPOINTER_MISMATCH]: `Wrapped backpointer account address does not match expected PDA`, + [TOKEN_WRAP_ERROR__ESCROW_IN_GOOD_STATE]: `The escrow account is in a good state and cannot be recreated`, + [TOKEN_WRAP_ERROR__ESCROW_MISMATCH]: `Escrow account address does not match expected ATA`, + [TOKEN_WRAP_ERROR__ESCROW_OWNER_MISMATCH]: `Unwrapped escrow token owner is not set to expected PDA`, + [TOKEN_WRAP_ERROR__EXTERNAL_PROGRAM_RETURNED_NO_DATA]: `External metadata program returned no data`, + [TOKEN_WRAP_ERROR__INVALID_BACKPOINTER_OWNER]: `Wrapped backpointer account owner is not the expected token wrap program`, + [TOKEN_WRAP_ERROR__INVALID_WRAPPED_MINT_OWNER]: `Wrapped mint account owner is not the expected token program`, + [TOKEN_WRAP_ERROR__METADATA_POINTER_MISMATCH]: `Provided source metadata account does not match pointer`, + [TOKEN_WRAP_ERROR__METADATA_POINTER_MISSING]: `Metadata pointer extension missing on mint`, + [TOKEN_WRAP_ERROR__METADATA_POINTER_UNSET]: `Metadata pointer is unset (None)`, + [TOKEN_WRAP_ERROR__METAPLEX_METADATA_MISMATCH]: `Metaplex metadata account address does not match expected PDA`, + [TOKEN_WRAP_ERROR__MINT_AUTHORITY_MISMATCH]: `Wrapped mint authority does not match expected PDA`, + [TOKEN_WRAP_ERROR__NO_SYNCING_TO_TOKEN2022]: `Instruction can only be used with spl-token wrapped mints`, + [TOKEN_WRAP_ERROR__UNWRAPPED_MINT_HAS_NO_METADATA]: `Unwrapped mint does not have the TokenMetadata extension`, + [TOKEN_WRAP_ERROR__WRAPPED_MINT_MISMATCH]: `Wrapped mint account address does not match expected PDA`, + [TOKEN_WRAP_ERROR__ZERO_WRAP_AMOUNT]: `Wrap amount should be positive`, + }; } export function getTokenWrapErrorMessage(code: TokenWrapError): string { - if (process.env.NODE_ENV !== 'production') { - return (tokenWrapErrorMessages as Record)[code]; - } + if (process.env.NODE_ENV !== 'production') { + return (tokenWrapErrorMessages as Record)[code]; + } - return 'Error message not available in production bundles.'; + return 'Error message not available in production bundles.'; } export function isTokenWrapError( - error: unknown, - transactionMessage: { - instructions: Record; - }, - code?: TProgramErrorCode + error: unknown, + transactionMessage: { instructions: Record }, + code?: TProgramErrorCode, ): error is SolanaError & - Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { - return isProgramError( - error, - transactionMessage, - TOKEN_WRAP_PROGRAM_ADDRESS, - code - ); + Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> { + return isProgramError(error, transactionMessage, TOKEN_WRAP_PROGRAM_ADDRESS, code); } diff --git a/clients/js/src/generated/instructions/closeStuckEscrow.ts b/clients/js/src/generated/instructions/closeStuckEscrow.ts index 8f5b6a03..a9bd57f3 100644 --- a/clients/js/src/generated/instructions/closeStuckEscrow.ts +++ b/clients/js/src/generated/instructions/closeStuckEscrow.ts @@ -7,23 +7,23 @@ */ import { - combineCodec, - getStructDecoder, - getStructEncoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type AccountMeta, - type Address, - type FixedSizeCodec, - type FixedSizeDecoder, - type FixedSizeEncoder, - type Instruction, - type InstructionWithAccounts, - type InstructionWithData, - type ReadonlyAccount, - type ReadonlyUint8Array, - type WritableAccount, + combineCodec, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type AccountMeta, + type Address, + type FixedSizeCodec, + type FixedSizeDecoder, + type FixedSizeEncoder, + type Instruction, + type InstructionWithAccounts, + type InstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, + type WritableAccount, } from '@solana/kit'; import { TOKEN_WRAP_PROGRAM_ADDRESS } from '../programs'; import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; @@ -31,162 +31,99 @@ import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; export const CLOSE_STUCK_ESCROW_DISCRIMINATOR = 3; export function getCloseStuckEscrowDiscriminatorBytes() { - return getU8Encoder().encode(CLOSE_STUCK_ESCROW_DISCRIMINATOR); + return getU8Encoder().encode(CLOSE_STUCK_ESCROW_DISCRIMINATOR); } export type CloseStuckEscrowInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountEscrow extends string | AccountMeta = string, - TAccountDestination extends string | AccountMeta = string, - TAccountUnwrappedMint extends string | AccountMeta = string, - TAccountWrappedMint extends string | AccountMeta = string, - TAccountWrappedMintAuthority extends string | AccountMeta = string, - TAccountToken2022Program extends - | string - | AccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', - TRemainingAccounts extends readonly AccountMeta[] = [], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountEscrow extends string | AccountMeta = string, + TAccountDestination extends string | AccountMeta = string, + TAccountUnwrappedMint extends string | AccountMeta = string, + TAccountWrappedMint extends string | AccountMeta = string, + TAccountWrappedMintAuthority extends string | AccountMeta = string, + TAccountToken2022Program extends string | AccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', + TRemainingAccounts extends readonly AccountMeta[] = [], > = Instruction & - InstructionWithData & - InstructionWithAccounts< - [ - TAccountEscrow extends string - ? WritableAccount - : TAccountEscrow, - TAccountDestination extends string - ? WritableAccount - : TAccountDestination, - TAccountUnwrappedMint extends string - ? ReadonlyAccount - : TAccountUnwrappedMint, - TAccountWrappedMint extends string - ? ReadonlyAccount - : TAccountWrappedMint, - TAccountWrappedMintAuthority extends string - ? ReadonlyAccount - : TAccountWrappedMintAuthority, - TAccountToken2022Program extends string - ? ReadonlyAccount - : TAccountToken2022Program, - ...TRemainingAccounts, - ] - >; + InstructionWithData & + InstructionWithAccounts< + [ + TAccountEscrow extends string ? WritableAccount : TAccountEscrow, + TAccountDestination extends string ? WritableAccount : TAccountDestination, + TAccountUnwrappedMint extends string ? ReadonlyAccount : TAccountUnwrappedMint, + TAccountWrappedMint extends string ? ReadonlyAccount : TAccountWrappedMint, + TAccountWrappedMintAuthority extends string + ? ReadonlyAccount + : TAccountWrappedMintAuthority, + TAccountToken2022Program extends string + ? ReadonlyAccount + : TAccountToken2022Program, + ...TRemainingAccounts, + ] + >; export type CloseStuckEscrowInstructionData = { discriminator: number }; export type CloseStuckEscrowInstructionDataArgs = {}; export function getCloseStuckEscrowInstructionDataEncoder(): FixedSizeEncoder { - return transformEncoder( - getStructEncoder([['discriminator', getU8Encoder()]]), - (value) => ({ ...value, discriminator: CLOSE_STUCK_ESCROW_DISCRIMINATOR }) - ); + return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()]]), value => ({ + ...value, + discriminator: CLOSE_STUCK_ESCROW_DISCRIMINATOR, + })); } export function getCloseStuckEscrowInstructionDataDecoder(): FixedSizeDecoder { - return getStructDecoder([['discriminator', getU8Decoder()]]); + return getStructDecoder([['discriminator', getU8Decoder()]]); } export function getCloseStuckEscrowInstructionDataCodec(): FixedSizeCodec< - CloseStuckEscrowInstructionDataArgs, - CloseStuckEscrowInstructionData + CloseStuckEscrowInstructionDataArgs, + CloseStuckEscrowInstructionData > { - return combineCodec( - getCloseStuckEscrowInstructionDataEncoder(), - getCloseStuckEscrowInstructionDataDecoder() - ); + return combineCodec(getCloseStuckEscrowInstructionDataEncoder(), getCloseStuckEscrowInstructionDataDecoder()); } export type CloseStuckEscrowInput< - TAccountEscrow extends string = string, - TAccountDestination extends string = string, - TAccountUnwrappedMint extends string = string, - TAccountWrappedMint extends string = string, - TAccountWrappedMintAuthority extends string = string, - TAccountToken2022Program extends string = string, + TAccountEscrow extends string = string, + TAccountDestination extends string = string, + TAccountUnwrappedMint extends string = string, + TAccountWrappedMint extends string = string, + TAccountWrappedMintAuthority extends string = string, + TAccountToken2022Program extends string = string, > = { - /** Escrow account to close (ATA) */ - escrow: Address; - /** Destination for lamports from closed account */ - destination: Address; - /** Unwrapped mint */ - unwrappedMint: Address; - /** Wrapped mint */ - wrappedMint: Address; - /** Wrapped mint authority (PDA) */ - wrappedMintAuthority: Address; - /** Token-2022 program */ - token2022Program?: Address; + /** Escrow account to close (ATA) */ + escrow: Address; + /** Destination for lamports from closed account */ + destination: Address; + /** Unwrapped mint */ + unwrappedMint: Address; + /** Wrapped mint */ + wrappedMint: Address; + /** Wrapped mint authority (PDA) */ + wrappedMintAuthority: Address; + /** Token-2022 program */ + token2022Program?: Address; }; export function getCloseStuckEscrowInstruction< - TAccountEscrow extends string, - TAccountDestination extends string, - TAccountUnwrappedMint extends string, - TAccountWrappedMint extends string, - TAccountWrappedMintAuthority extends string, - TAccountToken2022Program extends string, - TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountEscrow extends string, + TAccountDestination extends string, + TAccountUnwrappedMint extends string, + TAccountWrappedMint extends string, + TAccountWrappedMintAuthority extends string, + TAccountToken2022Program extends string, + TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, >( - input: CloseStuckEscrowInput< - TAccountEscrow, - TAccountDestination, - TAccountUnwrappedMint, - TAccountWrappedMint, - TAccountWrappedMintAuthority, - TAccountToken2022Program - >, - config?: { programAddress?: TProgramAddress } + input: CloseStuckEscrowInput< + TAccountEscrow, + TAccountDestination, + TAccountUnwrappedMint, + TAccountWrappedMint, + TAccountWrappedMintAuthority, + TAccountToken2022Program + >, + config?: { programAddress?: TProgramAddress }, ): CloseStuckEscrowInstruction< - TProgramAddress, - TAccountEscrow, - TAccountDestination, - TAccountUnwrappedMint, - TAccountWrappedMint, - TAccountWrappedMintAuthority, - TAccountToken2022Program -> { - // Program address. - const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - escrow: { value: input.escrow ?? null, isWritable: true }, - destination: { value: input.destination ?? null, isWritable: true }, - unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, - wrappedMint: { value: input.wrappedMint ?? null, isWritable: false }, - wrappedMintAuthority: { - value: input.wrappedMintAuthority ?? null, - isWritable: false, - }, - token2022Program: { - value: input.token2022Program ?? null, - isWritable: false, - }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - // Resolve default values. - if (!accounts.token2022Program.value) { - accounts.token2022Program.value = - 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>; - } - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - return Object.freeze({ - accounts: [ - getAccountMeta(accounts.escrow), - getAccountMeta(accounts.destination), - getAccountMeta(accounts.unwrappedMint), - getAccountMeta(accounts.wrappedMint), - getAccountMeta(accounts.wrappedMintAuthority), - getAccountMeta(accounts.token2022Program), - ], - data: getCloseStuckEscrowInstructionDataEncoder().encode({}), - programAddress, - } as CloseStuckEscrowInstruction< TProgramAddress, TAccountEscrow, TAccountDestination, @@ -194,65 +131,101 @@ export function getCloseStuckEscrowInstruction< TAccountWrappedMint, TAccountWrappedMintAuthority, TAccountToken2022Program - >); +> { + // Program address. + const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + escrow: { value: input.escrow ?? null, isWritable: true }, + destination: { value: input.destination ?? null, isWritable: true }, + unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, + wrappedMint: { value: input.wrappedMint ?? null, isWritable: false }, + wrappedMintAuthority: { value: input.wrappedMintAuthority ?? null, isWritable: false }, + token2022Program: { value: input.token2022Program ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record; + + // Resolve default values. + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = + 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + return Object.freeze({ + accounts: [ + getAccountMeta(accounts.escrow), + getAccountMeta(accounts.destination), + getAccountMeta(accounts.unwrappedMint), + getAccountMeta(accounts.wrappedMint), + getAccountMeta(accounts.wrappedMintAuthority), + getAccountMeta(accounts.token2022Program), + ], + data: getCloseStuckEscrowInstructionDataEncoder().encode({}), + programAddress, + } as CloseStuckEscrowInstruction< + TProgramAddress, + TAccountEscrow, + TAccountDestination, + TAccountUnwrappedMint, + TAccountWrappedMint, + TAccountWrappedMintAuthority, + TAccountToken2022Program + >); } export type ParsedCloseStuckEscrowInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], > = { - programAddress: Address; - accounts: { - /** Escrow account to close (ATA) */ - escrow: TAccountMetas[0]; - /** Destination for lamports from closed account */ - destination: TAccountMetas[1]; - /** Unwrapped mint */ - unwrappedMint: TAccountMetas[2]; - /** Wrapped mint */ - wrappedMint: TAccountMetas[3]; - /** Wrapped mint authority (PDA) */ - wrappedMintAuthority: TAccountMetas[4]; - /** Token-2022 program */ - token2022Program?: TAccountMetas[5] | undefined; - }; - data: CloseStuckEscrowInstructionData; + programAddress: Address; + accounts: { + /** Escrow account to close (ATA) */ + escrow: TAccountMetas[0]; + /** Destination for lamports from closed account */ + destination: TAccountMetas[1]; + /** Unwrapped mint */ + unwrappedMint: TAccountMetas[2]; + /** Wrapped mint */ + wrappedMint: TAccountMetas[3]; + /** Wrapped mint authority (PDA) */ + wrappedMintAuthority: TAccountMetas[4]; + /** Token-2022 program */ + token2022Program?: TAccountMetas[5] | undefined; + }; + data: CloseStuckEscrowInstructionData; }; -export function parseCloseStuckEscrowInstruction< - TProgram extends string, - TAccountMetas extends readonly AccountMeta[], ->( - instruction: Instruction & - InstructionWithAccounts & - InstructionWithData +export function parseCloseStuckEscrowInstruction( + instruction: Instruction & + InstructionWithAccounts & + InstructionWithData, ): ParsedCloseStuckEscrowInstruction { - if (instruction.accounts.length < 6) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - const getNextOptionalAccount = () => { - const accountMeta = getNextAccount(); - return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS - ? undefined - : accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - escrow: getNextAccount(), - destination: getNextAccount(), - unwrappedMint: getNextAccount(), - wrappedMint: getNextAccount(), - wrappedMintAuthority: getNextAccount(), - token2022Program: getNextOptionalAccount(), - }, - data: getCloseStuckEscrowInstructionDataDecoder().decode(instruction.data), - }; + if (instruction.accounts.length < 6) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS ? undefined : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + escrow: getNextAccount(), + destination: getNextAccount(), + unwrappedMint: getNextAccount(), + wrappedMint: getNextAccount(), + wrappedMintAuthority: getNextAccount(), + token2022Program: getNextOptionalAccount(), + }, + data: getCloseStuckEscrowInstructionDataDecoder().decode(instruction.data), + }; } diff --git a/clients/js/src/generated/instructions/createMint.ts b/clients/js/src/generated/instructions/createMint.ts index 43e12803..f5786cc7 100644 --- a/clients/js/src/generated/instructions/createMint.ts +++ b/clients/js/src/generated/instructions/createMint.ts @@ -7,25 +7,25 @@ */ import { - combineCodec, - getBooleanDecoder, - getBooleanEncoder, - getStructDecoder, - getStructEncoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type AccountMeta, - type Address, - type FixedSizeCodec, - type FixedSizeDecoder, - type FixedSizeEncoder, - type Instruction, - type InstructionWithAccounts, - type InstructionWithData, - type ReadonlyAccount, - type ReadonlyUint8Array, - type WritableAccount, + combineCodec, + getBooleanDecoder, + getBooleanEncoder, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type AccountMeta, + type Address, + type FixedSizeCodec, + type FixedSizeDecoder, + type FixedSizeEncoder, + type Instruction, + type InstructionWithAccounts, + type InstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, + type WritableAccount, } from '@solana/kit'; import { TOKEN_WRAP_PROGRAM_ADDRESS } from '../programs'; import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; @@ -33,244 +33,214 @@ import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; export const CREATE_MINT_DISCRIMINATOR = 0; export function getCreateMintDiscriminatorBytes() { - return getU8Encoder().encode(CREATE_MINT_DISCRIMINATOR); + return getU8Encoder().encode(CREATE_MINT_DISCRIMINATOR); } export type CreateMintInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountWrappedMint extends string | AccountMeta = string, - TAccountBackpointer extends string | AccountMeta = string, - TAccountUnwrappedMint extends string | AccountMeta = string, - TAccountSystemProgram extends - | string - | AccountMeta = '11111111111111111111111111111111', - TAccountWrappedTokenProgram extends string | AccountMeta = string, - TRemainingAccounts extends readonly AccountMeta[] = [], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountWrappedMint extends string | AccountMeta = string, + TAccountBackpointer extends string | AccountMeta = string, + TAccountUnwrappedMint extends string | AccountMeta = string, + TAccountSystemProgram extends string | AccountMeta = '11111111111111111111111111111111', + TAccountWrappedTokenProgram extends string | AccountMeta = string, + TRemainingAccounts extends readonly AccountMeta[] = [], > = Instruction & - InstructionWithData & - InstructionWithAccounts< - [ - TAccountWrappedMint extends string - ? WritableAccount - : TAccountWrappedMint, - TAccountBackpointer extends string - ? WritableAccount - : TAccountBackpointer, - TAccountUnwrappedMint extends string - ? ReadonlyAccount - : TAccountUnwrappedMint, - TAccountSystemProgram extends string - ? ReadonlyAccount - : TAccountSystemProgram, - TAccountWrappedTokenProgram extends string - ? ReadonlyAccount - : TAccountWrappedTokenProgram, - ...TRemainingAccounts, - ] - >; + InstructionWithData & + InstructionWithAccounts< + [ + TAccountWrappedMint extends string ? WritableAccount : TAccountWrappedMint, + TAccountBackpointer extends string ? WritableAccount : TAccountBackpointer, + TAccountUnwrappedMint extends string ? ReadonlyAccount : TAccountUnwrappedMint, + TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, + TAccountWrappedTokenProgram extends string + ? ReadonlyAccount + : TAccountWrappedTokenProgram, + ...TRemainingAccounts, + ] + >; export type CreateMintInstructionData = { - discriminator: number; - /** Whether the creation should fail if the wrapped mint already exists. */ - idempotent: boolean; + discriminator: number; + /** Whether the creation should fail if the wrapped mint already exists. */ + idempotent: boolean; }; export type CreateMintInstructionDataArgs = { - /** Whether the creation should fail if the wrapped mint already exists. */ - idempotent?: boolean; + /** Whether the creation should fail if the wrapped mint already exists. */ + idempotent?: boolean; }; export function getCreateMintInstructionDataEncoder(): FixedSizeEncoder { - return transformEncoder( - getStructEncoder([ - ['discriminator', getU8Encoder()], - ['idempotent', getBooleanEncoder()], - ]), - (value) => ({ - ...value, - discriminator: CREATE_MINT_DISCRIMINATOR, - idempotent: value.idempotent ?? false, - }) - ); + return transformEncoder( + getStructEncoder([ + ['discriminator', getU8Encoder()], + ['idempotent', getBooleanEncoder()], + ]), + value => ({ ...value, discriminator: CREATE_MINT_DISCRIMINATOR, idempotent: value.idempotent ?? false }), + ); } export function getCreateMintInstructionDataDecoder(): FixedSizeDecoder { - return getStructDecoder([ - ['discriminator', getU8Decoder()], - ['idempotent', getBooleanDecoder()], - ]); + return getStructDecoder([ + ['discriminator', getU8Decoder()], + ['idempotent', getBooleanDecoder()], + ]); } export function getCreateMintInstructionDataCodec(): FixedSizeCodec< - CreateMintInstructionDataArgs, - CreateMintInstructionData + CreateMintInstructionDataArgs, + CreateMintInstructionData > { - return combineCodec( - getCreateMintInstructionDataEncoder(), - getCreateMintInstructionDataDecoder() - ); + return combineCodec(getCreateMintInstructionDataEncoder(), getCreateMintInstructionDataDecoder()); } export type CreateMintInput< - TAccountWrappedMint extends string = string, - TAccountBackpointer extends string = string, - TAccountUnwrappedMint extends string = string, - TAccountSystemProgram extends string = string, - TAccountWrappedTokenProgram extends string = string, + TAccountWrappedMint extends string = string, + TAccountBackpointer extends string = string, + TAccountUnwrappedMint extends string = string, + TAccountSystemProgram extends string = string, + TAccountWrappedTokenProgram extends string = string, > = { - /** - * Unallocated wrapped mint account to create (PDA), address must be: - * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` - */ - wrappedMint: Address; - /** - * Unallocated wrapped backpointer account to create (PDA) - * `get_wrapped_mint_backpointer_address(wrapped_mint_address)` - */ - backpointer: Address; - /** The existing mint */ - unwrappedMint: Address; - /** The system program */ - systemProgram?: Address; - /** The token program used to create the wrapped mint */ - wrappedTokenProgram: Address; - idempotent?: CreateMintInstructionDataArgs['idempotent']; + /** + * Unallocated wrapped mint account to create (PDA), address must be: + * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` + */ + wrappedMint: Address; + /** + * Unallocated wrapped backpointer account to create (PDA) + * `get_wrapped_mint_backpointer_address(wrapped_mint_address)` + */ + backpointer: Address; + /** The existing mint */ + unwrappedMint: Address; + /** The system program */ + systemProgram?: Address; + /** The token program used to create the wrapped mint */ + wrappedTokenProgram: Address; + idempotent?: CreateMintInstructionDataArgs['idempotent']; }; export function getCreateMintInstruction< - TAccountWrappedMint extends string, - TAccountBackpointer extends string, - TAccountUnwrappedMint extends string, - TAccountSystemProgram extends string, - TAccountWrappedTokenProgram extends string, - TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountWrappedMint extends string, + TAccountBackpointer extends string, + TAccountUnwrappedMint extends string, + TAccountSystemProgram extends string, + TAccountWrappedTokenProgram extends string, + TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, >( - input: CreateMintInput< - TAccountWrappedMint, - TAccountBackpointer, - TAccountUnwrappedMint, - TAccountSystemProgram, - TAccountWrappedTokenProgram - >, - config?: { programAddress?: TProgramAddress } + input: CreateMintInput< + TAccountWrappedMint, + TAccountBackpointer, + TAccountUnwrappedMint, + TAccountSystemProgram, + TAccountWrappedTokenProgram + >, + config?: { programAddress?: TProgramAddress }, ): CreateMintInstruction< - TProgramAddress, - TAccountWrappedMint, - TAccountBackpointer, - TAccountUnwrappedMint, - TAccountSystemProgram, - TAccountWrappedTokenProgram -> { - // Program address. - const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - wrappedMint: { value: input.wrappedMint ?? null, isWritable: true }, - backpointer: { value: input.backpointer ?? null, isWritable: true }, - unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, - systemProgram: { value: input.systemProgram ?? null, isWritable: false }, - wrappedTokenProgram: { - value: input.wrappedTokenProgram ?? null, - isWritable: false, - }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - // Original args. - const args = { ...input }; - - // Resolve default values. - if (!accounts.systemProgram.value) { - accounts.systemProgram.value = - '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; - } - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - return Object.freeze({ - accounts: [ - getAccountMeta(accounts.wrappedMint), - getAccountMeta(accounts.backpointer), - getAccountMeta(accounts.unwrappedMint), - getAccountMeta(accounts.systemProgram), - getAccountMeta(accounts.wrappedTokenProgram), - ], - data: getCreateMintInstructionDataEncoder().encode( - args as CreateMintInstructionDataArgs - ), - programAddress, - } as CreateMintInstruction< TProgramAddress, TAccountWrappedMint, TAccountBackpointer, TAccountUnwrappedMint, TAccountSystemProgram, TAccountWrappedTokenProgram - >); +> { + // Program address. + const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + wrappedMint: { value: input.wrappedMint ?? null, isWritable: true }, + backpointer: { value: input.backpointer ?? null, isWritable: true }, + unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + wrappedTokenProgram: { value: input.wrappedTokenProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record; + + // Original args. + const args = { ...input }; + + // Resolve default values. + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + return Object.freeze({ + accounts: [ + getAccountMeta(accounts.wrappedMint), + getAccountMeta(accounts.backpointer), + getAccountMeta(accounts.unwrappedMint), + getAccountMeta(accounts.systemProgram), + getAccountMeta(accounts.wrappedTokenProgram), + ], + data: getCreateMintInstructionDataEncoder().encode(args as CreateMintInstructionDataArgs), + programAddress, + } as CreateMintInstruction< + TProgramAddress, + TAccountWrappedMint, + TAccountBackpointer, + TAccountUnwrappedMint, + TAccountSystemProgram, + TAccountWrappedTokenProgram + >); } export type ParsedCreateMintInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], > = { - programAddress: Address; - accounts: { - /** - * Unallocated wrapped mint account to create (PDA), address must be: - * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` - */ - wrappedMint: TAccountMetas[0]; - /** - * Unallocated wrapped backpointer account to create (PDA) - * `get_wrapped_mint_backpointer_address(wrapped_mint_address)` - */ - backpointer: TAccountMetas[1]; - /** The existing mint */ - unwrappedMint: TAccountMetas[2]; - /** The system program */ - systemProgram?: TAccountMetas[3] | undefined; - /** The token program used to create the wrapped mint */ - wrappedTokenProgram: TAccountMetas[4]; - }; - data: CreateMintInstructionData; + programAddress: Address; + accounts: { + /** + * Unallocated wrapped mint account to create (PDA), address must be: + * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` + */ + wrappedMint: TAccountMetas[0]; + /** + * Unallocated wrapped backpointer account to create (PDA) + * `get_wrapped_mint_backpointer_address(wrapped_mint_address)` + */ + backpointer: TAccountMetas[1]; + /** The existing mint */ + unwrappedMint: TAccountMetas[2]; + /** The system program */ + systemProgram?: TAccountMetas[3] | undefined; + /** The token program used to create the wrapped mint */ + wrappedTokenProgram: TAccountMetas[4]; + }; + data: CreateMintInstructionData; }; -export function parseCreateMintInstruction< - TProgram extends string, - TAccountMetas extends readonly AccountMeta[], ->( - instruction: Instruction & - InstructionWithAccounts & - InstructionWithData +export function parseCreateMintInstruction( + instruction: Instruction & + InstructionWithAccounts & + InstructionWithData, ): ParsedCreateMintInstruction { - if (instruction.accounts.length < 5) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - const getNextOptionalAccount = () => { - const accountMeta = getNextAccount(); - return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS - ? undefined - : accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - wrappedMint: getNextAccount(), - backpointer: getNextAccount(), - unwrappedMint: getNextAccount(), - systemProgram: getNextOptionalAccount(), - wrappedTokenProgram: getNextAccount(), - }, - data: getCreateMintInstructionDataDecoder().decode(instruction.data), - }; + if (instruction.accounts.length < 5) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS ? undefined : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + wrappedMint: getNextAccount(), + backpointer: getNextAccount(), + unwrappedMint: getNextAccount(), + systemProgram: getNextOptionalAccount(), + wrappedTokenProgram: getNextAccount(), + }, + data: getCreateMintInstructionDataDecoder().decode(instruction.data), + }; } diff --git a/clients/js/src/generated/instructions/syncMetadataToSplToken.ts b/clients/js/src/generated/instructions/syncMetadataToSplToken.ts index 859ef9c2..d70036ee 100644 --- a/clients/js/src/generated/instructions/syncMetadataToSplToken.ts +++ b/clients/js/src/generated/instructions/syncMetadataToSplToken.ts @@ -7,23 +7,23 @@ */ import { - combineCodec, - getStructDecoder, - getStructEncoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type AccountMeta, - type Address, - type FixedSizeCodec, - type FixedSizeDecoder, - type FixedSizeEncoder, - type Instruction, - type InstructionWithAccounts, - type InstructionWithData, - type ReadonlyAccount, - type ReadonlyUint8Array, - type WritableAccount, + combineCodec, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type AccountMeta, + type Address, + type FixedSizeCodec, + type FixedSizeDecoder, + type FixedSizeEncoder, + type Instruction, + type InstructionWithAccounts, + type InstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, + type WritableAccount, } from '@solana/kit'; import { TOKEN_WRAP_PROGRAM_ADDRESS } from '../programs'; import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; @@ -31,141 +31,131 @@ import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; export const SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR = 5; export function getSyncMetadataToSplTokenDiscriminatorBytes() { - return getU8Encoder().encode(SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR); + return getU8Encoder().encode(SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR); } export type SyncMetadataToSplTokenInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountMetaplexMetadata extends string | AccountMeta = string, - TAccountWrappedMintAuthority extends string | AccountMeta = string, - TAccountWrappedMint extends string | AccountMeta = string, - TAccountUnwrappedMint extends string | AccountMeta = string, - TAccountMetaplexProgram extends - | string - | AccountMeta = 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', - TAccountSystemProgram extends - | string - | AccountMeta = '11111111111111111111111111111111', - TAccountRentSysvar extends - | string - | AccountMeta = 'SysvarRent111111111111111111111111111111111', - TAccountSourceMetadata extends string | AccountMeta = string, - TAccountOwnerProgram extends string | AccountMeta = string, - TRemainingAccounts extends readonly AccountMeta[] = [], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountMetaplexMetadata extends string | AccountMeta = string, + TAccountWrappedMintAuthority extends string | AccountMeta = string, + TAccountWrappedMint extends string | AccountMeta = string, + TAccountUnwrappedMint extends string | AccountMeta = string, + TAccountMetaplexProgram extends string | AccountMeta = 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', + TAccountSystemProgram extends string | AccountMeta = '11111111111111111111111111111111', + TAccountRentSysvar extends string | AccountMeta = 'SysvarRent111111111111111111111111111111111', + TAccountSourceMetadata extends string | AccountMeta = string, + TAccountOwnerProgram extends string | AccountMeta = string, + TRemainingAccounts extends readonly AccountMeta[] = [], > = Instruction & - InstructionWithData & - InstructionWithAccounts< - [ - TAccountMetaplexMetadata extends string - ? WritableAccount - : TAccountMetaplexMetadata, - TAccountWrappedMintAuthority extends string - ? WritableAccount - : TAccountWrappedMintAuthority, - TAccountWrappedMint extends string - ? ReadonlyAccount - : TAccountWrappedMint, - TAccountUnwrappedMint extends string - ? ReadonlyAccount - : TAccountUnwrappedMint, - TAccountMetaplexProgram extends string - ? ReadonlyAccount - : TAccountMetaplexProgram, - TAccountSystemProgram extends string - ? ReadonlyAccount - : TAccountSystemProgram, - TAccountRentSysvar extends string - ? ReadonlyAccount - : TAccountRentSysvar, - TAccountSourceMetadata extends string - ? ReadonlyAccount - : TAccountSourceMetadata, - TAccountOwnerProgram extends string - ? ReadonlyAccount - : TAccountOwnerProgram, - ...TRemainingAccounts, - ] - >; + InstructionWithData & + InstructionWithAccounts< + [ + TAccountMetaplexMetadata extends string + ? WritableAccount + : TAccountMetaplexMetadata, + TAccountWrappedMintAuthority extends string + ? WritableAccount + : TAccountWrappedMintAuthority, + TAccountWrappedMint extends string ? ReadonlyAccount : TAccountWrappedMint, + TAccountUnwrappedMint extends string ? ReadonlyAccount : TAccountUnwrappedMint, + TAccountMetaplexProgram extends string ? ReadonlyAccount : TAccountMetaplexProgram, + TAccountSystemProgram extends string ? ReadonlyAccount : TAccountSystemProgram, + TAccountRentSysvar extends string ? ReadonlyAccount : TAccountRentSysvar, + TAccountSourceMetadata extends string ? ReadonlyAccount : TAccountSourceMetadata, + TAccountOwnerProgram extends string ? ReadonlyAccount : TAccountOwnerProgram, + ...TRemainingAccounts, + ] + >; export type SyncMetadataToSplTokenInstructionData = { discriminator: number }; export type SyncMetadataToSplTokenInstructionDataArgs = {}; export function getSyncMetadataToSplTokenInstructionDataEncoder(): FixedSizeEncoder { - return transformEncoder( - getStructEncoder([['discriminator', getU8Encoder()]]), - (value) => ({ - ...value, - discriminator: SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR, - }) - ); + return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()]]), value => ({ + ...value, + discriminator: SYNC_METADATA_TO_SPL_TOKEN_DISCRIMINATOR, + })); } export function getSyncMetadataToSplTokenInstructionDataDecoder(): FixedSizeDecoder { - return getStructDecoder([['discriminator', getU8Decoder()]]); + return getStructDecoder([['discriminator', getU8Decoder()]]); } export function getSyncMetadataToSplTokenInstructionDataCodec(): FixedSizeCodec< - SyncMetadataToSplTokenInstructionDataArgs, - SyncMetadataToSplTokenInstructionData + SyncMetadataToSplTokenInstructionDataArgs, + SyncMetadataToSplTokenInstructionData > { - return combineCodec( - getSyncMetadataToSplTokenInstructionDataEncoder(), - getSyncMetadataToSplTokenInstructionDataDecoder() - ); + return combineCodec( + getSyncMetadataToSplTokenInstructionDataEncoder(), + getSyncMetadataToSplTokenInstructionDataDecoder(), + ); } export type SyncMetadataToSplTokenInput< - TAccountMetaplexMetadata extends string = string, - TAccountWrappedMintAuthority extends string = string, - TAccountWrappedMint extends string = string, - TAccountUnwrappedMint extends string = string, - TAccountMetaplexProgram extends string = string, - TAccountSystemProgram extends string = string, - TAccountRentSysvar extends string = string, - TAccountSourceMetadata extends string = string, - TAccountOwnerProgram extends string = string, + TAccountMetaplexMetadata extends string = string, + TAccountWrappedMintAuthority extends string = string, + TAccountWrappedMint extends string = string, + TAccountUnwrappedMint extends string = string, + TAccountMetaplexProgram extends string = string, + TAccountSystemProgram extends string = string, + TAccountRentSysvar extends string = string, + TAccountSourceMetadata extends string = string, + TAccountOwnerProgram extends string = string, > = { - /** `Metaplex` metadata account */ - metaplexMetadata: Address; - /** Wrapped mint authority (PDA) */ - wrappedMintAuthority: Address; - /** Wrapped SPL Token mint */ - wrappedMint: Address; - /** Unwrapped mint */ - unwrappedMint: Address; - /** `Metaplex` Token Metadata Program */ - metaplexProgram?: Address; - /** System program */ - systemProgram?: Address; - /** Rent sysvar */ - rentSysvar?: Address; - /** - * Source metadata account. Required if unwrapped mint - * is an SPL-Token or, if a Token-2022, its metadata pointer indicates - * an external account. - */ - sourceMetadata?: Address; - /** - * Owner program. Required when metadata account is - * owned by a third-party program. - */ - ownerProgram?: Address; + /** `Metaplex` metadata account */ + metaplexMetadata: Address; + /** Wrapped mint authority (PDA) */ + wrappedMintAuthority: Address; + /** Wrapped SPL Token mint */ + wrappedMint: Address; + /** Unwrapped mint */ + unwrappedMint: Address; + /** `Metaplex` Token Metadata Program */ + metaplexProgram?: Address; + /** System program */ + systemProgram?: Address; + /** Rent sysvar */ + rentSysvar?: Address; + /** + * Source metadata account. Required if unwrapped mint + * is an SPL-Token or, if a Token-2022, its metadata pointer indicates + * an external account. + */ + sourceMetadata?: Address; + /** + * Owner program. Required when metadata account is + * owned by a third-party program. + */ + ownerProgram?: Address; }; export function getSyncMetadataToSplTokenInstruction< - TAccountMetaplexMetadata extends string, - TAccountWrappedMintAuthority extends string, - TAccountWrappedMint extends string, - TAccountUnwrappedMint extends string, - TAccountMetaplexProgram extends string, - TAccountSystemProgram extends string, - TAccountRentSysvar extends string, - TAccountSourceMetadata extends string, - TAccountOwnerProgram extends string, - TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountMetaplexMetadata extends string, + TAccountWrappedMintAuthority extends string, + TAccountWrappedMint extends string, + TAccountUnwrappedMint extends string, + TAccountMetaplexProgram extends string, + TAccountSystemProgram extends string, + TAccountRentSysvar extends string, + TAccountSourceMetadata extends string, + TAccountOwnerProgram extends string, + TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, >( - input: SyncMetadataToSplTokenInput< + input: SyncMetadataToSplTokenInput< + TAccountMetaplexMetadata, + TAccountWrappedMintAuthority, + TAccountWrappedMint, + TAccountUnwrappedMint, + TAccountMetaplexProgram, + TAccountSystemProgram, + TAccountRentSysvar, + TAccountSourceMetadata, + TAccountOwnerProgram + >, + config?: { programAddress?: TProgramAddress }, +): SyncMetadataToSplTokenInstruction< + TProgramAddress, TAccountMetaplexMetadata, TAccountWrappedMintAuthority, TAccountWrappedMint, @@ -175,166 +165,137 @@ export function getSyncMetadataToSplTokenInstruction< TAccountRentSysvar, TAccountSourceMetadata, TAccountOwnerProgram - >, - config?: { programAddress?: TProgramAddress } -): SyncMetadataToSplTokenInstruction< - TProgramAddress, - TAccountMetaplexMetadata, - TAccountWrappedMintAuthority, - TAccountWrappedMint, - TAccountUnwrappedMint, - TAccountMetaplexProgram, - TAccountSystemProgram, - TAccountRentSysvar, - TAccountSourceMetadata, - TAccountOwnerProgram > { - // Program address. - const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; + // Program address. + const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; - // Original accounts. - const originalAccounts = { - metaplexMetadata: { - value: input.metaplexMetadata ?? null, - isWritable: true, - }, - wrappedMintAuthority: { - value: input.wrappedMintAuthority ?? null, - isWritable: true, - }, - wrappedMint: { value: input.wrappedMint ?? null, isWritable: false }, - unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, - metaplexProgram: { - value: input.metaplexProgram ?? null, - isWritable: false, - }, - systemProgram: { value: input.systemProgram ?? null, isWritable: false }, - rentSysvar: { value: input.rentSysvar ?? null, isWritable: false }, - sourceMetadata: { value: input.sourceMetadata ?? null, isWritable: false }, - ownerProgram: { value: input.ownerProgram ?? null, isWritable: false }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; + // Original accounts. + const originalAccounts = { + metaplexMetadata: { value: input.metaplexMetadata ?? null, isWritable: true }, + wrappedMintAuthority: { value: input.wrappedMintAuthority ?? null, isWritable: true }, + wrappedMint: { value: input.wrappedMint ?? null, isWritable: false }, + unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, + metaplexProgram: { value: input.metaplexProgram ?? null, isWritable: false }, + systemProgram: { value: input.systemProgram ?? null, isWritable: false }, + rentSysvar: { value: input.rentSysvar ?? null, isWritable: false }, + sourceMetadata: { value: input.sourceMetadata ?? null, isWritable: false }, + ownerProgram: { value: input.ownerProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record; - // Resolve default values. - if (!accounts.metaplexProgram.value) { - accounts.metaplexProgram.value = - 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s' as Address<'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'>; - } - if (!accounts.systemProgram.value) { - accounts.systemProgram.value = - '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; - } - if (!accounts.rentSysvar.value) { - accounts.rentSysvar.value = - 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>; - } + // Resolve default values. + if (!accounts.metaplexProgram.value) { + accounts.metaplexProgram.value = + 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s' as Address<'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s'>; + } + if (!accounts.systemProgram.value) { + accounts.systemProgram.value = + '11111111111111111111111111111111' as Address<'11111111111111111111111111111111'>; + } + if (!accounts.rentSysvar.value) { + accounts.rentSysvar.value = + 'SysvarRent111111111111111111111111111111111' as Address<'SysvarRent111111111111111111111111111111111'>; + } - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - return Object.freeze({ - accounts: [ - getAccountMeta(accounts.metaplexMetadata), - getAccountMeta(accounts.wrappedMintAuthority), - getAccountMeta(accounts.wrappedMint), - getAccountMeta(accounts.unwrappedMint), - getAccountMeta(accounts.metaplexProgram), - getAccountMeta(accounts.systemProgram), - getAccountMeta(accounts.rentSysvar), - getAccountMeta(accounts.sourceMetadata), - getAccountMeta(accounts.ownerProgram), - ], - data: getSyncMetadataToSplTokenInstructionDataEncoder().encode({}), - programAddress, - } as SyncMetadataToSplTokenInstruction< - TProgramAddress, - TAccountMetaplexMetadata, - TAccountWrappedMintAuthority, - TAccountWrappedMint, - TAccountUnwrappedMint, - TAccountMetaplexProgram, - TAccountSystemProgram, - TAccountRentSysvar, - TAccountSourceMetadata, - TAccountOwnerProgram - >); + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + return Object.freeze({ + accounts: [ + getAccountMeta(accounts.metaplexMetadata), + getAccountMeta(accounts.wrappedMintAuthority), + getAccountMeta(accounts.wrappedMint), + getAccountMeta(accounts.unwrappedMint), + getAccountMeta(accounts.metaplexProgram), + getAccountMeta(accounts.systemProgram), + getAccountMeta(accounts.rentSysvar), + getAccountMeta(accounts.sourceMetadata), + getAccountMeta(accounts.ownerProgram), + ], + data: getSyncMetadataToSplTokenInstructionDataEncoder().encode({}), + programAddress, + } as SyncMetadataToSplTokenInstruction< + TProgramAddress, + TAccountMetaplexMetadata, + TAccountWrappedMintAuthority, + TAccountWrappedMint, + TAccountUnwrappedMint, + TAccountMetaplexProgram, + TAccountSystemProgram, + TAccountRentSysvar, + TAccountSourceMetadata, + TAccountOwnerProgram + >); } export type ParsedSyncMetadataToSplTokenInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], > = { - programAddress: Address; - accounts: { - /** `Metaplex` metadata account */ - metaplexMetadata: TAccountMetas[0]; - /** Wrapped mint authority (PDA) */ - wrappedMintAuthority: TAccountMetas[1]; - /** Wrapped SPL Token mint */ - wrappedMint: TAccountMetas[2]; - /** Unwrapped mint */ - unwrappedMint: TAccountMetas[3]; - /** `Metaplex` Token Metadata Program */ - metaplexProgram: TAccountMetas[4]; - /** System program */ - systemProgram: TAccountMetas[5]; - /** Rent sysvar */ - rentSysvar: TAccountMetas[6]; - /** - * Source metadata account. Required if unwrapped mint - * is an SPL-Token or, if a Token-2022, its metadata pointer indicates - * an external account. - */ - sourceMetadata?: TAccountMetas[7] | undefined; - /** - * Owner program. Required when metadata account is - * owned by a third-party program. - */ - ownerProgram?: TAccountMetas[8] | undefined; - }; - data: SyncMetadataToSplTokenInstructionData; + programAddress: Address; + accounts: { + /** `Metaplex` metadata account */ + metaplexMetadata: TAccountMetas[0]; + /** Wrapped mint authority (PDA) */ + wrappedMintAuthority: TAccountMetas[1]; + /** Wrapped SPL Token mint */ + wrappedMint: TAccountMetas[2]; + /** Unwrapped mint */ + unwrappedMint: TAccountMetas[3]; + /** `Metaplex` Token Metadata Program */ + metaplexProgram: TAccountMetas[4]; + /** System program */ + systemProgram: TAccountMetas[5]; + /** Rent sysvar */ + rentSysvar: TAccountMetas[6]; + /** + * Source metadata account. Required if unwrapped mint + * is an SPL-Token or, if a Token-2022, its metadata pointer indicates + * an external account. + */ + sourceMetadata?: TAccountMetas[7] | undefined; + /** + * Owner program. Required when metadata account is + * owned by a third-party program. + */ + ownerProgram?: TAccountMetas[8] | undefined; + }; + data: SyncMetadataToSplTokenInstructionData; }; export function parseSyncMetadataToSplTokenInstruction< - TProgram extends string, - TAccountMetas extends readonly AccountMeta[], + TProgram extends string, + TAccountMetas extends readonly AccountMeta[], >( - instruction: Instruction & - InstructionWithAccounts & - InstructionWithData + instruction: Instruction & + InstructionWithAccounts & + InstructionWithData, ): ParsedSyncMetadataToSplTokenInstruction { - if (instruction.accounts.length < 9) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - const getNextOptionalAccount = () => { - const accountMeta = getNextAccount(); - return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS - ? undefined - : accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - metaplexMetadata: getNextAccount(), - wrappedMintAuthority: getNextAccount(), - wrappedMint: getNextAccount(), - unwrappedMint: getNextAccount(), - metaplexProgram: getNextAccount(), - systemProgram: getNextAccount(), - rentSysvar: getNextAccount(), - sourceMetadata: getNextOptionalAccount(), - ownerProgram: getNextOptionalAccount(), - }, - data: getSyncMetadataToSplTokenInstructionDataDecoder().decode( - instruction.data - ), - }; + if (instruction.accounts.length < 9) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS ? undefined : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + metaplexMetadata: getNextAccount(), + wrappedMintAuthority: getNextAccount(), + wrappedMint: getNextAccount(), + unwrappedMint: getNextAccount(), + metaplexProgram: getNextAccount(), + systemProgram: getNextAccount(), + rentSysvar: getNextAccount(), + sourceMetadata: getNextOptionalAccount(), + ownerProgram: getNextOptionalAccount(), + }, + data: getSyncMetadataToSplTokenInstructionDataDecoder().decode(instruction.data), + }; } diff --git a/clients/js/src/generated/instructions/syncMetadataToToken2022.ts b/clients/js/src/generated/instructions/syncMetadataToToken2022.ts index 8f9de29f..7857a876 100644 --- a/clients/js/src/generated/instructions/syncMetadataToToken2022.ts +++ b/clients/js/src/generated/instructions/syncMetadataToToken2022.ts @@ -7,23 +7,23 @@ */ import { - combineCodec, - getStructDecoder, - getStructEncoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type AccountMeta, - type Address, - type FixedSizeCodec, - type FixedSizeDecoder, - type FixedSizeEncoder, - type Instruction, - type InstructionWithAccounts, - type InstructionWithData, - type ReadonlyAccount, - type ReadonlyUint8Array, - type WritableAccount, + combineCodec, + getStructDecoder, + getStructEncoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type AccountMeta, + type Address, + type FixedSizeCodec, + type FixedSizeDecoder, + type FixedSizeEncoder, + type Instruction, + type InstructionWithAccounts, + type InstructionWithData, + type ReadonlyAccount, + type ReadonlyUint8Array, + type WritableAccount, } from '@solana/kit'; import { TOKEN_WRAP_PROGRAM_ADDRESS } from '../programs'; import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; @@ -31,171 +31,108 @@ import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; export const SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR = 4; export function getSyncMetadataToToken2022DiscriminatorBytes() { - return getU8Encoder().encode(SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR); + return getU8Encoder().encode(SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR); } export type SyncMetadataToToken2022Instruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountWrappedMint extends string | AccountMeta = string, - TAccountWrappedMintAuthority extends string | AccountMeta = string, - TAccountUnwrappedMint extends string | AccountMeta = string, - TAccountToken2022Program extends - | string - | AccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', - TAccountSourceMetadata extends string | AccountMeta = string, - TAccountOwnerProgram extends string | AccountMeta = string, - TRemainingAccounts extends readonly AccountMeta[] = [], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountWrappedMint extends string | AccountMeta = string, + TAccountWrappedMintAuthority extends string | AccountMeta = string, + TAccountUnwrappedMint extends string | AccountMeta = string, + TAccountToken2022Program extends string | AccountMeta = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', + TAccountSourceMetadata extends string | AccountMeta = string, + TAccountOwnerProgram extends string | AccountMeta = string, + TRemainingAccounts extends readonly AccountMeta[] = [], > = Instruction & - InstructionWithData & - InstructionWithAccounts< - [ - TAccountWrappedMint extends string - ? WritableAccount - : TAccountWrappedMint, - TAccountWrappedMintAuthority extends string - ? ReadonlyAccount - : TAccountWrappedMintAuthority, - TAccountUnwrappedMint extends string - ? ReadonlyAccount - : TAccountUnwrappedMint, - TAccountToken2022Program extends string - ? ReadonlyAccount - : TAccountToken2022Program, - TAccountSourceMetadata extends string - ? ReadonlyAccount - : TAccountSourceMetadata, - TAccountOwnerProgram extends string - ? ReadonlyAccount - : TAccountOwnerProgram, - ...TRemainingAccounts, - ] - >; + InstructionWithData & + InstructionWithAccounts< + [ + TAccountWrappedMint extends string ? WritableAccount : TAccountWrappedMint, + TAccountWrappedMintAuthority extends string + ? ReadonlyAccount + : TAccountWrappedMintAuthority, + TAccountUnwrappedMint extends string ? ReadonlyAccount : TAccountUnwrappedMint, + TAccountToken2022Program extends string + ? ReadonlyAccount + : TAccountToken2022Program, + TAccountSourceMetadata extends string ? ReadonlyAccount : TAccountSourceMetadata, + TAccountOwnerProgram extends string ? ReadonlyAccount : TAccountOwnerProgram, + ...TRemainingAccounts, + ] + >; export type SyncMetadataToToken2022InstructionData = { discriminator: number }; export type SyncMetadataToToken2022InstructionDataArgs = {}; export function getSyncMetadataToToken2022InstructionDataEncoder(): FixedSizeEncoder { - return transformEncoder( - getStructEncoder([['discriminator', getU8Encoder()]]), - (value) => ({ - ...value, - discriminator: SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR, - }) - ); + return transformEncoder(getStructEncoder([['discriminator', getU8Encoder()]]), value => ({ + ...value, + discriminator: SYNC_METADATA_TO_TOKEN2022_DISCRIMINATOR, + })); } export function getSyncMetadataToToken2022InstructionDataDecoder(): FixedSizeDecoder { - return getStructDecoder([['discriminator', getU8Decoder()]]); + return getStructDecoder([['discriminator', getU8Decoder()]]); } export function getSyncMetadataToToken2022InstructionDataCodec(): FixedSizeCodec< - SyncMetadataToToken2022InstructionDataArgs, - SyncMetadataToToken2022InstructionData + SyncMetadataToToken2022InstructionDataArgs, + SyncMetadataToToken2022InstructionData > { - return combineCodec( - getSyncMetadataToToken2022InstructionDataEncoder(), - getSyncMetadataToToken2022InstructionDataDecoder() - ); + return combineCodec( + getSyncMetadataToToken2022InstructionDataEncoder(), + getSyncMetadataToToken2022InstructionDataDecoder(), + ); } export type SyncMetadataToToken2022Input< - TAccountWrappedMint extends string = string, - TAccountWrappedMintAuthority extends string = string, - TAccountUnwrappedMint extends string = string, - TAccountToken2022Program extends string = string, - TAccountSourceMetadata extends string = string, - TAccountOwnerProgram extends string = string, + TAccountWrappedMint extends string = string, + TAccountWrappedMintAuthority extends string = string, + TAccountUnwrappedMint extends string = string, + TAccountToken2022Program extends string = string, + TAccountSourceMetadata extends string = string, + TAccountOwnerProgram extends string = string, > = { - /** Wrapped mint */ - wrappedMint: Address; - /** Wrapped mint authority PDA */ - wrappedMintAuthority: Address; - /** Unwrapped mint */ - unwrappedMint: Address; - /** Token-2022 program */ - token2022Program?: Address; - /** - * Source metadata account. Required if metadata pointer - * indicates external account. - */ - sourceMetadata?: Address; - /** - * Owner program. Required when metadata account is - * owned by a third-party program. - */ - ownerProgram?: Address; + /** Wrapped mint */ + wrappedMint: Address; + /** Wrapped mint authority PDA */ + wrappedMintAuthority: Address; + /** Unwrapped mint */ + unwrappedMint: Address; + /** Token-2022 program */ + token2022Program?: Address; + /** + * Source metadata account. Required if metadata pointer + * indicates external account. + */ + sourceMetadata?: Address; + /** + * Owner program. Required when metadata account is + * owned by a third-party program. + */ + ownerProgram?: Address; }; export function getSyncMetadataToToken2022Instruction< - TAccountWrappedMint extends string, - TAccountWrappedMintAuthority extends string, - TAccountUnwrappedMint extends string, - TAccountToken2022Program extends string, - TAccountSourceMetadata extends string, - TAccountOwnerProgram extends string, - TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountWrappedMint extends string, + TAccountWrappedMintAuthority extends string, + TAccountUnwrappedMint extends string, + TAccountToken2022Program extends string, + TAccountSourceMetadata extends string, + TAccountOwnerProgram extends string, + TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, >( - input: SyncMetadataToToken2022Input< - TAccountWrappedMint, - TAccountWrappedMintAuthority, - TAccountUnwrappedMint, - TAccountToken2022Program, - TAccountSourceMetadata, - TAccountOwnerProgram - >, - config?: { programAddress?: TProgramAddress } + input: SyncMetadataToToken2022Input< + TAccountWrappedMint, + TAccountWrappedMintAuthority, + TAccountUnwrappedMint, + TAccountToken2022Program, + TAccountSourceMetadata, + TAccountOwnerProgram + >, + config?: { programAddress?: TProgramAddress }, ): SyncMetadataToToken2022Instruction< - TProgramAddress, - TAccountWrappedMint, - TAccountWrappedMintAuthority, - TAccountUnwrappedMint, - TAccountToken2022Program, - TAccountSourceMetadata, - TAccountOwnerProgram -> { - // Program address. - const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; - - // Original accounts. - const originalAccounts = { - wrappedMint: { value: input.wrappedMint ?? null, isWritable: true }, - wrappedMintAuthority: { - value: input.wrappedMintAuthority ?? null, - isWritable: false, - }, - unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, - token2022Program: { - value: input.token2022Program ?? null, - isWritable: false, - }, - sourceMetadata: { value: input.sourceMetadata ?? null, isWritable: false }, - ownerProgram: { value: input.ownerProgram ?? null, isWritable: false }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; - - // Resolve default values. - if (!accounts.token2022Program.value) { - accounts.token2022Program.value = - 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>; - } - - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - return Object.freeze({ - accounts: [ - getAccountMeta(accounts.wrappedMint), - getAccountMeta(accounts.wrappedMintAuthority), - getAccountMeta(accounts.unwrappedMint), - getAccountMeta(accounts.token2022Program), - getAccountMeta(accounts.sourceMetadata), - getAccountMeta(accounts.ownerProgram), - ], - data: getSyncMetadataToToken2022InstructionDataEncoder().encode({}), - programAddress, - } as SyncMetadataToToken2022Instruction< TProgramAddress, TAccountWrappedMint, TAccountWrappedMintAuthority, @@ -203,73 +140,110 @@ export function getSyncMetadataToToken2022Instruction< TAccountToken2022Program, TAccountSourceMetadata, TAccountOwnerProgram - >); +> { + // Program address. + const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; + + // Original accounts. + const originalAccounts = { + wrappedMint: { value: input.wrappedMint ?? null, isWritable: true }, + wrappedMintAuthority: { value: input.wrappedMintAuthority ?? null, isWritable: false }, + unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, + token2022Program: { value: input.token2022Program ?? null, isWritable: false }, + sourceMetadata: { value: input.sourceMetadata ?? null, isWritable: false }, + ownerProgram: { value: input.ownerProgram ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record; + + // Resolve default values. + if (!accounts.token2022Program.value) { + accounts.token2022Program.value = + 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' as Address<'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb'>; + } + + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + return Object.freeze({ + accounts: [ + getAccountMeta(accounts.wrappedMint), + getAccountMeta(accounts.wrappedMintAuthority), + getAccountMeta(accounts.unwrappedMint), + getAccountMeta(accounts.token2022Program), + getAccountMeta(accounts.sourceMetadata), + getAccountMeta(accounts.ownerProgram), + ], + data: getSyncMetadataToToken2022InstructionDataEncoder().encode({}), + programAddress, + } as SyncMetadataToToken2022Instruction< + TProgramAddress, + TAccountWrappedMint, + TAccountWrappedMintAuthority, + TAccountUnwrappedMint, + TAccountToken2022Program, + TAccountSourceMetadata, + TAccountOwnerProgram + >); } export type ParsedSyncMetadataToToken2022Instruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], > = { - programAddress: Address; - accounts: { - /** Wrapped mint */ - wrappedMint: TAccountMetas[0]; - /** Wrapped mint authority PDA */ - wrappedMintAuthority: TAccountMetas[1]; - /** Unwrapped mint */ - unwrappedMint: TAccountMetas[2]; - /** Token-2022 program */ - token2022Program: TAccountMetas[3]; - /** - * Source metadata account. Required if metadata pointer - * indicates external account. - */ - sourceMetadata?: TAccountMetas[4] | undefined; - /** - * Owner program. Required when metadata account is - * owned by a third-party program. - */ - ownerProgram?: TAccountMetas[5] | undefined; - }; - data: SyncMetadataToToken2022InstructionData; + programAddress: Address; + accounts: { + /** Wrapped mint */ + wrappedMint: TAccountMetas[0]; + /** Wrapped mint authority PDA */ + wrappedMintAuthority: TAccountMetas[1]; + /** Unwrapped mint */ + unwrappedMint: TAccountMetas[2]; + /** Token-2022 program */ + token2022Program: TAccountMetas[3]; + /** + * Source metadata account. Required if metadata pointer + * indicates external account. + */ + sourceMetadata?: TAccountMetas[4] | undefined; + /** + * Owner program. Required when metadata account is + * owned by a third-party program. + */ + ownerProgram?: TAccountMetas[5] | undefined; + }; + data: SyncMetadataToToken2022InstructionData; }; export function parseSyncMetadataToToken2022Instruction< - TProgram extends string, - TAccountMetas extends readonly AccountMeta[], + TProgram extends string, + TAccountMetas extends readonly AccountMeta[], >( - instruction: Instruction & - InstructionWithAccounts & - InstructionWithData + instruction: Instruction & + InstructionWithAccounts & + InstructionWithData, ): ParsedSyncMetadataToToken2022Instruction { - if (instruction.accounts.length < 6) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - const getNextOptionalAccount = () => { - const accountMeta = getNextAccount(); - return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS - ? undefined - : accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - wrappedMint: getNextAccount(), - wrappedMintAuthority: getNextAccount(), - unwrappedMint: getNextAccount(), - token2022Program: getNextAccount(), - sourceMetadata: getNextOptionalAccount(), - ownerProgram: getNextOptionalAccount(), - }, - data: getSyncMetadataToToken2022InstructionDataDecoder().decode( - instruction.data - ), - }; + if (instruction.accounts.length < 6) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + const getNextOptionalAccount = () => { + const accountMeta = getNextAccount(); + return accountMeta.address === TOKEN_WRAP_PROGRAM_ADDRESS ? undefined : accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + wrappedMint: getNextAccount(), + wrappedMintAuthority: getNextAccount(), + unwrappedMint: getNextAccount(), + token2022Program: getNextAccount(), + sourceMetadata: getNextOptionalAccount(), + ownerProgram: getNextOptionalAccount(), + }, + data: getSyncMetadataToToken2022InstructionDataDecoder().decode(instruction.data), + }; } diff --git a/clients/js/src/generated/instructions/unwrap.ts b/clients/js/src/generated/instructions/unwrap.ts index 28bd3732..4159f455 100644 --- a/clients/js/src/generated/instructions/unwrap.ts +++ b/clients/js/src/generated/instructions/unwrap.ts @@ -7,29 +7,29 @@ */ import { - AccountRole, - combineCodec, - getStructDecoder, - getStructEncoder, - getU64Decoder, - getU64Encoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type AccountMeta, - type AccountSignerMeta, - type Address, - type FixedSizeCodec, - type FixedSizeDecoder, - type FixedSizeEncoder, - type Instruction, - type InstructionWithAccounts, - type InstructionWithData, - type ReadonlyAccount, - type ReadonlySignerAccount, - type ReadonlyUint8Array, - type TransactionSigner, - type WritableAccount, + AccountRole, + combineCodec, + getStructDecoder, + getStructEncoder, + getU64Decoder, + getU64Encoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type AccountMeta, + type AccountSignerMeta, + type Address, + type FixedSizeCodec, + type FixedSizeDecoder, + type FixedSizeEncoder, + type Instruction, + type InstructionWithAccounts, + type InstructionWithData, + type ReadonlyAccount, + type ReadonlySignerAccount, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, } from '@solana/kit'; import { TOKEN_WRAP_PROGRAM_ADDRESS } from '../programs'; import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; @@ -37,151 +37,150 @@ import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; export const UNWRAP_DISCRIMINATOR = 2; export function getUnwrapDiscriminatorBytes() { - return getU8Encoder().encode(UNWRAP_DISCRIMINATOR); + return getU8Encoder().encode(UNWRAP_DISCRIMINATOR); } export type UnwrapInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountUnwrappedEscrow extends string | AccountMeta = string, - TAccountRecipientUnwrappedToken extends string | AccountMeta = string, - TAccountWrappedMintAuthority extends string | AccountMeta = string, - TAccountUnwrappedMint extends string | AccountMeta = string, - TAccountWrappedTokenProgram extends string | AccountMeta = string, - TAccountUnwrappedTokenProgram extends string | AccountMeta = string, - TAccountWrappedTokenAccount extends string | AccountMeta = string, - TAccountWrappedMint extends string | AccountMeta = string, - TAccountTransferAuthority extends string | AccountMeta = string, - TRemainingAccounts extends readonly AccountMeta[] = [], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountUnwrappedEscrow extends string | AccountMeta = string, + TAccountRecipientUnwrappedToken extends string | AccountMeta = string, + TAccountWrappedMintAuthority extends string | AccountMeta = string, + TAccountUnwrappedMint extends string | AccountMeta = string, + TAccountWrappedTokenProgram extends string | AccountMeta = string, + TAccountUnwrappedTokenProgram extends string | AccountMeta = string, + TAccountWrappedTokenAccount extends string | AccountMeta = string, + TAccountWrappedMint extends string | AccountMeta = string, + TAccountTransferAuthority extends string | AccountMeta = string, + TRemainingAccounts extends readonly AccountMeta[] = [], > = Instruction & - InstructionWithData & - InstructionWithAccounts< - [ - TAccountUnwrappedEscrow extends string - ? WritableAccount - : TAccountUnwrappedEscrow, - TAccountRecipientUnwrappedToken extends string - ? WritableAccount - : TAccountRecipientUnwrappedToken, - TAccountWrappedMintAuthority extends string - ? ReadonlyAccount - : TAccountWrappedMintAuthority, - TAccountUnwrappedMint extends string - ? ReadonlyAccount - : TAccountUnwrappedMint, - TAccountWrappedTokenProgram extends string - ? ReadonlyAccount - : TAccountWrappedTokenProgram, - TAccountUnwrappedTokenProgram extends string - ? ReadonlyAccount - : TAccountUnwrappedTokenProgram, - TAccountWrappedTokenAccount extends string - ? WritableAccount - : TAccountWrappedTokenAccount, - TAccountWrappedMint extends string - ? WritableAccount - : TAccountWrappedMint, - TAccountTransferAuthority extends string - ? ReadonlyAccount - : TAccountTransferAuthority, - ...TRemainingAccounts, - ] - >; + InstructionWithData & + InstructionWithAccounts< + [ + TAccountUnwrappedEscrow extends string ? WritableAccount : TAccountUnwrappedEscrow, + TAccountRecipientUnwrappedToken extends string + ? WritableAccount + : TAccountRecipientUnwrappedToken, + TAccountWrappedMintAuthority extends string + ? ReadonlyAccount + : TAccountWrappedMintAuthority, + TAccountUnwrappedMint extends string ? ReadonlyAccount : TAccountUnwrappedMint, + TAccountWrappedTokenProgram extends string + ? ReadonlyAccount + : TAccountWrappedTokenProgram, + TAccountUnwrappedTokenProgram extends string + ? ReadonlyAccount + : TAccountUnwrappedTokenProgram, + TAccountWrappedTokenAccount extends string + ? WritableAccount + : TAccountWrappedTokenAccount, + TAccountWrappedMint extends string ? WritableAccount : TAccountWrappedMint, + TAccountTransferAuthority extends string + ? ReadonlyAccount + : TAccountTransferAuthority, + ...TRemainingAccounts, + ] + >; export type UnwrapInstructionData = { - discriminator: number; - /** The amount of tokens to unwrap. */ - amount: bigint; + discriminator: number; + /** The amount of tokens to unwrap. */ + amount: bigint; }; export type UnwrapInstructionDataArgs = { - /** The amount of tokens to unwrap. */ - amount: number | bigint; + /** The amount of tokens to unwrap. */ + amount: number | bigint; }; export function getUnwrapInstructionDataEncoder(): FixedSizeEncoder { - return transformEncoder( - getStructEncoder([ - ['discriminator', getU8Encoder()], - ['amount', getU64Encoder()], - ]), - (value) => ({ ...value, discriminator: UNWRAP_DISCRIMINATOR }) - ); + return transformEncoder( + getStructEncoder([ + ['discriminator', getU8Encoder()], + ['amount', getU64Encoder()], + ]), + value => ({ ...value, discriminator: UNWRAP_DISCRIMINATOR }), + ); } export function getUnwrapInstructionDataDecoder(): FixedSizeDecoder { - return getStructDecoder([ - ['discriminator', getU8Decoder()], - ['amount', getU64Decoder()], - ]); + return getStructDecoder([ + ['discriminator', getU8Decoder()], + ['amount', getU64Decoder()], + ]); } -export function getUnwrapInstructionDataCodec(): FixedSizeCodec< - UnwrapInstructionDataArgs, - UnwrapInstructionData -> { - return combineCodec( - getUnwrapInstructionDataEncoder(), - getUnwrapInstructionDataDecoder() - ); +export function getUnwrapInstructionDataCodec(): FixedSizeCodec { + return combineCodec(getUnwrapInstructionDataEncoder(), getUnwrapInstructionDataDecoder()); } export type UnwrapInput< - TAccountUnwrappedEscrow extends string = string, - TAccountRecipientUnwrappedToken extends string = string, - TAccountWrappedMintAuthority extends string = string, - TAccountUnwrappedMint extends string = string, - TAccountWrappedTokenProgram extends string = string, - TAccountUnwrappedTokenProgram extends string = string, - TAccountWrappedTokenAccount extends string = string, - TAccountWrappedMint extends string = string, - TAccountTransferAuthority extends string = string, + TAccountUnwrappedEscrow extends string = string, + TAccountRecipientUnwrappedToken extends string = string, + TAccountWrappedMintAuthority extends string = string, + TAccountUnwrappedMint extends string = string, + TAccountWrappedTokenProgram extends string = string, + TAccountUnwrappedTokenProgram extends string = string, + TAccountWrappedTokenAccount extends string = string, + TAccountWrappedMint extends string = string, + TAccountTransferAuthority extends string = string, > = { - /** - * The escrow account holding the unwrapped tokens. - * Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program) - */ - unwrappedEscrow: Address; - /** The account to receive the unwrapped tokens. */ - recipientUnwrappedToken: Address; - /** - * The PDA authority of the wrapped mint, - * address must be: `get_wrapped_mint_authority(wrapped_mint)` - */ - wrappedMintAuthority: Address; - /** The mint of the unwrapped tokens */ - unwrappedMint: Address; - /** The token program of the wrapped tokens */ - wrappedTokenProgram: Address; - /** The token program of the unwrapped tokens */ - unwrappedTokenProgram: Address; - /** The source token account for the wrapped tokens */ - wrappedTokenAccount: Address; - /** - * The wrapped mint account, address must be: - * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` - */ - wrappedMint: Address; - /** The authority to burn the wrapped tokens. */ - transferAuthority: - | Address - | TransactionSigner; - amount: UnwrapInstructionDataArgs['amount']; - multiSigners?: Array; + /** + * The escrow account holding the unwrapped tokens. + * Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program) + */ + unwrappedEscrow: Address; + /** The account to receive the unwrapped tokens. */ + recipientUnwrappedToken: Address; + /** + * The PDA authority of the wrapped mint, + * address must be: `get_wrapped_mint_authority(wrapped_mint)` + */ + wrappedMintAuthority: Address; + /** The mint of the unwrapped tokens */ + unwrappedMint: Address; + /** The token program of the wrapped tokens */ + wrappedTokenProgram: Address; + /** The token program of the unwrapped tokens */ + unwrappedTokenProgram: Address; + /** The source token account for the wrapped tokens */ + wrappedTokenAccount: Address; + /** + * The wrapped mint account, address must be: + * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` + */ + wrappedMint: Address; + /** The authority to burn the wrapped tokens. */ + transferAuthority: Address | TransactionSigner; + amount: UnwrapInstructionDataArgs['amount']; + multiSigners?: Array; }; export function getUnwrapInstruction< - TAccountUnwrappedEscrow extends string, - TAccountRecipientUnwrappedToken extends string, - TAccountWrappedMintAuthority extends string, - TAccountUnwrappedMint extends string, - TAccountWrappedTokenProgram extends string, - TAccountUnwrappedTokenProgram extends string, - TAccountWrappedTokenAccount extends string, - TAccountWrappedMint extends string, - TAccountTransferAuthority extends string, - TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountUnwrappedEscrow extends string, + TAccountRecipientUnwrappedToken extends string, + TAccountWrappedMintAuthority extends string, + TAccountUnwrappedMint extends string, + TAccountWrappedTokenProgram extends string, + TAccountUnwrappedTokenProgram extends string, + TAccountWrappedTokenAccount extends string, + TAccountWrappedMint extends string, + TAccountTransferAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, >( - input: UnwrapInput< + input: UnwrapInput< + TAccountUnwrappedEscrow, + TAccountRecipientUnwrappedToken, + TAccountWrappedMintAuthority, + TAccountUnwrappedMint, + TAccountWrappedTokenProgram, + TAccountUnwrappedTokenProgram, + TAccountWrappedTokenAccount, + TAccountWrappedMint, + TAccountTransferAuthority + >, + config?: { programAddress?: TProgramAddress }, +): UnwrapInstruction< + TProgramAddress, TAccountUnwrappedEscrow, TAccountRecipientUnwrappedToken, TAccountWrappedMintAuthority, @@ -190,177 +189,134 @@ export function getUnwrapInstruction< TAccountUnwrappedTokenProgram, TAccountWrappedTokenAccount, TAccountWrappedMint, - TAccountTransferAuthority - >, - config?: { programAddress?: TProgramAddress } -): UnwrapInstruction< - TProgramAddress, - TAccountUnwrappedEscrow, - TAccountRecipientUnwrappedToken, - TAccountWrappedMintAuthority, - TAccountUnwrappedMint, - TAccountWrappedTokenProgram, - TAccountUnwrappedTokenProgram, - TAccountWrappedTokenAccount, - TAccountWrappedMint, - (typeof input)['transferAuthority'] extends TransactionSigner - ? ReadonlySignerAccount & - AccountSignerMeta - : TAccountTransferAuthority + (typeof input)['transferAuthority'] extends TransactionSigner + ? ReadonlySignerAccount & AccountSignerMeta + : TAccountTransferAuthority > { - // Program address. - const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; + // Program address. + const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; - // Original accounts. - const originalAccounts = { - unwrappedEscrow: { value: input.unwrappedEscrow ?? null, isWritable: true }, - recipientUnwrappedToken: { - value: input.recipientUnwrappedToken ?? null, - isWritable: true, - }, - wrappedMintAuthority: { - value: input.wrappedMintAuthority ?? null, - isWritable: false, - }, - unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, - wrappedTokenProgram: { - value: input.wrappedTokenProgram ?? null, - isWritable: false, - }, - unwrappedTokenProgram: { - value: input.unwrappedTokenProgram ?? null, - isWritable: false, - }, - wrappedTokenAccount: { - value: input.wrappedTokenAccount ?? null, - isWritable: true, - }, - wrappedMint: { value: input.wrappedMint ?? null, isWritable: true }, - transferAuthority: { - value: input.transferAuthority ?? null, - isWritable: false, - }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; + // Original accounts. + const originalAccounts = { + unwrappedEscrow: { value: input.unwrappedEscrow ?? null, isWritable: true }, + recipientUnwrappedToken: { value: input.recipientUnwrappedToken ?? null, isWritable: true }, + wrappedMintAuthority: { value: input.wrappedMintAuthority ?? null, isWritable: false }, + unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, + wrappedTokenProgram: { value: input.wrappedTokenProgram ?? null, isWritable: false }, + unwrappedTokenProgram: { value: input.unwrappedTokenProgram ?? null, isWritable: false }, + wrappedTokenAccount: { value: input.wrappedTokenAccount ?? null, isWritable: true }, + wrappedMint: { value: input.wrappedMint ?? null, isWritable: true }, + transferAuthority: { value: input.transferAuthority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record; - // Original args. - const args = { ...input }; + // Original args. + const args = { ...input }; - // Remaining accounts. - const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map( - (signer) => ({ - address: signer.address, - role: AccountRole.READONLY_SIGNER, - signer, - }) - ); + // Remaining accounts. + const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(signer => ({ + address: signer.address, + role: AccountRole.READONLY_SIGNER, + signer, + })); - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - return Object.freeze({ - accounts: [ - getAccountMeta(accounts.unwrappedEscrow), - getAccountMeta(accounts.recipientUnwrappedToken), - getAccountMeta(accounts.wrappedMintAuthority), - getAccountMeta(accounts.unwrappedMint), - getAccountMeta(accounts.wrappedTokenProgram), - getAccountMeta(accounts.unwrappedTokenProgram), - getAccountMeta(accounts.wrappedTokenAccount), - getAccountMeta(accounts.wrappedMint), - getAccountMeta(accounts.transferAuthority), - ...remainingAccounts, - ], - data: getUnwrapInstructionDataEncoder().encode( - args as UnwrapInstructionDataArgs - ), - programAddress, - } as UnwrapInstruction< - TProgramAddress, - TAccountUnwrappedEscrow, - TAccountRecipientUnwrappedToken, - TAccountWrappedMintAuthority, - TAccountUnwrappedMint, - TAccountWrappedTokenProgram, - TAccountUnwrappedTokenProgram, - TAccountWrappedTokenAccount, - TAccountWrappedMint, - (typeof input)['transferAuthority'] extends TransactionSigner - ? ReadonlySignerAccount & - AccountSignerMeta - : TAccountTransferAuthority - >); + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + return Object.freeze({ + accounts: [ + getAccountMeta(accounts.unwrappedEscrow), + getAccountMeta(accounts.recipientUnwrappedToken), + getAccountMeta(accounts.wrappedMintAuthority), + getAccountMeta(accounts.unwrappedMint), + getAccountMeta(accounts.wrappedTokenProgram), + getAccountMeta(accounts.unwrappedTokenProgram), + getAccountMeta(accounts.wrappedTokenAccount), + getAccountMeta(accounts.wrappedMint), + getAccountMeta(accounts.transferAuthority), + ...remainingAccounts, + ], + data: getUnwrapInstructionDataEncoder().encode(args as UnwrapInstructionDataArgs), + programAddress, + } as UnwrapInstruction< + TProgramAddress, + TAccountUnwrappedEscrow, + TAccountRecipientUnwrappedToken, + TAccountWrappedMintAuthority, + TAccountUnwrappedMint, + TAccountWrappedTokenProgram, + TAccountUnwrappedTokenProgram, + TAccountWrappedTokenAccount, + TAccountWrappedMint, + (typeof input)['transferAuthority'] extends TransactionSigner + ? ReadonlySignerAccount & AccountSignerMeta + : TAccountTransferAuthority + >); } export type ParsedUnwrapInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], > = { - programAddress: Address; - accounts: { - /** - * The escrow account holding the unwrapped tokens. - * Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program) - */ - unwrappedEscrow: TAccountMetas[0]; - /** The account to receive the unwrapped tokens. */ - recipientUnwrappedToken: TAccountMetas[1]; - /** - * The PDA authority of the wrapped mint, - * address must be: `get_wrapped_mint_authority(wrapped_mint)` - */ - wrappedMintAuthority: TAccountMetas[2]; - /** The mint of the unwrapped tokens */ - unwrappedMint: TAccountMetas[3]; - /** The token program of the wrapped tokens */ - wrappedTokenProgram: TAccountMetas[4]; - /** The token program of the unwrapped tokens */ - unwrappedTokenProgram: TAccountMetas[5]; - /** The source token account for the wrapped tokens */ - wrappedTokenAccount: TAccountMetas[6]; - /** - * The wrapped mint account, address must be: - * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` - */ - wrappedMint: TAccountMetas[7]; - /** The authority to burn the wrapped tokens. */ - transferAuthority: TAccountMetas[8]; - }; - data: UnwrapInstructionData; + programAddress: Address; + accounts: { + /** + * The escrow account holding the unwrapped tokens. + * Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program) + */ + unwrappedEscrow: TAccountMetas[0]; + /** The account to receive the unwrapped tokens. */ + recipientUnwrappedToken: TAccountMetas[1]; + /** + * The PDA authority of the wrapped mint, + * address must be: `get_wrapped_mint_authority(wrapped_mint)` + */ + wrappedMintAuthority: TAccountMetas[2]; + /** The mint of the unwrapped tokens */ + unwrappedMint: TAccountMetas[3]; + /** The token program of the wrapped tokens */ + wrappedTokenProgram: TAccountMetas[4]; + /** The token program of the unwrapped tokens */ + unwrappedTokenProgram: TAccountMetas[5]; + /** The source token account for the wrapped tokens */ + wrappedTokenAccount: TAccountMetas[6]; + /** + * The wrapped mint account, address must be: + * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` + */ + wrappedMint: TAccountMetas[7]; + /** The authority to burn the wrapped tokens. */ + transferAuthority: TAccountMetas[8]; + }; + data: UnwrapInstructionData; }; -export function parseUnwrapInstruction< - TProgram extends string, - TAccountMetas extends readonly AccountMeta[], ->( - instruction: Instruction & - InstructionWithAccounts & - InstructionWithData +export function parseUnwrapInstruction( + instruction: Instruction & + InstructionWithAccounts & + InstructionWithData, ): ParsedUnwrapInstruction { - if (instruction.accounts.length < 9) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - unwrappedEscrow: getNextAccount(), - recipientUnwrappedToken: getNextAccount(), - wrappedMintAuthority: getNextAccount(), - unwrappedMint: getNextAccount(), - wrappedTokenProgram: getNextAccount(), - unwrappedTokenProgram: getNextAccount(), - wrappedTokenAccount: getNextAccount(), - wrappedMint: getNextAccount(), - transferAuthority: getNextAccount(), - }, - data: getUnwrapInstructionDataDecoder().decode(instruction.data), - }; + if (instruction.accounts.length < 9) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + unwrappedEscrow: getNextAccount(), + recipientUnwrappedToken: getNextAccount(), + wrappedMintAuthority: getNextAccount(), + unwrappedMint: getNextAccount(), + wrappedTokenProgram: getNextAccount(), + unwrappedTokenProgram: getNextAccount(), + wrappedTokenAccount: getNextAccount(), + wrappedMint: getNextAccount(), + transferAuthority: getNextAccount(), + }, + data: getUnwrapInstructionDataDecoder().decode(instruction.data), + }; } diff --git a/clients/js/src/generated/instructions/wrap.ts b/clients/js/src/generated/instructions/wrap.ts index 180d2472..a686ff93 100644 --- a/clients/js/src/generated/instructions/wrap.ts +++ b/clients/js/src/generated/instructions/wrap.ts @@ -7,29 +7,29 @@ */ import { - AccountRole, - combineCodec, - getStructDecoder, - getStructEncoder, - getU64Decoder, - getU64Encoder, - getU8Decoder, - getU8Encoder, - transformEncoder, - type AccountMeta, - type AccountSignerMeta, - type Address, - type FixedSizeCodec, - type FixedSizeDecoder, - type FixedSizeEncoder, - type Instruction, - type InstructionWithAccounts, - type InstructionWithData, - type ReadonlyAccount, - type ReadonlySignerAccount, - type ReadonlyUint8Array, - type TransactionSigner, - type WritableAccount, + AccountRole, + combineCodec, + getStructDecoder, + getStructEncoder, + getU64Decoder, + getU64Encoder, + getU8Decoder, + getU8Encoder, + transformEncoder, + type AccountMeta, + type AccountSignerMeta, + type Address, + type FixedSizeCodec, + type FixedSizeDecoder, + type FixedSizeEncoder, + type Instruction, + type InstructionWithAccounts, + type InstructionWithData, + type ReadonlyAccount, + type ReadonlySignerAccount, + type ReadonlyUint8Array, + type TransactionSigner, + type WritableAccount, } from '@solana/kit'; import { TOKEN_WRAP_PROGRAM_ADDRESS } from '../programs'; import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; @@ -37,153 +37,150 @@ import { getAccountMetaFactory, type ResolvedAccount } from '../shared'; export const WRAP_DISCRIMINATOR = 1; export function getWrapDiscriminatorBytes() { - return getU8Encoder().encode(WRAP_DISCRIMINATOR); + return getU8Encoder().encode(WRAP_DISCRIMINATOR); } export type WrapInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountRecipientWrappedTokenAccount extends - | string - | AccountMeta = string, - TAccountWrappedMint extends string | AccountMeta = string, - TAccountWrappedMintAuthority extends string | AccountMeta = string, - TAccountUnwrappedTokenProgram extends string | AccountMeta = string, - TAccountWrappedTokenProgram extends string | AccountMeta = string, - TAccountUnwrappedTokenAccount extends string | AccountMeta = string, - TAccountUnwrappedMint extends string | AccountMeta = string, - TAccountUnwrappedEscrow extends string | AccountMeta = string, - TAccountTransferAuthority extends string | AccountMeta = string, - TRemainingAccounts extends readonly AccountMeta[] = [], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountRecipientWrappedTokenAccount extends string | AccountMeta = string, + TAccountWrappedMint extends string | AccountMeta = string, + TAccountWrappedMintAuthority extends string | AccountMeta = string, + TAccountUnwrappedTokenProgram extends string | AccountMeta = string, + TAccountWrappedTokenProgram extends string | AccountMeta = string, + TAccountUnwrappedTokenAccount extends string | AccountMeta = string, + TAccountUnwrappedMint extends string | AccountMeta = string, + TAccountUnwrappedEscrow extends string | AccountMeta = string, + TAccountTransferAuthority extends string | AccountMeta = string, + TRemainingAccounts extends readonly AccountMeta[] = [], > = Instruction & - InstructionWithData & - InstructionWithAccounts< - [ - TAccountRecipientWrappedTokenAccount extends string - ? WritableAccount - : TAccountRecipientWrappedTokenAccount, - TAccountWrappedMint extends string - ? WritableAccount - : TAccountWrappedMint, - TAccountWrappedMintAuthority extends string - ? ReadonlyAccount - : TAccountWrappedMintAuthority, - TAccountUnwrappedTokenProgram extends string - ? ReadonlyAccount - : TAccountUnwrappedTokenProgram, - TAccountWrappedTokenProgram extends string - ? ReadonlyAccount - : TAccountWrappedTokenProgram, - TAccountUnwrappedTokenAccount extends string - ? WritableAccount - : TAccountUnwrappedTokenAccount, - TAccountUnwrappedMint extends string - ? ReadonlyAccount - : TAccountUnwrappedMint, - TAccountUnwrappedEscrow extends string - ? WritableAccount - : TAccountUnwrappedEscrow, - TAccountTransferAuthority extends string - ? ReadonlyAccount - : TAccountTransferAuthority, - ...TRemainingAccounts, - ] - >; + InstructionWithData & + InstructionWithAccounts< + [ + TAccountRecipientWrappedTokenAccount extends string + ? WritableAccount + : TAccountRecipientWrappedTokenAccount, + TAccountWrappedMint extends string ? WritableAccount : TAccountWrappedMint, + TAccountWrappedMintAuthority extends string + ? ReadonlyAccount + : TAccountWrappedMintAuthority, + TAccountUnwrappedTokenProgram extends string + ? ReadonlyAccount + : TAccountUnwrappedTokenProgram, + TAccountWrappedTokenProgram extends string + ? ReadonlyAccount + : TAccountWrappedTokenProgram, + TAccountUnwrappedTokenAccount extends string + ? WritableAccount + : TAccountUnwrappedTokenAccount, + TAccountUnwrappedMint extends string ? ReadonlyAccount : TAccountUnwrappedMint, + TAccountUnwrappedEscrow extends string ? WritableAccount : TAccountUnwrappedEscrow, + TAccountTransferAuthority extends string + ? ReadonlyAccount + : TAccountTransferAuthority, + ...TRemainingAccounts, + ] + >; export type WrapInstructionData = { - discriminator: number; - /** The amount of tokens to wrap. */ - amount: bigint; + discriminator: number; + /** The amount of tokens to wrap. */ + amount: bigint; }; export type WrapInstructionDataArgs = { - /** The amount of tokens to wrap. */ - amount: number | bigint; + /** The amount of tokens to wrap. */ + amount: number | bigint; }; export function getWrapInstructionDataEncoder(): FixedSizeEncoder { - return transformEncoder( - getStructEncoder([ - ['discriminator', getU8Encoder()], - ['amount', getU64Encoder()], - ]), - (value) => ({ ...value, discriminator: WRAP_DISCRIMINATOR }) - ); + return transformEncoder( + getStructEncoder([ + ['discriminator', getU8Encoder()], + ['amount', getU64Encoder()], + ]), + value => ({ ...value, discriminator: WRAP_DISCRIMINATOR }), + ); } export function getWrapInstructionDataDecoder(): FixedSizeDecoder { - return getStructDecoder([ - ['discriminator', getU8Decoder()], - ['amount', getU64Decoder()], - ]); + return getStructDecoder([ + ['discriminator', getU8Decoder()], + ['amount', getU64Decoder()], + ]); } -export function getWrapInstructionDataCodec(): FixedSizeCodec< - WrapInstructionDataArgs, - WrapInstructionData -> { - return combineCodec( - getWrapInstructionDataEncoder(), - getWrapInstructionDataDecoder() - ); +export function getWrapInstructionDataCodec(): FixedSizeCodec { + return combineCodec(getWrapInstructionDataEncoder(), getWrapInstructionDataDecoder()); } export type WrapInput< - TAccountRecipientWrappedTokenAccount extends string = string, - TAccountWrappedMint extends string = string, - TAccountWrappedMintAuthority extends string = string, - TAccountUnwrappedTokenProgram extends string = string, - TAccountWrappedTokenProgram extends string = string, - TAccountUnwrappedTokenAccount extends string = string, - TAccountUnwrappedMint extends string = string, - TAccountUnwrappedEscrow extends string = string, - TAccountTransferAuthority extends string = string, + TAccountRecipientWrappedTokenAccount extends string = string, + TAccountWrappedMint extends string = string, + TAccountWrappedMintAuthority extends string = string, + TAccountUnwrappedTokenProgram extends string = string, + TAccountWrappedTokenProgram extends string = string, + TAccountUnwrappedTokenAccount extends string = string, + TAccountUnwrappedMint extends string = string, + TAccountUnwrappedEscrow extends string = string, + TAccountTransferAuthority extends string = string, > = { - /** The token account to receive the wrapped tokens. */ - recipientWrappedTokenAccount: Address; - /** - * Wrapped mint, must be initialized, address must be: - * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` - */ - wrappedMint: Address; - /** - * The PDA authority of the wrapped mint, address must be - * `get_wrapped_mint_authority(wrapped_mint)` - */ - wrappedMintAuthority: Address; - /** The token program of the unwrapped tokens. */ - unwrappedTokenProgram: Address; - /** The token program of the wrapped tokens. */ - wrappedTokenProgram: Address; - /** The source token account for the unwrapped tokens. */ - unwrappedTokenAccount: Address; - /** The mint of the unwrapped tokens. */ - unwrappedMint: Address; - /** - * The escrow account that holds the unwrapped tokens. - * Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program) - */ - unwrappedEscrow: Address; - /** The authority to transfer the unwrapped tokens. */ - transferAuthority: - | Address - | TransactionSigner; - amount: WrapInstructionDataArgs['amount']; - multiSigners?: Array; + /** The token account to receive the wrapped tokens. */ + recipientWrappedTokenAccount: Address; + /** + * Wrapped mint, must be initialized, address must be: + * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` + */ + wrappedMint: Address; + /** + * The PDA authority of the wrapped mint, address must be + * `get_wrapped_mint_authority(wrapped_mint)` + */ + wrappedMintAuthority: Address; + /** The token program of the unwrapped tokens. */ + unwrappedTokenProgram: Address; + /** The token program of the wrapped tokens. */ + wrappedTokenProgram: Address; + /** The source token account for the unwrapped tokens. */ + unwrappedTokenAccount: Address; + /** The mint of the unwrapped tokens. */ + unwrappedMint: Address; + /** + * The escrow account that holds the unwrapped tokens. + * Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program) + */ + unwrappedEscrow: Address; + /** The authority to transfer the unwrapped tokens. */ + transferAuthority: Address | TransactionSigner; + amount: WrapInstructionDataArgs['amount']; + multiSigners?: Array; }; export function getWrapInstruction< - TAccountRecipientWrappedTokenAccount extends string, - TAccountWrappedMint extends string, - TAccountWrappedMintAuthority extends string, - TAccountUnwrappedTokenProgram extends string, - TAccountWrappedTokenProgram extends string, - TAccountUnwrappedTokenAccount extends string, - TAccountUnwrappedMint extends string, - TAccountUnwrappedEscrow extends string, - TAccountTransferAuthority extends string, - TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountRecipientWrappedTokenAccount extends string, + TAccountWrappedMint extends string, + TAccountWrappedMintAuthority extends string, + TAccountUnwrappedTokenProgram extends string, + TAccountWrappedTokenProgram extends string, + TAccountUnwrappedTokenAccount extends string, + TAccountUnwrappedMint extends string, + TAccountUnwrappedEscrow extends string, + TAccountTransferAuthority extends string, + TProgramAddress extends Address = typeof TOKEN_WRAP_PROGRAM_ADDRESS, >( - input: WrapInput< + input: WrapInput< + TAccountRecipientWrappedTokenAccount, + TAccountWrappedMint, + TAccountWrappedMintAuthority, + TAccountUnwrappedTokenProgram, + TAccountWrappedTokenProgram, + TAccountUnwrappedTokenAccount, + TAccountUnwrappedMint, + TAccountUnwrappedEscrow, + TAccountTransferAuthority + >, + config?: { programAddress?: TProgramAddress }, +): WrapInstruction< + TProgramAddress, TAccountRecipientWrappedTokenAccount, TAccountWrappedMint, TAccountWrappedMintAuthority, @@ -192,177 +189,134 @@ export function getWrapInstruction< TAccountUnwrappedTokenAccount, TAccountUnwrappedMint, TAccountUnwrappedEscrow, - TAccountTransferAuthority - >, - config?: { programAddress?: TProgramAddress } -): WrapInstruction< - TProgramAddress, - TAccountRecipientWrappedTokenAccount, - TAccountWrappedMint, - TAccountWrappedMintAuthority, - TAccountUnwrappedTokenProgram, - TAccountWrappedTokenProgram, - TAccountUnwrappedTokenAccount, - TAccountUnwrappedMint, - TAccountUnwrappedEscrow, - (typeof input)['transferAuthority'] extends TransactionSigner - ? ReadonlySignerAccount & - AccountSignerMeta - : TAccountTransferAuthority + (typeof input)['transferAuthority'] extends TransactionSigner + ? ReadonlySignerAccount & AccountSignerMeta + : TAccountTransferAuthority > { - // Program address. - const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; + // Program address. + const programAddress = config?.programAddress ?? TOKEN_WRAP_PROGRAM_ADDRESS; - // Original accounts. - const originalAccounts = { - recipientWrappedTokenAccount: { - value: input.recipientWrappedTokenAccount ?? null, - isWritable: true, - }, - wrappedMint: { value: input.wrappedMint ?? null, isWritable: true }, - wrappedMintAuthority: { - value: input.wrappedMintAuthority ?? null, - isWritable: false, - }, - unwrappedTokenProgram: { - value: input.unwrappedTokenProgram ?? null, - isWritable: false, - }, - wrappedTokenProgram: { - value: input.wrappedTokenProgram ?? null, - isWritable: false, - }, - unwrappedTokenAccount: { - value: input.unwrappedTokenAccount ?? null, - isWritable: true, - }, - unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, - unwrappedEscrow: { value: input.unwrappedEscrow ?? null, isWritable: true }, - transferAuthority: { - value: input.transferAuthority ?? null, - isWritable: false, - }, - }; - const accounts = originalAccounts as Record< - keyof typeof originalAccounts, - ResolvedAccount - >; + // Original accounts. + const originalAccounts = { + recipientWrappedTokenAccount: { value: input.recipientWrappedTokenAccount ?? null, isWritable: true }, + wrappedMint: { value: input.wrappedMint ?? null, isWritable: true }, + wrappedMintAuthority: { value: input.wrappedMintAuthority ?? null, isWritable: false }, + unwrappedTokenProgram: { value: input.unwrappedTokenProgram ?? null, isWritable: false }, + wrappedTokenProgram: { value: input.wrappedTokenProgram ?? null, isWritable: false }, + unwrappedTokenAccount: { value: input.unwrappedTokenAccount ?? null, isWritable: true }, + unwrappedMint: { value: input.unwrappedMint ?? null, isWritable: false }, + unwrappedEscrow: { value: input.unwrappedEscrow ?? null, isWritable: true }, + transferAuthority: { value: input.transferAuthority ?? null, isWritable: false }, + }; + const accounts = originalAccounts as Record; - // Original args. - const args = { ...input }; + // Original args. + const args = { ...input }; - // Remaining accounts. - const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map( - (signer) => ({ - address: signer.address, - role: AccountRole.READONLY_SIGNER, - signer, - }) - ); + // Remaining accounts. + const remainingAccounts: AccountMeta[] = (args.multiSigners ?? []).map(signer => ({ + address: signer.address, + role: AccountRole.READONLY_SIGNER, + signer, + })); - const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); - return Object.freeze({ - accounts: [ - getAccountMeta(accounts.recipientWrappedTokenAccount), - getAccountMeta(accounts.wrappedMint), - getAccountMeta(accounts.wrappedMintAuthority), - getAccountMeta(accounts.unwrappedTokenProgram), - getAccountMeta(accounts.wrappedTokenProgram), - getAccountMeta(accounts.unwrappedTokenAccount), - getAccountMeta(accounts.unwrappedMint), - getAccountMeta(accounts.unwrappedEscrow), - getAccountMeta(accounts.transferAuthority), - ...remainingAccounts, - ], - data: getWrapInstructionDataEncoder().encode( - args as WrapInstructionDataArgs - ), - programAddress, - } as WrapInstruction< - TProgramAddress, - TAccountRecipientWrappedTokenAccount, - TAccountWrappedMint, - TAccountWrappedMintAuthority, - TAccountUnwrappedTokenProgram, - TAccountWrappedTokenProgram, - TAccountUnwrappedTokenAccount, - TAccountUnwrappedMint, - TAccountUnwrappedEscrow, - (typeof input)['transferAuthority'] extends TransactionSigner - ? ReadonlySignerAccount & - AccountSignerMeta - : TAccountTransferAuthority - >); + const getAccountMeta = getAccountMetaFactory(programAddress, 'programId'); + return Object.freeze({ + accounts: [ + getAccountMeta(accounts.recipientWrappedTokenAccount), + getAccountMeta(accounts.wrappedMint), + getAccountMeta(accounts.wrappedMintAuthority), + getAccountMeta(accounts.unwrappedTokenProgram), + getAccountMeta(accounts.wrappedTokenProgram), + getAccountMeta(accounts.unwrappedTokenAccount), + getAccountMeta(accounts.unwrappedMint), + getAccountMeta(accounts.unwrappedEscrow), + getAccountMeta(accounts.transferAuthority), + ...remainingAccounts, + ], + data: getWrapInstructionDataEncoder().encode(args as WrapInstructionDataArgs), + programAddress, + } as WrapInstruction< + TProgramAddress, + TAccountRecipientWrappedTokenAccount, + TAccountWrappedMint, + TAccountWrappedMintAuthority, + TAccountUnwrappedTokenProgram, + TAccountWrappedTokenProgram, + TAccountUnwrappedTokenAccount, + TAccountUnwrappedMint, + TAccountUnwrappedEscrow, + (typeof input)['transferAuthority'] extends TransactionSigner + ? ReadonlySignerAccount & AccountSignerMeta + : TAccountTransferAuthority + >); } export type ParsedWrapInstruction< - TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, - TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], + TProgram extends string = typeof TOKEN_WRAP_PROGRAM_ADDRESS, + TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[], > = { - programAddress: Address; - accounts: { - /** The token account to receive the wrapped tokens. */ - recipientWrappedTokenAccount: TAccountMetas[0]; - /** - * Wrapped mint, must be initialized, address must be: - * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` - */ - wrappedMint: TAccountMetas[1]; - /** - * The PDA authority of the wrapped mint, address must be - * `get_wrapped_mint_authority(wrapped_mint)` - */ - wrappedMintAuthority: TAccountMetas[2]; - /** The token program of the unwrapped tokens. */ - unwrappedTokenProgram: TAccountMetas[3]; - /** The token program of the wrapped tokens. */ - wrappedTokenProgram: TAccountMetas[4]; - /** The source token account for the unwrapped tokens. */ - unwrappedTokenAccount: TAccountMetas[5]; - /** The mint of the unwrapped tokens. */ - unwrappedMint: TAccountMetas[6]; - /** - * The escrow account that holds the unwrapped tokens. - * Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program) - */ - unwrappedEscrow: TAccountMetas[7]; - /** The authority to transfer the unwrapped tokens. */ - transferAuthority: TAccountMetas[8]; - }; - data: WrapInstructionData; + programAddress: Address; + accounts: { + /** The token account to receive the wrapped tokens. */ + recipientWrappedTokenAccount: TAccountMetas[0]; + /** + * Wrapped mint, must be initialized, address must be: + * `get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)` + */ + wrappedMint: TAccountMetas[1]; + /** + * The PDA authority of the wrapped mint, address must be + * `get_wrapped_mint_authority(wrapped_mint)` + */ + wrappedMintAuthority: TAccountMetas[2]; + /** The token program of the unwrapped tokens. */ + unwrappedTokenProgram: TAccountMetas[3]; + /** The token program of the wrapped tokens. */ + wrappedTokenProgram: TAccountMetas[4]; + /** The source token account for the unwrapped tokens. */ + unwrappedTokenAccount: TAccountMetas[5]; + /** The mint of the unwrapped tokens. */ + unwrappedMint: TAccountMetas[6]; + /** + * The escrow account that holds the unwrapped tokens. + * Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program) + */ + unwrappedEscrow: TAccountMetas[7]; + /** The authority to transfer the unwrapped tokens. */ + transferAuthority: TAccountMetas[8]; + }; + data: WrapInstructionData; }; -export function parseWrapInstruction< - TProgram extends string, - TAccountMetas extends readonly AccountMeta[], ->( - instruction: Instruction & - InstructionWithAccounts & - InstructionWithData +export function parseWrapInstruction( + instruction: Instruction & + InstructionWithAccounts & + InstructionWithData, ): ParsedWrapInstruction { - if (instruction.accounts.length < 9) { - // TODO: Coded error. - throw new Error('Not enough accounts'); - } - let accountIndex = 0; - const getNextAccount = () => { - const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; - accountIndex += 1; - return accountMeta; - }; - return { - programAddress: instruction.programAddress, - accounts: { - recipientWrappedTokenAccount: getNextAccount(), - wrappedMint: getNextAccount(), - wrappedMintAuthority: getNextAccount(), - unwrappedTokenProgram: getNextAccount(), - wrappedTokenProgram: getNextAccount(), - unwrappedTokenAccount: getNextAccount(), - unwrappedMint: getNextAccount(), - unwrappedEscrow: getNextAccount(), - transferAuthority: getNextAccount(), - }, - data: getWrapInstructionDataDecoder().decode(instruction.data), - }; + if (instruction.accounts.length < 9) { + // TODO: Coded error. + throw new Error('Not enough accounts'); + } + let accountIndex = 0; + const getNextAccount = () => { + const accountMeta = (instruction.accounts as TAccountMetas)[accountIndex]!; + accountIndex += 1; + return accountMeta; + }; + return { + programAddress: instruction.programAddress, + accounts: { + recipientWrappedTokenAccount: getNextAccount(), + wrappedMint: getNextAccount(), + wrappedMintAuthority: getNextAccount(), + unwrappedTokenProgram: getNextAccount(), + wrappedTokenProgram: getNextAccount(), + unwrappedTokenAccount: getNextAccount(), + unwrappedMint: getNextAccount(), + unwrappedEscrow: getNextAccount(), + transferAuthority: getNextAccount(), + }, + data: getWrapInstructionDataDecoder().decode(instruction.data), + }; } diff --git a/clients/js/src/generated/pdas/backpointer.ts b/clients/js/src/generated/pdas/backpointer.ts index a8130aed..a5475e55 100644 --- a/clients/js/src/generated/pdas/backpointer.ts +++ b/clients/js/src/generated/pdas/backpointer.ts @@ -7,29 +7,26 @@ */ import { - getAddressEncoder, - getProgramDerivedAddress, - getUtf8Encoder, - type Address, - type ProgramDerivedAddress, + getAddressEncoder, + getProgramDerivedAddress, + getUtf8Encoder, + type Address, + type ProgramDerivedAddress, } from '@solana/kit'; export type BackpointerSeeds = { - wrappedMint: Address; + wrappedMint: Address; }; export async function findBackpointerPda( - seeds: BackpointerSeeds, - config: { programAddress?: Address | undefined } = {} + seeds: BackpointerSeeds, + config: { programAddress?: Address | undefined } = {}, ): Promise { - const { - programAddress = 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR' as Address<'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR'>, - } = config; - return await getProgramDerivedAddress({ - programAddress, - seeds: [ - getUtf8Encoder().encode('backpointer'), - getAddressEncoder().encode(seeds.wrappedMint), - ], - }); + const { + programAddress = 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR' as Address<'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR'>, + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [getUtf8Encoder().encode('backpointer'), getAddressEncoder().encode(seeds.wrappedMint)], + }); } diff --git a/clients/js/src/generated/pdas/wrappedMint.ts b/clients/js/src/generated/pdas/wrappedMint.ts index 4a4591a1..31938c56 100644 --- a/clients/js/src/generated/pdas/wrappedMint.ts +++ b/clients/js/src/generated/pdas/wrappedMint.ts @@ -7,31 +7,31 @@ */ import { - getAddressEncoder, - getProgramDerivedAddress, - getUtf8Encoder, - type Address, - type ProgramDerivedAddress, + getAddressEncoder, + getProgramDerivedAddress, + getUtf8Encoder, + type Address, + type ProgramDerivedAddress, } from '@solana/kit'; export type WrappedMintSeeds = { - unwrappedMint: Address; - wrappedTokenProgram: Address; + unwrappedMint: Address; + wrappedTokenProgram: Address; }; export async function findWrappedMintPda( - seeds: WrappedMintSeeds, - config: { programAddress?: Address | undefined } = {} + seeds: WrappedMintSeeds, + config: { programAddress?: Address | undefined } = {}, ): Promise { - const { - programAddress = 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR' as Address<'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR'>, - } = config; - return await getProgramDerivedAddress({ - programAddress, - seeds: [ - getUtf8Encoder().encode('mint'), - getAddressEncoder().encode(seeds.unwrappedMint), - getAddressEncoder().encode(seeds.wrappedTokenProgram), - ], - }); + const { + programAddress = 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR' as Address<'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR'>, + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [ + getUtf8Encoder().encode('mint'), + getAddressEncoder().encode(seeds.unwrappedMint), + getAddressEncoder().encode(seeds.wrappedTokenProgram), + ], + }); } diff --git a/clients/js/src/generated/pdas/wrappedMintAuthority.ts b/clients/js/src/generated/pdas/wrappedMintAuthority.ts index 00bc93c0..a113c47b 100644 --- a/clients/js/src/generated/pdas/wrappedMintAuthority.ts +++ b/clients/js/src/generated/pdas/wrappedMintAuthority.ts @@ -7,29 +7,26 @@ */ import { - getAddressEncoder, - getProgramDerivedAddress, - getUtf8Encoder, - type Address, - type ProgramDerivedAddress, + getAddressEncoder, + getProgramDerivedAddress, + getUtf8Encoder, + type Address, + type ProgramDerivedAddress, } from '@solana/kit'; export type WrappedMintAuthoritySeeds = { - wrappedMint: Address; + wrappedMint: Address; }; export async function findWrappedMintAuthorityPda( - seeds: WrappedMintAuthoritySeeds, - config: { programAddress?: Address | undefined } = {} + seeds: WrappedMintAuthoritySeeds, + config: { programAddress?: Address | undefined } = {}, ): Promise { - const { - programAddress = 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR' as Address<'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR'>, - } = config; - return await getProgramDerivedAddress({ - programAddress, - seeds: [ - getUtf8Encoder().encode('authority'), - getAddressEncoder().encode(seeds.wrappedMint), - ], - }); + const { + programAddress = 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR' as Address<'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR'>, + } = config; + return await getProgramDerivedAddress({ + programAddress, + seeds: [getUtf8Encoder().encode('authority'), getAddressEncoder().encode(seeds.wrappedMint)], + }); } diff --git a/clients/js/src/generated/programs/tokenWrap.ts b/clients/js/src/generated/programs/tokenWrap.ts index d88d7490..e33f89e6 100644 --- a/clients/js/src/generated/programs/tokenWrap.ts +++ b/clients/js/src/generated/programs/tokenWrap.ts @@ -7,81 +7,121 @@ */ import { - containsBytes, - getU8Encoder, - type Address, - type ReadonlyUint8Array, + assertIsInstructionWithAccounts, + containsBytes, + getU8Encoder, + type Address, + type Instruction, + type InstructionWithData, + type ReadonlyUint8Array, } from '@solana/kit'; import { - type ParsedCloseStuckEscrowInstruction, - type ParsedCreateMintInstruction, - type ParsedSyncMetadataToSplTokenInstruction, - type ParsedSyncMetadataToToken2022Instruction, - type ParsedUnwrapInstruction, - type ParsedWrapInstruction, + parseCloseStuckEscrowInstruction, + parseCreateMintInstruction, + parseSyncMetadataToSplTokenInstruction, + parseSyncMetadataToToken2022Instruction, + parseUnwrapInstruction, + parseWrapInstruction, + type ParsedCloseStuckEscrowInstruction, + type ParsedCreateMintInstruction, + type ParsedSyncMetadataToSplTokenInstruction, + type ParsedSyncMetadataToToken2022Instruction, + type ParsedUnwrapInstruction, + type ParsedWrapInstruction, } from '../instructions'; export const TOKEN_WRAP_PROGRAM_ADDRESS = - 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR' as Address<'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR'>; + 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR' as Address<'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR'>; export enum TokenWrapAccount { - Backpointer, + Backpointer, } export enum TokenWrapInstruction { - CreateMint, - Wrap, - Unwrap, - CloseStuckEscrow, - SyncMetadataToToken2022, - SyncMetadataToSplToken, + CreateMint, + Wrap, + Unwrap, + CloseStuckEscrow, + SyncMetadataToToken2022, + SyncMetadataToSplToken, } export function identifyTokenWrapInstruction( - instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array + instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array, ): TokenWrapInstruction { - const data = 'data' in instruction ? instruction.data : instruction; - if (containsBytes(data, getU8Encoder().encode(0), 0)) { - return TokenWrapInstruction.CreateMint; - } - if (containsBytes(data, getU8Encoder().encode(1), 0)) { - return TokenWrapInstruction.Wrap; - } - if (containsBytes(data, getU8Encoder().encode(2), 0)) { - return TokenWrapInstruction.Unwrap; - } - if (containsBytes(data, getU8Encoder().encode(3), 0)) { - return TokenWrapInstruction.CloseStuckEscrow; - } - if (containsBytes(data, getU8Encoder().encode(4), 0)) { - return TokenWrapInstruction.SyncMetadataToToken2022; - } - if (containsBytes(data, getU8Encoder().encode(5), 0)) { - return TokenWrapInstruction.SyncMetadataToSplToken; - } - throw new Error( - 'The provided instruction could not be identified as a tokenWrap instruction.' - ); + const data = 'data' in instruction ? instruction.data : instruction; + if (containsBytes(data, getU8Encoder().encode(0), 0)) { + return TokenWrapInstruction.CreateMint; + } + if (containsBytes(data, getU8Encoder().encode(1), 0)) { + return TokenWrapInstruction.Wrap; + } + if (containsBytes(data, getU8Encoder().encode(2), 0)) { + return TokenWrapInstruction.Unwrap; + } + if (containsBytes(data, getU8Encoder().encode(3), 0)) { + return TokenWrapInstruction.CloseStuckEscrow; + } + if (containsBytes(data, getU8Encoder().encode(4), 0)) { + return TokenWrapInstruction.SyncMetadataToToken2022; + } + if (containsBytes(data, getU8Encoder().encode(5), 0)) { + return TokenWrapInstruction.SyncMetadataToSplToken; + } + throw new Error('The provided instruction could not be identified as a tokenWrap instruction.'); } -export type ParsedTokenWrapInstruction< - TProgram extends string = 'TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR', -> = - | ({ - instructionType: TokenWrapInstruction.CreateMint; - } & ParsedCreateMintInstruction) - | ({ - instructionType: TokenWrapInstruction.Wrap; - } & ParsedWrapInstruction) - | ({ - instructionType: TokenWrapInstruction.Unwrap; - } & ParsedUnwrapInstruction) - | ({ - instructionType: TokenWrapInstruction.CloseStuckEscrow; - } & ParsedCloseStuckEscrowInstruction) - | ({ - instructionType: TokenWrapInstruction.SyncMetadataToToken2022; - } & ParsedSyncMetadataToToken2022Instruction) - | ({ - instructionType: TokenWrapInstruction.SyncMetadataToSplToken; - } & ParsedSyncMetadataToSplTokenInstruction); +export type ParsedTokenWrapInstruction = + | ({ instructionType: TokenWrapInstruction.CreateMint } & ParsedCreateMintInstruction) + | ({ instructionType: TokenWrapInstruction.Wrap } & ParsedWrapInstruction) + | ({ instructionType: TokenWrapInstruction.Unwrap } & ParsedUnwrapInstruction) + | ({ instructionType: TokenWrapInstruction.CloseStuckEscrow } & ParsedCloseStuckEscrowInstruction) + | ({ + instructionType: TokenWrapInstruction.SyncMetadataToToken2022; + } & ParsedSyncMetadataToToken2022Instruction) + | ({ + instructionType: TokenWrapInstruction.SyncMetadataToSplToken; + } & ParsedSyncMetadataToSplTokenInstruction); + +export function parseTokenWrapInstruction( + instruction: Instruction & InstructionWithData, +): ParsedTokenWrapInstruction { + const instructionType = identifyTokenWrapInstruction(instruction); + switch (instructionType) { + case TokenWrapInstruction.CreateMint: { + assertIsInstructionWithAccounts(instruction); + return { instructionType: TokenWrapInstruction.CreateMint, ...parseCreateMintInstruction(instruction) }; + } + case TokenWrapInstruction.Wrap: { + assertIsInstructionWithAccounts(instruction); + return { instructionType: TokenWrapInstruction.Wrap, ...parseWrapInstruction(instruction) }; + } + case TokenWrapInstruction.Unwrap: { + assertIsInstructionWithAccounts(instruction); + return { instructionType: TokenWrapInstruction.Unwrap, ...parseUnwrapInstruction(instruction) }; + } + case TokenWrapInstruction.CloseStuckEscrow: { + assertIsInstructionWithAccounts(instruction); + return { + instructionType: TokenWrapInstruction.CloseStuckEscrow, + ...parseCloseStuckEscrowInstruction(instruction), + }; + } + case TokenWrapInstruction.SyncMetadataToToken2022: { + assertIsInstructionWithAccounts(instruction); + return { + instructionType: TokenWrapInstruction.SyncMetadataToToken2022, + ...parseSyncMetadataToToken2022Instruction(instruction), + }; + } + case TokenWrapInstruction.SyncMetadataToSplToken: { + assertIsInstructionWithAccounts(instruction); + return { + instructionType: TokenWrapInstruction.SyncMetadataToSplToken, + ...parseSyncMetadataToSplTokenInstruction(instruction), + }; + } + default: + throw new Error(`Unrecognized instruction type: ${instructionType as string}`); + } +} diff --git a/clients/js/src/generated/shared/index.ts b/clients/js/src/generated/shared/index.ts index 83a31834..7380d8c7 100644 --- a/clients/js/src/generated/shared/index.ts +++ b/clients/js/src/generated/shared/index.ts @@ -7,15 +7,15 @@ */ import { - AccountRole, - isProgramDerivedAddress, - isTransactionSigner as kitIsTransactionSigner, - type AccountMeta, - type AccountSignerMeta, - type Address, - type ProgramDerivedAddress, - type TransactionSigner, - upgradeRoleToSigner, + AccountRole, + isProgramDerivedAddress, + isTransactionSigner as kitIsTransactionSigner, + type AccountMeta, + type AccountSignerMeta, + type Address, + type ProgramDerivedAddress, + type TransactionSigner, + upgradeRoleToSigner, } from '@solana/kit'; /** @@ -23,10 +23,10 @@ import { * @internal */ export function expectSome(value: T | null | undefined): T { - if (value === null || value === undefined) { - throw new Error('Expected a value but received null or undefined.'); - } - return value; + if (value === null || value === undefined) { + throw new Error('Expected a value but received null or undefined.'); + } + return value; } /** @@ -34,23 +34,18 @@ export function expectSome(value: T | null | undefined): T { * @internal */ export function expectAddress( - value: - | Address - | ProgramDerivedAddress - | TransactionSigner - | null - | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): Address { - if (!value) { - throw new Error('Expected a Address.'); - } - if (typeof value === 'object' && 'address' in value) { - return value.address; - } - if (Array.isArray(value)) { - return value[0] as Address; - } - return value as Address; + if (!value) { + throw new Error('Expected a Address.'); + } + if (typeof value === 'object' && 'address' in value) { + return value.address; + } + if (Array.isArray(value)) { + return value[0] as Address; + } + return value as Address; } /** @@ -58,17 +53,12 @@ export function expectAddress( * @internal */ export function expectProgramDerivedAddress( - value: - | Address - | ProgramDerivedAddress - | TransactionSigner - | null - | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): ProgramDerivedAddress { - if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { - throw new Error('Expected a ProgramDerivedAddress.'); - } - return value; + if (!value || !Array.isArray(value) || !isProgramDerivedAddress(value)) { + throw new Error('Expected a ProgramDerivedAddress.'); + } + return value; } /** @@ -76,17 +66,12 @@ export function expectProgramDerivedAddress( * @internal */ export function expectTransactionSigner( - value: - | Address - | ProgramDerivedAddress - | TransactionSigner - | null - | undefined + value: Address | ProgramDerivedAddress | TransactionSigner | null | undefined, ): TransactionSigner { - if (!value || !isTransactionSigner(value)) { - throw new Error('Expected a TransactionSigner.'); - } - return value; + if (!value || !isTransactionSigner(value)) { + throw new Error('Expected a TransactionSigner.'); + } + return value; } /** @@ -94,19 +79,15 @@ export function expectTransactionSigner( * @internal */ export type ResolvedAccount< - T extends string = string, - U extends - | Address - | ProgramDerivedAddress - | TransactionSigner - | null = - | Address - | ProgramDerivedAddress - | TransactionSigner - | null, + T extends string = string, + U extends Address | ProgramDerivedAddress | TransactionSigner | null = + | Address + | ProgramDerivedAddress + | TransactionSigner + | null, > = { - isWritable: boolean; - value: U; + isWritable: boolean; + value: U; }; /** @@ -114,51 +95,31 @@ export type ResolvedAccount< * @internal */ export type InstructionWithByteDelta = { - byteDelta: number; + byteDelta: number; }; /** * Get account metas and signers from resolved accounts. * @internal */ -export function getAccountMetaFactory( - programAddress: Address, - optionalAccountStrategy: 'omitted' | 'programId' -) { - return ( - account: ResolvedAccount - ): AccountMeta | AccountSignerMeta | undefined => { - if (!account.value) { - if (optionalAccountStrategy === 'omitted') return; - return Object.freeze({ - address: programAddress, - role: AccountRole.READONLY, - }); - } +export function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: 'omitted' | 'programId') { + return (account: ResolvedAccount): AccountMeta | AccountSignerMeta | undefined => { + if (!account.value) { + if (optionalAccountStrategy === 'omitted') return; + return Object.freeze({ address: programAddress, role: AccountRole.READONLY }); + } - const writableRole = account.isWritable - ? AccountRole.WRITABLE - : AccountRole.READONLY; - return Object.freeze({ - address: expectAddress(account.value), - role: isTransactionSigner(account.value) - ? upgradeRoleToSigner(writableRole) - : writableRole, - ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), - }); - }; + const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY; + return Object.freeze({ + address: expectAddress(account.value), + role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole, + ...(isTransactionSigner(account.value) ? { signer: account.value } : {}), + }); + }; } export function isTransactionSigner( - value: - | Address - | ProgramDerivedAddress - | TransactionSigner + value: Address | ProgramDerivedAddress | TransactionSigner, ): value is TransactionSigner { - return ( - !!value && - typeof value === 'object' && - 'address' in value && - kitIsTransactionSigner(value) - ); + return !!value && typeof value === 'object' && 'address' in value && kitIsTransactionSigner(value); } diff --git a/clients/js/src/global.d.ts b/clients/js/src/global.d.ts index 1ec5371d..968f603b 100644 --- a/clients/js/src/global.d.ts +++ b/clients/js/src/global.d.ts @@ -2,7 +2,7 @@ // error TS4111: Property 'NODE_ENV' comes from an index signature, so it must be accessed with ['NODE_ENV']. declare namespace NodeJS { - interface ProcessEnv { - NODE_ENV: string; - } + interface ProcessEnv { + NODE_ENV: string; + } } diff --git a/clients/js/src/index.ts b/clients/js/src/index.ts index 2efb762f..8963d598 100644 --- a/clients/js/src/index.ts +++ b/clients/js/src/index.ts @@ -2,22 +2,22 @@ export * from './generated'; export { createMint, type CreateMintArgs, type CreateMintResult } from './create-mint'; export { - singleSignerWrap, - type SingleSignerWrapArgs, - type SingleSignerWrapResult, - multisigOfflineSignWrap, - type MultiSignerWrapIxBuilderArgs, + singleSignerWrap, + type SingleSignerWrapArgs, + type SingleSignerWrapResult, + multisigOfflineSignWrap, + type MultiSignerWrapIxBuilderArgs, } from './wrap'; export { - singleSignerUnwrap, - type SingleSignerUnwrapArgs, - type SingleSignerUnwrapResult, - multisigOfflineSignUnwrap, + singleSignerUnwrap, + type SingleSignerUnwrapArgs, + type SingleSignerUnwrapResult, + multisigOfflineSignUnwrap, } from './unwrap'; export { - createEscrowAccount, - type CreateEscrowAccountArgs, - type CreateEscrowAccountResult, - combinedMultisigTx, - type MultiSigCombineArgs, + createEscrowAccount, + type CreateEscrowAccountArgs, + type CreateEscrowAccountResult, + combinedMultisigTx, + type MultiSigCombineArgs, } from './utilities'; diff --git a/clients/js/src/unwrap.ts b/clients/js/src/unwrap.ts index 38aee994..14ae28f0 100644 --- a/clients/js/src/unwrap.ts +++ b/clients/js/src/unwrap.ts @@ -1,118 +1,97 @@ +import { findAssociatedTokenPda, getTokenDecoder } from '@solana-program/token-2022'; import { - Address, - appendTransactionMessageInstructions, - createTransactionMessage, - fetchEncodedAccount, - GetAccountInfoApi, - Instruction, - pipe, - Rpc, - setTransactionMessageFeePayerSigner, - setTransactionMessageLifetimeUsingBlockhash, - TransactionMessage, - TransactionMessageWithBlockhashLifetime, - TransactionMessageWithFeePayerSigner, - TransactionSigner, + Address, + appendTransactionMessageInstructions, + Blockhash, + createTransactionMessage, + fetchEncodedAccount, + GetAccountInfoApi, + Instruction, + pipe, + Rpc, + setTransactionMessageFeePayerSigner, + setTransactionMessageLifetimeUsingBlockhash, + TransactionMessage, + TransactionMessageWithBlockhashLifetime, + TransactionMessageWithFeePayerSigner, + TransactionSigner, } from '@solana/kit'; -import { findAssociatedTokenPda, getTokenDecoder } from '@solana-program/token-2022'; import { findWrappedMintAuthorityPda, getUnwrapInstruction, UnwrapInput } from './generated'; import { getMintFromTokenAccount, getOwnerFromAccount } from './utilities'; -import { Blockhash } from '@solana/rpc-types'; export interface SingleSignerUnwrapArgs { - rpc: Rpc; - payer: TransactionSigner; // Fee payer and default transfer authority - wrappedTokenAccount: Address; - amount: bigint | number; - recipientUnwrappedToken: Address; - // Optional arguments below (will be derived/defaulted if not provided) - transferAuthority?: Address | TransactionSigner; // Defaults to payer - unwrappedMint?: Address; // Will derive from unwrappedEscrow if not provided - wrappedTokenProgram?: Address; // Will derive from wrappedTokenAccount if not provided - unwrappedTokenProgram?: Address; // Will derive from unwrappedEscrow if not provided + rpc: Rpc; + payer: TransactionSigner; // Fee payer and default transfer authority + wrappedTokenAccount: Address; + amount: bigint | number; + recipientUnwrappedToken: Address; + // Optional arguments below (will be derived/defaulted if not provided) + transferAuthority?: Address | TransactionSigner; // Defaults to payer + unwrappedMint?: Address; // Will derive from unwrappedEscrow if not provided + wrappedTokenProgram?: Address; // Will derive from wrappedTokenAccount if not provided + unwrappedTokenProgram?: Address; // Will derive from unwrappedEscrow if not provided } async function resolveUnwrapAddrs({ - rpc, - payer, - wrappedTokenAccount, - recipientUnwrappedToken, - inputUnwrappedMint, - inputTransferAuthority, - inputWrappedTokenProgram, - inputUnwrappedTokenProgram, + rpc, + payer, + wrappedTokenAccount, + recipientUnwrappedToken, + inputUnwrappedMint, + inputTransferAuthority, + inputWrappedTokenProgram, + inputUnwrappedTokenProgram, }: { - rpc: Rpc; - payer: TransactionSigner; - wrappedTokenAccount: Address; - recipientUnwrappedToken: Address; - inputUnwrappedMint?: Address; - inputTransferAuthority?: Address | TransactionSigner; - inputWrappedTokenProgram?: Address; - inputUnwrappedTokenProgram?: Address; + rpc: Rpc; + payer: TransactionSigner; + wrappedTokenAccount: Address; + recipientUnwrappedToken: Address; + inputUnwrappedMint?: Address; + inputTransferAuthority?: Address | TransactionSigner; + inputWrappedTokenProgram?: Address; + inputUnwrappedTokenProgram?: Address; }) { - const wrappedTokenProgram = - inputWrappedTokenProgram ?? (await getOwnerFromAccount(rpc, wrappedTokenAccount)); - const unwrappedTokenProgram = - inputUnwrappedTokenProgram ?? (await getOwnerFromAccount(rpc, recipientUnwrappedToken)); - const unwrappedMint = - inputUnwrappedMint ?? (await getMintFromTokenAccount(rpc, recipientUnwrappedToken)); - - // Get wrapped mint from the token account being burned - const wrappedAccountInfo = await fetchEncodedAccount(rpc, wrappedTokenAccount); - if (!wrappedAccountInfo.exists) { - throw new Error(`Wrapped token account ${wrappedTokenAccount} not found.`); - } - const wrappedMint = getTokenDecoder().decode(wrappedAccountInfo.data).mint; - - const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ wrappedMint }); - - // Default transfer authority to payer if not provided - const transferAuthority = inputTransferAuthority ?? payer; - - return { - unwrappedMint, - wrappedMint, - wrappedMintAuthority, - transferAuthority, - wrappedTokenProgram, - unwrappedTokenProgram, - }; + const wrappedTokenProgram = inputWrappedTokenProgram ?? (await getOwnerFromAccount(rpc, wrappedTokenAccount)); + const unwrappedTokenProgram = + inputUnwrappedTokenProgram ?? (await getOwnerFromAccount(rpc, recipientUnwrappedToken)); + const unwrappedMint = inputUnwrappedMint ?? (await getMintFromTokenAccount(rpc, recipientUnwrappedToken)); + + // Get wrapped mint from the token account being burned + const wrappedAccountInfo = await fetchEncodedAccount(rpc, wrappedTokenAccount); + if (!wrappedAccountInfo.exists) { + throw new Error(`Wrapped token account ${wrappedTokenAccount} not found.`); + } + const wrappedMint = getTokenDecoder().decode(wrappedAccountInfo.data).mint; + + const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ wrappedMint }); + + // Default transfer authority to payer if not provided + const transferAuthority = inputTransferAuthority ?? payer; + + return { + unwrappedMint, + wrappedMint, + wrappedMintAuthority, + transferAuthority, + wrappedTokenProgram, + unwrappedTokenProgram, + }; } interface UnwrapTxBuilderArgs { - wrappedTokenAccount: Address; - amount: bigint | number; - wrappedMint: Address; - wrappedMintAuthority: Address; - unwrappedMint: Address; - recipientUnwrappedToken: Address; - unwrappedTokenProgram: Address; - wrappedTokenProgram: Address; - transferAuthority: Address | TransactionSigner; - multiSigners?: TransactionSigner[]; + wrappedTokenAccount: Address; + amount: bigint | number; + wrappedMint: Address; + wrappedMintAuthority: Address; + unwrappedMint: Address; + recipientUnwrappedToken: Address; + unwrappedTokenProgram: Address; + wrappedTokenProgram: Address; + transferAuthority: Address | TransactionSigner; + multiSigners?: TransactionSigner[]; } async function buildUnwrapTransaction({ - recipientUnwrappedToken, - wrappedMintAuthority, - unwrappedMint, - wrappedTokenProgram, - unwrappedTokenProgram, - wrappedTokenAccount, - wrappedMint, - transferAuthority, - amount, - multiSigners = [], -}: UnwrapTxBuilderArgs): Promise { - const [unwrappedEscrow] = await findAssociatedTokenPda({ - owner: wrappedMintAuthority, - mint: unwrappedMint, - tokenProgram: unwrappedTokenProgram, - }); - - const unwrapInstructionInput: UnwrapInput = { - unwrappedEscrow, recipientUnwrappedToken, wrappedMintAuthority, unwrappedMint, @@ -121,17 +100,36 @@ async function buildUnwrapTransaction({ wrappedTokenAccount, wrappedMint, transferAuthority, - amount: BigInt(amount), - multiSigners, - }; - - return getUnwrapInstruction(unwrapInstructionInput); + amount, + multiSigners = [], +}: UnwrapTxBuilderArgs): Promise { + const [unwrappedEscrow] = await findAssociatedTokenPda({ + owner: wrappedMintAuthority, + mint: unwrappedMint, + tokenProgram: unwrappedTokenProgram, + }); + + const unwrapInstructionInput: UnwrapInput = { + unwrappedEscrow, + recipientUnwrappedToken, + wrappedMintAuthority, + unwrappedMint, + wrappedTokenProgram, + unwrappedTokenProgram, + wrappedTokenAccount, + wrappedMint, + transferAuthority, + amount: BigInt(amount), + multiSigners, + }; + + return getUnwrapInstruction(unwrapInstructionInput); } export interface SingleSignerUnwrapResult { - ixs: Instruction[]; - recipientUnwrappedToken: Address; - amount: bigint; + ixs: Instruction[]; + recipientUnwrappedToken: Address; + amount: bigint; } /** @@ -139,76 +137,72 @@ export interface SingleSignerUnwrapResult { * Derives necessary PDAs and default accounts if not provided. */ export async function singleSignerUnwrap({ - rpc, - payer, - wrappedTokenAccount, - amount, - recipientUnwrappedToken, - transferAuthority: inputTransferAuthority, - unwrappedMint: inputUnwrappedMint, - wrappedTokenProgram: inputWrappedTokenProgram, - unwrappedTokenProgram: inputUnwrappedTokenProgram, -}: SingleSignerUnwrapArgs): Promise { - const { - wrappedMint, - wrappedMintAuthority, - transferAuthority, - unwrappedTokenProgram, - unwrappedMint, - wrappedTokenProgram, - } = await resolveUnwrapAddrs({ rpc, payer, wrappedTokenAccount, - recipientUnwrappedToken, - inputUnwrappedMint, - inputTransferAuthority, - inputWrappedTokenProgram, - inputUnwrappedTokenProgram, - }); - - const ix = await buildUnwrapTransaction({ - recipientUnwrappedToken, - wrappedMintAuthority, - unwrappedMint, - wrappedTokenProgram, - unwrappedTokenProgram, - wrappedTokenAccount, - wrappedMint, - transferAuthority, amount, - }); - - return { recipientUnwrappedToken, - amount: BigInt(amount), - ixs: [ix], - }; + transferAuthority: inputTransferAuthority, + unwrappedMint: inputUnwrappedMint, + wrappedTokenProgram: inputWrappedTokenProgram, + unwrappedTokenProgram: inputUnwrappedTokenProgram, +}: SingleSignerUnwrapArgs): Promise { + const { + wrappedMint, + wrappedMintAuthority, + transferAuthority, + unwrappedTokenProgram, + unwrappedMint, + wrappedTokenProgram, + } = await resolveUnwrapAddrs({ + rpc, + payer, + wrappedTokenAccount, + recipientUnwrappedToken, + inputUnwrappedMint, + inputTransferAuthority, + inputWrappedTokenProgram, + inputUnwrappedTokenProgram, + }); + + const ix = await buildUnwrapTransaction({ + recipientUnwrappedToken, + wrappedMintAuthority, + unwrappedMint, + wrappedTokenProgram, + unwrappedTokenProgram, + wrappedTokenAccount, + wrappedMint, + transferAuthority, + amount, + }); + + return { + recipientUnwrappedToken, + amount: BigInt(amount), + ixs: [ix], + }; } export interface MultiSignerUnWrapTxBuilderArgs extends UnwrapTxBuilderArgs { - payer: TransactionSigner; - blockhash: { - blockhash: Blockhash; - lastValidBlockHeight: bigint; - }; - multiSigners: TransactionSigner[]; + payer: TransactionSigner; + blockhash: { + blockhash: Blockhash; + lastValidBlockHeight: bigint; + }; + multiSigners: TransactionSigner[]; } // Used to collect signatures export async function multisigOfflineSignUnwrap( - args: MultiSignerUnWrapTxBuilderArgs, -): Promise< - TransactionMessage & - TransactionMessageWithBlockhashLifetime & - TransactionMessageWithFeePayerSigner -> { - const unwrapIx = await buildUnwrapTransaction(args); - - return pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(args.payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(args.blockhash, tx), - tx => appendTransactionMessageInstructions([unwrapIx], tx), - ); + args: MultiSignerUnWrapTxBuilderArgs, +): Promise { + const unwrapIx = await buildUnwrapTransaction(args); + + return pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(args.payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(args.blockhash, tx), + tx => appendTransactionMessageInstructions([unwrapIx], tx), + ); } diff --git a/clients/js/src/utilities.ts b/clients/js/src/utilities.ts index ad9bf9a2..6ac5e324 100644 --- a/clients/js/src/utilities.ts +++ b/clients/js/src/utilities.ts @@ -1,242 +1,234 @@ -import { findWrappedMintAuthorityPda, findWrappedMintPda } from './generated'; -import { - Address, - assertIsFullySignedTransaction, - assertIsSendableTransaction, - containsBytes, - fetchEncodedAccount, - FullySignedTransaction, - generateKeyPairSigner, - GetAccountInfoApi, - GetMinimumBalanceForRentExemptionApi, - Instruction, - KeyPairSigner, - Rpc, - SignatureBytes, - Transaction, - TransactionWithBlockhashLifetime, - TransactionWithinSizeLimit, -} from '@solana/kit'; import { getCreateAccountInstruction } from '@solana-program/system'; +import { getInitializeAccountInstruction as initializeToken, TOKEN_PROGRAM_ADDRESS } from '@solana-program/token'; import { - getInitializeAccountInstruction as initializeToken, - TOKEN_PROGRAM_ADDRESS, -} from '@solana-program/token'; -import { - fetchMaybeToken, - findAssociatedTokenPda, - getCreateAssociatedTokenInstruction, - getInitializeAccountInstruction as initializeToken2022, - getTokenDecoder, - Token, - TOKEN_2022_PROGRAM_ADDRESS, + fetchMaybeToken, + findAssociatedTokenPda, + getCreateAssociatedTokenInstruction, + getTokenDecoder, + InitializeAccountInput, + getInitializeAccountInstruction as initializeToken2022, + Token, + TOKEN_2022_PROGRAM_ADDRESS, } from '@solana-program/token-2022'; -import { Blockhash } from '@solana/rpc-types'; -import { Account } from '@solana/accounts'; -import { InitializeAccountInput } from '@solana-program/token-2022'; - -function getInitializeTokenFn( - tokenProgram: Address, -): (input: InitializeAccountInput) => Instruction { - if (tokenProgram === TOKEN_PROGRAM_ADDRESS) return initializeToken; - if (tokenProgram === TOKEN_2022_PROGRAM_ADDRESS) return initializeToken2022; - throw new Error(`${tokenProgram} is not a valid token program.`); +import { + Account, + Address, + assertIsFullySignedTransaction, + assertIsSendableTransaction, + Blockhash, + containsBytes, + fetchEncodedAccount, + FullySignedTransaction, + generateKeyPairSigner, + GetAccountInfoApi, + GetMinimumBalanceForRentExemptionApi, + Instruction, + KeyPairSigner, + Rpc, + SignatureBytes, + Transaction, + TransactionWithBlockhashLifetime, + TransactionWithinSizeLimit, +} from '@solana/kit'; +import { findWrappedMintAuthorityPda, findWrappedMintPda } from './generated'; + +function getInitializeTokenFn(tokenProgram: Address): (input: InitializeAccountInput) => Instruction { + if (tokenProgram === TOKEN_PROGRAM_ADDRESS) return initializeToken; + if (tokenProgram === TOKEN_2022_PROGRAM_ADDRESS) return initializeToken2022; + throw new Error(`${tokenProgram} is not a valid token program.`); } export async function createTokenAccount({ - rpc, - payer, - mint, - owner, - tokenProgram, -}: { - rpc: Rpc; - payer: KeyPairSigner; - mint: Address; - owner: Address; - tokenProgram: Address; -}): Promise<{ ixs: Instruction[]; keyPair: KeyPairSigner }> { - const [keyPair, lamports] = await Promise.all([ - generateKeyPairSigner(), - rpc.getMinimumBalanceForRentExemption(165n).send(), - ]); - - const createAccountIx = getCreateAccountInstruction({ + rpc, payer, - newAccount: keyPair, - lamports, - space: 165, - programAddress: tokenProgram, - }); - - const initializeAccountIx = getInitializeTokenFn(tokenProgram)({ - account: keyPair.address, mint, owner, - }); - - return { - ixs: [createAccountIx, initializeAccountIx], - keyPair, - }; + tokenProgram, +}: { + rpc: Rpc; + payer: KeyPairSigner; + mint: Address; + owner: Address; + tokenProgram: Address; +}): Promise<{ ixs: Instruction[]; keyPair: KeyPairSigner }> { + const [keyPair, lamports] = await Promise.all([ + generateKeyPairSigner(), + rpc.getMinimumBalanceForRentExemption(165n).send(), + ]); + + const createAccountIx = getCreateAccountInstruction({ + payer, + newAccount: keyPair, + lamports, + space: 165, + programAddress: tokenProgram, + }); + + const initializeAccountIx = getInitializeTokenFn(tokenProgram)({ + account: keyPair.address, + mint, + owner, + }); + + return { + ixs: [createAccountIx, initializeAccountIx], + keyPair, + }; } export interface CreateEscrowAccountArgs { - rpc: Rpc; - payer: KeyPairSigner; - unwrappedMint: Address; - wrappedTokenProgram: Address; + rpc: Rpc; + payer: KeyPairSigner; + unwrappedMint: Address; + wrappedTokenProgram: Address; } export type CreateEscrowAccountResult = - | { kind: 'already_exists'; account: Account } - | { - kind: 'instructions_to_create'; - address: Address; - ixs: Instruction[]; - }; + | { kind: 'already_exists'; account: Account } + | { + kind: 'instructions_to_create'; + address: Address; + ixs: Instruction[]; + }; export async function createEscrowAccount({ - rpc, - payer, - unwrappedMint, - wrappedTokenProgram, -}: CreateEscrowAccountArgs): Promise { - const [wrappedMint] = await findWrappedMintPda({ unwrappedMint, wrappedTokenProgram }); - const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ wrappedMint }); - const unwrappedTokenProgram = await getOwnerFromAccount(rpc, unwrappedMint); - - const [escrowAta] = await findAssociatedTokenPda({ - owner: wrappedMintAuthority, - mint: unwrappedMint, - tokenProgram: unwrappedTokenProgram, - }); - - const escrowResult = await fetchMaybeToken(rpc, escrowAta); - if (escrowResult.exists) { - return { kind: 'already_exists', account: escrowResult }; - } - - const ix = getCreateAssociatedTokenInstruction({ + rpc, payer, - owner: wrappedMintAuthority, - mint: unwrappedMint, - ata: escrowAta, - tokenProgram: unwrappedTokenProgram, - }) as Instruction; + unwrappedMint, + wrappedTokenProgram, +}: CreateEscrowAccountArgs): Promise { + const [wrappedMint] = await findWrappedMintPda({ unwrappedMint, wrappedTokenProgram }); + const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ wrappedMint }); + const unwrappedTokenProgram = await getOwnerFromAccount(rpc, unwrappedMint); + + const [escrowAta] = await findAssociatedTokenPda({ + owner: wrappedMintAuthority, + mint: unwrappedMint, + tokenProgram: unwrappedTokenProgram, + }); + + const escrowResult = await fetchMaybeToken(rpc, escrowAta); + if (escrowResult.exists) { + return { kind: 'already_exists', account: escrowResult }; + } + + const ix = getCreateAssociatedTokenInstruction({ + payer, + owner: wrappedMintAuthority, + mint: unwrappedMint, + ata: escrowAta, + tokenProgram: unwrappedTokenProgram, + }) as Instruction; - return { address: escrowAta, ixs: [ix], kind: 'instructions_to_create' }; + return { address: escrowAta, ixs: [ix], kind: 'instructions_to_create' }; } -export async function getOwnerFromAccount( - rpc: Rpc, - accountAddress: Address, -): Promise
{ - const accountInfo = await rpc.getAccountInfo(accountAddress, { encoding: 'base64' }).send(); - if (!accountInfo.value) { - throw new Error(`Account ${accountAddress} not found.`); - } - return accountInfo.value.owner; +export async function getOwnerFromAccount(rpc: Rpc, accountAddress: Address): Promise
{ + const accountInfo = await rpc.getAccountInfo(accountAddress, { encoding: 'base64' }).send(); + if (!accountInfo.value) { + throw new Error(`Account ${accountAddress} not found.`); + } + return accountInfo.value.owner; } export async function getMintFromTokenAccount( - rpc: Rpc, - tokenAccountAddress: Address, + rpc: Rpc, + tokenAccountAddress: Address, ): Promise
{ - const account = await fetchEncodedAccount(rpc, tokenAccountAddress); - if (!account.exists) { - throw new Error(`Unwrapped token account ${tokenAccountAddress} not found.`); - } - return getTokenDecoder().decode(account.data).mint; + const account = await fetchEncodedAccount(rpc, tokenAccountAddress); + if (!account.exists) { + throw new Error(`Unwrapped token account ${tokenAccountAddress} not found.`); + } + return getTokenDecoder().decode(account.data).mint; } function messageBytesEqual(results: (Transaction & TransactionWithBlockhashLifetime)[]): boolean { - // If array has only one element, return true - if (results.length === 1) { - return true; - } - - // Use the first result as reference - const reference = results[0]; - if (!reference) throw new Error('No transactions in input'); - - // Compare each result with the reference - return results.every( - c => - reference.messageBytes.length === c.messageBytes.length && - containsBytes(reference.messageBytes, c.messageBytes, 0), - ); + // If array has only one element, return true + if (results.length === 1) { + return true; + } + + // Use the first result as reference + const reference = results[0]; + if (!reference) throw new Error('No transactions in input'); + + // Compare each result with the reference + return results.every( + c => + reference.messageBytes.length === c.messageBytes.length && + containsBytes(reference.messageBytes, c.messageBytes, 0), + ); } function combineSignatures( - signedTxs: (Transaction & TransactionWithBlockhashLifetime)[], + signedTxs: (Transaction & TransactionWithBlockhashLifetime)[], ): Record { - // Step 1: Determine the canonical signer order from the first signed transaction. - // Insertion order is the way to re-create this. Without it, verification will fail. - const firstSignedTx = signedTxs[0]; - if (!firstSignedTx) { - throw new Error('No signed transactions provided'); - } - - const allSignatures: Record = {}; - - // Step 1: Insert a null signature for each signer, maintaining the order of the signatures from the first signed transaction - for (const pubkey of Object.keys(firstSignedTx.signatures)) { - allSignatures[pubkey] = null; - } - - // Step 2: Gather all signatures from all transactions - for (const signedTx of signedTxs) { - for (const [address, signature] of Object.entries(signedTx.signatures)) { - if (signature) { - // only store non-null signers - allSignatures[address] = signature; - } + // Step 1: Determine the canonical signer order from the first signed transaction. + // Insertion order is the way to re-create this. Without it, verification will fail. + const firstSignedTx = signedTxs[0]; + if (!firstSignedTx) { + throw new Error('No signed transactions provided'); + } + + const allSignatures: Record = {}; + + // Step 1: Insert a null signature for each signer, maintaining the order of the signatures from the first signed transaction + for (const pubkey of Object.keys(firstSignedTx.signatures)) { + allSignatures[pubkey] = null; } - } - // Step 3: Assert all signatures are set - const missingSigners: string[] = []; - for (const [pubkey, signature] of Object.entries(allSignatures)) { - if (signature === null) { - missingSigners.push(pubkey); + // Step 2: Gather all signatures from all transactions + for (const signedTx of signedTxs) { + for (const [address, signature] of Object.entries(signedTx.signatures)) { + if (signature) { + // only store non-null signers + allSignatures[address] = signature; + } + } + } + + // Step 3: Assert all signatures are set + const missingSigners: string[] = []; + for (const [pubkey, signature] of Object.entries(allSignatures)) { + if (signature === null) { + missingSigners.push(pubkey); + } + } + if (missingSigners.length > 0) { + throw new Error(`Missing signatures for: ${missingSigners.join(', ')}`); } - } - if (missingSigners.length > 0) { - throw new Error(`Missing signatures for: ${missingSigners.join(', ')}`); - } - return allSignatures as Record; + return allSignatures as Record; } export interface MultiSigCombineArgs { - signedTxs: (Transaction & TransactionWithBlockhashLifetime)[]; - blockhash: { - blockhash: Blockhash; - lastValidBlockHeight: bigint; - }; + signedTxs: (Transaction & TransactionWithBlockhashLifetime)[]; + blockhash: { + blockhash: Blockhash; + lastValidBlockHeight: bigint; + }; } // Combines, validates, and broadcasts outputs of multisig offline partially signed txs export function combinedMultisigTx({ - signedTxs, - blockhash, + signedTxs, + blockhash, }: MultiSigCombineArgs): Transaction & - FullySignedTransaction & - TransactionWithBlockhashLifetime & - TransactionWithinSizeLimit { - const messagesEqual = messageBytesEqual(signedTxs); - if (!messagesEqual) throw new Error('Messages are not all the same'); - if (!signedTxs[0]) throw new Error('No signed transactions provided'); - - const tx = { - messageBytes: signedTxs[0].messageBytes, - signatures: combineSignatures(signedTxs), - lifetimeConstraint: blockhash, - }; - - assertIsFullySignedTransaction(tx); - assertIsSendableTransaction(tx); - - return tx; + FullySignedTransaction & + TransactionWithBlockhashLifetime & + TransactionWithinSizeLimit { + const messagesEqual = messageBytesEqual(signedTxs); + if (!messagesEqual) throw new Error('Messages are not all the same'); + if (!signedTxs[0]) throw new Error('No signed transactions provided'); + + const tx = { + messageBytes: signedTxs[0].messageBytes, + signatures: combineSignatures(signedTxs), + lifetimeConstraint: blockhash, + }; + + assertIsFullySignedTransaction(tx); + assertIsSendableTransaction(tx); + + return tx; } diff --git a/clients/js/src/wrap.ts b/clients/js/src/wrap.ts index ab88dd71..c66eceb6 100644 --- a/clients/js/src/wrap.ts +++ b/clients/js/src/wrap.ts @@ -1,222 +1,211 @@ +import { findAssociatedTokenPda } from '@solana-program/token-2022'; import { - Address, - appendTransactionMessageInstructions, - createTransactionMessage, - GetAccountInfoApi, - Instruction, - pipe, - Rpc, - setTransactionMessageFeePayerSigner, - setTransactionMessageLifetimeUsingBlockhash, - TransactionMessage, - TransactionMessageWithBlockhashLifetime, - TransactionMessageWithFeePayerSigner, - TransactionSigner, + Address, + appendTransactionMessageInstructions, + Blockhash, + createTransactionMessage, + GetAccountInfoApi, + Instruction, + pipe, + Rpc, + setTransactionMessageFeePayerSigner, + setTransactionMessageLifetimeUsingBlockhash, + TransactionMessage, + TransactionMessageWithBlockhashLifetime, + TransactionMessageWithFeePayerSigner, + TransactionSigner, } from '@solana/kit'; -import { - findWrappedMintAuthorityPda, - findWrappedMintPda, - getWrapInstruction, - WrapInput, -} from './generated'; +import { findWrappedMintAuthorityPda, findWrappedMintPda, getWrapInstruction, WrapInput } from './generated'; import { getMintFromTokenAccount, getOwnerFromAccount } from './utilities'; -import { findAssociatedTokenPda } from '@solana-program/token-2022'; -import { Blockhash } from '@solana/rpc-types'; interface IxBuilderArgs { - unwrappedTokenAccount: Address; - wrappedTokenProgram: Address; - amount: bigint | number; - wrappedMint: Address; - wrappedMintAuthority: Address; - transferAuthority: Address | TransactionSigner; - unwrappedMint: Address; - recipientWrappedTokenAccount: Address; - unwrappedTokenProgram: Address; - multiSigners?: TransactionSigner[]; + unwrappedTokenAccount: Address; + wrappedTokenProgram: Address; + amount: bigint | number; + wrappedMint: Address; + wrappedMintAuthority: Address; + transferAuthority: Address | TransactionSigner; + unwrappedMint: Address; + recipientWrappedTokenAccount: Address; + unwrappedTokenProgram: Address; + multiSigners?: TransactionSigner[]; } export interface MultiSignerWrapIxBuilderArgs extends IxBuilderArgs { - payer: TransactionSigner; - blockhash: { - blockhash: Blockhash; - lastValidBlockHeight: bigint; - }; - multiSigners: TransactionSigner[]; + payer: TransactionSigner; + blockhash: { + blockhash: Blockhash; + lastValidBlockHeight: bigint; + }; + multiSigners: TransactionSigner[]; } // Used to collect signatures export async function multisigOfflineSignWrap( - args: MultiSignerWrapIxBuilderArgs, -): Promise< - TransactionMessage & - TransactionMessageWithBlockhashLifetime & - TransactionMessageWithFeePayerSigner -> { - const wrapIx = await buildWrapIx(args); + args: MultiSignerWrapIxBuilderArgs, +): Promise { + const wrapIx = await buildWrapIx(args); - return pipe( - createTransactionMessage({ version: 0 }), - tx => setTransactionMessageFeePayerSigner(args.payer, tx), - tx => setTransactionMessageLifetimeUsingBlockhash(args.blockhash, tx), - tx => appendTransactionMessageInstructions([wrapIx], tx), - ); + return pipe( + createTransactionMessage({ version: 0 }), + tx => setTransactionMessageFeePayerSigner(args.payer, tx), + tx => setTransactionMessageLifetimeUsingBlockhash(args.blockhash, tx), + tx => appendTransactionMessageInstructions([wrapIx], tx), + ); } export interface SingleSignerWrapArgs { - rpc: Rpc; - payer: TransactionSigner; // Fee payer and default transfer authority - unwrappedTokenAccount: Address; - wrappedTokenProgram: Address; - amount: bigint | number; - transferAuthority?: Address | TransactionSigner; // Defaults to payer if not provided - unwrappedMint?: Address; // Will fetch from unwrappedTokenAccount if not provided - recipientWrappedTokenAccount?: Address; // Defaults to payer's ATA if not provided - unwrappedTokenProgram?: Address; // Will fetch from unwrappedTokenAccount owner if not provided + rpc: Rpc; + payer: TransactionSigner; // Fee payer and default transfer authority + unwrappedTokenAccount: Address; + wrappedTokenProgram: Address; + amount: bigint | number; + transferAuthority?: Address | TransactionSigner; // Defaults to payer if not provided + unwrappedMint?: Address; // Will fetch from unwrappedTokenAccount if not provided + recipientWrappedTokenAccount?: Address; // Defaults to payer's ATA if not provided + unwrappedTokenProgram?: Address; // Will fetch from unwrappedTokenAccount owner if not provided } export interface SingleSignerWrapResult { - ixs: Instruction[]; - recipientWrappedTokenAccount: Address; - escrowAccount: Address; - amount: bigint; + ixs: Instruction[]; + recipientWrappedTokenAccount: Address; + escrowAccount: Address; + amount: bigint; } export async function singleSignerWrap({ - rpc, - payer, - unwrappedTokenAccount, - wrappedTokenProgram, - amount, - transferAuthority: inputTransferAuthority, - unwrappedMint: inputUnwrappedMint, - recipientWrappedTokenAccount: inputRecipientTokenAccount, - unwrappedTokenProgram: inputUnwrappedTokenProgram, -}: SingleSignerWrapArgs): Promise { - const { - unwrappedMint, - unwrappedTokenProgram, - wrappedMint, - wrappedMintAuthority, - recipientWrappedTokenAccount, - transferAuthority, - unwrappedEscrow, - } = await resolveAddrs({ rpc, payer, - inputTransferAuthority, - inputUnwrappedMint, - unwrappedTokenAccount, - inputUnwrappedTokenProgram, - wrappedTokenProgram, - inputRecipientTokenAccount, - }); - - const ix = await buildWrapIx({ unwrappedTokenAccount, wrappedTokenProgram, amount, - transferAuthority, - unwrappedMint, - wrappedMint, - wrappedMintAuthority, - recipientWrappedTokenAccount, - unwrappedTokenProgram, - }); + transferAuthority: inputTransferAuthority, + unwrappedMint: inputUnwrappedMint, + recipientWrappedTokenAccount: inputRecipientTokenAccount, + unwrappedTokenProgram: inputUnwrappedTokenProgram, +}: SingleSignerWrapArgs): Promise { + const { + unwrappedMint, + unwrappedTokenProgram, + wrappedMint, + wrappedMintAuthority, + recipientWrappedTokenAccount, + transferAuthority, + unwrappedEscrow, + } = await resolveAddrs({ + rpc, + payer, + inputTransferAuthority, + inputUnwrappedMint, + unwrappedTokenAccount, + inputUnwrappedTokenProgram, + wrappedTokenProgram, + inputRecipientTokenAccount, + }); - return { - ixs: [ix], - recipientWrappedTokenAccount, - escrowAccount: unwrappedEscrow, - amount: BigInt(amount), - }; + const ix = await buildWrapIx({ + unwrappedTokenAccount, + wrappedTokenProgram, + amount, + transferAuthority, + unwrappedMint, + wrappedMint, + wrappedMintAuthority, + recipientWrappedTokenAccount, + unwrappedTokenProgram, + }); + + return { + ixs: [ix], + recipientWrappedTokenAccount, + escrowAccount: unwrappedEscrow, + amount: BigInt(amount), + }; } // Meant to handle all of the potential default values async function resolveAddrs({ - rpc, - payer, - unwrappedTokenAccount, - wrappedTokenProgram, - inputTransferAuthority, - inputUnwrappedMint, - inputRecipientTokenAccount, - inputUnwrappedTokenProgram, + rpc, + payer, + unwrappedTokenAccount, + wrappedTokenProgram, + inputTransferAuthority, + inputUnwrappedMint, + inputRecipientTokenAccount, + inputUnwrappedTokenProgram, }: { - rpc: Rpc; - payer: TransactionSigner; - unwrappedTokenAccount: Address; - wrappedTokenProgram: Address; - inputTransferAuthority?: Address | TransactionSigner; - inputUnwrappedMint?: Address; - inputRecipientTokenAccount?: Address; - inputUnwrappedTokenProgram?: Address; + rpc: Rpc; + payer: TransactionSigner; + unwrappedTokenAccount: Address; + wrappedTokenProgram: Address; + inputTransferAuthority?: Address | TransactionSigner; + inputUnwrappedMint?: Address; + inputRecipientTokenAccount?: Address; + inputUnwrappedTokenProgram?: Address; }) { - const unwrappedMint = - inputUnwrappedMint ?? (await getMintFromTokenAccount(rpc, unwrappedTokenAccount)); - const unwrappedTokenProgram = - inputUnwrappedTokenProgram ?? (await getOwnerFromAccount(rpc, unwrappedTokenAccount)); - const [wrappedMint] = await findWrappedMintPda({ unwrappedMint, wrappedTokenProgram }); - const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ wrappedMint }); - const recipientWrappedTokenAccount = - inputRecipientTokenAccount ?? - ( - await findAssociatedTokenPda({ - owner: payer.address, - mint: wrappedMint, - tokenProgram: wrappedTokenProgram, - }) - )[0]; - const [unwrappedEscrow] = await findAssociatedTokenPda({ - owner: wrappedMintAuthority, - mint: unwrappedMint, - tokenProgram: unwrappedTokenProgram, - }); + const unwrappedMint = inputUnwrappedMint ?? (await getMintFromTokenAccount(rpc, unwrappedTokenAccount)); + const unwrappedTokenProgram = inputUnwrappedTokenProgram ?? (await getOwnerFromAccount(rpc, unwrappedTokenAccount)); + const [wrappedMint] = await findWrappedMintPda({ unwrappedMint, wrappedTokenProgram }); + const [wrappedMintAuthority] = await findWrappedMintAuthorityPda({ wrappedMint }); + const recipientWrappedTokenAccount = + inputRecipientTokenAccount ?? + ( + await findAssociatedTokenPda({ + owner: payer.address, + mint: wrappedMint, + tokenProgram: wrappedTokenProgram, + }) + )[0]; + const [unwrappedEscrow] = await findAssociatedTokenPda({ + owner: wrappedMintAuthority, + mint: unwrappedMint, + tokenProgram: unwrappedTokenProgram, + }); - const transferAuthority = inputTransferAuthority ?? payer; + const transferAuthority = inputTransferAuthority ?? payer; - return { - unwrappedEscrow, + return { + unwrappedEscrow, + transferAuthority, + unwrappedMint, + unwrappedTokenProgram, + wrappedMint, + wrappedMintAuthority, + recipientWrappedTokenAccount, + }; +} + +async function buildWrapIx({ + unwrappedTokenAccount, + wrappedTokenProgram, + amount, transferAuthority, unwrappedMint, + recipientWrappedTokenAccount, unwrappedTokenProgram, wrappedMint, wrappedMintAuthority, - recipientWrappedTokenAccount, - }; -} - -async function buildWrapIx({ - unwrappedTokenAccount, - wrappedTokenProgram, - amount, - transferAuthority, - unwrappedMint, - recipientWrappedTokenAccount, - unwrappedTokenProgram, - wrappedMint, - wrappedMintAuthority, - multiSigners = [], + multiSigners = [], }: IxBuilderArgs): Promise { - const [unwrappedEscrow] = await findAssociatedTokenPda({ - owner: wrappedMintAuthority, - mint: unwrappedMint, - tokenProgram: unwrappedTokenProgram, - }); + const [unwrappedEscrow] = await findAssociatedTokenPda({ + owner: wrappedMintAuthority, + mint: unwrappedMint, + tokenProgram: unwrappedTokenProgram, + }); - const wrapInstructionInput: WrapInput = { - recipientWrappedTokenAccount, - wrappedMint, - wrappedMintAuthority, - unwrappedTokenProgram, - wrappedTokenProgram, - unwrappedTokenAccount, - unwrappedMint, - unwrappedEscrow, - transferAuthority, - amount: BigInt(amount), - multiSigners, - }; + const wrapInstructionInput: WrapInput = { + recipientWrappedTokenAccount, + wrappedMint, + wrappedMintAuthority, + unwrappedTokenProgram, + wrappedTokenProgram, + unwrappedTokenAccount, + unwrappedMint, + unwrappedEscrow, + transferAuthority, + amount: BigInt(amount), + multiSigners, + }; - return getWrapInstruction(wrapInstructionInput); + return getWrapInstruction(wrapInstructionInput); } diff --git a/clients/js/tsconfig.json b/clients/js/tsconfig.json index 70131322..33e01a2c 100644 --- a/clients/js/tsconfig.json +++ b/clients/js/tsconfig.json @@ -1,16 +1,16 @@ { - "compilerOptions": { - "exactOptionalPropertyTypes": false, - "lib": ["ESNext", "DOM"], - "target": "ESNext", - "types": ["node"], - "module": "NodeNext", - "moduleResolution": "nodenext", - "incremental": false, - "declaration": true, - "declarationDir": "./dist/types", - "emitDeclarationOnly": true - }, - "extends": ["@tsconfig/strictest/tsconfig.json"], - "include": ["src"] + "compilerOptions": { + "exactOptionalPropertyTypes": false, + "lib": ["ESNext", "DOM"], + "target": "ESNext", + "types": ["node"], + "module": "NodeNext", + "moduleResolution": "nodenext", + "incremental": false, + "declaration": true, + "declarationDir": "./dist/types", + "emitDeclarationOnly": true + }, + "extends": ["@tsconfig/strictest/tsconfig.json"], + "include": ["src", "*.ts"] } diff --git a/clients/js/tsup.config.ts b/clients/js/tsup.config.ts index e58229a3..9eaa3b95 100644 --- a/clients/js/tsup.config.ts +++ b/clients/js/tsup.config.ts @@ -2,16 +2,17 @@ import { env } from 'node:process'; import { defineConfig, Options } from 'tsup'; const SHARED_OPTIONS: Options = { - define: { __VERSION__: `"${env.npm_package_version}"` }, - entry: ['./src/index.ts'], - outDir: './dist/src', - outExtension: ({ format }) => ({ js: format === 'cjs' ? '.js' : '.mjs' }), - sourcemap: true, - treeshake: true, + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions + define: { __VERSION__: `"${env['npm_package_version']}"` }, + entry: ['./src/index.ts'], + outDir: './dist/src', + outExtension: ({ format }) => ({ js: format === 'cjs' ? '.js' : '.mjs' }), + sourcemap: true, + treeshake: true, }; export default defineConfig(() => [ - // Source. - { ...SHARED_OPTIONS, format: 'cjs' }, - { ...SHARED_OPTIONS, format: 'esm' }, + // Source. + { ...SHARED_OPTIONS, format: 'cjs' }, + { ...SHARED_OPTIONS, format: 'esm' }, ]); diff --git a/codama.json b/codama.json index 90aa85bf..5aeea2cf 100644 --- a/codama.json +++ b/codama.json @@ -1,18 +1,16 @@ { - "idl": "program/idl.json", - "before": [], - "scripts": { - "js": { - "from": "@codama/renderers-js", - "args": [ - "clients/js/src/generated" - ] - }, - "rust": { - "from": "@codama/renderers-rust", - "args": [ - "clients/rust/src/generated" - ] + "idl": "program/idl.json", + "before": [], + "scripts": { + "js": { + "from": "@codama/renderers-js", + "args": [ + "clients/js/src/generated", + { + "packageFolder": "clients/js", + "syncPackageJson": true + } + ] + } } - } } diff --git a/package.json b/package.json index 8158fb9e..2c674c8a 100644 --- a/package.json +++ b/package.json @@ -1,40 +1,42 @@ { - "private": true, - "scripts": { - "programs:build": "cargo-build-sbf --manifest-path program/Cargo.toml && cargo-build-sbf --manifest-path program/tests/programs/test-transfer-hook/Cargo.toml && cargo-build-sbf --manifest-path program/tests/programs/mock-metadata-owner/Cargo.toml", - "programs:test": "zx ./scripts/rust/test-sbf.mjs program", - "programs:format": "zx ./scripts/rust/format.mjs program", - "programs:lint": "zx ./scripts/rust/lint.mjs program", - "clients:js:build": "zx ./scripts/js/build.mjs clients/js", - "clients:js:format": "zx ./scripts/js/format.mjs clients/js", - "clients:js:format:check": "zx ./scripts/js/format.mjs clients/js --check", - "clients:js:lint": "zx ./scripts/js/lint.mjs clients/js", - "generate": "tsx program/idl.ts && codama run js", - "solana:check": "zx ./scripts/check-solana-version.mjs", - "solana:link": "zx ./scripts/link-solana-version.mjs", - "template:upgrade": "zx ./scripts/upgrade-template.mjs", - "rust:spellcheck": "cargo spellcheck --code 1", - "rust:audit": "zx ./scripts/rust/audit.mjs", - "rust:publish": "zx ./scripts/rust/publish.mjs", - "rust:semver": "cargo semver-checks", - "clients:cli:test": "zx ./scripts/rust/test.mjs clients/cli", - "clients:cli:format": "zx ./scripts/rust/format.mjs clients/cli", - "clients:cli:lint": "zx ./scripts/rust/lint.mjs clients/cli" - }, - "devDependencies": { - "@changesets/cli": "^2.29.8", - "@codama/renderers-js": "^1.5.5", - "@iarna/toml": "^2.2.5", - "@solana-program/system": "^0.10.0", - "@solana/sysvars": "^5.0.0", - "@types/node": "^25.0.3", - "codama": "^1.4.4", - "tsx": "^4.21.0", - "typescript": "^5.9.3", - "zx": "^8.8.5" - }, - "engines": { - "node": ">=v20.0.0" - }, - "packageManager": "pnpm@10.15.0" + "private": true, + "scripts": { + "programs:build": "cargo-build-sbf --manifest-path program/Cargo.toml && cargo-build-sbf --manifest-path program/tests/programs/test-transfer-hook/Cargo.toml && cargo-build-sbf --manifest-path program/tests/programs/mock-metadata-owner/Cargo.toml", + "programs:test": "zx ./scripts/rust/test-sbf.mjs program", + "programs:format": "zx ./scripts/rust/format.mjs program", + "programs:lint": "zx ./scripts/rust/lint.mjs program", + "clients:js:build": "zx ./scripts/js/build.mjs clients/js", + "clients:js:format": "zx ./scripts/js/format.mjs clients/js", + "clients:js:format:check": "zx ./scripts/js/format.mjs clients/js --check", + "clients:js:lint": "zx ./scripts/js/lint.mjs clients/js", + "generate": "tsx program/idl.ts && codama run --all", + "solana:check": "zx ./scripts/check-solana-version.mjs", + "solana:link": "zx ./scripts/link-solana-version.mjs", + "template:upgrade": "zx ./scripts/upgrade-template.mjs", + "rust:spellcheck": "cargo spellcheck --code 1", + "rust:audit": "zx ./scripts/rust/audit.mjs", + "rust:publish": "zx ./scripts/rust/publish.mjs", + "rust:semver": "cargo semver-checks", + "clients:cli:test": "zx ./scripts/rust/test.mjs clients/cli", + "clients:cli:format": "zx ./scripts/rust/format.mjs clients/cli", + "clients:cli:lint": "zx ./scripts/rust/lint.mjs clients/cli" + }, + "devDependencies": { + "@changesets/cli": "^2.29.8", + "@codama/renderers-js": "^1.7.0", + "@iarna/toml": "^2.2.5", + "@solana-program/system": "^0.11.0", + "@solana/sysvars": "^6.0.0", + "@solana/prettier-config-solana": "0.0.6", + "@types/node": "^25.0.3", + "codama": "^1.5.0", + "tsx": "^4.21.0", + "typescript": "^5.9.3", + "zx": "^8.8.5" + }, + "engines": { + "node": ">=v20.0.0" + }, + "packageManager": "pnpm@10.15.1", + "prettier": "@solana/prettier-config-solana" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 667ce2b3..44607dc9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,23 +12,26 @@ importers: specifier: ^2.29.8 version: 2.29.8(@types/node@25.0.3) '@codama/renderers-js': - specifier: ^1.5.5 - version: 1.5.5(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + specifier: ^1.7.0 + version: 1.7.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) '@iarna/toml': specifier: ^2.2.5 version: 2.2.5 '@solana-program/system': - specifier: ^0.10.0 - version: 0.10.0(@solana/kit@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) + specifier: ^0.11.0 + version: 0.11.0(@solana/kit@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)) + '@solana/prettier-config-solana': + specifier: 0.0.6 + version: 0.0.6(prettier@3.8.1) '@solana/sysvars': - specifier: ^5.0.0 - version: 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + specifier: ^6.0.0 + version: 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) '@types/node': specifier: ^25.0.3 version: 25.0.3 codama: - specifier: ^1.4.4 - version: 1.4.4 + specifier: ^1.5.0 + version: 1.5.0 tsx: specifier: ^4.21.0 version: 4.21.0 @@ -42,27 +45,21 @@ importers: clients/js: dependencies: '@solana-program/system': - specifier: ^0.10.0 - version: 0.10.0(@solana/kit@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) + specifier: ^0.11.0 + version: 0.11.0(@solana/kit@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)) '@solana-program/token': - specifier: ^0.9.0 - version: 0.9.0(@solana/kit@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))) + specifier: ^0.10.0 + version: 0.10.0(@solana/kit@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)) '@solana-program/token-2022': - specifier: ^0.6.1 - version: 0.6.1(@solana/kit@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)) - '@solana/accounts': - specifier: ^5.1.0 - version: 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-types': - specifier: ^5.1.0 - version: 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + specifier: ^0.9.0 + version: 0.9.0(@solana/kit@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10))(@solana/sysvars@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)) devDependencies: '@eslint/js': specifier: ^9.39.2 version: 9.39.2 '@solana/kit': - specifier: ^5.1.0 - version: 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + specifier: ^6.0.0 + version: 6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) '@tsconfig/strictest': specifier: ^2.0.8 version: 2.0.8 @@ -76,8 +73,8 @@ importers: specifier: ^10.1.8 version: 10.1.8(eslint@9.39.2) prettier: - specifier: ^3.7.4 - version: 3.7.4 + specifier: ^3.8.1 + version: 3.8.1 tsup: specifier: ^8.5.1 version: 8.5.1(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.2) @@ -155,35 +152,48 @@ packages: '@changesets/write@0.4.0': resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} - '@codama/cli@1.4.3': - resolution: {integrity: sha512-I6EdKY0e/6OFQpPgwa+qnts/dpWESIXRg0Zmwd6LR7WIL+6tOV1MYMbhrkYCGxxp1N0zkEiMShc9U6m7wj8oew==} + '@codama/cli@1.4.4': + resolution: {integrity: sha512-0uLecW/RZC2c1wx3j/eiRAYvilvNY+2DoyEYu/hV0OfM1/uIgIyuy5U+wolV+LY4wLFYdApjYdy+5D32lngCHg==} hasBin: true '@codama/errors@1.4.4': resolution: {integrity: sha512-XC86H5X+zGTi0cSRKLc+wFkeXNsvnh+ttOgVnVHIljmXOJWbUt9wXhKding3UftipLWwlHPuoswERJ0vS0mO2A==} hasBin: true + '@codama/errors@1.5.0': + resolution: {integrity: sha512-i4cS+S7JaZXhofQHFY3cwzt8rqxUVPNaeJND5VOyKUbtcOi933YXJXk52gDG4mc+CpGqHJijsJjfSpr1lJGxzg==} + hasBin: true + '@codama/node-types@1.4.4': resolution: {integrity: sha512-uUeIz34Id/TTAMi4k5OVl9FByM/PawnlNIIVqgpooH9AS0UlniICZ+KJ/mdHZidJs/AGo6bSRoOPS1BLtMajyw==} + '@codama/node-types@1.5.0': + resolution: {integrity: sha512-Ebz2vOUukmNaFXWdkni1ZihXkAIUnPYtqIMXYxKXOxjMP+TGz2q0lGtRo7sqw1pc2ksFBIkfBp5pZsl5p6gwXA==} + '@codama/nodes@1.4.4': resolution: {integrity: sha512-JzlY5qLk3rhsnu0nerC/Vkc9/2HjdsLtEpBtST0dxC1j9kpfHvIc2uyIj+5hlB1YIBRJIDNo+UOHGla8hidkaA==} + '@codama/nodes@1.5.0': + resolution: {integrity: sha512-yg+xmorWiMNjS3n19CGIt/FZ/ZCuDIu+HEY45bq6gHu1MN3RtJZY+Q3v0ErnBPA60D8mNWkvkKoeSZXfzcAvfw==} + '@codama/renderers-core@1.3.4': resolution: {integrity: sha512-+qEPsvpCjUElohgJTcVNsjy6u1LjoCcwo72NbcffLF9QU5mUjNwL8EhFouEq2K60H/QKmNaiVKLQfJcQ/xCT9A==} - '@codama/renderers-js@1.5.5': - resolution: {integrity: sha512-zYVw8KGRHFzrpPKAv8PJI1pMy28qc/iEMspMC6Iw915Vsg0od75FUmUhDAvrTwgc28oyCmlrsWv6BNON4AKmqQ==} + '@codama/renderers-js@1.7.0': + resolution: {integrity: sha512-WwKkSkNPdUBVWjGmkG+RNXyZ5K/4ji8UZQGzowDNTrqktUrqPsBThOkc7Zpmv+TpCapxrfjj0Txpo+0q5FjKGw==} engines: {node: '>=20.18.0'} - '@codama/validators@1.4.4': - resolution: {integrity: sha512-IbSOrfoR4R5oKs3euydfujCbJoOAr/ngjsvJ4VQM2Q/bTOcfdlsG3NvJF0ny/yq1Jvmi8Su9cl1pzDCumJpHAA==} + '@codama/validators@1.5.0': + resolution: {integrity: sha512-p3ufDxnCH1jiuHGzcBv4/d+ctzUcKD2K3gX/W8169tC41o9DggjlEpNy1Z6YAAhVb3wHnmXVGA2qmp32rWSfWw==} '@codama/visitors-core@1.4.4': resolution: {integrity: sha512-vk/4tczViAUHa7c8PF7FxN+JWbuTcDB0pIdrDbbO6eBPKDPQGZCUCEp6rXIYBVxfO129jWrNf2+CuyYre/c/vA==} - '@codama/visitors@1.4.4': - resolution: {integrity: sha512-3w2aRNvGV6/rXTfRDynXR82zoAqX0P4tlfQ/zT4I4Bby4xTobKgDZLyAstodmA0D878eKW7sMg4Gb1m1R5dOig==} + '@codama/visitors-core@1.5.0': + resolution: {integrity: sha512-3PIAlBX0a06hIxzyPtQMfQcqWGFBgfbwysSwcXBbvHUYbemwhD6xwlBKJuqTwm9DyFj3faStp5fpvcp03Rjxtw==} + + '@codama/visitors@1.5.0': + resolution: {integrity: sha512-SwtQaleXxAaFz6uHygxki621q4nPUDQlnwEhsg+QKOjHpKWXjLYdJof+R8gUiTV/n7/IeNnjvxJTTNfUsvETPQ==} '@esbuild/aix-ppc64@0.27.0': resolution: {integrity: sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==} @@ -566,350 +576,381 @@ packages: '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} - '@solana-program/system@0.10.0': - resolution: {integrity: sha512-Go+LOEZmqmNlfr+Gjy5ZWAdY5HbYzk2RBewD9QinEU/bBSzpFfzqDRT55JjFRBGJUvMgf3C2vfXEGT4i8DSI4g==} + '@solana-program/system@0.11.0': + resolution: {integrity: sha512-SJeQVTkqGZzIXd7XHlCxnfpKpvPZghB1IFwddPPG04ydVXtDLRWp9wLoTR5Prkl9FIWRe/c5VgT4nxyzW1cAuQ==} peerDependencies: - '@solana/kit': ^5.0 + '@solana/kit': ^6.0.0 - '@solana-program/token-2022@0.6.1': - resolution: {integrity: sha512-Ex02cruDMGfBMvZZCrggVR45vdQQSI/unHVpt/7HPt/IwFYB4eTlXtO8otYZyqV/ce5GqZ8S6uwyRf0zy6fdbA==} + '@solana-program/token-2022@0.9.0': + resolution: {integrity: sha512-j8fPBc/oUApYF7aW0ub6cIV7dbbtXC+Y6oDcI9SUs6BXXSq+lj7p7XRU+GEH8qWfyQ5ziRiOLI9s2AZjJY1Icg==} peerDependencies: - '@solana/kit': ^5.0 + '@solana/kit': ^6.0.0 '@solana/sysvars': ^5.0 - '@solana-program/token@0.9.0': - resolution: {integrity: sha512-vnZxndd4ED4Fc56sw93cWZ2djEeeOFxtaPS8SPf5+a+JZjKA/EnKqzbE1y04FuMhIVrLERQ8uR8H2h72eZzlsA==} - peerDependencies: - '@solana/kit': ^5.0 - - '@solana/accounts@5.0.0': - resolution: {integrity: sha512-0JzBdEobgp8NBdhhu+GgwNDh7e8KkHDsSTVZAnNQgvT3taOz0Mwv5E48MuEeDhW6DLFwWVAx/FO3pvibG/NGwA==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/accounts@5.1.0': - resolution: {integrity: sha512-Q1KzykCrl/YjLUH2RXF8vPq65U/ehAV2SHZicPbZ0jvgQUU6X1+Eca+0ilxA9xH8srYn3YTVDyEs/LYdfbY/2A==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/addresses@5.0.0': - resolution: {integrity: sha512-bVk+khc1ZZQHMri25csosM/ikuyPcB/CZidDM/ZMBX0CoJErpHJnmcID5mYOmv4/UHbqo2OANuEaGcFO0Q37sw==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/addresses@5.1.0': - resolution: {integrity: sha512-X84qSZLgve9YeYsyxGI49WnfEre53tdFu4x9/4oULBgoj8d0A+P9VGLYzmRJ0YFYKRcZG7U4u3MQpI5uLZ1AsQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/assertions@5.0.0': - resolution: {integrity: sha512-2kIykk90kYciQW6bp+KaE6jRd1Y2CgHPeJxxlc5chQnjhoG6eiD8VXvocs6AvqPTht0p/SoEj9jH5tT4oG/bcg==} - engines: {node: '>=20.18.0'} + '@solana-program/token@0.10.0': + resolution: {integrity: sha512-6JhgF4tywgbzIBnbEFiSLpXe9ZimPzNheRQU7ksgD98Y4YCakcRI5VIAt2CUh/lTiLUOxGerW/oaK1QGF00FMw==} peerDependencies: - typescript: '>=5.3.3' + '@solana/kit': ^6.0.0 - '@solana/assertions@5.1.0': - resolution: {integrity: sha512-5But2wyxuvGXMIOnD0jBMQ9yq1QQF2LSK3IbIRSkAkXbD3DS6O2tRvKUHNhogd+BpkPyCGOQHBycezgnxmStlg==} + '@solana/accounts@6.0.1': + resolution: {integrity: sha512-wdW2KI31jeAIyryL2hLytu+bmIbfKBPkO2Qsu7DO80m2pqOVVOGQ0L0wIqFdNXZN7Eu/FVTY8sh6gqF9bnf5LQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' - - '@solana/codecs-core@5.0.0': - resolution: {integrity: sha512-rCG2d8OaamVF2/J//YyCgDqNJpUytVVltw9C8mJtEz5c6Se/LR6BFuG8g4xeJswq/ab4RFk5/HFdgbvNjKgQjA==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/codecs-core@5.1.0': - resolution: {integrity: sha512-vDwi03mxWeWCS5Il6BCdNdifYdOoHVz97YOmbWGIt45b77Ivu5NUYeSD2+ccl6fSw8eYQ6QaqqKXMjbSfsXv4g==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/codecs-data-structures@5.0.0': - resolution: {integrity: sha512-y503Pqmv0LHcfcf0vQJGaxDvydQJbyCo8nK3nxn56EhFj5lBQ1NWb3WvTd83epigwuZurW2MhJARrpikfhQglQ==} + '@solana/addresses@6.0.1': + resolution: {integrity: sha512-i/7JuTZF1MInCulP8/+aK9khKcDgjTrqqEl3wRmg6Kk/Dq+rOBrjXggLf3bEtGSWV53iH0NGDQt+psUNFd5Reg==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/codecs-data-structures@5.1.0': - resolution: {integrity: sha512-ftAwL/jsurFrk9kFVhkTLdQ8fGZ8I0PcbVH+V1a0dIP2aKDofGePvK0XbwZE/ohizC9gEIZxyBX5IgRKk5PXyg==} + '@solana/assertions@6.0.1': + resolution: {integrity: sha512-Fnk0PCxjeNLDrsRQX+DRS3HnN5PRYQedosmtqx0/xK2CIB4lG/4coK/IdoL6i8/yS4EcKq8gNcMfH4fkmaMfLQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/codecs-numbers@5.0.0': - resolution: {integrity: sha512-a2+skRLuUK02f/XFe4L0e1+wHCyfK25PkyseFps1v1l4pvevukFwth/EhSyrs6w5CsTJRVoR7MuE3E00PM4egw==} + '@solana/codecs-core@6.0.1': + resolution: {integrity: sha512-OnUQk94qfvfE0nVveZ638aNUL3tyRJoorUFiAG0ICTGUo3c6fkYb8vH23o/5O2qmuSmYND1sn+UCaldNMVkFpg==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/codecs-numbers@5.1.0': - resolution: {integrity: sha512-Ea5/9yjDNOrDZcI40UGzzi6Aq1JNsmzM4m5pOk6Xb3JRZ0YdKOv/MwuCqb6jRgzZ7SQjHhkfGL43kHLJA++bOw==} + '@solana/codecs-data-structures@6.0.1': + resolution: {integrity: sha512-ImPGi5wtpca0gLaD9dJGj29z6GMU8tCYjqnmTc5Lyh5S80iCz9wNlwT1/VvPM6gqeIOFVx8bM9H1iljQ7MuCMw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/codecs-strings@5.0.0': - resolution: {integrity: sha512-ALkRwpV8bGR6qjAYw0YXZwp2YI4wzvKOJGmx04Ut8gMdbaUx7qOcJkhEQKI6ZVC3lAWSIS1N1wGccUZDwvfKxw==} + '@solana/codecs-numbers@6.0.1': + resolution: {integrity: sha512-ZrI1NjUsf4I+Klue/2rlQbZLcGRom/G2E4VB/8x4IEHGOeFLQhXcxmnib8kdgomQRYOzF1BjVDmCYxvZr+6AWA==} engines: {node: '>=20.18.0'} peerDependencies: - fastestsmallesttextencoderdecoder: ^1.0.22 - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/codecs-strings@5.1.0': - resolution: {integrity: sha512-014xwl5T/3VnGW0gceizF47DUs5EURRtgGmbWIR5+Z32yxgQ6hT9Zl0atZbL268RHbUQ03/J8Ush1StQgy7sfQ==} + '@solana/codecs-strings@6.0.1': + resolution: {integrity: sha512-OmMIfMFbbJVIxveBeATKCj9DsmZ8l4vJPnOLHUop0hLWRiYHTQ1qokMqfk/X8PCmUjXmbXnlp63BikGtdKN3/g==} engines: {node: '>=20.18.0'} peerDependencies: fastestsmallesttextencoderdecoder: ^1.0.22 - typescript: '>=5.3.3' + typescript: ^5.0.0 peerDependenciesMeta: fastestsmallesttextencoderdecoder: optional: true + typescript: + optional: true - '@solana/codecs@5.0.0': - resolution: {integrity: sha512-KOw0gFUSBxIMDWLJ3AkVFkEci91dw0Rpx3C6y83Our7fSW+SEP8vRZklCElieYR85LHVB1QIEhoeHR7rc+Ifkw==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/codecs@5.1.0': - resolution: {integrity: sha512-krSuf/E2Sa/4oASZ/jb/5KGUG58m1/bQdLrKvBnoAFhYj7zZf+8V4UqHGTV5n2NCQfmMyORsg9n2saKjkUzo8w==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/errors@5.0.0': - resolution: {integrity: sha512-gTuhzO6E+ydfAAzqmqdPcvFyJwAzFKKIrqtnZPpgAuomcPYu+HSo0tuwSM/cTX0djmHt+GoOsf/julph+nvs2w==} + '@solana/codecs@6.0.1': + resolution: {integrity: sha512-xNL69WA50fCMItk3zXA7UMDHVMDyW9paL32wwxzL++sv7txfgma3UIAxP90tn9GBMwjPTB74hI6ook1mA2DhTQ==} engines: {node: '>=20.18.0'} - hasBin: true peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/errors@5.1.0': - resolution: {integrity: sha512-JlTyekErWa6Fdcwu1Hrh+jZxjM4YxyorGCFDRVZlmHZFkp5N00DWKcYnSGZrTF8E6ZZEP9pfS2XwM8y7p7HPww==} + '@solana/errors@6.0.1': + resolution: {integrity: sha512-sMe5GCsXto8F1KDeq9GbZR0+m841SqEYep3NAcYlC0lqF2RG4giaaPQHgrWI5DJR/L7yc8FzUIQfTxnaN7bwOQ==} engines: {node: '>=20.18.0'} hasBin: true peerDependencies: - typescript: '>=5.3.3' - - '@solana/fast-stable-stringify@5.1.0': - resolution: {integrity: sha512-ACZo7cH/5EXsBmruw/0gU2/PXL2l4aET0YpL93H6QEaZwEAICFD8cLkj20nBcfLTf4srEiuKtwuSDeONTWIulw==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/functional@5.1.0': - resolution: {integrity: sha512-R6jacWU0Gr+j49lTDp+FSECBolqw2Gq7JlC22rI0JkcxJiiAlp3G80v6zAYq0FkHzxZbjyR6//JYUXSwliem5g==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/instruction-plans@5.1.0': - resolution: {integrity: sha512-friMgHt0z5jQlCyyTDXfwAMYjCAagI7QYR+hLWB/BmvSuRpai0ddToWbWJoqrNRM312xZ+Oy/qjC3+Ftzi0DLA==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - - '@solana/instructions@5.1.0': - resolution: {integrity: sha512-fkwpUwwqk5K14T/kZDnCrfeR0kww49HBx+BK8xdSeJx+bt4QTwAHa9YeOkGhGrHEFVEJEUf8FKoxxTzZzJZtKQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/keys@5.1.0': - resolution: {integrity: sha512-ma4zTTuSOmtTCvATHMfUGNTw0Vqah/6XPe1VmLc66ohwXMI3yqatX1FQPXgDZozr15SvLAesfs7/bgl2TRoe9w==} + '@solana/fast-stable-stringify@6.0.1': + resolution: {integrity: sha512-60F0TaKm+mbIfsj94TaPgO2mbKtXVYyELC1Kf8YoRo9jIQSXVGXdljXR1UzqSxrN6V4Ueyx3RE5jW9fAIzQZ/A==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/kit@5.1.0': - resolution: {integrity: sha512-oNQRzI0+mGWmXy05psO0J7r9Boy8PF7LH5H0Y9Jxvs10AbG4oSOBtyj20EccsRrr+jkqLw42fqb/4rNuASfvsA==} + '@solana/functional@6.0.1': + resolution: {integrity: sha512-qHPw87tCf4Kq4H9cpH6XV/C1wKJzSj0OQ8t+BqbFxvpX+c7svSRUY/It2gJOAcJd9f9hduQ3ZrqARXOU7aILvw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/nominal-types@5.0.0': - resolution: {integrity: sha512-Qn7xH4UG2rDAv+wAyheP4jWvX3oQmbZ/woxFZwug7PaRLvyjUswGr38Hil+SjiQyFDo+un1UqWM9N9yusUeeZQ==} + '@solana/instruction-plans@6.0.1': + resolution: {integrity: sha512-aEwCfksUxVgcrOGnDJmmIp4phYn+DpOeS0fq7v3uteBu7T7lkwW+EJCu2iT1j1VLxcjDuPf243pNBp5GR13+yw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/nominal-types@5.1.0': - resolution: {integrity: sha512-+4Cm+SpK+D811i9giqv4Up93ZlmUcZfLDHkSH24F4in61+Y2TKA+XKuRtKhNytQMmqCfbvJZ9MHFaIeZw5g+Bg==} + '@solana/instructions@6.0.1': + resolution: {integrity: sha512-qNTc3GrmiesN2x27Ap8qhKKn9vIocz/1Dc/Am7hiYU4TFiKtuj34TARyDa5VVbLGKRY5vZCpNsX2jqVx2V0lSQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/offchain-messages@5.1.0': - resolution: {integrity: sha512-6FUXjiIJprjWa7y/T4E3rUb3HKi3P5zpBweBEwDflEEJ/QlieWUw7xlGAOvZ1eF3Wi+6LfcrdtZOwIkuv6o9Sg==} + '@solana/keys@6.0.1': + resolution: {integrity: sha512-naN3yRzN2VDJUgdcrxwsObr2ik8MV2brOI/MLrOWDUW8nlVfcs4OC7mB/HC1hYd60DT0rsP18P33Gjd8juknYw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/options@5.0.0': - resolution: {integrity: sha512-ezHVBFb9FXVSn8LUVRD2tLb6fejU0x8KtGEYyCYh0J0pQuXSITV0IQCjcEopvu/ZxWdXOJyzjvmymnhz90on5A==} + '@solana/kit@6.0.1': + resolution: {integrity: sha512-zCU5URMgkCgL5hZOxjIzhAD7SjqVAJN4sbpyC4MatxbXE/NGoabPc4I2y5STrXsZLokQD0t4KZ1zs9v5M8Ylag==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/options@5.1.0': - resolution: {integrity: sha512-PqgfALd0yhK+QFaYIbRFTV6hBpiy5xwdu07zSw1RLoNvt1sg+MRsRFDk9R8ZdEdiM69PY/cKiClVSjpNzLLcJg==} + '@solana/nominal-types@6.0.1': + resolution: {integrity: sha512-2/1loP3iHgLQIaeksrDPNL2be2zboKbsF2EKDAt7zqbiDCOsPY9Kgdq50WJGGileIXD0v7yincq6UTdOLcaR8Q==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/programs@5.1.0': - resolution: {integrity: sha512-zAghXyRGixWNcarShlrnpjMD2115BZTF9JMLIcgkCYDOwjDPFIB/Y0hwDCH87N5uSjzlgkDpxKEL4ILewoZTRQ==} + '@solana/offchain-messages@6.0.1': + resolution: {integrity: sha512-lwpNl+kusH2v5nLgUfwxme66uDonCn8+TqzYqJeENolaAbV0nnF8rV4ZHjfFs1Bc/3UG+TxrI0WYvRI+B5nVBA==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/promises@5.1.0': - resolution: {integrity: sha512-LU9wwS1PvGc/It610dclfq+JCuUEZSIWjvaF0+sqMP7QCk12Uz7MK2m9TtvLcjTvvKTIrucglRZP6qKroWRqGg==} + '@solana/options@6.0.1': + resolution: {integrity: sha512-ld13WWyMgicU8FkN6dNOmMJgVaV0uqU8HDQRJCfClsPl0v2TQ1t3aOYHkxpYfX+OvBjja1x2v2wflqJgUHKS+Q==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-api@5.1.0': - resolution: {integrity: sha512-eI1tY0i3gmih1C65gFECYbfPRpHEYqFp+9IKjpknZtYpQIe9BqBKSpfYpGiCAbKdN/TMadBNPOzdK15ewhkkvQ==} + '@solana/plugin-core@6.0.1': + resolution: {integrity: sha512-mrVb6cf/HurU93z2bgCOoRxWuZWF/fWzIK+v7YMl9t8aKHhGdB4/iElXvPwGoArapZJaAe7dRqHgCJvYRPFvCg==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-parsed-types@5.1.0': - resolution: {integrity: sha512-ZJoXHNItALMNa1zmGrNnIh96RBlc9GpIqoaZkdE14mAQ7gWe7Oc0ejYavUeSCmcL0wZcvIFh50AsfVxrHr4+2Q==} - engines: {node: '>=20.18.0'} + '@solana/prettier-config-solana@0.0.6': + resolution: {integrity: sha512-/s55hDoAyh5QyltQh/jjNK3AgACEq885+DnC6lYhrmYZiV6I0iHITWYnKd8d23KRKs/RBjlaQH54MiafeoI9hw==} peerDependencies: - typescript: '>=5.3.3' + prettier: ^3.7.4 - '@solana/rpc-spec-types@5.0.0': - resolution: {integrity: sha512-B0P/ylXVaCG5oSIV+kB88s2qoW996D8iKhc7RyF0C/AyYvklF6kCwv0N9ZVrWp0ibjlQ8St290WbBHJyo7QZkA==} + '@solana/programs@6.0.1': + resolution: {integrity: sha512-eKsSVuADG/bzTu66iwhJctbIEQQLZVnD/kx98gtPAuNG6Z1WjMXO8tn6EYLn3ndc5yS+oeNSQBV6z3ozL+gTkQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-spec-types@5.1.0': - resolution: {integrity: sha512-B8/WyjmHpC34vXtAmTpZyPwRCm7WwoSkmjBcBouaaY1uilJ9+Wp2nptbq2cJyWairOoMSoI7v5kvvnrJuquq4Q==} + '@solana/promises@6.0.1': + resolution: {integrity: sha512-6W8yFBtjhwy8Gn7aagXBUjiQejpa+ENgqot2uy3LACQPQMCnd+TwZk9Pggnm5+Q12rm+d9bMvAa4110eoXR0Bw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-spec@5.0.0': - resolution: {integrity: sha512-1LD2SYEQ5bYhiBumznAPzymtxSX4nYLZd6u+FA0bAxNBVzHDvUUQzVSXHAoWROhlGrCyvtALTs9u0DIDlgZHCA==} + '@solana/rpc-api@6.0.1': + resolution: {integrity: sha512-lCXPGHx2eF8wl0kdpuDLWX44vdDaTcPTAD9hCIsHQFLWeahJDarieoOacaAuse6TsRtGaPExBvbW6Da555Lnaw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-spec@5.1.0': - resolution: {integrity: sha512-y8B6fUWA1EBKXUsNo6b9EiFcQPsaJREPLlcIDbo4b6TucQNwvl7FHfpf1VHJL64SkI/WE69i2WEkiOJYjmLO0A==} + '@solana/rpc-parsed-types@6.0.1': + resolution: {integrity: sha512-2CnWhtJuiOgefU3EerwM1bg/OvmLJTMBUuGiSVoVAr7WfGjUXcoRa3mNO0HUDDoRo2gZwM/8BaFzhiRSbamsmQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-subscriptions-api@5.1.0': - resolution: {integrity: sha512-84e2AsgqAGiVloW3G4RzpHPkInknu3rEuFPut2/69eq3Ab97TiTz2s5kc9gJpprtGM+xbgnIfeuGqr5F+2bXQA==} + '@solana/rpc-spec-types@6.0.1': + resolution: {integrity: sha512-dosqI9gWs5Cz5T9Uanu4FkMkBN7AD6bRVw0YDIkalRcpC50Ak2iP48fJKArw3lh/phjcxEBVQxY3XeKEVGZP7Q==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-subscriptions-channel-websocket@5.1.0': - resolution: {integrity: sha512-FzAEmHzXtlckNn7T/1dzDS7r5HmekYPstrtZKjDcVxuGMVBUkZTnb69t7EJvKNuKw1wYZEUd0EEegtC2K/9dZA==} + '@solana/rpc-spec@6.0.1': + resolution: {integrity: sha512-SfZZUCbpiKNHsIAYq9WKd6PhnpXkH8ASRIda9KMkpFtTVg1thm4sA/A/Jpk8vJDpUVvzYLBVblNHQWqwRiRxAA==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' - ws: ^8.18.0 + typescript: ^5.0.0 peerDependenciesMeta: - ws: + typescript: optional: true - '@solana/rpc-subscriptions-spec@5.1.0': - resolution: {integrity: sha512-ORfjKtainnYisql6z4YsXByVwY8/rWsedVWn5oe/V7Og9LyetTM7hwJ8FbUdRDZwyLlUrI0cEE1aG+3ma/8tPw==} + '@solana/rpc-subscriptions-api@6.0.1': + resolution: {integrity: sha512-yj6niyZ6jqwg4u4oi55gDPzDNwXdgGBuu1zVfUnD6auCavDl4OxziUEtRIQ3NURJZa5kjTqQ48TuR0tD55vfiA==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-subscriptions@5.1.0': - resolution: {integrity: sha512-u/mafVzBbdqvYDD7x/98T5/5xk4Bl2C/90TaHiKx7FmutVC/H4QsritPTY0v9JG1dOVWbgIfUgfZ0C0DPkiYnA==} + '@solana/rpc-subscriptions-channel-websocket@6.0.1': + resolution: {integrity: sha512-lxjfG+krZF8np69SQyRbmQL8jYNV/G69Ak782GYYfkEdAYztFs9OOQMgZNuciIgUlQAcXWWkNjJ6GhIbisg9NA==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-transformers@5.1.0': - resolution: {integrity: sha512-6v93xi/ewGS/xEiSktNQ0bh0Uiv1/q9nR5oiFMn3BiAJRC+FdMRMxCjp6H+/Tua7wdhpClaPKrZYBQHoIp59tw==} + '@solana/rpc-subscriptions-spec@6.0.1': + resolution: {integrity: sha512-FhZOXpP71R5y7q0TEvAFNJ+WmxIJUfhQicgae71WQtaiw+vM/dFnT/AL3I9rRBVzF0UQ7wIeqkuVKltdJEdzqQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-transport-http@5.1.0': - resolution: {integrity: sha512-XoGX+2n/iXzoGb3Xrltbx8avnzp15vCfCGXuZpQWFL+xUg3P4CGl217XyDGjS5VxuUml+f/30xzWl18RaAIEcw==} + '@solana/rpc-subscriptions@6.0.1': + resolution: {integrity: sha512-h2LXD8PiXPZca3vtECmUSEzLjc5m6EswgnJcq+HtJqA0M+xINFRl8mL6yS5D2d1Cf7sl/CwU/7935GJ8uLFeJA==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-types@5.0.0': - resolution: {integrity: sha512-JMbhwnV6nX4ezJv/KmaElOR0r/MZTKzKpaz6cv7FopLNuPrYCBrRCZKuM2XQh6gUbt9Mey08/KBOmOGmzTbL/g==} + '@solana/rpc-transformers@6.0.1': + resolution: {integrity: sha512-tkyTh5jwK/IZV+jI4plFttG1l43g47YB/laFtxYvu8OZx5RTCljryPh5RamjxGAhFk3w6xnLZJbc3MBk8VrPsQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc-types@5.1.0': - resolution: {integrity: sha512-Rnpt5BuHQvnULPNXUC/yRqB+7iPbon95CSCeyRvPj5tJ4fx2JibvX3s/UEoud5vC+kRjPi/R0BGJ8XFvd3eDWg==} + '@solana/rpc-transport-http@6.0.1': + resolution: {integrity: sha512-l9TOpQq4cSIhReyzLJb7j+03YaUDClDJOzJr7ZQSo1fqt7Ww6C5+dKOVIUUu6tg9AOO8mCA0QVT/rFmZ9ZjhiQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/rpc@5.1.0': - resolution: {integrity: sha512-j+ByLxFCoHWw9TnsGzkAVMFUfBDIUE53nIosJAYEsERpImD2mjwc33uDE6YXLKoaKRoYO4tc7IUzkKY1fQp/CA==} + '@solana/rpc-types@6.0.1': + resolution: {integrity: sha512-40nXhThKNzh0ih2Pd8ACsIKPgVaP/6OqbLfgcZxPjZ10XjhjMy9crwW1ZF0EPhK8uo+bs9gtztl9OVWWgYYrNQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/signers@5.1.0': - resolution: {integrity: sha512-B8xO0SGN1ZWYfJROL+da3id279qNbXbXoqud+AuT5gur51RrS4YhNkTQ6khVbGtAOpPMAhkoZN0jnfCC1r33jQ==} + '@solana/rpc@6.0.1': + resolution: {integrity: sha512-fuRnm1SNcRLWii6N3WeJL8LSJJDEVEdS+ZDXclUWAPXUccl6wGb99/1tHWeOOwczgk9nmWoTYY9XeOLJt88HSg==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/subscribable@5.1.0': - resolution: {integrity: sha512-OeW5AJwKzHh18+PIPtghuuPJTmEep2Mhb3Lsrq4alas4fibmMGkr39z1HXxVF6l6e2lu/YGhHIDtuhouWmY7ow==} + '@solana/signers@6.0.1': + resolution: {integrity: sha512-iby4CGjk4pBNqytpyyPK2IGZ8/BMcrdtubVCuSYze2DJE3RdrPkuhVv2A6A6Cfk/0DPfUkqZQtTNMxCOj6oCbw==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/sysvars@5.0.0': - resolution: {integrity: sha512-F/GEb2rS8mrgDd79lDPyu8za9jGE6cRlS4jHNeKCkvOCJxdKQbX34JIzx4kwzjtvk7O8/yrDHfGdpA8nBg/l4w==} + '@solana/subscribable@6.0.1': + resolution: {integrity: sha512-GGXvRVzOAJlbGwwgOHbcxwT8lILkgrlHYO72ChkG8IbJWq7eTi1+Uz3TQTsXtC923dZ2XHLqp+aHl7Kx3L3ENg==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/sysvars@5.1.0': - resolution: {integrity: sha512-FJ9YIsLTAaajnOrYEYn54znstXJsvKndRhyCrlyiAEN1IXHw5HtZHploLF3ZZ78b7YU3uv3tFJMziXFBwPOn4Q==} + '@solana/sysvars@6.0.1': + resolution: {integrity: sha512-fSMasRQUfbzrhZ3t0XdVpwIezHRelPx3ZxkqyUy8Lx/90YzR1kxaJpmNS7c1pBV60scdiJVQ4vXQtetKxIgRVQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/transaction-confirmation@5.1.0': - resolution: {integrity: sha512-6HnL0uH8tWZXJVuaoeTbCQp/FS11Bsc4GSlq+k0N21GdhTbFuqBhsxlAYWbzPWs9+/kYRGHqqXvBPCReWxT7BA==} + '@solana/transaction-confirmation@6.0.1': + resolution: {integrity: sha512-x0sXnS75xwchAtQU0UbQ7wBQoWqgUQkn0G4DKQMEGllWGRsJFvpQzuUqAgh5fNhe2sMt8+4QdQHrI01zUNDDtQ==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/transaction-messages@5.1.0': - resolution: {integrity: sha512-9rNV2YJhd85WIMvnwa/vUY4xUw3ZTU17jP1KDo/fFZWk55a0ov0ATJJPyC5HAR1i6hT1cmJzGH/UHhnD9m/Q3w==} + '@solana/transaction-messages@6.0.1': + resolution: {integrity: sha512-lpSyXsFPMCDo5Vf0LLsdj5+WyYxUD+8WEMWuVDYiG/7e8fVjLEsZ6k/UpvyI7ZJnkMhfwEa3DRAubNDH1Biafg==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true - '@solana/transactions@5.1.0': - resolution: {integrity: sha512-06JwSPtz+38ozNgpysAXS2eTMPQCufIisXB6K88X8J4GF8ziqs4nkq0BpXAXn+MpZTkuMt+JeW2RxP3HKhXe5g==} + '@solana/transactions@6.0.1': + resolution: {integrity: sha512-VLFug8oKCpEyZv/mMMnQIraupXwMUzO4KzA/kGBHbUnCX95K7UFpc07AFc1nXGbo1jBBO4e+O2cnVWg097Yz0A==} engines: {node: '>=20.18.0'} peerDependencies: - typescript: '>=5.3.3' + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true '@tsconfig/strictest@2.0.8': resolution: {integrity: sha512-XnQ7vNz5HRN0r88GYf1J9JJjqtZPiHt2woGJOo2dYqyHGGcd6OLGqSlBB6p1j9mpzja6Oe5BoPqWmeDx6X9rLw==} @@ -1095,8 +1136,8 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - codama@1.4.4: - resolution: {integrity: sha512-DpS9XRftrck13FRbSh6hR8V+loAPdtuuFRKixKyAahdR1R4T/EJJ9G78JqBfVXow+4lJ1NKhNlvHKKEJPaE+FQ==} + codama@1.5.0: + resolution: {integrity: sha512-hhfSzrOiDX3bV7QmJneEBsBk3ln4gIcMJs6P8BlEJ3EFI+P0QZaTT5W61o8Tq0/79hTZeyj0gP65HZ/LYJil+w==} hasBin: true color-convert@2.0.1: @@ -1106,14 +1147,14 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - commander@14.0.1: - resolution: {integrity: sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A==} - engines: {node: '>=20'} - commander@14.0.2: resolution: {integrity: sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==} engines: {node: '>=20'} + commander@14.0.3: + resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} + engines: {node: '>=20'} + commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -1650,8 +1691,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.7.4: - resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} + prettier@3.8.1: + resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==} engines: {node: '>=14'} hasBin: true @@ -1857,6 +1898,9 @@ packages: undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + undici-types@7.21.0: + resolution: {integrity: sha512-w9IMgQrz4O0YN1LtB7K5P63vhlIOvC7opSmouCJ+ZywlPAlO9gIkJ+otk6LvGpAs2wg4econaCz3TvQ9xPoyuQ==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -1877,8 +1921,8 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - ws@8.18.3: - resolution: {integrity: sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==} + ws@8.19.0: + resolution: {integrity: sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -2051,11 +2095,11 @@ snapshots: human-id: 4.1.3 prettier: 2.8.8 - '@codama/cli@1.4.3': + '@codama/cli@1.4.4': dependencies: - '@codama/nodes': 1.4.4 - '@codama/visitors': 1.4.4 - '@codama/visitors-core': 1.4.4 + '@codama/nodes': 1.5.0 + '@codama/visitors': 1.5.0 + '@codama/visitors-core': 1.5.0 commander: 14.0.2 picocolors: 1.1.1 prompts: 2.4.2 @@ -2066,37 +2110,50 @@ snapshots: commander: 14.0.2 picocolors: 1.1.1 + '@codama/errors@1.5.0': + dependencies: + '@codama/node-types': 1.5.0 + commander: 14.0.2 + picocolors: 1.1.1 + '@codama/node-types@1.4.4': {} + '@codama/node-types@1.5.0': {} + '@codama/nodes@1.4.4': dependencies: '@codama/errors': 1.4.4 '@codama/node-types': 1.4.4 + '@codama/nodes@1.5.0': + dependencies: + '@codama/errors': 1.5.0 + '@codama/node-types': 1.5.0 + '@codama/renderers-core@1.3.4': dependencies: '@codama/errors': 1.4.4 '@codama/nodes': 1.4.4 '@codama/visitors-core': 1.4.4 - '@codama/renderers-js@1.5.5(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@codama/renderers-js@1.7.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: '@codama/errors': 1.4.4 '@codama/nodes': 1.4.4 '@codama/renderers-core': 1.3.4 '@codama/visitors-core': 1.4.4 - '@solana/codecs-strings': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - prettier: 3.7.4 + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + prettier: 3.8.1 semver: 7.7.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - typescript - '@codama/validators@1.4.4': + '@codama/validators@1.5.0': dependencies: - '@codama/errors': 1.4.4 - '@codama/nodes': 1.4.4 - '@codama/visitors-core': 1.4.4 + '@codama/errors': 1.5.0 + '@codama/nodes': 1.5.0 + '@codama/visitors-core': 1.5.0 '@codama/visitors-core@1.4.4': dependencies: @@ -2104,11 +2161,17 @@ snapshots: '@codama/nodes': 1.4.4 json-stable-stringify: 1.3.0 - '@codama/visitors@1.4.4': + '@codama/visitors-core@1.5.0': dependencies: - '@codama/errors': 1.4.4 - '@codama/nodes': 1.4.4 - '@codama/visitors-core': 1.4.4 + '@codama/errors': 1.5.0 + '@codama/nodes': 1.5.0 + json-stable-stringify: 1.3.0 + + '@codama/visitors@1.5.0': + dependencies: + '@codama/errors': 1.5.0 + '@codama/nodes': 1.5.0 + '@codama/visitors-core': 1.5.0 '@esbuild/aix-ppc64@0.27.0': optional: true @@ -2390,516 +2453,444 @@ snapshots: '@shikijs/vscode-textmate@10.0.2': {} - '@solana-program/system@0.10.0(@solana/kit@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': - dependencies: - '@solana/kit': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - - '@solana-program/token-2022@0.6.1(@solana/kit@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3))': - dependencies: - '@solana/kit': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/sysvars': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - - '@solana-program/token@0.9.0(@solana/kit@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))': + '@solana-program/system@0.11.0(@solana/kit@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10))': dependencies: - '@solana/kit': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@solana/kit': 6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) - '@solana/accounts@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana-program/token-2022@0.9.0(@solana/kit@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10))(@solana/sysvars@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3))': dependencies: - '@solana/addresses': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.0.0(typescript@5.9.3) - '@solana/codecs-strings': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.0.0(typescript@5.9.3) - '@solana/rpc-spec': 5.0.0(typescript@5.9.3) - '@solana/rpc-types': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder + '@solana/kit': 6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) + '@solana/sysvars': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/accounts@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana-program/token@0.10.0(@solana/kit@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10))': dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec': 5.1.0(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder + '@solana/kit': 6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) - '@solana/addresses@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/accounts@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/assertions': 5.0.0(typescript@5.9.3) - '@solana/codecs-core': 5.0.0(typescript@5.9.3) - '@solana/codecs-strings': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.0.0(typescript@5.9.3) - '@solana/nominal-types': 5.0.0(typescript@5.9.3) + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec': 6.0.1(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/addresses@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/addresses@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/assertions': 5.1.0(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/nominal-types': 5.1.0(typescript@5.9.3) + '@solana/assertions': 6.0.1(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/nominal-types': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/assertions@5.0.0(typescript@5.9.3)': - dependencies: - '@solana/errors': 5.0.0(typescript@5.9.3) - typescript: 5.9.3 - - '@solana/assertions@5.1.0(typescript@5.9.3)': - dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - typescript: 5.9.3 - - '@solana/codecs-core@5.0.0(typescript@5.9.3)': - dependencies: - '@solana/errors': 5.0.0(typescript@5.9.3) - typescript: 5.9.3 - - '@solana/codecs-core@5.1.0(typescript@5.9.3)': - dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - typescript: 5.9.3 - - '@solana/codecs-data-structures@5.0.0(typescript@5.9.3)': - dependencies: - '@solana/codecs-core': 5.0.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.0.0(typescript@5.9.3) - '@solana/errors': 5.0.0(typescript@5.9.3) - typescript: 5.9.3 - - '@solana/codecs-data-structures@5.1.0(typescript@5.9.3)': + '@solana/assertions@6.0.1(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.1.0(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - '@solana/codecs-numbers@5.0.0(typescript@5.9.3)': + '@solana/codecs-core@6.0.1(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 5.0.0(typescript@5.9.3) - '@solana/errors': 5.0.0(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - '@solana/codecs-numbers@5.1.0(typescript@5.9.3)': + '@solana/codecs-data-structures@6.0.1(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-numbers': 6.0.1(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - '@solana/codecs-strings@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/codecs-numbers@6.0.1(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 5.0.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.0.0(typescript@5.9.3) - '@solana/errors': 5.0.0(typescript@5.9.3) - fastestsmallesttextencoderdecoder: 1.0.22 + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - '@solana/codecs-strings@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/codecs-strings@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.1.0(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - typescript: 5.9.3 + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-numbers': 6.0.1(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) optionalDependencies: fastestsmallesttextencoderdecoder: 1.0.22 - - '@solana/codecs@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/codecs-core': 5.0.0(typescript@5.9.3) - '@solana/codecs-data-structures': 5.0.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.0.0(typescript@5.9.3) - '@solana/codecs-strings': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/options': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) typescript: 5.9.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/codecs@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/codecs@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-data-structures': 5.1.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/options': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-data-structures': 6.0.1(typescript@5.9.3) + '@solana/codecs-numbers': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/options': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/errors@5.0.0(typescript@5.9.3)': - dependencies: - chalk: 5.6.2 - commander: 14.0.1 - typescript: 5.9.3 - - '@solana/errors@5.1.0(typescript@5.9.3)': + '@solana/errors@6.0.1(typescript@5.9.3)': dependencies: chalk: 5.6.2 - commander: 14.0.2 + commander: 14.0.3 + optionalDependencies: typescript: 5.9.3 - '@solana/fast-stable-stringify@5.1.0(typescript@5.9.3)': - dependencies: + '@solana/fast-stable-stringify@6.0.1(typescript@5.9.3)': + optionalDependencies: typescript: 5.9.3 - '@solana/functional@5.1.0(typescript@5.9.3)': - dependencies: + '@solana/functional@6.0.1(typescript@5.9.3)': + optionalDependencies: typescript: 5.9.3 - '@solana/instruction-plans@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/instruction-plans@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/instructions': 5.1.0(typescript@5.9.3) - '@solana/keys': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/promises': 5.1.0(typescript@5.9.3) - '@solana/transaction-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transactions': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/instructions': 6.0.1(typescript@5.9.3) + '@solana/keys': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/promises': 6.0.1(typescript@5.9.3) + '@solana/transaction-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/instructions@5.1.0(typescript@5.9.3)': + '@solana/instructions@6.0.1(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - '@solana/keys@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/keys@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/assertions': 5.1.0(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/nominal-types': 5.1.0(typescript@5.9.3) + '@solana/assertions': 6.0.1(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/nominal-types': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/kit@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/accounts': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/functional': 5.1.0(typescript@5.9.3) - '@solana/instruction-plans': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/instructions': 5.1.0(typescript@5.9.3) - '@solana/keys': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/offchain-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/programs': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-parsed-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-subscriptions': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/signers': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/sysvars': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transaction-confirmation': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/transaction-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transactions': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/kit@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)': + dependencies: + '@solana/accounts': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/functional': 6.0.1(typescript@5.9.3) + '@solana/instruction-plans': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/instructions': 6.0.1(typescript@5.9.3) + '@solana/keys': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/offchain-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/plugin-core': 6.0.1(typescript@5.9.3) + '@solana/programs': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-api': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-parsed-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-subscriptions': 6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/signers': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/sysvars': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-confirmation': 6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) + '@solana/transaction-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: + - bufferutil - fastestsmallesttextencoderdecoder - - ws + - utf-8-validate - '@solana/nominal-types@5.0.0(typescript@5.9.3)': - dependencies: - typescript: 5.9.3 - - '@solana/nominal-types@5.1.0(typescript@5.9.3)': - dependencies: + '@solana/nominal-types@6.0.1(typescript@5.9.3)': + optionalDependencies: typescript: 5.9.3 - '@solana/offchain-messages@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/offchain-messages@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-data-structures': 5.1.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/keys': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/nominal-types': 5.1.0(typescript@5.9.3) + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-data-structures': 6.0.1(typescript@5.9.3) + '@solana/codecs-numbers': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/keys': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/nominal-types': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/options@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/options@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/codecs-core': 5.0.0(typescript@5.9.3) - '@solana/codecs-data-structures': 5.0.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.0.0(typescript@5.9.3) - '@solana/codecs-strings': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.0.0(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-data-structures': 6.0.1(typescript@5.9.3) + '@solana/codecs-numbers': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/options@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-data-structures': 5.1.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) + '@solana/plugin-core@6.0.1(typescript@5.9.3)': + optionalDependencies: typescript: 5.9.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/programs@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/prettier-config-solana@0.0.6(prettier@3.8.1)': dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder + prettier: 3.8.1 - '@solana/promises@5.1.0(typescript@5.9.3)': + '@solana/programs@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - typescript: 5.9.3 - - '@solana/rpc-api@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/keys': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-parsed-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec': 5.1.0(typescript@5.9.3) - '@solana/rpc-transformers': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transaction-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transactions': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc-parsed-types@5.1.0(typescript@5.9.3)': - dependencies: + '@solana/promises@6.0.1(typescript@5.9.3)': + optionalDependencies: typescript: 5.9.3 - '@solana/rpc-spec-types@5.0.0(typescript@5.9.3)': + '@solana/rpc-api@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/keys': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-parsed-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec': 6.0.1(typescript@5.9.3) + '@solana/rpc-transformers': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 + transitivePeerDependencies: + - fastestsmallesttextencoderdecoder - '@solana/rpc-spec-types@5.1.0(typescript@5.9.3)': - dependencies: + '@solana/rpc-parsed-types@6.0.1(typescript@5.9.3)': + optionalDependencies: typescript: 5.9.3 - '@solana/rpc-spec@5.0.0(typescript@5.9.3)': - dependencies: - '@solana/errors': 5.0.0(typescript@5.9.3) - '@solana/rpc-spec-types': 5.0.0(typescript@5.9.3) + '@solana/rpc-spec-types@6.0.1(typescript@5.9.3)': + optionalDependencies: typescript: 5.9.3 - '@solana/rpc-spec@5.1.0(typescript@5.9.3)': + '@solana/rpc-spec@6.0.1(typescript@5.9.3)': dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec-types': 5.1.0(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec-types': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - '@solana/rpc-subscriptions-api@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/rpc-subscriptions-api@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/keys': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-subscriptions-spec': 5.1.0(typescript@5.9.3) - '@solana/rpc-transformers': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transaction-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transactions': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/keys': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-subscriptions-spec': 6.0.1(typescript@5.9.3) + '@solana/rpc-transformers': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc-subscriptions-channel-websocket@5.1.0(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + '@solana/rpc-subscriptions-channel-websocket@6.0.1(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10)': dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/functional': 5.1.0(typescript@5.9.3) - '@solana/rpc-subscriptions-spec': 5.1.0(typescript@5.9.3) - '@solana/subscribable': 5.1.0(typescript@5.9.3) - typescript: 5.9.3 + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/functional': 6.0.1(typescript@5.9.3) + '@solana/rpc-subscriptions-spec': 6.0.1(typescript@5.9.3) + '@solana/subscribable': 6.0.1(typescript@5.9.3) + ws: 8.19.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: - ws: 8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) + typescript: 5.9.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate - '@solana/rpc-subscriptions-spec@5.1.0(typescript@5.9.3)': + '@solana/rpc-subscriptions-spec@6.0.1(typescript@5.9.3)': dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/promises': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec-types': 5.1.0(typescript@5.9.3) - '@solana/subscribable': 5.1.0(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/promises': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec-types': 6.0.1(typescript@5.9.3) + '@solana/subscribable': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - '@solana/rpc-subscriptions@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/fast-stable-stringify': 5.1.0(typescript@5.9.3) - '@solana/functional': 5.1.0(typescript@5.9.3) - '@solana/promises': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-subscriptions-api': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-subscriptions-channel-websocket': 5.1.0(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-subscriptions-spec': 5.1.0(typescript@5.9.3) - '@solana/rpc-transformers': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/subscribable': 5.1.0(typescript@5.9.3) + '@solana/rpc-subscriptions@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)': + dependencies: + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/fast-stable-stringify': 6.0.1(typescript@5.9.3) + '@solana/functional': 6.0.1(typescript@5.9.3) + '@solana/promises': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-subscriptions-api': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-subscriptions-channel-websocket': 6.0.1(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10) + '@solana/rpc-subscriptions-spec': 6.0.1(typescript@5.9.3) + '@solana/rpc-transformers': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/subscribable': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: + - bufferutil - fastestsmallesttextencoderdecoder - - ws + - utf-8-validate - '@solana/rpc-transformers@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/rpc-transformers@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/functional': 5.1.0(typescript@5.9.3) - '@solana/nominal-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/functional': 6.0.1(typescript@5.9.3) + '@solana/nominal-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc-transport-http@5.1.0(typescript@5.9.3)': + '@solana/rpc-transport-http@6.0.1(typescript@5.9.3)': dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec-types': 5.1.0(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec-types': 6.0.1(typescript@5.9.3) + undici-types: 7.21.0 + optionalDependencies: typescript: 5.9.3 - undici-types: 7.16.0 - '@solana/rpc-types@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/rpc-types@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/addresses': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.0.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.0.0(typescript@5.9.3) - '@solana/codecs-strings': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.0.0(typescript@5.9.3) - '@solana/nominal-types': 5.0.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - '@solana/rpc-types@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/nominal-types': 5.1.0(typescript@5.9.3) + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-numbers': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/nominal-types': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/fast-stable-stringify': 5.1.0(typescript@5.9.3) - '@solana/functional': 5.1.0(typescript@5.9.3) - '@solana/rpc-api': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-spec': 5.1.0(typescript@5.9.3) - '@solana/rpc-spec-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-transformers': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-transport-http': 5.1.0(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + dependencies: + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/fast-stable-stringify': 6.0.1(typescript@5.9.3) + '@solana/functional': 6.0.1(typescript@5.9.3) + '@solana/rpc-api': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-spec': 6.0.1(typescript@5.9.3) + '@solana/rpc-spec-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-transformers': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-transport-http': 6.0.1(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/signers@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/instructions': 5.1.0(typescript@5.9.3) - '@solana/keys': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/nominal-types': 5.1.0(typescript@5.9.3) - '@solana/offchain-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transaction-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transactions': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/signers@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + dependencies: + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/instructions': 6.0.1(typescript@5.9.3) + '@solana/keys': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/nominal-types': 6.0.1(typescript@5.9.3) + '@solana/offchain-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/subscribable@5.1.0(typescript@5.9.3)': + '@solana/subscribable@6.0.1(typescript@5.9.3)': dependencies: - '@solana/errors': 5.1.0(typescript@5.9.3) - typescript: 5.9.3 - - '@solana/sysvars@5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/accounts': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.0.0(typescript@5.9.3) - '@solana/rpc-types': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/sysvars@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + '@solana/sysvars@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': dependencies: - '@solana/accounts': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/accounts': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/transaction-confirmation@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': - dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/keys': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/promises': 5.1.0(typescript@5.9.3) - '@solana/rpc': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/rpc-subscriptions': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transaction-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transactions': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-confirmation@6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10)': + dependencies: + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/keys': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/promises': 6.0.1(typescript@5.9.3) + '@solana/rpc': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/rpc-subscriptions': 6.0.1(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: + - bufferutil - fastestsmallesttextencoderdecoder - - ws - - '@solana/transaction-messages@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-data-structures': 5.1.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.1.0(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/functional': 5.1.0(typescript@5.9.3) - '@solana/instructions': 5.1.0(typescript@5.9.3) - '@solana/nominal-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + - utf-8-validate + + '@solana/transaction-messages@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + dependencies: + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-data-structures': 6.0.1(typescript@5.9.3) + '@solana/codecs-numbers': 6.0.1(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/functional': 6.0.1(typescript@5.9.3) + '@solana/instructions': 6.0.1(typescript@5.9.3) + '@solana/nominal-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/transactions@5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': - dependencies: - '@solana/addresses': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/codecs-core': 5.1.0(typescript@5.9.3) - '@solana/codecs-data-structures': 5.1.0(typescript@5.9.3) - '@solana/codecs-numbers': 5.1.0(typescript@5.9.3) - '@solana/codecs-strings': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/errors': 5.1.0(typescript@5.9.3) - '@solana/functional': 5.1.0(typescript@5.9.3) - '@solana/instructions': 5.1.0(typescript@5.9.3) - '@solana/keys': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/nominal-types': 5.1.0(typescript@5.9.3) - '@solana/rpc-types': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@solana/transaction-messages': 5.1.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transactions@6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)': + dependencies: + '@solana/addresses': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/codecs-core': 6.0.1(typescript@5.9.3) + '@solana/codecs-data-structures': 6.0.1(typescript@5.9.3) + '@solana/codecs-numbers': 6.0.1(typescript@5.9.3) + '@solana/codecs-strings': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/errors': 6.0.1(typescript@5.9.3) + '@solana/functional': 6.0.1(typescript@5.9.3) + '@solana/instructions': 6.0.1(typescript@5.9.3) + '@solana/keys': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/nominal-types': 6.0.1(typescript@5.9.3) + '@solana/rpc-types': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + '@solana/transaction-messages': 6.0.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) + optionalDependencies: typescript: 5.9.3 transitivePeerDependencies: - fastestsmallesttextencoderdecoder @@ -3109,13 +3100,13 @@ snapshots: ci-info@3.9.0: {} - codama@1.4.4: + codama@1.5.0: dependencies: - '@codama/cli': 1.4.3 - '@codama/errors': 1.4.4 - '@codama/nodes': 1.4.4 - '@codama/validators': 1.4.4 - '@codama/visitors': 1.4.4 + '@codama/cli': 1.4.4 + '@codama/errors': 1.5.0 + '@codama/nodes': 1.5.0 + '@codama/validators': 1.5.0 + '@codama/visitors': 1.5.0 color-convert@2.0.1: dependencies: @@ -3123,10 +3114,10 @@ snapshots: color-name@1.1.4: {} - commander@14.0.1: {} - commander@14.0.2: {} + commander@14.0.3: {} + commander@4.1.1: {} concat-map@0.0.1: {} @@ -3299,7 +3290,8 @@ snapshots: fast-levenshtein@2.0.6: {} - fastestsmallesttextencoderdecoder@1.0.22: {} + fastestsmallesttextencoderdecoder@1.0.22: + optional: true fastq@1.19.1: dependencies: @@ -3651,7 +3643,7 @@ snapshots: prettier@2.8.8: {} - prettier@3.7.4: {} + prettier@3.8.1: {} prompts@2.4.2: dependencies: @@ -3866,6 +3858,8 @@ snapshots: undici-types@7.16.0: {} + undici-types@7.21.0: {} + universalify@0.1.2: {} uri-js@4.4.1: @@ -3883,11 +3877,10 @@ snapshots: word-wrap@1.2.5: {} - ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10): + ws@8.19.0(bufferutil@4.0.9)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.9 utf-8-validate: 5.0.10 - optional: true yaml@2.8.2: {} diff --git a/program/idl.json b/program/idl.json index 7c729c56..d42e48eb 100644 --- a/program/idl.json +++ b/program/idl.json @@ -1,7 +1,7 @@ { "kind": "rootNode", "standard": "codama", - "version": "1.3.7", + "version": "1.5.0", "program": { "kind": "programNode", "name": "tokenWrap",