diff --git a/CLAUDE.md b/CLAUDE.md index 8f832d18f9c..a624cc07c80 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -115,7 +115,6 @@ The SDK uses modular exports from `src/exports/` including: - **thirdweb** - Main SDK (TypeScript, React, React Native) - **engine** - thirdweb Engine API client - **insight** - Analytics and data APIs -- **nebula** - Account abstraction client - **service-utils** - Shared utilities across services ## Development Practices diff --git a/README.md b/README.md index 9f1693e960c..18af2d8d33b 100644 --- a/README.md +++ b/README.md @@ -144,22 +144,6 @@ TypeScript SDK for Insight, thirdweb's multichain indexer service. npm install @thirdweb-dev/insight ``` -#### [`@thirdweb-dev/vault-sdk`](./packages/vault-sdk/README.md) - -SDK for interacting with Vault, thirdweb's secure key management service. - -```bash -npm install @thirdweb-dev/vault-sdk -``` - -#### [`@thirdweb-dev/nebula`](./packages/nebula/README.md) - -TypeScript SDK for Nebula, thirdweb's AI agent service. - -```bash -npm install @thirdweb-dev/nebula -``` - ## Contributing We welcome contributions from all developers regardless of experience level. If you are interested in contributing, please read our [Contributing Guide](.github/contributing.md) to learn how the repo works, how to test your changes, and how to submit a pull request. diff --git a/apps/wagmi-demo/package.json b/apps/wagmi-demo/package.json index fdd78418134..dc20c832e70 100644 --- a/apps/wagmi-demo/package.json +++ b/apps/wagmi-demo/package.json @@ -25,7 +25,7 @@ "@types/react": "19.2.7", "@types/react-dom": "19.2.3", "@vitejs/plugin-react": "5.0.4", - "@wagmi/cli": "latest", + "@wagmi/cli": "2.8.0", "buffer": "^6.0.3", "typescript": "5.8.3", "vite": "7.1.7" diff --git a/package.json b/package.json index ecf86cda4a6..a7daa1f2807 100644 --- a/package.json +++ b/package.json @@ -57,16 +57,16 @@ "build": "turbo run build --filter=./packages/*", "build:release": "turbo run build --filter=./packages/* --force", "changeset": "changeset", - "dashboard": "turbo run dev --filter=./apps/dashboard --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/vault-sdk --filter=./packages/engine --filter=./packages/nebula", + "dashboard": "turbo run dev --filter=./apps/dashboard --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine", "dashboard:build": "turbo run build --filter=./apps/dashboard", "e2e": "turbo run e2e --filter=./packages/*", "fix": "turbo run fix", "hotlink-init": "node ./scripts/hotlink/hotlink-init.mjs", "hotlink-revert": "node ./scripts/hotlink/hotlink-revert.mjs", "lint": "pnpm dlx sherif@latest -i remark-gfm -i eslint && turbo run lint", - "playground": "turbo run dev --filter=./apps/playground-web --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/nebula --filter=./packages/ai-sdk-provider", + "playground": "turbo run dev --filter=./apps/playground-web --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/ai-sdk-provider", "playground:build": "turbo run build --filter=./apps/playground-web", - "portal": "turbo run dev --filter=./apps/portal --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/nebula", + "portal": "turbo run dev --filter=./apps/portal --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine", "wagmi-demo": "turbo run dev --filter=./apps/wagmi-demo --filter=./packages/thirdweb --filter=./packages/wagmi-adapter", "portal:build": "turbo run build --filter=./apps/portal", "prefix": "pnpm dlx sherif@latest -i remark-gfm -i eslint --fix", @@ -78,8 +78,8 @@ "typedoc": "turbo run typedoc", "version-packages": "changeset version", "version-packages:nightly": "node scripts/pre-nightly.mjs && changeset version --snapshot nightly", - "wallet-ui": "turbo run dev --filter=./apps/wallet-ui --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/nebula", - "wallet-ui:build": "turbo run build --filter=./apps/wallet-ui --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/nebula" + "wallet-ui": "turbo run dev --filter=./apps/wallet-ui --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine", + "wallet-ui:build": "turbo run build --filter=./apps/wallet-ui --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine" }, "version": "1.0.0" } diff --git a/packages/nebula/CHANGELOG.md b/packages/nebula/CHANGELOG.md deleted file mode 100644 index 90680228e0c..00000000000 --- a/packages/nebula/CHANGELOG.md +++ /dev/null @@ -1,870 +0,0 @@ -# @thirdweb-dev/nebula - -## 0.2.120 - -### Patch Changes - -- Updated dependencies [[`a088faf`](https://github.com/thirdweb-dev/js/commit/a088faf4b63776a570192f12dd6e7fd026a8e9d4)]: - - thirdweb@5.121.3 - -## 0.2.119 - -### Patch Changes - -- Updated dependencies [[`a3488dd`](https://github.com/thirdweb-dev/js/commit/a3488dd200f562ae08545764243d736fcbeb509c)]: - - thirdweb@5.121.2 - -## 0.2.118 - -### Patch Changes - -- Updated dependencies [[`fcc0417`](https://github.com/thirdweb-dev/js/commit/fcc04176f1f54d04d4a6705e7f6d1437cfd007ab)]: - - thirdweb@5.121.1 - -## 0.2.117 - -### Patch Changes - -- Updated dependencies [[`133e57d`](https://github.com/thirdweb-dev/js/commit/133e57d373ffbbe3531c9c12023540dcb8ad372f), [`e4fba08`](https://github.com/thirdweb-dev/js/commit/e4fba08e2546511f3c4d1f03c49893b0b643aa28), [`8c521aa`](https://github.com/thirdweb-dev/js/commit/8c521aa06aca02a57200f5941e10d06c8cbaf9fb), [`f411769`](https://github.com/thirdweb-dev/js/commit/f411769e2a0c82ad636a41ba650b72222df29006)]: - - thirdweb@5.121.0 - -## 0.2.116 - -### Patch Changes - -- Updated dependencies [[`49194e3`](https://github.com/thirdweb-dev/js/commit/49194e3a2a1707c5d1e0a2cc67c328e84ef5e9a0)]: - - thirdweb@5.120.1 - -## 0.2.115 - -### Patch Changes - -- Updated dependencies [[`23d74a0`](https://github.com/thirdweb-dev/js/commit/23d74a0a54247930e6889bbf66f88fa673a23f1a)]: - - thirdweb@5.120.0 - -## 0.2.114 - -### Patch Changes - -- Updated dependencies [[`83198b2`](https://github.com/thirdweb-dev/js/commit/83198b2ea4dd29b1debb7db2dc2eabba57e9c4d7), [`ad49560`](https://github.com/thirdweb-dev/js/commit/ad4956033107c52ecdf4cd9f5b2bff87867f3bec)]: - - thirdweb@5.119.4 - -## 0.2.113 - -### Patch Changes - -- Updated dependencies [[`3a18c6e`](https://github.com/thirdweb-dev/js/commit/3a18c6e6a8c12cecaf684fff2dfc5a73c77c40c9)]: - - thirdweb@5.119.3 - -## 0.2.112 - -### Patch Changes - -- Updated dependencies [[`32c2ff6`](https://github.com/thirdweb-dev/js/commit/32c2ff62f8a2ca8da82c1e8d9bb73def95ec41db)]: - - thirdweb@5.119.2 - -## 0.2.111 - -### Patch Changes - -- Updated dependencies [[`e13b9a7`](https://github.com/thirdweb-dev/js/commit/e13b9a784aca3a9b5d797fc6e011c6d1a10542e9), [`da4a4a5`](https://github.com/thirdweb-dev/js/commit/da4a4a540a6b141050af8fc8332621826d8dd835)]: - - thirdweb@5.119.1 - -## 0.2.110 - -### Patch Changes - -- Updated dependencies [[`5352152`](https://github.com/thirdweb-dev/js/commit/53521528353a00691e82405460d4fb869ac986de)]: - - thirdweb@5.119.0 - -## 0.2.109 - -### Patch Changes - -- Updated dependencies [[`1caf6dd`](https://github.com/thirdweb-dev/js/commit/1caf6dd4609ac72a06999ef0d70f31a371e5108a)]: - - thirdweb@5.118.2 - -## 0.2.108 - -### Patch Changes - -- Updated dependencies [[`b50e304`](https://github.com/thirdweb-dev/js/commit/b50e304e0ccd1ac7eae551c3d49e82312ffc82d1)]: - - thirdweb@5.118.1 - -## 0.2.107 - -### Patch Changes - -- Updated dependencies [[`281759f`](https://github.com/thirdweb-dev/js/commit/281759f06a276d08028825ed171f674984d66e85), [`2d98fe2`](https://github.com/thirdweb-dev/js/commit/2d98fe2799b0a5c17a41f0bb87c8852e21007e4a)]: - - thirdweb@5.118.0 - -## 0.2.106 - -### Patch Changes - -- Updated dependencies [[`d38deec`](https://github.com/thirdweb-dev/js/commit/d38deecaa1b1990a9af2fad79e2e620e61d4c0e3)]: - - thirdweb@5.117.2 - -## 0.2.105 - -### Patch Changes - -- Updated dependencies [[`6390052`](https://github.com/thirdweb-dev/js/commit/6390052f8bc3b9b7d58d57f8f953c1da9a34066a)]: - - thirdweb@5.117.1 - -## 0.2.104 - -### Patch Changes - -- Updated dependencies [[`8d4b6a1`](https://github.com/thirdweb-dev/js/commit/8d4b6a1fea53013cbdbe9f450d00470b2f8d3761), [`9c04b3f`](https://github.com/thirdweb-dev/js/commit/9c04b3f18042b162de24cb7cf5c296a38a9af4f0), [`5ec84bd`](https://github.com/thirdweb-dev/js/commit/5ec84bd3b631395f80cb1f5ee24bc8b481b9f5cb), [`01004e8`](https://github.com/thirdweb-dev/js/commit/01004e840856551ec704de674f92f5d01c548a0e), [`36ff327`](https://github.com/thirdweb-dev/js/commit/36ff3277443dd0d7b47e6a0e51eb533a8db0da34), [`26a9153`](https://github.com/thirdweb-dev/js/commit/26a91537d2d05c5a4cf06de620004f5fef86d07b), [`0ff8b9f`](https://github.com/thirdweb-dev/js/commit/0ff8b9ff602aa7fc4c94355f60e8c422e68f9e89), [`31e24f1`](https://github.com/thirdweb-dev/js/commit/31e24f1c58aa7c53a207d07599fe498bc10e8953), [`304e4e5`](https://github.com/thirdweb-dev/js/commit/304e4e5be860e4989abf0493cb737f46e050a697), [`fdd2557`](https://github.com/thirdweb-dev/js/commit/fdd25576630399b8f9049b7d47d3ef415e50b47f), [`151127d`](https://github.com/thirdweb-dev/js/commit/151127d66825365cb0ed949ae28b9906ee4dfc8d), [`5766c90`](https://github.com/thirdweb-dev/js/commit/5766c90fb4bc48f40e858a03b90fcf60a3b11923), [`f68c2c6`](https://github.com/thirdweb-dev/js/commit/f68c2c62a58d1071fd9892af57536ec9efda691e), [`a3ff757`](https://github.com/thirdweb-dev/js/commit/a3ff7572d64d54e0674c32b6a24c6c965de9345c), [`38f4a89`](https://github.com/thirdweb-dev/js/commit/38f4a890764b3aa6406f54f0a8238b5dbb280b2e), [`56a1c0a`](https://github.com/thirdweb-dev/js/commit/56a1c0a467e4adcc4d40794d89b0d853f2cd8803)]: - - thirdweb@5.117.0 - -## 0.2.103 - -### Patch Changes - -- Updated dependencies [[`f5ab57f`](https://github.com/thirdweb-dev/js/commit/f5ab57f3657bf0569e77ac2dcbf7f158a3211fb1)]: - - thirdweb@5.116.1 - -## 0.2.102 - -### Patch Changes - -- Updated dependencies [[`18425f9`](https://github.com/thirdweb-dev/js/commit/18425f9d744fd9605e901abb6c2ba89e7b518f5f)]: - - thirdweb@5.116.0 - -## 0.2.101 - -### Patch Changes - -- Updated dependencies [[`70ff608`](https://github.com/thirdweb-dev/js/commit/70ff608c72628a9c1958d3d77cea2bdaca3139b2)]: - - thirdweb@5.115.4 - -## 0.2.100 - -### Patch Changes - -- Updated dependencies [[`7b873d3`](https://github.com/thirdweb-dev/js/commit/7b873d38db373151ef42dfa7bc1e083568cb5432), [`b0eccf3`](https://github.com/thirdweb-dev/js/commit/b0eccf365a7521ec882fca9e680837c84147041e), [`a704c3f`](https://github.com/thirdweb-dev/js/commit/a704c3f2b00434f8f50653aa2825b4adf7cd4696)]: - - thirdweb@5.115.3 - -## 0.2.99 - -### Patch Changes - -- Updated dependencies [[`859032d`](https://github.com/thirdweb-dev/js/commit/859032dc1761afdb7a4e12b40534e3a98b771498)]: - - thirdweb@5.115.2 - -## 0.2.98 - -### Patch Changes - -- Updated dependencies [[`551ec68`](https://github.com/thirdweb-dev/js/commit/551ec680df3a84d2cacca4dfb9f0522fd7383f7a), [`b6be8d6`](https://github.com/thirdweb-dev/js/commit/b6be8d67ef74f425e911d900a9adb19f9a70efd9)]: - - thirdweb@5.115.1 - -## 0.2.97 - -### Patch Changes - -- Updated dependencies [[`98d8f29`](https://github.com/thirdweb-dev/js/commit/98d8f292db7f9fd1a80cc67401787da836f24b8e), [`3ebca18`](https://github.com/thirdweb-dev/js/commit/3ebca18f9e7f8e0af278d1b13c09832f565104e8), [`9e43da4`](https://github.com/thirdweb-dev/js/commit/9e43da4ec0f88f32e988e445257fb518454c4c81), [`4c5696e`](https://github.com/thirdweb-dev/js/commit/4c5696e414cc18e1650d71b472274652c7d93952)]: - - thirdweb@5.115.0 - -## 0.2.96 - -### Patch Changes - -- Updated dependencies [[`629efc1`](https://github.com/thirdweb-dev/js/commit/629efc13b62cd56beeefedc964440b3d66fc1dbb), [`629efc1`](https://github.com/thirdweb-dev/js/commit/629efc13b62cd56beeefedc964440b3d66fc1dbb)]: - - thirdweb@5.114.1 - -## 0.2.95 - -### Patch Changes - -- Updated dependencies [[`35aaf24`](https://github.com/thirdweb-dev/js/commit/35aaf24e8aecb76f12727af00e1c2da407da2936)]: - - thirdweb@5.114.0 - -## 0.2.94 - -### Patch Changes - -- Updated dependencies [[`52aba0f`](https://github.com/thirdweb-dev/js/commit/52aba0ffb814904414cdc8e76407afd71272d88e), [`9809d5c`](https://github.com/thirdweb-dev/js/commit/9809d5cf66baa520a9413986eb5bd2900de6f337)]: - - thirdweb@5.113.0 - -## 0.2.93 - -### Patch Changes - -- Updated dependencies [[`f5f6848`](https://github.com/thirdweb-dev/js/commit/f5f6848ead0d070114eae587c7620cfce60f5977)]: - - thirdweb@5.112.4 - -## 0.2.92 - -### Patch Changes - -- Updated dependencies [[`9983e6c`](https://github.com/thirdweb-dev/js/commit/9983e6ccfdfe09404db64cf182e614f432f9f27b)]: - - thirdweb@5.112.3 - -## 0.2.91 - -### Patch Changes - -- Updated dependencies [[`419fb31`](https://github.com/thirdweb-dev/js/commit/419fb3160188c435a89d65caf36bdd845dd239fe)]: - - thirdweb@5.112.2 - -## 0.2.90 - -### Patch Changes - -- Updated dependencies [[`6cd681c`](https://github.com/thirdweb-dev/js/commit/6cd681c9cee4641c67bc341e03231d886ec7501a), [`f07b4b5`](https://github.com/thirdweb-dev/js/commit/f07b4b56c5ff82ae69b8a0edb578e4d75a582334)]: - - thirdweb@5.112.1 - -## 0.2.89 - -### Patch Changes - -- Updated dependencies [[`e26d81c`](https://github.com/thirdweb-dev/js/commit/e26d81ce1d92e96de2ae23b5b53f5278c9ec772f), [`d0bbbfd`](https://github.com/thirdweb-dev/js/commit/d0bbbfd39d2c55554e8fe9c7d2d25d0fc645eeaf), [`a54c1ab`](https://github.com/thirdweb-dev/js/commit/a54c1aba350bf1672b2c3fc1ffc702cf2e36bb49)]: - - thirdweb@5.112.0 - -## 0.2.88 - -### Patch Changes - -- Updated dependencies [[`f964b8a`](https://github.com/thirdweb-dev/js/commit/f964b8aaff22d4078ff4c4c5e09c6ebb5fcb182c), [`424e6b8`](https://github.com/thirdweb-dev/js/commit/424e6b8f9b071d3629ff0291ae6875fa4e4c882e), [`763d3de`](https://github.com/thirdweb-dev/js/commit/763d3de5a8db19a8022b2eda420f13a6787de100)]: - - thirdweb@5.111.10 - -## 0.2.87 - -### Patch Changes - -- Updated dependencies [[`673e51b`](https://github.com/thirdweb-dev/js/commit/673e51b11cf2d06f00ab92bd4cbb45c51d95ec1f)]: - - thirdweb@5.111.9 - -## 0.2.86 - -### Patch Changes - -- Updated dependencies [[`1f440d0`](https://github.com/thirdweb-dev/js/commit/1f440d0c97adf14d26d55666257b57541b2ef01a)]: - - thirdweb@5.111.8 - -## 0.2.85 - -### Patch Changes - -- Updated dependencies [[`7f08161`](https://github.com/thirdweb-dev/js/commit/7f081618e16e7d5754a09780421e35b244186ce8), [`7f08161`](https://github.com/thirdweb-dev/js/commit/7f081618e16e7d5754a09780421e35b244186ce8)]: - - thirdweb@5.111.7 - -## 0.2.84 - -### Patch Changes - -- Updated dependencies []: - - thirdweb@5.111.6 - -## 0.2.83 - -### Patch Changes - -- Updated dependencies [[`7da16cf`](https://github.com/thirdweb-dev/js/commit/7da16cff2ff3aaa80c7fe5614639d950d88b5bf2)]: - - thirdweb@5.111.5 - -## 0.2.82 - -### Patch Changes - -- Updated dependencies [[`d907017`](https://github.com/thirdweb-dev/js/commit/d907017217a0927e7f69eab0470b1fe120b4d1a1), [`40781b8`](https://github.com/thirdweb-dev/js/commit/40781b8170a1014ef76e438ba3c8244137dba7ea)]: - - thirdweb@5.111.4 - -## 0.2.81 - -### Patch Changes - -- Updated dependencies [[`207cb9d`](https://github.com/thirdweb-dev/js/commit/207cb9dbeb82411809bafa2a8e833b1f10414b92)]: - - thirdweb@5.111.3 - -## 0.2.80 - -### Patch Changes - -- Updated dependencies [[`1d54cff`](https://github.com/thirdweb-dev/js/commit/1d54cff7b442b8667ddd54bd783502c367ffc83e), [`fd04eef`](https://github.com/thirdweb-dev/js/commit/fd04eefea9a2a99eee3740d6746040c9f81cd43f)]: - - thirdweb@5.111.2 - -## 0.2.79 - -### Patch Changes - -- Updated dependencies [[`ccdce49`](https://github.com/thirdweb-dev/js/commit/ccdce496e09bc9420b0e15854328651c01f36279)]: - - thirdweb@5.111.1 - -## 0.2.78 - -### Patch Changes - -- Updated dependencies [[`c83f1c6`](https://github.com/thirdweb-dev/js/commit/c83f1c6f7a38c8a9f424798e6e726e1d037ed042), [`219fc69`](https://github.com/thirdweb-dev/js/commit/219fc69d72b1ca861bf0228589039788008ea0c0)]: - - thirdweb@5.111.0 - -## 0.2.77 - -### Patch Changes - -- Updated dependencies [[`6c318f8`](https://github.com/thirdweb-dev/js/commit/6c318f83d63aa8acce46da666e43638e410f799c), [`759b93b`](https://github.com/thirdweb-dev/js/commit/759b93beff7ab10a3a2fa3b9dd25ca628efb9267), [`8e357b3`](https://github.com/thirdweb-dev/js/commit/8e357b3cb39dcc7a8595a83224098a9c44585389)]: - - thirdweb@5.110.6 - -## 0.2.76 - -### Patch Changes - -- Updated dependencies [[`c08fb13`](https://github.com/thirdweb-dev/js/commit/c08fb1356e77be9eeb0569905fcb2ab76a516dc3), [`bcbb3f5`](https://github.com/thirdweb-dev/js/commit/bcbb3f540a8eab2b02f9261b779bd2aad3464598), [`e0c8312`](https://github.com/thirdweb-dev/js/commit/e0c83121c201eb2dbdfa6a6b1bbb637f5ad2a21d)]: - - thirdweb@5.110.5 - -## 0.2.75 - -### Patch Changes - -- Updated dependencies [[`23cb3bd`](https://github.com/thirdweb-dev/js/commit/23cb3bd98c5390e64f45da5a222042cdc76bd7f4), [`abf0bba`](https://github.com/thirdweb-dev/js/commit/abf0bbaf359c8de5b0ed0d481e3791c4b7cbf92b), [`e0abf2b`](https://github.com/thirdweb-dev/js/commit/e0abf2b2738661fda3c69551d78231cfac4b0767)]: - - thirdweb@5.110.4 - -## 0.2.74 - -### Patch Changes - -- Updated dependencies [[`bf46520`](https://github.com/thirdweb-dev/js/commit/bf46520a6b183c4beb873de5e63853cd3a23e685)]: - - thirdweb@5.110.3 - -## 0.2.73 - -### Patch Changes - -- Updated dependencies [[`3e9eb49`](https://github.com/thirdweb-dev/js/commit/3e9eb49787e00c09c3286aeb4ad73826a2856e65), [`bfd3be7`](https://github.com/thirdweb-dev/js/commit/bfd3be764c461c420f1f8520fe4d5d2cc83e42f7), [`ae3a122`](https://github.com/thirdweb-dev/js/commit/ae3a122cf1628f0fc997dd240d4b23842ac30f66), [`d5d5939`](https://github.com/thirdweb-dev/js/commit/d5d593956e12b2a15393ed32d1d742bc43575bdd), [`f757e60`](https://github.com/thirdweb-dev/js/commit/f757e6084648b6b6e5879abeab30954753a1020d)]: - - thirdweb@5.110.2 - -## 0.2.72 - -### Patch Changes - -- Updated dependencies [[`85fe949`](https://github.com/thirdweb-dev/js/commit/85fe9491cd6d2270847e9941ddb7df76aefd8b31), [`e978809`](https://github.com/thirdweb-dev/js/commit/e9788096d665afef7c2a933cea5d6f522fc67273), [`899051f`](https://github.com/thirdweb-dev/js/commit/899051f788b0c2521a022846782892a8c1405a66)]: - - thirdweb@5.110.1 - -## 0.2.71 - -### Patch Changes - -- Updated dependencies [[`ceba683`](https://github.com/thirdweb-dev/js/commit/ceba6835dd60896efc34fe1495a1812c0cc39db7), [`b30369f`](https://github.com/thirdweb-dev/js/commit/b30369f3cc0bbceed3470b6c905551a5c930f08f)]: - - thirdweb@5.110.0 - -## 0.2.70 - -### Patch Changes - -- Updated dependencies [[`5ff6063`](https://github.com/thirdweb-dev/js/commit/5ff6063961c5b58e6a49cae77c803155072f30fc), [`72fbb15`](https://github.com/thirdweb-dev/js/commit/72fbb1550f957c93cfde4e63d7bb6458fb192c47)]: - - thirdweb@5.109.1 - -## 0.2.69 - -### Patch Changes - -- Updated dependencies [[`51c8318`](https://github.com/thirdweb-dev/js/commit/51c8318df7b51126496ee94b1fd79a338734fced), [`d68da22`](https://github.com/thirdweb-dev/js/commit/d68da2239b628f7835b0545a143b69e09cdf4141)]: - - thirdweb@5.109.0 - -## 0.2.68 - -### Patch Changes - -- Updated dependencies [[`e7f42e6`](https://github.com/thirdweb-dev/js/commit/e7f42e6ac591102145f5e25983aeaa6f3647ad7f)]: - - thirdweb@5.108.15 - -## 0.2.67 - -### Patch Changes - -- Updated dependencies [[`8280efb`](https://github.com/thirdweb-dev/js/commit/8280efb99189c5b849156df383522f9e1b8f2c52), [`464af6a`](https://github.com/thirdweb-dev/js/commit/464af6a54cb776158a1656e793ee181c2c221f27)]: - - thirdweb@5.108.14 - -## 0.2.66 - -### Patch Changes - -- Updated dependencies []: - - thirdweb@5.108.13 - -## 0.2.65 - -### Patch Changes - -- Updated dependencies [[`0082e99`](https://github.com/thirdweb-dev/js/commit/0082e996cae47a326110e74457c72b3f3936743d), [`0082e99`](https://github.com/thirdweb-dev/js/commit/0082e996cae47a326110e74457c72b3f3936743d)]: - - thirdweb@5.108.12 - -## 0.2.64 - -### Patch Changes - -- Updated dependencies [[`05550d0`](https://github.com/thirdweb-dev/js/commit/05550d045f291b8e53afd0d7e73c438bee202fb7)]: - - thirdweb@5.108.11 - -## 0.2.63 - -### Patch Changes - -- Updated dependencies [[`f630912`](https://github.com/thirdweb-dev/js/commit/f630912b9b0e1d8ebe22b0b52c650f5e40e12baf), [`62cfbb7`](https://github.com/thirdweb-dev/js/commit/62cfbb7441e66156c55c76d73f5b481f5ea576bc)]: - - thirdweb@5.108.10 - -## 0.2.62 - -### Patch Changes - -- Updated dependencies [[`968913d`](https://github.com/thirdweb-dev/js/commit/968913d55b761c1e23062fdf6008904fa8c17050)]: - - thirdweb@5.108.9 - -## 0.2.61 - -### Patch Changes - -- Updated dependencies [[`af9a73d`](https://github.com/thirdweb-dev/js/commit/af9a73d9302078a506b7d3cb8d55b611f15b6293)]: - - thirdweb@5.108.8 - -## 0.2.60 - -### Patch Changes - -- Updated dependencies [[`e612f16`](https://github.com/thirdweb-dev/js/commit/e612f16a85ffda024d7f74b41abb48b2999b9107)]: - - thirdweb@5.108.7 - -## 0.2.59 - -### Patch Changes - -- Updated dependencies [[`eb603f8`](https://github.com/thirdweb-dev/js/commit/eb603f89086f25202b157eb748f70a252dd7c6e7)]: - - thirdweb@5.108.6 - -## 0.2.58 - -### Patch Changes - -- Updated dependencies [[`7495f46`](https://github.com/thirdweb-dev/js/commit/7495f462221e9e4319d2dd08942693d7888cabe6), [`496615f`](https://github.com/thirdweb-dev/js/commit/496615feaea0e8dfaaf0612e1cc94b60fcae9f4f), [`b8afa98`](https://github.com/thirdweb-dev/js/commit/b8afa98de6bd38376e190f3c54ee9fdadccfebe7), [`94aae90`](https://github.com/thirdweb-dev/js/commit/94aae902a1d036e1f706fc37f1167a47820a6e4e)]: - - thirdweb@5.108.5 - -## 0.2.57 - -### Patch Changes - -- Updated dependencies [[`85bde21`](https://github.com/thirdweb-dev/js/commit/85bde21dc97d2ad06547832e9470532069d0cbf5), [`aa0d23e`](https://github.com/thirdweb-dev/js/commit/aa0d23e966d4fd34ebadc38793f0f006aa70004f)]: - - thirdweb@5.108.4 - -## 0.2.56 - -### Patch Changes - -- Updated dependencies [[`f152139`](https://github.com/thirdweb-dev/js/commit/f152139d739bbdfaefb07ee547c2655259c394b8)]: - - thirdweb@5.108.3 - -## 0.2.55 - -### Patch Changes - -- Updated dependencies [[`1f7cda6`](https://github.com/thirdweb-dev/js/commit/1f7cda66988e88628ca9b8fe608af071aa0026a1), [`9069351`](https://github.com/thirdweb-dev/js/commit/9069351e1abd231cf9051b05b7d92f95f891060b)]: - - thirdweb@5.108.2 - -## 0.2.54 - -### Patch Changes - -- Updated dependencies [[`e1cccd7`](https://github.com/thirdweb-dev/js/commit/e1cccd7a10447943c4b31f34e09a94d2ff5ee826)]: - - thirdweb@5.108.1 - -## 0.2.53 - -### Patch Changes - -- Updated dependencies [[`a94f229`](https://github.com/thirdweb-dev/js/commit/a94f22928a662a5aff7a203fc2d383d9fa0907ec), [`5249cb7`](https://github.com/thirdweb-dev/js/commit/5249cb7409a8486346fe428f824c81dd90845555)]: - - thirdweb@5.108.0 - -## 0.2.52 - -### Patch Changes - -- Updated dependencies [[`93f913c`](https://github.com/thirdweb-dev/js/commit/93f913c614ebbe3db350872bdcff264c07155ce2), [`a85ef0b`](https://github.com/thirdweb-dev/js/commit/a85ef0b222797d38ccd31e72fafda82ceb1faefa)]: - - thirdweb@5.107.1 - -## 0.2.51 - -### Patch Changes - -- Updated dependencies [[`5967fb8`](https://github.com/thirdweb-dev/js/commit/5967fb8afad3dbc28230c53423d304e8895f95bb)]: - - thirdweb@5.107.0 - -## 0.2.50 - -### Patch Changes - -- Updated dependencies [[`32980f8`](https://github.com/thirdweb-dev/js/commit/32980f854b9d53f0039d7bf913a2e5d8ba03704e), [`7b8ceeb`](https://github.com/thirdweb-dev/js/commit/7b8ceebb63ccc7b4b055e3b463bca0e1932d67b8)]: - - thirdweb@5.106.1 - -## 0.2.49 - -### Patch Changes - -- Updated dependencies [[`e160deb`](https://github.com/thirdweb-dev/js/commit/e160deb8b73d0d7ba5f6bcf47c0675230efc4dfb), [`e0738d6`](https://github.com/thirdweb-dev/js/commit/e0738d68d2aa6fcf0cfbdebc4b5603887e3233a1), [`0e3f346`](https://github.com/thirdweb-dev/js/commit/0e3f3460ad30d5a1c52552ce9d786a9cc814dfee), [`a6f846f`](https://github.com/thirdweb-dev/js/commit/a6f846fc1ead20734a52ff69263e6407f7ba3f9e), [`15f0839`](https://github.com/thirdweb-dev/js/commit/15f083912c053f98eb30a28cddcf0114450129e6), [`f276dcf`](https://github.com/thirdweb-dev/js/commit/f276dcfd766c79149c5302b0207777bcc9f267a0)]: - - thirdweb@5.106.0 - -## 0.2.48 - -### Patch Changes - -- Updated dependencies [[`557f0e2`](https://github.com/thirdweb-dev/js/commit/557f0e29e86d2ef3e3b72988f714203b4ede1009)]: - - thirdweb@5.105.48 - -## 0.2.47 - -### Patch Changes - -- Updated dependencies [[`97e5080`](https://github.com/thirdweb-dev/js/commit/97e5080fdfd5b8b1106141012bdee2db2d27ae4c)]: - - thirdweb@5.105.47 - -## 0.2.46 - -### Patch Changes - -- Updated dependencies [[`224c9d0`](https://github.com/thirdweb-dev/js/commit/224c9d034f274c3e6cf510d3508856fc36501c63)]: - - thirdweb@5.105.46 - -## 0.2.45 - -### Patch Changes - -- Updated dependencies [[`0b45405`](https://github.com/thirdweb-dev/js/commit/0b454050b14806c103ea446e3667d0c970739912), [`dc1f7ab`](https://github.com/thirdweb-dev/js/commit/dc1f7ab2ee820be512776a413f7de362ff6b98ef), [`ea80610`](https://github.com/thirdweb-dev/js/commit/ea8061048adddb9fb7648f29ce1f3041f250ddfb), [`3ad9f7d`](https://github.com/thirdweb-dev/js/commit/3ad9f7deba850b0a50e355111af11fd419db2efd)]: - - thirdweb@5.105.45 - -## 0.2.44 - -### Patch Changes - -- Updated dependencies [[`ef15ba7`](https://github.com/thirdweb-dev/js/commit/ef15ba7c434f8c9bde3b6d45d43d90e74f20616b)]: - - thirdweb@5.105.44 - -## 0.2.43 - -### Patch Changes - -- Updated dependencies [[`1759112`](https://github.com/thirdweb-dev/js/commit/1759112d722e11d2d9a902f2221e70636188015e)]: - - thirdweb@5.105.43 - -## 0.2.42 - -### Patch Changes - -- Updated dependencies [[`b149019`](https://github.com/thirdweb-dev/js/commit/b149019318a3a9f73aab96b68a92daef41a961e2), [`4ff1cf7`](https://github.com/thirdweb-dev/js/commit/4ff1cf79794af0c2e52f4beacbcf0d5d69266365)]: - - thirdweb@5.105.42 - -## 0.2.41 - -### Patch Changes - -- Updated dependencies [[`af6a306`](https://github.com/thirdweb-dev/js/commit/af6a306955aaf6a76fc22e3f8fd4e78854680d9c)]: - - thirdweb@5.105.41 - -## 0.2.40 - -### Patch Changes - -- Updated dependencies [[`597431e`](https://github.com/thirdweb-dev/js/commit/597431ec1dc7b6a8b52b6676256e77d96b9a16b1)]: - - thirdweb@5.105.40 - -## 0.2.39 - -### Patch Changes - -- Updated dependencies [[`50c6371`](https://github.com/thirdweb-dev/js/commit/50c6371e1ec12e296839987a6c25d9814dea2208)]: - - thirdweb@5.105.39 - -## 0.2.38 - -### Patch Changes - -- Updated dependencies [[`76cfecb`](https://github.com/thirdweb-dev/js/commit/76cfecb3054c03d952980a38842607300824a3bd), [`44e6e11`](https://github.com/thirdweb-dev/js/commit/44e6e115d9519dd75ae9efa20c8be069fee067ea), [`f3ad6ef`](https://github.com/thirdweb-dev/js/commit/f3ad6efcf829e23435c4e2859809a74be877809d)]: - - thirdweb@5.105.38 - -## 0.2.37 - -### Patch Changes - -- Updated dependencies [[`1083316`](https://github.com/thirdweb-dev/js/commit/1083316ef681c3f6ca4138acd00b1e945c5156d5)]: - - thirdweb@5.105.37 - -## 0.2.36 - -### Patch Changes - -- Updated dependencies [[`e01af9d`](https://github.com/thirdweb-dev/js/commit/e01af9db7128a66b8bc7297911f713eb828da3cc)]: - - thirdweb@5.105.36 - -## 0.2.35 - -### Patch Changes - -- Updated dependencies [[`f78b0a2`](https://github.com/thirdweb-dev/js/commit/f78b0a28dabf07dee801b923d33066c0bd103c3c)]: - - thirdweb@5.105.35 - -## 0.2.34 - -### Patch Changes - -- Updated dependencies [[`7f11657`](https://github.com/thirdweb-dev/js/commit/7f116577aba529e21a48163b295b091f9d6008f7), [`467ba50`](https://github.com/thirdweb-dev/js/commit/467ba5090729dd951970b15ef320caf9d058cc0b), [`d227bc3`](https://github.com/thirdweb-dev/js/commit/d227bc389bef4b2f84544a73732a61782e3dca16)]: - - thirdweb@5.105.34 - -## 0.2.33 - -### Patch Changes - -- Updated dependencies [[`4be655d`](https://github.com/thirdweb-dev/js/commit/4be655dd084dd474d021a7a539a0c67e648bb42d)]: - - thirdweb@5.105.33 - -## 0.2.32 - -### Patch Changes - -- Updated dependencies [[`0d7e5e5`](https://github.com/thirdweb-dev/js/commit/0d7e5e563d142d178005469e31ea3423e6daacf1), [`a77e98a`](https://github.com/thirdweb-dev/js/commit/a77e98a48a2f10d8b465e2ef1ba0f28a6df43f3f), [`66c7df9`](https://github.com/thirdweb-dev/js/commit/66c7df98e42dc7b5168b817e3f9a179349479d62), [`90f36bc`](https://github.com/thirdweb-dev/js/commit/90f36bc414a8f29b9794d3d6a15e2b3e145eca7c)]: - - thirdweb@5.105.32 - -## 0.2.31 - -### Patch Changes - -- Updated dependencies [[`45ba811`](https://github.com/thirdweb-dev/js/commit/45ba811950fe9e85060a4c93c76c13f7f00f8292), [`c672a84`](https://github.com/thirdweb-dev/js/commit/c672a84fc398730e673b40537e03ef09615106c7), [`d52855d`](https://github.com/thirdweb-dev/js/commit/d52855dbdabf497dc72a5dbed56c55d345bac0e9)]: - - thirdweb@5.105.31 - -## 0.2.30 - -### Patch Changes - -- Updated dependencies [[`e114b2c`](https://github.com/thirdweb-dev/js/commit/e114b2c4f98aa9470afffcd5f809953bb69c5c4f)]: - - thirdweb@5.105.30 - -## 0.2.29 - -### Patch Changes - -- Updated dependencies [[`c0948fb`](https://github.com/thirdweb-dev/js/commit/c0948fb9fe71b6403ac08f84e4c6f30bdbea8e3a)]: - - thirdweb@5.105.29 - -## 0.2.28 - -### Patch Changes - -- Updated dependencies [[`621c1de`](https://github.com/thirdweb-dev/js/commit/621c1de62e486b8698d9bd38fabde73fef9f7de5)]: - - thirdweb@5.105.28 - -## 0.2.27 - -### Patch Changes - -- Updated dependencies [[`fd4414b`](https://github.com/thirdweb-dev/js/commit/fd4414b451bf07d8a165f0dee9c71d2a1bea1812), [`9a3ebe1`](https://github.com/thirdweb-dev/js/commit/9a3ebe1cb1e937d40477019c71e163cc1837a99e), [`e5326c4`](https://github.com/thirdweb-dev/js/commit/e5326c43a9bf2aed665907760c48e43e2310cd74), [`e1ad7da`](https://github.com/thirdweb-dev/js/commit/e1ad7daf5401c4ddd3661eceed15e8c4f481d28e)]: - - thirdweb@5.105.27 - -## 0.2.26 - -### Patch Changes - -- Updated dependencies [[`b86d520`](https://github.com/thirdweb-dev/js/commit/b86d520f3c05c4c3741d9f3071f40d13cebe24dd), [`e4ba47b`](https://github.com/thirdweb-dev/js/commit/e4ba47bd1e4bc5aee4ca1e0bedd583dc9e33d30e), [`58787a2`](https://github.com/thirdweb-dev/js/commit/58787a28f362d168a72a6eb462930ad7de4b87f2)]: - - thirdweb@5.105.26 - -## 0.2.25 - -### Patch Changes - -- Updated dependencies [[`d35b6fc`](https://github.com/thirdweb-dev/js/commit/d35b6fc1fe320c55cddfe3080dc5b66a3d605514)]: - - thirdweb@5.105.25 - -## 0.2.24 - -### Patch Changes - -- Updated dependencies [[`c717eaa`](https://github.com/thirdweb-dev/js/commit/c717eaadae09c65b2f651145f1279ba876c90ace)]: - - thirdweb@5.105.24 - -## 0.2.23 - -### Patch Changes - -- Updated dependencies [[`4f38198`](https://github.com/thirdweb-dev/js/commit/4f38198ae110bf89479109e3e099ea94ddfd774e)]: - - thirdweb@5.105.23 - -## 0.2.22 - -### Patch Changes - -- Updated dependencies [[`1cbbbc3`](https://github.com/thirdweb-dev/js/commit/1cbbbc3c12763c9fae3af8a7fe6490383e0cad0d), [`58dbe90`](https://github.com/thirdweb-dev/js/commit/58dbe90b930a215684871ff45e2dd9abd1d1f1d4), [`e92d8f9`](https://github.com/thirdweb-dev/js/commit/e92d8f921a4b620e731e8916e4c145711c87f5fa)]: - - thirdweb@5.105.22 - -## 0.2.21 - -### Patch Changes - -- Updated dependencies [[`3c8e444`](https://github.com/thirdweb-dev/js/commit/3c8e444fe6f4bf90c8d2eaaa1b4481b683f41ec6), [`adec6be`](https://github.com/thirdweb-dev/js/commit/adec6be844f8e35d770e2d7f491117cea4a34548)]: - - thirdweb@5.105.21 - -## 0.2.20 - -### Patch Changes - -- Updated dependencies [[`cf22c23`](https://github.com/thirdweb-dev/js/commit/cf22c23b45e86adbe50a2b7b40e7a283f5222941)]: - - thirdweb@5.105.20 - -## 0.2.19 - -### Patch Changes - -- Updated dependencies [[`08955f1`](https://github.com/thirdweb-dev/js/commit/08955f1588c749104c12db51d974c7eebc258efd), [`7562952`](https://github.com/thirdweb-dev/js/commit/756295241a7168d4c62bdc146ffb3352859e58cf)]: - - thirdweb@5.105.19 - -## 0.2.18 - -### Patch Changes - -- Updated dependencies [[`37414eb`](https://github.com/thirdweb-dev/js/commit/37414eb54aacd9c155155f2bd5497e31b109bf97), [`22bf68a`](https://github.com/thirdweb-dev/js/commit/22bf68a6f00b715b899d28469cc3d795480d736c)]: - - thirdweb@5.105.18 - -## 0.2.17 - -### Patch Changes - -- Updated dependencies [[`4cbf671`](https://github.com/thirdweb-dev/js/commit/4cbf67181da4746d252d0bd3bcf0b522719ecf67), [`426bb8b`](https://github.com/thirdweb-dev/js/commit/426bb8bbb21b1c0f485aa3ab79134aad30927afb), [`170c377`](https://github.com/thirdweb-dev/js/commit/170c3774456cbd05482227104307d834641ad1e2), [`bfa0a42`](https://github.com/thirdweb-dev/js/commit/bfa0a42219cb8351ca169973211864af14f94896), [`823af01`](https://github.com/thirdweb-dev/js/commit/823af013ae8681ec9177f54929834d36802f39b5), [`0f38a12`](https://github.com/thirdweb-dev/js/commit/0f38a1287af527da53e7948b54e0dfd4b738fa69), [`620e294`](https://github.com/thirdweb-dev/js/commit/620e294f8ce59e8ec217e3984177ac6dd6d48772)]: - - thirdweb@5.105.17 - -## 0.2.16 - -### Patch Changes - -- Updated dependencies [[`f33e31a`](https://github.com/thirdweb-dev/js/commit/f33e31ad6e045fe751c2d7a51874f8a13e99861f), [`592bf6f`](https://github.com/thirdweb-dev/js/commit/592bf6f1fdd4f1a2babbef94a37b93881d28b6f5)]: - - thirdweb@5.105.16 - -## 0.2.15 - -### Patch Changes - -- Updated dependencies [[`585eac2`](https://github.com/thirdweb-dev/js/commit/585eac2a6f49877318cb275f6fff5910ceabdbfb), [`d62e997`](https://github.com/thirdweb-dev/js/commit/d62e9971ee7707211b513509de80a5b0abdaa4d0)]: - - thirdweb@5.105.15 - -## 0.2.14 - -### Patch Changes - -- Updated dependencies [[`f3234c3`](https://github.com/thirdweb-dev/js/commit/f3234c3c414f2fb4ee41c2394bf52a56fa081f73)]: - - thirdweb@5.105.14 - -## 0.2.13 - -### Patch Changes - -- Updated dependencies [[`772eb0c`](https://github.com/thirdweb-dev/js/commit/772eb0cc53982951dc6b6baed1c4411bd3e39934), [`446a69b`](https://github.com/thirdweb-dev/js/commit/446a69b1d18b8711324b24377abecdbda10b8a1f)]: - - thirdweb@5.105.13 - -## 0.2.12 - -### Patch Changes - -- Updated dependencies [[`bfd728a`](https://github.com/thirdweb-dev/js/commit/bfd728a9d1aab7d0044791b218abf9ac9dbc9bf6)]: - - thirdweb@5.105.12 - -## 0.2.11 - -### Patch Changes - -- Updated dependencies [[`692cedf`](https://github.com/thirdweb-dev/js/commit/692cedf9211fb5a6c24406df69155b920f7d2557)]: - - thirdweb@5.105.11 - -## 0.2.10 - -### Patch Changes - -- Updated dependencies [[`415ad90`](https://github.com/thirdweb-dev/js/commit/415ad909865d9be942771fb428f904e17916127d), [`c644463`](https://github.com/thirdweb-dev/js/commit/c64446306e7ee41110ca3f5bc6994a69d3f4de20), [`10c3b6f`](https://github.com/thirdweb-dev/js/commit/10c3b6f27fe4b73f5b1c71c4395ca350e5cd26d9)]: - - thirdweb@5.105.10 - -## 0.2.9 - -### Patch Changes - -- Updated dependencies [[`f48d800`](https://github.com/thirdweb-dev/js/commit/f48d8006bc5845c05f9bfc050a850edfaee7bdb5)]: - - thirdweb@5.105.9 - -## 0.2.8 - -### Patch Changes - -- Updated dependencies [[`0ea25bb`](https://github.com/thirdweb-dev/js/commit/0ea25bb9ae7b17524b4f883993bba5ebb20ca939)]: - - thirdweb@5.105.8 - -## 0.2.7 - -### Patch Changes - -- Updated dependencies [[`cb77544`](https://github.com/thirdweb-dev/js/commit/cb77544a46b4c4ca7899920f7077760e8d0e94c9)]: - - thirdweb@5.105.7 - -## 0.2.6 - -### Patch Changes - -- Updated dependencies [[`ca1fb84`](https://github.com/thirdweb-dev/js/commit/ca1fb84ebaf1db8ef1221a3f164d60d62fef505b), [`f94226a`](https://github.com/thirdweb-dev/js/commit/f94226ad7ebdd52e7783353ee8128f947063d607), [`341325f`](https://github.com/thirdweb-dev/js/commit/341325f844f510dac2af568f944033d4b684c940)]: - - thirdweb@5.105.6 - -## 0.2.5 - -### Patch Changes - -- Updated dependencies [[`ec75d95`](https://github.com/thirdweb-dev/js/commit/ec75d9502c308c87fdf620769b66e1c87679c7ab), [`50e01ce`](https://github.com/thirdweb-dev/js/commit/50e01ce06771fdae03b8ce07efa7383322b71a69), [`85c4ef1`](https://github.com/thirdweb-dev/js/commit/85c4ef10ce02b005e97da96e7f4dfcb3fb15e87b), [`7ab8808`](https://github.com/thirdweb-dev/js/commit/7ab8808b50fae437e43d4f2e2f95754fbc7ee992), [`fd967ce`](https://github.com/thirdweb-dev/js/commit/fd967ce8e362cb8a954d2a0a0ae87137a2a5bb4d)]: - - thirdweb@5.105.5 - -## 0.2.4 - -### Patch Changes - -- Updated dependencies [[`bc51255`](https://github.com/thirdweb-dev/js/commit/bc512551ab3a685bdb0ac167105f8aa7385d46d8)]: - - thirdweb@5.105.4 - -## 0.2.3 - -### Patch Changes - -- Updated dependencies [[`acd5656`](https://github.com/thirdweb-dev/js/commit/acd5656d4d592e3a7ba4a3c09994418e0b654120), [`6d1d344`](https://github.com/thirdweb-dev/js/commit/6d1d344c48302d45aeb63532c84cc8e79c93e26f), [`f9d7935`](https://github.com/thirdweb-dev/js/commit/f9d7935d848cbb2dea3f5204d5bff69cd0c3a921)]: - - thirdweb@5.105.3 - -## 0.2.2 - -### Patch Changes - -- Updated dependencies [[`277c2e2`](https://github.com/thirdweb-dev/js/commit/277c2e2ed96ff38194a2d5c33916d25a8f1e9a6f), [`c2ef5eb`](https://github.com/thirdweb-dev/js/commit/c2ef5eb51cb15dc23942b3681f5f5ca7634594ad)]: - - thirdweb@5.105.2 - -## 0.2.1 - -### Patch Changes - -- Updated dependencies [[`fa5e13b`](https://github.com/thirdweb-dev/js/commit/fa5e13b5d3f181bda4cd2b4153629b23e7c17dfb)]: - - thirdweb@5.105.1 - -## 0.2.0 - -### Minor Changes - -- [#7431](https://github.com/thirdweb-dev/js/pull/7431) [`1387337`](https://github.com/thirdweb-dev/js/commit/1387337955a38f1527266b0a6146bb18d86426aa) Thanks [@PaoloRollo](https://github.com/PaoloRollo)! - update hey-api version to 0.76.0 - -### Patch Changes - -- Updated dependencies [[`1387337`](https://github.com/thirdweb-dev/js/commit/1387337955a38f1527266b0a6146bb18d86426aa), [`6712911`](https://github.com/thirdweb-dev/js/commit/67129119504953e8c547f209f184e4aeca5fe23a), [`af89836`](https://github.com/thirdweb-dev/js/commit/af89836b6c1b8ea39407fdfddc2fb07ad95d768d), [`6aa2765`](https://github.com/thirdweb-dev/js/commit/6aa2765a344d89e8072010d5aff09d3cc6a59281)]: - - thirdweb@5.105.0 - -## 0.1.1 - -### Patch Changes - -- Updated dependencies [[`3107ba1`](https://github.com/thirdweb-dev/js/commit/3107ba1c3753352cac2f9a3d16dcdccd522b7659), [`ef2895f`](https://github.com/thirdweb-dev/js/commit/ef2895fa2c30b8b8b5250dadb05e3f5d125c9e4d), [`c26be2d`](https://github.com/thirdweb-dev/js/commit/c26be2d958283fb77d7689e31356b1cee7c6ff2a)]: - - thirdweb@5.104.1 - -## 0.1.0 - -### Minor Changes - -- [#7389](https://github.com/thirdweb-dev/js/pull/7389) [`9667c74`](https://github.com/thirdweb-dev/js/commit/9667c749810b4591d95a4669764b621cacbe26d9) Thanks [@PaoloRollo](https://github.com/PaoloRollo)! - Initial release of the Nebula TS sdk - -### Patch Changes - -- Updated dependencies [[`70e024f`](https://github.com/thirdweb-dev/js/commit/70e024f43e6ff0a890efa6288fbdc9c19ca42e72), [`6be9459`](https://github.com/thirdweb-dev/js/commit/6be945936195e6ba41dbdd3a90a28f097e81dbee), [`787118d`](https://github.com/thirdweb-dev/js/commit/787118d36765b9f57113cb62c606e494e715be04), [`3dbf9e1`](https://github.com/thirdweb-dev/js/commit/3dbf9e16fdff04eb36e9bb757a2b136f2b8001dc), [`9c420c0`](https://github.com/thirdweb-dev/js/commit/9c420c0c9d8874469bcc46e6122a637aff67923f)]: - - thirdweb@5.104.0 diff --git a/packages/nebula/README.md b/packages/nebula/README.md deleted file mode 100644 index 46d461c6376..00000000000 --- a/packages/nebula/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Nebula OpenAPI TypeScript wrapper - -This package is a thin OpenAPI wrapper for Nebula, our AI agent service. - -## Configuration - -```ts -import { configure } from "@thirdweb-dev/nebula"; - -// call this once at the startup of your application -configure({ - secretKey: "", -}); -``` - -You can also configure the client with a Thirdweb client instance: - -```ts -import { configureWithClient } from "@thirdweb-dev/nebula"; -import { twClient } from "./thirdwebClient"; - -// call this once at the startup of your application -configureWithClient(twClient); -``` - -## Example Usage - -```ts -import { getModels } from "@thirdweb-dev/nebula"; - -const models = await getModels(); -``` - -You can also use this package on a client application (eg. NextJS) by retrieving the Nebula API client first. - -```ts -import { getNebulaClient, getAgents } from "@thirdweb-dev/nebula"; - -// retrieve the Nebula auth token -const nebulaClient = getNebulaClient(authToken); - -// pass the client inside the methods -const agentsResult = await getAgents({ client: nebulaClient }); -``` - -This package was autogenerated from the [Nebula openAPI spec](https://nebula-api.thirdweb.com/docs) using [@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) diff --git a/packages/nebula/biome.json b/packages/nebula/biome.json deleted file mode 100644 index 709230af37e..00000000000 --- a/packages/nebula/biome.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/2.0.6/schema.json", - "extends": "//", - "overrides": [ - { - "assist": { - "actions": { - "source": { - "useSortedKeys": "off" - } - } - }, - "includes": ["package.json"] - } - ] -} diff --git a/packages/nebula/openapi-ts.config.ts b/packages/nebula/openapi-ts.config.ts deleted file mode 100644 index c9d254e35cf..00000000000 --- a/packages/nebula/openapi-ts.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineConfig } from "@hey-api/openapi-ts"; - -export default defineConfig({ - input: "https://nebula-api.thirdweb-dev.com/openapi.json", - output: { format: "biome", lint: "biome", path: "src/client" }, - plugins: ["@hey-api/client-fetch"], -}); diff --git a/packages/nebula/package.json b/packages/nebula/package.json deleted file mode 100644 index 7212f6a5095..00000000000 --- a/packages/nebula/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "author": "thirdweb eng ", - "bugs": { - "url": "https://github.com/thirdweb-dev/js/issues" - }, - "dependencies": { - "thirdweb": "workspace:*" - }, - "devDependencies": { - "@biomejs/biome": "2.0.6", - "@hey-api/openapi-ts": "0.76.0", - "rimraf": "6.0.1", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=18" - }, - "exports": { - ".": { - "types": "./dist/types/exports/thirdweb.d.ts", - "import": "./dist/esm/exports/thirdweb.js", - "default": "./dist/cjs/exports/thirdweb.js" - }, - "./package.json": "./package.json" - }, - "files": [ - "dist/*", - "src/*" - ], - "license": "Apache-2.0", - "main": "./dist/cjs/exports/thirdweb.js", - "module": "./dist/esm/exports/thirdweb.js", - "name": "@thirdweb-dev/nebula", - "peerDependencies": { - "typescript": ">=5.0.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - }, - "repository": { - "type": "git", - "url": "git+https://github.com/thirdweb-dev/js.git#main" - }, - "scripts": { - "build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types", - "build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json", - "build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json", - "build:generate": "openapi-ts && pnpm format", - "build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rimraf dist", - "fix": "biome check ./src --fix", - "format": "biome format ./src --write", - "lint": "biome check ./src" - }, - "type": "module", - "types": "./dist/types/exports/thirdweb.d.ts", - "typings": "./dist/types/exports/thirdweb.d.ts", - "version": "0.2.120" -} diff --git a/packages/nebula/src/client/client.gen.ts b/packages/nebula/src/client/client.gen.ts deleted file mode 100644 index 3452237ec12..00000000000 --- a/packages/nebula/src/client/client.gen.ts +++ /dev/null @@ -1,28 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import { - type Config, - createClient, - createConfig, - type ClientOptions as DefaultClientOptions, -} from "./client/index.js"; -import type { ClientOptions } from "./types.gen.js"; - -/** - * The `createClientConfig()` function will be called on client initialization - * and the returned object will become the client's initial configuration. - * - * You may want to initialize your client this way instead of calling - * `setConfig()`. This is useful for example if you're using Next.js - * to ensure your client always has the correct values. - */ -export type CreateClientConfig = - ( - override?: Config, - ) => Config & T>; - -export const client = createClient( - createConfig({ - baseUrl: "https://nebula-api.thirdweb-dev.com", - }), -); diff --git a/packages/nebula/src/client/client/client.ts b/packages/nebula/src/client/client/client.ts deleted file mode 100644 index 8cb5e5bde84..00000000000 --- a/packages/nebula/src/client/client/client.ts +++ /dev/null @@ -1,189 +0,0 @@ -import type { Client, Config, RequestOptions } from "./types.js"; -import { - buildUrl, - createConfig, - createInterceptors, - getParseAs, - mergeConfigs, - mergeHeaders, - setAuthParams, -} from "./utils.js"; - -type ReqInit = Omit & { - body?: any; - headers: ReturnType; -}; - -export const createClient = (config: Config = {}): Client => { - let _config = mergeConfigs(createConfig(), config); - - const getConfig = (): Config => ({ ..._config }); - - const setConfig = (config: Config): Config => { - _config = mergeConfigs(_config, config); - return getConfig(); - }; - - const interceptors = createInterceptors< - Request, - Response, - unknown, - RequestOptions - >(); - - const request: Client["request"] = async (options) => { - const opts = { - ..._config, - ...options, - fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, - headers: mergeHeaders(_config.headers, options.headers), - }; - - if (opts.security) { - await setAuthParams({ - ...opts, - security: opts.security, - }); - } - - if (opts.body && opts.bodySerializer) { - opts.body = opts.bodySerializer(opts.body); - } - - // remove Content-Type header if body is empty to avoid sending invalid requests - if (opts.body === undefined || opts.body === "") { - opts.headers.delete("Content-Type"); - } - - const url = buildUrl(opts); - const requestInit: ReqInit = { - redirect: "follow", - ...opts, - }; - - let request = new Request(url, requestInit); - - for (const fn of interceptors.request._fns) { - if (fn) { - request = await fn(request, opts); - } - } - - // fetch must be assigned here, otherwise it would throw the error: - // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation - const _fetch = opts.fetch!; - let response = await _fetch(request); - - for (const fn of interceptors.response._fns) { - if (fn) { - response = await fn(response, request, opts); - } - } - - const result = { - request, - response, - }; - - if (response.ok) { - if ( - response.status === 204 || - response.headers.get("Content-Length") === "0" - ) { - return opts.responseStyle === "data" - ? {} - : { - data: {}, - ...result, - }; - } - - const parseAs = - (opts.parseAs === "auto" - ? getParseAs(response.headers.get("Content-Type")) - : opts.parseAs) ?? "json"; - - let data: any; - switch (parseAs) { - case "arrayBuffer": - case "blob": - case "formData": - case "json": - case "text": - data = await response[parseAs](); - break; - case "stream": - return opts.responseStyle === "data" - ? response.body - : { - data: response.body, - ...result, - }; - } - - if (parseAs === "json") { - if (opts.responseValidator) { - await opts.responseValidator(data); - } - - if (opts.responseTransformer) { - data = await opts.responseTransformer(data); - } - } - - return opts.responseStyle === "data" - ? data - : { - data, - ...result, - }; - } - - let error = await response.text(); - - try { - error = JSON.parse(error); - } catch { - // noop - } - - let finalError = error; - - for (const fn of interceptors.error._fns) { - if (fn) { - finalError = (await fn(error, response, request, opts)) as string; - } - } - - finalError = finalError || ({} as string); - - if (opts.throwOnError) { - throw finalError; - } - - // TODO: we probably want to return error and improve types - return opts.responseStyle === "data" - ? undefined - : { - error: finalError, - ...result, - }; - }; - - return { - buildUrl, - connect: (options) => request({ ...options, method: "CONNECT" }), - delete: (options) => request({ ...options, method: "DELETE" }), - get: (options) => request({ ...options, method: "GET" }), - getConfig, - head: (options) => request({ ...options, method: "HEAD" }), - interceptors, - options: (options) => request({ ...options, method: "OPTIONS" }), - patch: (options) => request({ ...options, method: "PATCH" }), - post: (options) => request({ ...options, method: "POST" }), - put: (options) => request({ ...options, method: "PUT" }), - request, - setConfig, - trace: (options) => request({ ...options, method: "TRACE" }), - }; -}; diff --git a/packages/nebula/src/client/client/index.ts b/packages/nebula/src/client/client/index.ts deleted file mode 100644 index 33d0123ce32..00000000000 --- a/packages/nebula/src/client/client/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -export type { Auth } from "../core/auth.js"; -export type { QuerySerializerOptions } from "../core/bodySerializer.js"; -export { - formDataBodySerializer, - jsonBodySerializer, - urlSearchParamsBodySerializer, -} from "../core/bodySerializer.js"; -export { buildClientParams } from "../core/params.js"; -export { createClient } from "./client.js"; -export type { - Client, - ClientOptions, - Config, - CreateClientConfig, - Options, - OptionsLegacyParser, - RequestOptions, - RequestResult, - ResponseStyle, - TDataShape, -} from "./types.js"; -export { createConfig, mergeHeaders } from "./utils.js"; diff --git a/packages/nebula/src/client/client/types.ts b/packages/nebula/src/client/client/types.ts deleted file mode 100644 index 6d37980f22f..00000000000 --- a/packages/nebula/src/client/client/types.ts +++ /dev/null @@ -1,222 +0,0 @@ -import type { Auth } from "../core/auth.js"; -import type { - Client as CoreClient, - Config as CoreConfig, -} from "../core/types.js"; -import type { Middleware } from "./utils.js"; - -export type ResponseStyle = "data" | "fields"; - -export interface Config - extends Omit, - CoreConfig { - /** - * Base URL for all requests made by this client. - */ - baseUrl?: T["baseUrl"]; - /** - * Fetch API implementation. You can use this option to provide a custom - * fetch instance. - * - * @default globalThis.fetch - */ - fetch?: (request: Request) => ReturnType; - /** - * Please don't use the Fetch client for Next.js applications. The `next` - * options won't have any effect. - * - * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. - */ - next?: never; - /** - * Return the response data parsed in a specified format. By default, `auto` - * will infer the appropriate method from the `Content-Type` response header. - * You can override this behavior with any of the {@link Body} methods. - * Select `stream` if you don't want to parse response data at all. - * - * @default 'auto' - */ - parseAs?: - | "arrayBuffer" - | "auto" - | "blob" - | "formData" - | "json" - | "stream" - | "text"; - /** - * Should we return only data or multiple fields (data, error, response, etc.)? - * - * @default 'fields' - */ - responseStyle?: ResponseStyle; - /** - * Throw an error instead of returning it in the response? - * - * @default false - */ - throwOnError?: T["throwOnError"]; -} - -export interface RequestOptions< - TResponseStyle extends ResponseStyle = "fields", - ThrowOnError extends boolean = boolean, - Url extends string = string, -> extends Config<{ - responseStyle: TResponseStyle; - throwOnError: ThrowOnError; - }> { - /** - * Any body that you want to add to your request. - * - * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} - */ - body?: unknown; - path?: Record; - query?: Record; - /** - * Security mechanism(s) to use for the request. - */ - security?: ReadonlyArray; - url: Url; -} - -export type RequestResult< - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = boolean, - TResponseStyle extends ResponseStyle = "fields", -> = ThrowOnError extends true - ? Promise< - TResponseStyle extends "data" - ? TData extends Record - ? TData[keyof TData] - : TData - : { - data: TData extends Record - ? TData[keyof TData] - : TData; - request: Request; - response: Response; - } - > - : Promise< - TResponseStyle extends "data" - ? - | (TData extends Record - ? TData[keyof TData] - : TData) - | undefined - : ( - | { - data: TData extends Record - ? TData[keyof TData] - : TData; - error: undefined; - } - | { - data: undefined; - error: TError extends Record - ? TError[keyof TError] - : TError; - } - ) & { - request: Request; - response: Response; - } - >; - -export interface ClientOptions { - baseUrl?: string; - responseStyle?: ResponseStyle; - throwOnError?: boolean; -} - -type MethodFn = < - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = "fields", ->( - options: Omit, "method">, -) => RequestResult; - -type RequestFn = < - TData = unknown, - TError = unknown, - ThrowOnError extends boolean = false, - TResponseStyle extends ResponseStyle = "fields", ->( - options: Omit, "method"> & - Pick>, "method">, -) => RequestResult; - -type BuildUrlFn = < - TData extends { - body?: unknown; - path?: Record; - query?: Record; - url: string; - }, ->( - options: Pick & Options, -) => string; - -export type Client = CoreClient & { - interceptors: Middleware; -}; - -/** - * The `createClientConfig()` function will be called on client initialization - * and the returned object will become the client's initial configuration. - * - * You may want to initialize your client this way instead of calling - * `setConfig()`. This is useful for example if you're using Next.js - * to ensure your client always has the correct values. - */ -export type CreateClientConfig = ( - override?: Config, -) => Config & T>; - -export interface TDataShape { - body?: unknown; - headers?: unknown; - path?: unknown; - query?: unknown; - url: string; -} - -type OmitKeys = Pick>; - -export type Options< - TData extends TDataShape = TDataShape, - ThrowOnError extends boolean = boolean, - TResponseStyle extends ResponseStyle = "fields", -> = OmitKeys< - RequestOptions, - "body" | "path" | "query" | "url" -> & - Omit; - -export type OptionsLegacyParser< - TData = unknown, - ThrowOnError extends boolean = boolean, - TResponseStyle extends ResponseStyle = "fields", -> = TData extends { body?: any } - ? TData extends { headers?: any } - ? OmitKeys< - RequestOptions, - "body" | "headers" | "url" - > & - TData - : OmitKeys, "body" | "url"> & - TData & - Pick, "headers"> - : TData extends { headers?: any } - ? OmitKeys< - RequestOptions, - "headers" | "url" - > & - TData & - Pick, "body"> - : OmitKeys, "url"> & TData; diff --git a/packages/nebula/src/client/client/utils.ts b/packages/nebula/src/client/client/utils.ts deleted file mode 100644 index 103b5315f96..00000000000 --- a/packages/nebula/src/client/client/utils.ts +++ /dev/null @@ -1,417 +0,0 @@ -import { getAuthToken } from "../core/auth.js"; -import type { - QuerySerializer, - QuerySerializerOptions, -} from "../core/bodySerializer.js"; -import { jsonBodySerializer } from "../core/bodySerializer.js"; -import { - serializeArrayParam, - serializeObjectParam, - serializePrimitiveParam, -} from "../core/pathSerializer.js"; -import type { Client, ClientOptions, Config, RequestOptions } from "./types.js"; - -interface PathSerializer { - path: Record; - url: string; -} - -const PATH_PARAM_RE = /\{[^{}]+\}/g; - -type ArrayStyle = "form" | "spaceDelimited" | "pipeDelimited"; -type MatrixStyle = "label" | "matrix" | "simple"; -type ArraySeparatorStyle = ArrayStyle | MatrixStyle; - -const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { - let url = _url; - const matches = _url.match(PATH_PARAM_RE); - if (matches) { - for (const match of matches) { - let explode = false; - let name = match.substring(1, match.length - 1); - let style: ArraySeparatorStyle = "simple"; - - if (name.endsWith("*")) { - explode = true; - name = name.substring(0, name.length - 1); - } - - if (name.startsWith(".")) { - name = name.substring(1); - style = "label"; - } else if (name.startsWith(";")) { - name = name.substring(1); - style = "matrix"; - } - - const value = path[name]; - - if (value === undefined || value === null) { - continue; - } - - if (Array.isArray(value)) { - url = url.replace( - match, - serializeArrayParam({ explode, name, style, value }), - ); - continue; - } - - if (typeof value === "object") { - url = url.replace( - match, - serializeObjectParam({ - explode, - name, - style, - value: value as Record, - valueOnly: true, - }), - ); - continue; - } - - if (style === "matrix") { - url = url.replace( - match, - `;${serializePrimitiveParam({ - name, - value: value as string, - })}`, - ); - continue; - } - - const replaceValue = encodeURIComponent( - style === "label" ? `.${value as string}` : (value as string), - ); - url = url.replace(match, replaceValue); - } - } - return url; -}; - -export const createQuerySerializer = ({ - allowReserved, - array, - object, -}: QuerySerializerOptions = {}) => { - const querySerializer = (queryParams: T) => { - const search: string[] = []; - if (queryParams && typeof queryParams === "object") { - for (const name in queryParams) { - const value = queryParams[name]; - - if (value === undefined || value === null) { - continue; - } - - if (Array.isArray(value)) { - const serializedArray = serializeArrayParam({ - allowReserved, - explode: true, - name, - style: "form", - value, - ...array, - }); - if (serializedArray) search.push(serializedArray); - } else if (typeof value === "object") { - const serializedObject = serializeObjectParam({ - allowReserved, - explode: true, - name, - style: "deepObject", - value: value as Record, - ...object, - }); - if (serializedObject) search.push(serializedObject); - } else { - const serializedPrimitive = serializePrimitiveParam({ - allowReserved, - name, - value: value as string, - }); - if (serializedPrimitive) search.push(serializedPrimitive); - } - } - } - return search.join("&"); - }; - return querySerializer; -}; - -/** - * Infers parseAs value from provided Content-Type header. - */ -export const getParseAs = ( - contentType: string | null, -): Exclude => { - if (!contentType) { - // If no Content-Type header is provided, the best we can do is return the raw response body, - // which is effectively the same as the 'stream' option. - return "stream"; - } - - const cleanContent = contentType.split(";")[0]?.trim(); - - if (!cleanContent) { - return; - } - - if ( - cleanContent.startsWith("application/json") || - cleanContent.endsWith("+json") - ) { - return "json"; - } - - if (cleanContent === "multipart/form-data") { - return "formData"; - } - - if ( - ["application/", "audio/", "image/", "video/"].some((type) => - cleanContent.startsWith(type), - ) - ) { - return "blob"; - } - - if (cleanContent.startsWith("text/")) { - return "text"; - } - - return; -}; - -export const setAuthParams = async ({ - security, - ...options -}: Pick, "security"> & - Pick & { - headers: Headers; - }) => { - for (const auth of security) { - const token = await getAuthToken(auth, options.auth); - - if (!token) { - continue; - } - - const name = auth.name ?? "Authorization"; - - switch (auth.in) { - case "query": - if (!options.query) { - options.query = {}; - } - options.query[name] = token; - break; - case "cookie": - options.headers.append("Cookie", `${name}=${token}`); - break; - case "header": - default: - options.headers.set(name, token); - break; - } - - return; - } -}; - -export const buildUrl: Client["buildUrl"] = (options) => { - const url = getUrl({ - baseUrl: options.baseUrl as string, - path: options.path, - query: options.query, - querySerializer: - typeof options.querySerializer === "function" - ? options.querySerializer - : createQuerySerializer(options.querySerializer), - url: options.url, - }); - return url; -}; - -export const getUrl = ({ - baseUrl, - path, - query, - querySerializer, - url: _url, -}: { - baseUrl?: string; - path?: Record; - query?: Record; - querySerializer: QuerySerializer; - url: string; -}) => { - const pathUrl = _url.startsWith("/") ? _url : `/${_url}`; - let url = (baseUrl ?? "") + pathUrl; - if (path) { - url = defaultPathSerializer({ path, url }); - } - let search = query ? querySerializer(query) : ""; - if (search.startsWith("?")) { - search = search.substring(1); - } - if (search) { - url += `?${search}`; - } - return url; -}; - -export const mergeConfigs = (a: Config, b: Config): Config => { - const config = { ...a, ...b }; - if (config.baseUrl?.endsWith("/")) { - config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); - } - config.headers = mergeHeaders(a.headers, b.headers); - return config; -}; - -export const mergeHeaders = ( - ...headers: Array["headers"] | undefined> -): Headers => { - const mergedHeaders = new Headers(); - for (const header of headers) { - if (!header || typeof header !== "object") { - continue; - } - - const iterator = - header instanceof Headers ? header.entries() : Object.entries(header); - - for (const [key, value] of iterator) { - if (value === null) { - mergedHeaders.delete(key); - } else if (Array.isArray(value)) { - for (const v of value) { - mergedHeaders.append(key, v as string); - } - } else if (value !== undefined) { - // assume object headers are meant to be JSON stringified, i.e. their - // content value in OpenAPI specification is 'application/json' - mergedHeaders.set( - key, - typeof value === "object" ? JSON.stringify(value) : (value as string), - ); - } - } - } - return mergedHeaders; -}; - -type ErrInterceptor = ( - error: Err, - response: Res, - request: Req, - options: Options, -) => Err | Promise; - -type ReqInterceptor = ( - request: Req, - options: Options, -) => Req | Promise; - -type ResInterceptor = ( - response: Res, - request: Req, - options: Options, -) => Res | Promise; - -class Interceptors { - _fns: (Interceptor | null)[]; - - constructor() { - this._fns = []; - } - - clear() { - this._fns = []; - } - - getInterceptorIndex(id: number | Interceptor): number { - if (typeof id === "number") { - return this._fns[id] ? id : -1; - } else { - return this._fns.indexOf(id); - } - } - exists(id: number | Interceptor) { - const index = this.getInterceptorIndex(id); - return !!this._fns[index]; - } - - eject(id: number | Interceptor) { - const index = this.getInterceptorIndex(id); - if (this._fns[index]) { - this._fns[index] = null; - } - } - - update(id: number | Interceptor, fn: Interceptor) { - const index = this.getInterceptorIndex(id); - if (this._fns[index]) { - this._fns[index] = fn; - return id; - } else { - return false; - } - } - - use(fn: Interceptor) { - this._fns = [...this._fns, fn]; - return this._fns.length - 1; - } -} - -// `createInterceptors()` response, meant for external use as it does not -// expose internals -export interface Middleware { - error: Pick< - Interceptors>, - "eject" | "use" - >; - request: Pick>, "eject" | "use">; - response: Pick< - Interceptors>, - "eject" | "use" - >; -} - -// do not add `Middleware` as return type so we can use _fns internally -export const createInterceptors = () => ({ - error: new Interceptors>(), - request: new Interceptors>(), - response: new Interceptors>(), -}); - -const defaultQuerySerializer = createQuerySerializer({ - allowReserved: false, - array: { - explode: true, - style: "form", - }, - object: { - explode: true, - style: "deepObject", - }, -}); - -const defaultHeaders = { - "Content-Type": "application/json", -}; - -export const createConfig = ( - override: Config & T> = {}, -): Config & T> => ({ - ...jsonBodySerializer, - headers: defaultHeaders, - parseAs: "auto", - querySerializer: defaultQuerySerializer, - ...override, -}); diff --git a/packages/nebula/src/client/core/auth.ts b/packages/nebula/src/client/core/auth.ts deleted file mode 100644 index 70e9d5dba5e..00000000000 --- a/packages/nebula/src/client/core/auth.ts +++ /dev/null @@ -1,40 +0,0 @@ -export type AuthToken = string | undefined; - -export interface Auth { - /** - * Which part of the request do we use to send the auth? - * - * @default 'header' - */ - in?: "header" | "query" | "cookie"; - /** - * Header or query parameter name. - * - * @default 'Authorization' - */ - name?: string; - scheme?: "basic" | "bearer"; - type: "apiKey" | "http"; -} - -export const getAuthToken = async ( - auth: Auth, - callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, -): Promise => { - const token = - typeof callback === "function" ? await callback(auth) : callback; - - if (!token) { - return; - } - - if (auth.scheme === "bearer") { - return `Bearer ${token}`; - } - - if (auth.scheme === "basic") { - return `Basic ${btoa(token)}`; - } - - return token; -}; diff --git a/packages/nebula/src/client/core/bodySerializer.ts b/packages/nebula/src/client/core/bodySerializer.ts deleted file mode 100644 index e68daa47a7b..00000000000 --- a/packages/nebula/src/client/core/bodySerializer.ts +++ /dev/null @@ -1,84 +0,0 @@ -import type { - ArrayStyle, - ObjectStyle, - SerializerOptions, -} from "./pathSerializer.js"; - -export type QuerySerializer = (query: Record) => string; - -export type BodySerializer = (body: any) => any; - -export interface QuerySerializerOptions { - allowReserved?: boolean; - array?: SerializerOptions; - object?: SerializerOptions; -} - -const serializeFormDataPair = (data: FormData, key: string, value: unknown) => { - if (typeof value === "string" || value instanceof Blob) { - data.append(key, value); - } else { - data.append(key, JSON.stringify(value)); - } -}; - -const serializeUrlSearchParamsPair = ( - data: URLSearchParams, - key: string, - value: unknown, -) => { - if (typeof value === "string") { - data.append(key, value); - } else { - data.append(key, JSON.stringify(value)); - } -}; - -export const formDataBodySerializer = { - bodySerializer: | Array>>( - body: T, - ) => { - const data = new FormData(); - - Object.entries(body).forEach(([key, value]) => { - if (value === undefined || value === null) { - return; - } - if (Array.isArray(value)) { - value.forEach((v) => serializeFormDataPair(data, key, v)); - } else { - serializeFormDataPair(data, key, value); - } - }); - - return data; - }, -}; - -export const jsonBodySerializer = { - bodySerializer: (body: T) => - JSON.stringify(body, (_key, value) => - typeof value === "bigint" ? value.toString() : value, - ), -}; - -export const urlSearchParamsBodySerializer = { - bodySerializer: | Array>>( - body: T, - ) => { - const data = new URLSearchParams(); - - Object.entries(body).forEach(([key, value]) => { - if (value === undefined || value === null) { - return; - } - if (Array.isArray(value)) { - value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); - } else { - serializeUrlSearchParamsPair(data, key, value); - } - }); - - return data.toString(); - }, -}; diff --git a/packages/nebula/src/client/core/params.ts b/packages/nebula/src/client/core/params.ts deleted file mode 100644 index 0771542b148..00000000000 --- a/packages/nebula/src/client/core/params.ts +++ /dev/null @@ -1,141 +0,0 @@ -type Slot = "body" | "headers" | "path" | "query"; - -export type Field = - | { - in: Exclude; - key: string; - map?: string; - } - | { - in: Extract; - key?: string; - map?: string; - }; - -export interface Fields { - allowExtra?: Partial>; - args?: ReadonlyArray; -} - -export type FieldsConfig = ReadonlyArray; - -const extraPrefixesMap: Record = { - $body_: "body", - $headers_: "headers", - $path_: "path", - $query_: "query", -}; -const extraPrefixes = Object.entries(extraPrefixesMap); - -type KeyMap = Map< - string, - { - in: Slot; - map?: string; - } ->; - -const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { - if (!map) { - map = new Map(); - } - - for (const config of fields) { - if ("in" in config) { - if (config.key) { - map.set(config.key, { - in: config.in, - map: config.map, - }); - } - } else if (config.args) { - buildKeyMap(config.args, map); - } - } - - return map; -}; - -interface Params { - body: unknown; - headers: Record; - path: Record; - query: Record; -} - -const stripEmptySlots = (params: Params) => { - for (const [slot, value] of Object.entries(params)) { - if (value && typeof value === "object" && !Object.keys(value).length) { - delete params[slot as Slot]; - } - } -}; - -export const buildClientParams = ( - args: ReadonlyArray, - fields: FieldsConfig, -) => { - const params: Params = { - body: {}, - headers: {}, - path: {}, - query: {}, - }; - - const map = buildKeyMap(fields); - - let config: FieldsConfig[number] | undefined; - - for (const [index, arg] of args.entries()) { - if (fields[index]) { - config = fields[index]; - } - - if (!config) { - continue; - } - - if ("in" in config) { - if (config.key) { - const field = map.get(config.key)!; - const name = field.map || config.key; - (params[field.in] as Record)[name] = arg; - } else { - params.body = arg; - } - } else { - for (const [key, value] of Object.entries(arg ?? {})) { - const field = map.get(key); - - if (field) { - const name = field.map || key; - (params[field.in] as Record)[name] = value; - } else { - const extra = extraPrefixes.find(([prefix]) => - key.startsWith(prefix), - ); - - if (extra) { - const [prefix, slot] = extra; - (params[slot] as Record)[ - key.slice(prefix.length) - ] = value; - } else { - for (const [slot, allowed] of Object.entries( - config.allowExtra ?? {}, - )) { - if (allowed) { - (params[slot as Slot] as Record)[key] = value; - break; - } - } - } - } - } - } - } - - stripEmptySlots(params); - - return params; -}; diff --git a/packages/nebula/src/client/core/pathSerializer.ts b/packages/nebula/src/client/core/pathSerializer.ts deleted file mode 100644 index 4052ad12795..00000000000 --- a/packages/nebula/src/client/core/pathSerializer.ts +++ /dev/null @@ -1,179 +0,0 @@ -interface SerializeOptions - extends SerializePrimitiveOptions, - SerializerOptions {} - -interface SerializePrimitiveOptions { - allowReserved?: boolean; - name: string; -} - -export interface SerializerOptions { - /** - * @default true - */ - explode: boolean; - style: T; -} - -export type ArrayStyle = "form" | "spaceDelimited" | "pipeDelimited"; -export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; -type MatrixStyle = "label" | "matrix" | "simple"; -export type ObjectStyle = "form" | "deepObject"; -type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; - -interface SerializePrimitiveParam extends SerializePrimitiveOptions { - value: string; -} - -export const separatorArrayExplode = (style: ArraySeparatorStyle) => { - switch (style) { - case "label": - return "."; - case "matrix": - return ";"; - case "simple": - return ","; - default: - return "&"; - } -}; - -export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { - switch (style) { - case "form": - return ","; - case "pipeDelimited": - return "|"; - case "spaceDelimited": - return "%20"; - default: - return ","; - } -}; - -export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { - switch (style) { - case "label": - return "."; - case "matrix": - return ";"; - case "simple": - return ","; - default: - return "&"; - } -}; - -export const serializeArrayParam = ({ - allowReserved, - explode, - name, - style, - value, -}: SerializeOptions & { - value: unknown[]; -}) => { - if (!explode) { - const joinedValues = ( - allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) - ).join(separatorArrayNoExplode(style)); - switch (style) { - case "label": - return `.${joinedValues}`; - case "matrix": - return `;${name}=${joinedValues}`; - case "simple": - return joinedValues; - default: - return `${name}=${joinedValues}`; - } - } - - const separator = separatorArrayExplode(style); - const joinedValues = value - .map((v) => { - if (style === "label" || style === "simple") { - return allowReserved ? v : encodeURIComponent(v as string); - } - - return serializePrimitiveParam({ - allowReserved, - name, - value: v as string, - }); - }) - .join(separator); - return style === "label" || style === "matrix" - ? separator + joinedValues - : joinedValues; -}; - -export const serializePrimitiveParam = ({ - allowReserved, - name, - value, -}: SerializePrimitiveParam) => { - if (value === undefined || value === null) { - return ""; - } - - if (typeof value === "object") { - throw new Error( - "Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.", - ); - } - - return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; -}; - -export const serializeObjectParam = ({ - allowReserved, - explode, - name, - style, - value, - valueOnly, -}: SerializeOptions & { - value: Record | Date; - valueOnly?: boolean; -}) => { - if (value instanceof Date) { - return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; - } - - if (style !== "deepObject" && !explode) { - let values: string[] = []; - Object.entries(value).forEach(([key, v]) => { - values = [ - ...values, - key, - allowReserved ? (v as string) : encodeURIComponent(v as string), - ]; - }); - const joinedValues = values.join(","); - switch (style) { - case "form": - return `${name}=${joinedValues}`; - case "label": - return `.${joinedValues}`; - case "matrix": - return `;${name}=${joinedValues}`; - default: - return joinedValues; - } - } - - const separator = separatorObjectExplode(style); - const joinedValues = Object.entries(value) - .map(([key, v]) => - serializePrimitiveParam({ - allowReserved, - name: style === "deepObject" ? `${name}[${key}]` : key, - value: v as string, - }), - ) - .join(separator); - return style === "label" || style === "matrix" - ? separator + joinedValues - : joinedValues; -}; diff --git a/packages/nebula/src/client/core/types.ts b/packages/nebula/src/client/core/types.ts deleted file mode 100644 index 41322e707cb..00000000000 --- a/packages/nebula/src/client/core/types.ts +++ /dev/null @@ -1,98 +0,0 @@ -import type { Auth, AuthToken } from "./auth.js"; -import type { - BodySerializer, - QuerySerializer, - QuerySerializerOptions, -} from "./bodySerializer.js"; - -export interface Client< - RequestFn = never, - Config = unknown, - MethodFn = never, - BuildUrlFn = never, -> { - /** - * Returns the final request URL. - */ - buildUrl: BuildUrlFn; - connect: MethodFn; - delete: MethodFn; - get: MethodFn; - getConfig: () => Config; - head: MethodFn; - options: MethodFn; - patch: MethodFn; - post: MethodFn; - put: MethodFn; - request: RequestFn; - setConfig: (config: Config) => Config; - trace: MethodFn; -} - -export interface Config { - /** - * Auth token or a function returning auth token. The resolved value will be - * added to the request payload as defined by its `security` array. - */ - auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; - /** - * A function for serializing request body parameter. By default, - * {@link JSON.stringify()} will be used. - */ - bodySerializer?: BodySerializer | null; - /** - * An object containing any HTTP headers that you want to pre-populate your - * `Headers` object with. - * - * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} - */ - headers?: - | RequestInit["headers"] - | Record< - string, - | string - | number - | boolean - | (string | number | boolean)[] - | null - | undefined - | unknown - >; - /** - * The request method. - * - * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} - */ - method?: - | "CONNECT" - | "DELETE" - | "GET" - | "HEAD" - | "OPTIONS" - | "PATCH" - | "POST" - | "PUT" - | "TRACE"; - /** - * A function for serializing request query parameters. By default, arrays - * will be exploded in form style, objects will be exploded in deepObject - * style, and reserved characters are percent-encoded. - * - * This method will have no effect if the native `paramsSerializer()` Axios - * API function is used. - * - * {@link https://swagger.io/docs/specification/serialization/#query View examples} - */ - querySerializer?: QuerySerializer | QuerySerializerOptions; - /** - * A function transforming response data before it's returned. This is useful - * for post-processing data, e.g. converting ISO strings into Date objects. - */ - responseTransformer?: (data: unknown) => Promise; - /** - * A function validating response data. This is useful if you want to ensure - * the response conforms to the desired shape, so it can be safely passed to - * the transformers and returned to the user. - */ - responseValidator?: (data: unknown) => Promise; -} diff --git a/packages/nebula/src/client/index.ts b/packages/nebula/src/client/index.ts deleted file mode 100644 index 58ea430d932..00000000000 --- a/packages/nebula/src/client/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export * from "./sdk.gen.js"; -export * from "./types.gen.js"; diff --git a/packages/nebula/src/client/sdk.gen.ts b/packages/nebula/src/client/sdk.gen.ts deleted file mode 100644 index 1916fd20c7d..00000000000 --- a/packages/nebula/src/client/sdk.gen.ts +++ /dev/null @@ -1,1213 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { - Client, - Options as ClientOptions, - TDataShape, -} from "./client/index.js"; -import { client as _heyApiClient } from "./client.gen.js"; -import type { - AuthDelegateLoginData, - AuthDelegateLoginErrors, - AuthDelegateLoginResponses, - CreateAgentData, - CreateAgentErrors, - CreateAgentResponses, - CreateAgentToolData, - CreateAgentToolErrors, - CreateAgentToolResponses, - CreateAgentTriggerData, - CreateAgentTriggerErrors, - CreateAgentTriggerResponses, - CreateConversationData, - CreateConversationErrors, - CreateConversationMessageData, - CreateConversationMessageErrors, - CreateConversationMessageResponses, - CreateConversationResponses, - CreateUserWalletData, - CreateUserWalletErrors, - CreateUserWalletResponses, - DeleteAgentData, - DeleteAgentErrors, - DeleteAgentResponses, - DeleteAgentToolData, - DeleteAgentToolErrors, - DeleteAgentToolResponses, - DeleteAgentTriggerData, - DeleteAgentTriggerErrors, - DeleteAgentTriggerResponses, - DeleteConversationData, - DeleteConversationErrors, - DeleteConversationResponses, - DeleteUserWalletData, - DeleteUserWalletErrors, - DeleteUserWalletResponses, - DeprecatedChatCompletionsData, - DeprecatedChatCompletionsErrors, - DeprecatedChatCompletionsResponses, - DeprecatedChatData, - DeprecatedChatErrors, - DeprecatedChatResponses, - DeprecatedClearSessionData, - DeprecatedClearSessionErrors, - DeprecatedClearSessionResponses, - DeprecatedCreateSessionData, - DeprecatedCreateSessionErrors, - DeprecatedCreateSessionResponses, - DeprecatedDeleteSessionData, - DeprecatedDeleteSessionErrors, - DeprecatedDeleteSessionResponses, - DeprecatedExecuteData, - DeprecatedExecuteErrors, - DeprecatedExecuteResponses, - DeprecatedGetSessionData, - DeprecatedGetSessionErrors, - DeprecatedGetSessionResponses, - DeprecatedGetSessionsData, - DeprecatedGetSessionsResponses, - DeprecatedUpdateSessionData, - DeprecatedUpdateSessionErrors, - DeprecatedUpdateSessionResponses, - FeedbackData, - FeedbackErrors, - FeedbackResponses, - GetAgentData, - GetAgentErrors, - GetAgentResponses, - GetAgentsData, - GetAgentsResponses, - GetAgentToolData, - GetAgentToolErrors, - GetAgentToolResponses, - GetAgentTriggerData, - GetAgentTriggerErrors, - GetAgentTriggerResponses, - GetAgentWalletData, - GetAgentWalletErrors, - GetAgentWalletResponses, - GetAgentWalletsData, - GetAgentWalletsErrors, - GetAgentWalletsResponses, - GetAuthDelegatePayloadData, - GetAuthDelegatePayloadErrors, - GetAuthDelegatePayloadResponses, - GetConversationData, - GetConversationErrors, - GetConversationResponses, - GetConversationsData, - GetConversationsErrors, - GetConversationsResponses, - GetModelsData, - GetModelsResponses, - GetRegistryAgentsData, - GetRegistryAgentsErrors, - GetRegistryAgentsResponses, - GetUserData, - GetUserResponses, - GetUserWalletData, - GetUserWalletErrors, - GetUserWalletResponses, - GetUserWalletsData, - GetUserWalletsResponses, - UpdateAgentData, - UpdateAgentErrors, - UpdateAgentResponses, - UpdateAgentToolData, - UpdateAgentToolErrors, - UpdateAgentToolResponses, - UpdateAgentTriggerData, - UpdateAgentTriggerErrors, - UpdateAgentTriggerResponses, - UpdateConversationData, - UpdateConversationErrors, - UpdateConversationMessageData, - UpdateConversationMessageErrors, - UpdateConversationMessageResponses, - UpdateConversationResponses, - UpdateUserWalletData, - UpdateUserWalletErrors, - UpdateUserWalletResponses, - VerifyAuthData, - VerifyAuthResponses, -} from "./types.gen.js"; - -export type Options< - TData extends TDataShape = TDataShape, - ThrowOnError extends boolean = boolean, -> = ClientOptions & { - /** - * You can provide a client instance returned by `createClient()` instead of - * individual options. This might be also useful if you want to implement a - * custom client. - */ - client?: Client; - /** - * You can pass arbitrary values through the `meta` object. This can be - * used to access values that aren't defined as part of the SDK function. - */ - meta?: Record; -}; - -/** - * Get Session List - */ -export const deprecatedGetSessions = ( - options?: Options, -) => { - return (options?.client ?? _heyApiClient).get< - DeprecatedGetSessionsResponses, - unknown, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/session/list", - ...options, - }); -}; - -/** - * Delete Session - */ -export const deprecatedDeleteSession = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).delete< - DeprecatedDeleteSessionResponses, - DeprecatedDeleteSessionErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/session/{session_id}", - ...options, - }); -}; - -/** - * Get Session - */ -export const deprecatedGetSession = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).get< - DeprecatedGetSessionResponses, - DeprecatedGetSessionErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/session/{session_id}", - ...options, - }); -}; - -/** - * Update Session - */ -export const deprecatedUpdateSession = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).put< - DeprecatedUpdateSessionResponses, - DeprecatedUpdateSessionErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/session/{session_id}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Create Session - */ -export const deprecatedCreateSession = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - DeprecatedCreateSessionResponses, - DeprecatedCreateSessionErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/session", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Clear Session - */ -export const deprecatedClearSession = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - DeprecatedClearSessionResponses, - DeprecatedClearSessionErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/session/{session_id}/clear", - ...options, - }); -}; - -/** - * Chat - * Process a chat message and return the response - */ -export const deprecatedChat = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - DeprecatedChatResponses, - DeprecatedChatErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/chat", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Chat Completions - * Process a chat message and return the response - */ -export const deprecatedChatCompletions = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - DeprecatedChatCompletionsResponses, - DeprecatedChatCompletionsErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/chat/completions", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Execute - * Process an execute request and return the response - */ -export const deprecatedExecute = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - DeprecatedExecuteResponses, - DeprecatedExecuteErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/execute", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Feedback - * Process a feedback request and return the response - */ -export const feedback = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - FeedbackResponses, - FeedbackErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/feedback", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Get Models - * Get all models - */ -export const getModels = ( - options?: Options, -) => { - return (options?.client ?? _heyApiClient).get< - GetModelsResponses, - unknown, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/models", - ...options, - }); -}; - -/** - * Get Delegate Payload - * Get a delegate payload - */ -export const getAuthDelegatePayload = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - GetAuthDelegatePayloadResponses, - GetAuthDelegatePayloadErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/auth/delegate/payload", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Login Delegate - * Login with SIWE - */ -export const authDelegateLogin = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - AuthDelegateLoginResponses, - AuthDelegateLoginErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/auth/delegate/login", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Verify Auth - * Verify a delegate payload - */ -export const verifyAuth = ( - options?: Options, -) => { - return (options?.client ?? _heyApiClient).get< - VerifyAuthResponses, - unknown, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/auth/verify", - ...options, - }); -}; - -/** - * Get User - * Get the current user - */ -export const getUser = ( - options?: Options, -) => { - return (options?.client ?? _heyApiClient).get< - GetUserResponses, - unknown, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/user", - ...options, - }); -}; - -/** - * Get User Wallets - * Get all user wallets - */ -export const getUserWallets = ( - options?: Options, -) => { - return (options?.client ?? _heyApiClient).get< - GetUserWalletsResponses, - unknown, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/user/wallets", - ...options, - }); -}; - -/** - * Delete User Wallet - * Delete a user wallet - */ -export const deleteUserWallet = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).delete< - DeleteUserWalletResponses, - DeleteUserWalletErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/user/wallet/{wallet_id}", - ...options, - }); -}; - -/** - * Get User Wallet - * Get a user wallet - */ -export const getUserWallet = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).get< - GetUserWalletResponses, - GetUserWalletErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/user/wallet/{wallet_id}", - ...options, - }); -}; - -/** - * Put User Wallet - * Update a user wallet - */ -export const updateUserWallet = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).put< - UpdateUserWalletResponses, - UpdateUserWalletErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/user/wallet/{wallet_id}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Post User Wallet - * Create a user wallet - */ -export const createUserWallet = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - CreateUserWalletResponses, - CreateUserWalletErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/user/wallet", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Get Agents - * Get all agents - */ -export const getAgents = ( - options?: Options, -) => { - return (options?.client ?? _heyApiClient).get< - GetAgentsResponses, - unknown, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agents", - ...options, - }); -}; - -/** - * Delete Agent - * Delete an agent - */ -export const deleteAgent = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).delete< - DeleteAgentResponses, - DeleteAgentErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}", - ...options, - }); -}; - -/** - * Get Agent - * Get an agent - */ -export const getAgent = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).get< - GetAgentResponses, - GetAgentErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}", - ...options, - }); -}; - -/** - * Update Agent - * Update an agent - */ -export const updateAgent = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).put< - UpdateAgentResponses, - UpdateAgentErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Create Agent - * Create an agent - */ -export const createAgent = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - CreateAgentResponses, - CreateAgentErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Delete Agent Trigger - * Delete an agent trigger - */ -export const deleteAgentTrigger = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).delete< - DeleteAgentTriggerResponses, - DeleteAgentTriggerErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/trigger/{trigger_id}", - ...options, - }); -}; - -/** - * Get Agent Trigger - * Get an agent trigger - */ -export const getAgentTrigger = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).get< - GetAgentTriggerResponses, - GetAgentTriggerErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/trigger/{trigger_id}", - ...options, - }); -}; - -/** - * Update Agent Trigger - * Update an agent trigger - */ -export const updateAgentTrigger = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).put< - UpdateAgentTriggerResponses, - UpdateAgentTriggerErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/trigger/{trigger_id}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Create Agent Trigger - * Create an agent trigger - */ -export const createAgentTrigger = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - CreateAgentTriggerResponses, - CreateAgentTriggerErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/trigger", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Delete Agent Tool - * Delete an agent tool - */ -export const deleteAgentTool = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).delete< - DeleteAgentToolResponses, - DeleteAgentToolErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/tool/{tool_id}", - ...options, - }); -}; - -/** - * Get Agent Tool - * Get an agent tool - */ -export const getAgentTool = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).get< - GetAgentToolResponses, - GetAgentToolErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/tool/{tool_id}", - ...options, - }); -}; - -/** - * Update Agent Tool - * Update an agent tool - */ -export const updateAgentTool = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).put< - UpdateAgentToolResponses, - UpdateAgentToolErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/tool/{tool_id}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Create Agent Tool - * Create an agent tool - */ -export const createAgentTool = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - CreateAgentToolResponses, - CreateAgentToolErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/tool", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Get Agent Wallets - * Get all agent wallets - */ -export const getAgentWallets = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).get< - GetAgentWalletsResponses, - GetAgentWalletsErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/wallets", - ...options, - }); -}; - -/** - * Get Agent Wallet - * Get an agent wallet - */ -export const getAgentWallet = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).get< - GetAgentWalletResponses, - GetAgentWalletErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/agent/{agent_id}/wallet/{wallet_id}", - ...options, - }); -}; - -/** - * Get Conversations - * Get all conversations - */ -export const getConversations = ( - options?: Options, -) => { - return (options?.client ?? _heyApiClient).get< - GetConversationsResponses, - GetConversationsErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/conversations", - ...options, - }); -}; - -/** - * Delete Conversation - * Delete a conversation - */ -export const deleteConversation = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).delete< - DeleteConversationResponses, - DeleteConversationErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/conversation/{conversation_id}", - ...options, - }); -}; - -/** - * Get Conversation - * Get a conversation - */ -export const getConversation = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).get< - GetConversationResponses, - GetConversationErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/conversation/{conversation_id}", - ...options, - }); -}; - -/** - * Update Conversation - * Update a conversation - */ -export const updateConversation = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).put< - UpdateConversationResponses, - UpdateConversationErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/conversation/{conversation_id}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Create Conversation - * Create a conversation - */ -export const createConversation = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - CreateConversationResponses, - CreateConversationErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/conversation", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Create Conversation Message - * Create a message for a conversation - */ -export const createConversationMessage = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).post< - CreateConversationMessageResponses, - CreateConversationMessageErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/conversation/{conversation_id}/message", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Update Conversation Message - * Update a message for a conversation - */ -export const updateConversationMessage = ( - options: Options, -) => { - return (options.client ?? _heyApiClient).put< - UpdateConversationMessageResponses, - UpdateConversationMessageErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/conversation/{conversation_id}/message/{message_id}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Get Registry Agents - * Get all agents from the registry - */ -export const getRegistryAgents = ( - options?: Options, -) => { - return (options?.client ?? _heyApiClient).get< - GetRegistryAgentsResponses, - GetRegistryAgentsErrors, - ThrowOnError - >({ - security: [ - { - name: "x-secret-key", - type: "apiKey", - }, - ], - url: "/registry/agents", - ...options, - }); -}; diff --git a/packages/nebula/src/client/types.gen.ts b/packages/nebula/src/client/types.gen.ts deleted file mode 100644 index 714d08773cf..00000000000 --- a/packages/nebula/src/client/types.gen.ts +++ /dev/null @@ -1,4461 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -/** - * AbiDocFormatted - */ -export type AbiDocFormatted = { - /** - * Abi - */ - abi: { - [key: string]: unknown; - }; - /** - * Abi Inputs Parameters Description - */ - abi_inputs_parameters_description: { - [key: string]: string; - } | null; - /** - * Abi Inputs Description - */ - abi_inputs_description: string | null; - /** - * Abi Outputs Parameters Description - */ - abi_outputs_parameters_description: { - [key: string]: string; - } | null; - /** - * Function Description - */ - function_description: string | null; - /** - * Function Signature - */ - function_signature: string; - /** - * Full Signature - */ - full_signature: string; -}; - -/** - * AgentActionContext - */ -export type AgentActionContext = { - /** - * Type - */ - type?: "context"; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Source - */ - source?: string; - /** - * Tool Name - */ - tool_name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Kwargs - */ - kwargs?: { - [key: string]: unknown; - } | null; - /** - * Data - */ - data: CompletionContextOutput | string; -}; - -/** - * AgentActionEval - */ -export type AgentActionEval = { - /** - * Type - */ - type?: "eval"; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Source - */ - source?: string; - /** - * Tool Name - */ - tool_name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Kwargs - */ - kwargs?: { - [key: string]: unknown; - } | null; - /** - * Data - */ - data: string; -}; - -/** - * AgentActionExecution - */ -export type AgentActionExecution = { - /** - * Type - */ - type?: "execution"; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Source - */ - source?: string; - /** - * Tool Name - */ - tool_name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Kwargs - */ - kwargs?: { - [key: string]: unknown; - } | null; - data: AgentTransactionExecution; -}; - -/** - * AgentActionImage - */ -export type AgentActionImage = { - /** - * Type - */ - type?: "image"; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Source - */ - source?: string; - /** - * Tool Name - */ - tool_name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Kwargs - */ - kwargs?: { - [key: string]: unknown; - } | null; - data: AgentActionImageData; -}; - -/** - * AgentActionImageData - */ -export type AgentActionImageData = { - /** - * Url - */ - url: string; - /** - * Width - */ - width: number; - /** - * Height - */ - height: number; -}; - -/** - * AgentActionInit - */ -export type AgentActionInit = { - /** - * Type - */ - type?: "init"; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Source - */ - source?: string; - /** - * Tool Name - */ - tool_name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Kwargs - */ - kwargs?: { - [key: string]: unknown; - } | null; - /** - * Data - */ - data?: null; -}; - -/** - * AgentActionPresence - */ -export type AgentActionPresence = { - /** - * Type - */ - type?: "presence"; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Source - */ - source?: string; - /** - * Tool Name - */ - tool_name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Kwargs - */ - kwargs?: { - [key: string]: unknown; - } | null; - /** - * Data - */ - data: string; -}; - -/** - * AgentActionSignSwap - */ -export type AgentActionSignSwap = { - /** - * Type - */ - type?: "sign_swap"; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Source - */ - source?: string; - /** - * Tool Name - */ - tool_name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Kwargs - */ - kwargs?: { - [key: string]: unknown; - } | null; - /** - * Data - */ - data: AgentActionSignSwapData | string; -}; - -/** - * AgentActionSignSwapData - */ -export type AgentActionSignSwapData = { - transaction: AgentActionSignTransactionData; - /** - * Action - */ - action: string | null; - intent: AgentActionSignSwapDataIntent; - from: AgentActionSignSwapDataToken; - to: AgentActionSignSwapDataToken; -}; - -/** - * AgentActionSignSwapDataIntent - */ -export type AgentActionSignSwapDataIntent = { - /** - * Originchainid - */ - originChainId: number; - /** - * Origintokenaddress - */ - originTokenAddress: string; - /** - * Destinationchainid - */ - destinationChainId: number; - /** - * Destinationtokenaddress - */ - destinationTokenAddress: string; - /** - * Amount - */ - amount: string; - /** - * Sender - */ - sender: string; - /** - * Receiver - */ - receiver: string; - /** - * Maxsteps - */ - maxSteps: number; -}; - -/** - * AgentActionSignSwapDataToken - */ -export type AgentActionSignSwapDataToken = { - /** - * Address - */ - address: string; - /** - * Chain Id - */ - chain_id: number; - /** - * Amount - */ - amount: string; - /** - * Symbol - */ - symbol: string; - /** - * Decimals - */ - decimals: number; - /** - * Price - */ - price: number | null; -}; - -/** - * AgentActionSignTransaction - */ -export type AgentActionSignTransaction = { - /** - * Type - */ - type?: "sign_transaction"; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Source - */ - source?: string; - /** - * Tool Name - */ - tool_name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Kwargs - */ - kwargs?: { - [key: string]: unknown; - } | null; - /** - * Data - */ - data: AgentActionSignTransactionData | string; -}; - -/** - * AgentActionSignTransactionData - */ -export type AgentActionSignTransactionData = { - /** - * Chainid - */ - chainId: number; - /** - * Function - */ - function?: string | null; - /** - * To - */ - to: string; - /** - * Value - */ - value: string; - /** - * Data - */ - data: string; -}; - -/** - * AgentListResponse - */ -export type AgentListResponse = { - /** - * Id - */ - id: string; - /** - * Name - */ - name: string; - /** - * Description - */ - description?: string | null; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * AgentMemoryResponse - */ -export type AgentMemoryResponse = { - /** - * Id - */ - id: string; -}; - -/** - * AgentResponse - */ -export type AgentResponse = { - /** - * Id - */ - id: string; - /** - * User Id - */ - user_id: string; - /** - * Name - */ - name: string; - /** - * Description - */ - description?: string | null; - /** - * Model Name - */ - model_name: string; - /** - * Is Public - */ - is_public: boolean; - /** - * Summary - */ - summary?: string | null; - context: AgentTaskContext; - /** - * Prompts - */ - prompts?: Array; - /** - * Tools - */ - tools?: Array; - /** - * Triggers - */ - triggers?: Array; - /** - * Memories - */ - memories?: Array; - /** - * Wallets - */ - wallets?: Array; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * AgentStepImage - */ -export type AgentStepImage = { - /** - * Type - */ - type?: "image"; - image: AgentActionImageData; -}; - -/** - * AgentStepText - */ -export type AgentStepText = { - /** - * Type - */ - type?: "text"; - /** - * Text - */ - text: string; -}; - -/** - * AgentTaskContext - */ -export type AgentTaskContext = { - /** - * Chain Ids - */ - chain_ids?: Array | null; - /** - * Chain Type - */ - chain_type?: "all" | "mainnet" | "testnet"; - /** - * Automatic Execution - */ - automatic_execution?: boolean; -}; - -/** - * AgentTaskOptions - */ -export type AgentTaskOptions = { - /** - * Temperature - */ - temperature?: number | null; - /** - * Max Tokens - */ - max_tokens?: number | null; - /** - * Seed - */ - seed?: number | null; -}; - -/** - * AgentTaskUsage - */ -export type AgentTaskUsageReadable = { - /** - * Input Cached Tokens - */ - input_cached_tokens: number; - /** - * Input Text Tokens - */ - input_text_tokens: number; - /** - * Input Image Tokens - */ - input_image_tokens: number; - /** - * Output Text Tokens - */ - output_text_tokens: number; - /** - * Output Image Tokens - */ - output_image_tokens: number; - /** - * Output Reasoning Tokens - */ - output_reasoning_tokens: number; - /** - * Tool Read Tokens - */ - tool_read_tokens: number; - /** - * Tool Write Tokens - */ - tool_write_tokens: number; - /** - * Tool Requests - */ - tool_requests: number; - /** - * Input Tokens - */ - readonly input_tokens: number; - /** - * Output Tokens - */ - readonly output_tokens: number; - /** - * Total Tokens - */ - readonly total_tokens: number; - /** - * Tool Tokens - */ - readonly tool_tokens: number; -}; - -/** - * AgentTaskUsage - */ -export type AgentTaskUsageWritable = { - /** - * Input Cached Tokens - */ - input_cached_tokens: number; - /** - * Input Text Tokens - */ - input_text_tokens: number; - /** - * Input Image Tokens - */ - input_image_tokens: number; - /** - * Output Text Tokens - */ - output_text_tokens: number; - /** - * Output Image Tokens - */ - output_image_tokens: number; - /** - * Output Reasoning Tokens - */ - output_reasoning_tokens: number; - /** - * Tool Read Tokens - */ - tool_read_tokens: number; - /** - * Tool Write Tokens - */ - tool_write_tokens: number; - /** - * Tool Requests - */ - tool_requests: number; -}; - -/** - * AgentToolDataAgent - */ -export type AgentToolDataAgent = { - /** - * Type - */ - type?: "agent"; - /** - * Agent Id - */ - agent_id: string; -}; - -/** - * AgentToolDataApi - */ -export type AgentToolDataApi = { - /** - * Type - */ - type?: "api"; - /** - * Url - */ - url: string; - /** - * Method - */ - method?: string; - /** - * Headers - */ - headers?: { - [key: string]: string; - } | null; - /** - * Params - */ - params?: { - [key: string]: unknown; - } | null; - /** - * Task Param - */ - task_param: string; - /** - * Description - */ - description: string; -}; - -/** - * AgentToolDataBuiltin - */ -export type AgentToolDataBuiltin = { - /** - * Type - */ - type?: "builtin"; - /** - * Agent Name - */ - agent_name: string; -}; - -/** - * AgentToolDataMcp - */ -export type AgentToolDataMcp = { - /** - * Type - */ - type?: "mcp"; - config: McpConfig; -}; - -/** - * AgentToolReference - */ -export type AgentToolReference = { - /** - * Agent Id - */ - agent_id: string; - /** - * Name - */ - name: string; - /** - * Description - */ - description: string; - /** - * Summary - */ - summary?: string | null; -}; - -/** - * AgentToolResponse - */ -export type AgentToolResponse = { - /** - * Id - */ - id: string; - /** - * Name - */ - name: string | null; - /** - * Description - */ - description: string | null; - /** - * Data - */ - data: - | ({ - type: "agent"; - } & AgentToolDataAgent) - | ({ - type: "builtin"; - } & AgentToolDataBuiltin) - | ({ - type: "mcp"; - } & AgentToolDataMcp) - | ({ - type: "api"; - } & AgentToolDataApi); - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * AgentTransaction - */ -export type AgentTransaction = { - /** - * Action - */ - action: string; - /** - * Transactions - */ - transactions: Array; - simulation?: AgentTransactionDataSimulation | null; - /** - * Description - */ - description?: string | null; -}; - -/** - * AgentTransactionDataSimulation - */ -export type AgentTransactionDataSimulation = { - /** - * Success - */ - success: boolean; - /** - * Message - */ - message: string; - /** - * Chains - */ - chains: Array; - /** - * Contracts - */ - contracts?: Array | null; - /** - * Tokens - */ - tokens?: Array | null; -}; - -/** - * AgentTransactionDataSimulationChain - */ -export type AgentTransactionDataSimulationChain = { - /** - * Chain Id - */ - chain_id: number; - /** - * Name - */ - name: string; -}; - -/** - * AgentTransactionDataSimulationContract - */ -export type AgentTransactionDataSimulationContract = { - /** - * Chain Id - */ - chain_id: number; - /** - * Address - */ - address: string; - /** - * Name - */ - name: string; - /** - * Type - */ - type: "call" | "create"; - /** - * Function Name - */ - function_name?: string | null; - /** - * Function Args - */ - function_args?: { - [key: string]: unknown; - } | null; -}; - -/** - * AgentTransactionDataSimulationToken - */ -export type AgentTransactionDataSimulationToken = { - /** - * Chain Id - */ - chain_id: number; - /** - * Address - */ - address: string; - /** - * Name - */ - name: string; - /** - * Symbol - */ - symbol: string; - /** - * Decimals - */ - decimals: number; - /** - * Amount - */ - amount: number; -}; - -/** - * AgentTransactionDataTransaction - */ -export type AgentTransactionDataTransaction = { - /** - * To - */ - to: string; - /** - * Value - */ - value: string; - /** - * Data - */ - data: string; - /** - * Chain Id - */ - chain_id: number; -}; - -/** - * AgentTransactionExecution - */ -export type AgentTransactionExecution = { - /** - * Id - */ - id: string; - /** - * Wallet Address - */ - wallet_address: string; - /** - * Chain Id - */ - chain_id: number; - /** - * Status - */ - status: "pending" | "confirmed" | "failed"; - /** - * Transaction Hash - */ - transaction_hash?: string | null; - /** - * Error Message - */ - error_message?: string | null; - /** - * Transactions - */ - transactions?: Array | null; -}; - -/** - * AgentTriggerData - */ -export type AgentTriggerData = { - /** - * Type - */ - type: unknown; -}; - -/** - * AgentTriggerDataContinuous - */ -export type AgentTriggerDataContinuous = { - /** - * Type - */ - type?: "continuous"; -}; - -/** - * AgentTriggerDataTime - */ -export type AgentTriggerDataTime = { - /** - * Type - */ - type?: "time"; - /** - * Cron Expression - */ - cron_expression?: string | null; -}; - -/** - * AgentTriggerResponse - */ -export type AgentTriggerResponse = { - /** - * Id - */ - id: string; - /** - * Name - */ - name: string; - type: AgentTriggerType; - data: AgentTriggerData; - /** - * Prompts - */ - prompts: Array; - /** - * Is Paused - */ - is_paused: boolean; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * AgentTriggerType - */ -export type AgentTriggerType = "continuous" | "time"; - -/** - * AgentWalletResponse - */ -export type AgentWalletResponse = { - /** - * Id - */ - id: string; - type: WalletType; - /** - * Address - */ - address: string; - /** - * Data - */ - data: - | ({ - type: "server"; - } & WalletDataServer) - | ({ - type: "eip4337"; - } & WalletDataEip4337); - /** - * Transactions - */ - transactions?: Array; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * ApiToolConfig - */ -export type ApiToolConfig = { - /** - * Url - */ - url: string; - /** - * Method - */ - method: string; - /** - * Headers - */ - headers?: { - [key: string]: string; - } | null; - /** - * Params - */ - params?: { - [key: string]: string; - } | null; - /** - * Task Param - */ - task_param?: string | null; - /** - * Name - */ - name?: string | null; - /** - * Description - */ - description: string; -}; - -/** - * BlockchainEntity - * Base class for all blockchain entities tracked in memory. - */ -export type BlockchainEntity = { - /** - * Chain Id - */ - chain_id: number; - /** - * Address - */ - address: string; - /** - * Roles - */ - roles?: Array; - /** - * First Mentioned At - */ - first_mentioned_at?: string; - /** - * Last Mentioned At - */ - last_mentioned_at?: string; -}; - -/** - * BuiltinAgentReference - */ -export type BuiltinAgentReference = { - /** - * Agent Name - */ - agent_name: string; -}; - -/** - * ChatContentImage - */ -export type ChatContentImage = { - /** - * Type - */ - type?: "image"; - /** - * Image Url - */ - image_url?: string | null; - /** - * B64 - */ - b64?: string | null; -}; - -/** - * ChatContentText - */ -export type ChatContentText = { - /** - * Type - */ - type?: "text"; - /** - * Text - */ - text: string; -}; - -/** - * ChatContentTransaction - */ -export type ChatContentTransaction = { - /** - * Type - */ - type?: "transaction"; - /** - * Chain Id - */ - chain_id: number; - /** - * Transaction Hash - */ - transaction_hash: string; -}; - -/** - * ChatMessage - */ -export type ChatMessage = { - /** - * Role - */ - role: "system" | "user" | "assistant"; - /** - * Content - */ - content: Array< - | ({ - type: "image"; - } & ChatContentImage) - | ({ - type: "text"; - } & ChatContentText) - | ({ - type: "transaction"; - } & ChatContentTransaction) - >; -}; - -/** - * ChatParamsMultiMessages - */ -export type ChatParamsMultiMessages = { - /** - * Stream - */ - stream?: boolean | null; - /** - * Model Name - */ - model_name?: string | null; - /** - * Session Id - */ - session_id?: string | null; - context?: CompletionContextInput | null; - /** - * Max Tokens - */ - max_tokens?: number | null; - /** - * Max Completion Tokens - */ - max_completion_tokens?: number | null; - /** - * Frequency Penalty - */ - frequency_penalty?: number | null; - /** - * Presence Penalty - */ - presence_penalty?: number | null; - /** - * Temperature - */ - temperature?: number | null; - /** - * Top P - */ - top_p?: number | null; - /** - * Response Format - */ - response_format?: - | ( - | ({ - type: "json_object"; - } & CompletionResponseFormatJsonObject) - | ({ - type: "json_schema"; - } & CompletionResponseFormatJsonSchema) - ) - | null; - /** - * Messages - */ - messages: Array; -}; - -/** - * ChatParamsSingleMessage - */ -export type ChatParamsSingleMessage = { - /** - * Stream - */ - stream?: boolean | null; - /** - * Model Name - */ - model_name?: string | null; - /** - * Session Id - */ - session_id?: string | null; - context?: CompletionContextInput | null; - /** - * Max Tokens - */ - max_tokens?: number | null; - /** - * Max Completion Tokens - */ - max_completion_tokens?: number | null; - /** - * Frequency Penalty - */ - frequency_penalty?: number | null; - /** - * Presence Penalty - */ - presence_penalty?: number | null; - /** - * Temperature - */ - temperature?: number | null; - /** - * Top P - */ - top_p?: number | null; - /** - * Response Format - */ - response_format?: - | ( - | ({ - type: "json_object"; - } & CompletionResponseFormatJsonObject) - | ({ - type: "json_schema"; - } & CompletionResponseFormatJsonSchema) - ) - | null; - /** - * Message - */ - message: string; -}; - -/** - * ChatResponse - */ -export type ChatResponse = { - /** - * Message - */ - message: string; - /** - * Actions - */ - actions: Array< - | ({ - type: "init"; - } & AgentActionInit) - | ({ - type: "eval"; - } & AgentActionEval) - | ({ - type: "presence"; - } & AgentActionPresence) - | ({ - type: "context"; - } & AgentActionContext) - | ({ - type: "image"; - } & AgentActionImage) - | ({ - type: "execution"; - } & AgentActionExecution) - | ({ - type: "sign_transaction"; - } & AgentActionSignTransaction) - | ({ - type: "sign_swap"; - } & AgentActionSignSwap) - > | null; - /** - * Session Id - */ - session_id: string | null; - /** - * Request Id - */ - request_id: string | null; -}; - -/** - * CompletionChoice - */ -export type CompletionChoice = { - message: CompletionChoiceChatMessage; - /** - * Finish Reason - */ - finish_reason: "stop" | "length"; - /** - * Index - */ - index: number; -}; - -/** - * CompletionChoiceChatMessage - */ -export type CompletionChoiceChatMessage = { - /** - * Role - */ - role: "user" | "assistant"; - /** - * Content - */ - content: string; -}; - -/** - * CompletionContext - */ -export type CompletionContextInput = { - /** - * Session Id - */ - session_id?: string | null; - /** - * Wallet Address - */ - wallet_address?: - | string - | ({ - type: "server_wallet"; - } & ContextFilterServerWallet) - | null; - /** - * Chain Ids - */ - chain_ids?: Array | null; - /** - * Networks - */ - networks?: "all" | "mainnet" | "testnet"; - /** - * Prompts - */ - prompts?: Array; - /** - * Mcp Tools - */ - mcp_tools?: Array | null; - /** - * Agent Tools - */ - agent_tools?: Array | null; - /** - * Builtin Agents - */ - builtin_agents?: Array | null; - /** - * Api Tools - */ - api_tools?: Array | null; - /** - * Deployed Contracts - */ - deployed_contracts?: Array; - /** - * Entities - */ - entities?: { - [key: string]: BlockchainEntity; - }; -}; - -/** - * CompletionContext - */ -export type CompletionContextOutput = { - /** - * Session Id - */ - session_id?: string | null; - /** - * Wallet Address - */ - wallet_address?: - | string - | ({ - type: "server_wallet"; - } & ContextFilterServerWallet) - | null; - /** - * Chain Ids - */ - chain_ids?: Array | null; - /** - * Networks - */ - networks?: "all" | "mainnet" | "testnet"; - /** - * Prompts - */ - prompts?: Array; - /** - * Mcp Tools - */ - mcp_tools?: Array | null; - /** - * Agent Tools - */ - agent_tools?: Array | null; - /** - * Builtin Agents - */ - builtin_agents?: Array | null; - /** - * Api Tools - */ - api_tools?: Array | null; - /** - * Deployed Contracts - */ - deployed_contracts?: Array; - /** - * Entities - */ - entities?: { - [key: string]: BlockchainEntity; - }; -}; - -/** - * CompletionParams - */ -export type CompletionParams = { - /** - * Messages - */ - messages: Array; - /** - * Model - */ - model?: string | null; - /** - * Stream - */ - stream?: boolean; - /** - * Max Tokens - */ - max_tokens?: number | null; - /** - * Max Completion Tokens - */ - max_completion_tokens?: number | null; - /** - * Frequency Penalty - */ - frequency_penalty?: number | null; - /** - * Presence Penalty - */ - presence_penalty?: number | null; - /** - * Temperature - */ - temperature?: number | null; - /** - * Top P - */ - top_p?: number | null; - /** - * Response Format - */ - response_format?: - | ( - | ({ - type: "json_object"; - } & CompletionResponseFormatJsonObject) - | ({ - type: "json_schema"; - } & CompletionResponseFormatJsonSchema) - ) - | null; - context?: CompletionContextInput | null; -}; - -/** - * CompletionResponse - */ -export type CompletionResponse = { - /** - * Id - */ - id: string; - /** - * Choices - */ - choices: Array; - /** - * Created - */ - created: number; - /** - * Object - */ - object: "chat.completion"; - usage: CompletionUsage; - /** - * Actions - */ - actions: Array< - | ({ - type: "init"; - } & AgentActionInit) - | ({ - type: "eval"; - } & AgentActionEval) - | ({ - type: "presence"; - } & AgentActionPresence) - | ({ - type: "context"; - } & AgentActionContext) - | ({ - type: "image"; - } & AgentActionImage) - | ({ - type: "execution"; - } & AgentActionExecution) - | ({ - type: "sign_transaction"; - } & AgentActionSignTransaction) - | ({ - type: "sign_swap"; - } & AgentActionSignSwap) - > | null; - context: CompletionContextOutput | null; -}; - -/** - * CompletionResponseFormatJsonObject - */ -export type CompletionResponseFormatJsonObject = { - /** - * Type - */ - type: "json_object"; -}; - -/** - * CompletionResponseFormatJsonSchema - */ -export type CompletionResponseFormatJsonSchema = { - /** - * Type - */ - type: "json_schema"; - /** - * Json Schema - */ - json_schema: { - [key: string]: unknown; - }; -}; - -/** - * CompletionUsage - */ -export type CompletionUsage = { - /** - * Prompt Tokens - */ - prompt_tokens: number; - /** - * Completion Tokens - */ - completion_tokens: number; - /** - * Total Tokens - */ - total_tokens: number; -}; - -/** - * ContextFilterServerWallet - */ -export type ContextFilterServerWallet = { - /** - * Type - */ - type: "server_wallet"; - /** - * Server Wallet Id - */ - server_wallet_id?: string | null; - /** - * Server Wallet Address - */ - server_wallet_address?: string | null; -}; - -/** - * ContractBase - * Base class for contract-like entities that can be processed by ContractMetadata. - */ -export type ContractBase = { - /** - * Chain Id - */ - chain_id: number; - /** - * Address - */ - address: string; - /** - * Roles - */ - roles?: Array; - /** - * First Mentioned At - */ - first_mentioned_at?: string; - /** - * Last Mentioned At - */ - last_mentioned_at?: string; - /** - * Name - */ - name?: string | null; - /** - * Symbol - */ - symbol?: string | null; - /** - * Standard - */ - standard?: ("ERC20" | "ERC721" | "ERC1155" | "Unknown") | null; - /** - * Description - */ - description?: string | null; - /** - * Total Supply - */ - total_supply?: number | null; - /** - * Price - */ - price?: string | null; - /** - * Abi - */ - abi?: Array | null; - deployment_status?: DeploymentStatus; -}; - -/** - * ConversationListResponse - */ -export type ConversationListResponse = { - /** - * Id - */ - id: string; - /** - * Title - */ - title?: string; -}; - -/** - * ConversationMessageResponse - */ -export type ConversationMessageResponseReadable = { - /** - * Id - */ - id: string; - /** - * Inputs - */ - inputs?: Array; - /** - * Responses - */ - responses?: Array; - /** - * Steps - */ - steps?: Array< - | ({ - type: "text"; - } & AgentStepText) - | ({ - type: "image"; - } & AgentStepImage) - >; - /** - * Transactions - */ - transactions?: Array; - usage?: AgentTaskUsageReadable | null; -}; - -/** - * ConversationMessageResponse - */ -export type ConversationMessageResponseWritable = { - /** - * Id - */ - id: string; - /** - * Inputs - */ - inputs?: Array; - /** - * Responses - */ - responses?: Array; - /** - * Steps - */ - steps?: Array< - | ({ - type: "text"; - } & AgentStepText) - | ({ - type: "image"; - } & AgentStepImage) - >; - /** - * Transactions - */ - transactions?: Array; - usage?: AgentTaskUsageWritable | null; -}; - -/** - * ConversationResponse - */ -export type ConversationResponseReadable = { - /** - * Id - */ - id: string; - /** - * Title - */ - title: string; - /** - * User Id - */ - user_id: string; - /** - * Agent Id - */ - agent_id: string; - /** - * Is Public - */ - is_public: boolean; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; - /** - * Messages - */ - messages?: Array; -}; - -/** - * ConversationResponse - */ -export type ConversationResponseWritable = { - /** - * Id - */ - id: string; - /** - * Title - */ - title: string; - /** - * User Id - */ - user_id: string; - /** - * Agent Id - */ - agent_id: string; - /** - * Is Public - */ - is_public: boolean; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; - /** - * Messages - */ - messages?: Array; -}; - -/** - * CreateAgentHandlerParams - * inherits from CreateAgentParams, but adds triggers and tools - */ -export type CreateAgentHandlerParams = { - /** - * Name - */ - name: string; - /** - * Description - */ - description?: string | null; - /** - * Prompts - */ - prompts?: Array | null; - /** - * Triggers - */ - triggers?: Array | null; - /** - * Tools - */ - tools?: Array | null; -}; - -/** - * CreateAgentToolParams - */ -export type CreateAgentToolParams = { - /** - * Name - */ - name: string; - /** - * Data - */ - data: - | ({ - type: "agent"; - } & AgentToolDataAgent) - | ({ - type: "builtin"; - } & AgentToolDataBuiltin) - | ({ - type: "mcp"; - } & AgentToolDataMcp) - | ({ - type: "api"; - } & AgentToolDataApi); - /** - * Description - */ - description?: string | null; -}; - -/** - * CreateAgentTriggerParams - */ -export type CreateAgentTriggerParams = { - /** - * Name - */ - name: string; - /** - * Data - */ - data: - | ({ - type: "continuous"; - } & AgentTriggerDataContinuous) - | ({ - type: "time"; - } & AgentTriggerDataTime); - /** - * Prompts - */ - prompts?: Array | null; -}; - -/** - * CreateConversationHandlerParams - */ -export type CreateConversationHandlerParams = { - /** - * Title - */ - title?: string | null; - /** - * Is Public - */ - is_public?: boolean | null; - /** - * Agent Id - */ - agent_id: string; -}; - -/** - * CreateMessageHandlerParams - */ -export type CreateMessageHandlerParams = { - /** - * Inputs - */ - inputs: Array; - options?: AgentTaskOptions | null; - context?: AgentTaskContext | null; - /** - * Stream - */ - stream?: boolean; -}; - -/** - * CreateSessionParams - */ -export type CreateSessionParams = { - /** - * Model Name - */ - model_name?: string; - /** - * Title - */ - title?: string | null; - /** - * Is Public - */ - is_public?: boolean | null; - context?: CompletionContextInput | null; -}; - -/** - * CreateUserWalletParams - */ -export type CreateUserWalletParams = { - type: WalletType; - /** - * Data - */ - data?: WalletDataServer | WalletDataEip4337 | null; -}; - -/** - * DeploymentStatus - */ -export type DeploymentStatus = "unknown" | "pending" | "deployed" | "failed"; - -/** - * EntityRole - */ -export type EntityRole = "mentioned" | "deployed" | "user"; - -/** - * Feedback - */ -export type Feedback = { - /** - * Id - */ - id: string; - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Feedback Rating - */ - feedback_rating: number | null; - /** - * Feedback Response - */ - feedback_response: string | null; - /** - * Comment - */ - comment: string | null; - /** - * Created At - */ - created_at: string | null; - /** - * Updated At - */ - updated_at: string | null; -}; - -/** - * FeedbackParams - */ -export type FeedbackParams = { - /** - * Session Id - */ - session_id: string; - /** - * Request Id - */ - request_id: string; - /** - * Feedback Rating - */ - feedback_rating?: number | null; - /** - * Feedback Response - */ - feedback_response?: string | null; - /** - * Comment - */ - comment?: string | null; -}; - -/** - * GetPayloadParams - */ -export type GetPayloadParams = { - /** - * Address - */ - address: string; - /** - * Chain Id - */ - chain_id?: number | string | null; -}; - -/** - * GetPayloadResponse - */ -export type GetPayloadResponse = { - payload: Payload; -}; - -/** - * HTTPValidationError - */ -export type HttpValidationError = { - /** - * Detail - */ - detail?: Array; -}; - -/** - * LoginParams - */ -export type LoginParams = { - payload: Payload; - /** - * Signature - */ - signature?: string | null; - /** - * Token - */ - token?: string | null; -}; - -/** - * LoginResponse - */ -export type LoginResponse = { - /** - * Token - */ - token: string; -}; - -/** - * McpConfig - */ -export type McpConfig = { - /** - * Url - */ - url: string; - /** - * Headers - */ - headers?: { - [key: string]: unknown; - } | null; - /** - * Transport - */ - transport?: string; -}; - -/** - * McpToolConfig - */ -export type McpToolConfig = { - /** - * Url - */ - url: string; - /** - * Headers - */ - headers?: { - [key: string]: string; - } | null; - /** - * Transport - */ - transport?: string; - /** - * Media Support - */ - media_support?: Array | null; - /** - * Auto Upload Media - */ - auto_upload_media?: boolean; -}; - -/** - * MediaOutputType - */ -export type MediaOutputType = "text" | "image" | "audio" | "json" | "binary"; - -/** - * Model - */ -export type Model = { - /** - * Id - */ - id: string; - /** - * Object - */ - object: "model"; - /** - * Created - */ - created: number; - /** - * Owned By - */ - owned_by: "thirdweb"; -}; - -/** - * ModelResponse - */ -export type ModelResponse = { - /** - * Object - */ - object: "list"; - /** - * Data - */ - data: Array; -}; - -/** - * Payload - */ -export type Payload = { - /** - * Address - */ - address: string; - /** - * Chain Id - */ - chain_id: number | null; - /** - * Domain - */ - domain: string; - /** - * Expiration Time - */ - expiration_time: string; - /** - * Invalid Before - */ - invalid_before: string; - /** - * Issued At - */ - issued_at: string; - /** - * Nonce - */ - nonce: string; - /** - * Statement - */ - statement: string; - /** - * Version - */ - version: string; - /** - * Resources - */ - resources: Array | null; - /** - * Uri - */ - uri: string; -}; - -/** - * RegistryAgentListResponse - */ -export type RegistryAgentListResponse = { - /** - * Id - */ - id: string; - /** - * User Id - */ - user_id: string; - /** - * Name - */ - name: string; - /** - * Description - */ - description: string; - /** - * Summary - */ - summary?: string | null; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * ResponseModel[AgentResponse] - */ -export type ResponseModelAgentResponse = { - result: AgentResponse; -}; - -/** - * ResponseModel[AgentToolResponse] - */ -export type ResponseModelAgentToolResponse = { - result: AgentToolResponse; -}; - -/** - * ResponseModel[AgentTriggerResponse] - */ -export type ResponseModelAgentTriggerResponse = { - result: AgentTriggerResponse; -}; - -/** - * ResponseModel[AgentWalletResponse] - */ -export type ResponseModelAgentWalletResponse = { - result: AgentWalletResponse; -}; - -/** - * ResponseModel[ConversationMessageResponse] - */ -export type ResponseModelConversationMessageResponseReadable = { - result: ConversationMessageResponseReadable; -}; - -/** - * ResponseModel[ConversationMessageResponse] - */ -export type ResponseModelConversationMessageResponseWritable = { - result: ConversationMessageResponseWritable; -}; - -/** - * ResponseModel[ConversationResponse] - */ -export type ResponseModelConversationResponseReadable = { - result: ConversationResponseReadable; -}; - -/** - * ResponseModel[ConversationResponse] - */ -export type ResponseModelConversationResponseWritable = { - result: ConversationResponseWritable; -}; - -/** - * ResponseModel[Feedback] - */ -export type ResponseModelFeedback = { - result: Feedback; -}; - -/** - * ResponseModel[GetPayloadResponse] - */ -export type ResponseModelGetPayloadResponse = { - result: GetPayloadResponse; -}; - -/** - * ResponseModel[LoginResponse] - */ -export type ResponseModelLoginResponse = { - result: LoginResponse; -}; - -/** - * ResponseModel[SessionDeleteResponse] - */ -export type ResponseModelSessionDeleteResponse = { - result: SessionDeleteResponse; -}; - -/** - * ResponseModel[Session] - */ -export type ResponseModelSession = { - result: Session; -}; - -/** - * ResponseModel[UUID] - */ -export type ResponseModelUuid = { - /** - * Result - */ - result: string; -}; - -/** - * ResponseModel[UserResponse] - */ -export type ResponseModelUserResponse = { - result: UserResponse; -}; - -/** - * ResponseModel[UserWalletResponse] - */ -export type ResponseModelUserWalletResponse = { - result: UserWalletResponse; -}; - -/** - * ResponseModel[VerifyJwtResponse] - */ -export type ResponseModelVerifyJwtResponse = { - result: VerifyJwtResponse; -}; - -/** - * ResponseModel[list[AgentListResponse]] - */ -export type ResponseModelListAgentListResponse = { - /** - * Result - */ - result: Array; -}; - -/** - * ResponseModel[list[AgentWalletResponse]] - */ -export type ResponseModelListAgentWalletResponse = { - /** - * Result - */ - result: Array; -}; - -/** - * ResponseModel[list[ConversationListResponse]] - */ -export type ResponseModelListConversationListResponse = { - /** - * Result - */ - result: Array; -}; - -/** - * ResponseModel[list[RegistryAgentListResponse]] - */ -export type ResponseModelListRegistryAgentListResponse = { - /** - * Result - */ - result: Array; -}; - -/** - * ResponseModel[list[SessionList]] - */ -export type ResponseModelListSessionList = { - /** - * Result - */ - result: Array; -}; - -/** - * ResponseModel[list[UserWalletResponse]] - */ -export type ResponseModelListUserWalletResponse = { - /** - * Result - */ - result: Array; -}; - -/** - * Session - */ -export type Session = { - /** - * Id - */ - id: string; - /** - * Team Id - */ - team_id: string; - /** - * Project Id - */ - project_id: string | null; - /** - * Model Name - */ - model_name: string; - /** - * Is Public - */ - is_public: boolean | null; - /** - * Title - */ - title: string | null; - /** - * Memory - */ - memory: Array<{ - [key: string]: unknown; - }> | null; - /** - * History - */ - history: Array<{ - [key: string]: unknown; - }> | null; - /** - * Action - */ - action: Array<{ - [key: string]: unknown; - }> | null; - context?: CompletionContextOutput | null; - /** - * Archive At - */ - archive_at: string | null; - /** - * Deleted At - */ - deleted_at: string | null; - /** - * Created At - */ - created_at: string | null; - /** - * Updated At - */ - updated_at: string | null; -}; - -/** - * SessionDeleteResponse - */ -export type SessionDeleteResponse = { - /** - * Id - */ - id: string; - /** - * Deleted At - */ - deleted_at: string; -}; - -/** - * SessionList - */ -export type SessionList = { - /** - * Id - */ - id: string; - /** - * Title - */ - title: string | null; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * TransactionParams - */ -export type TransactionParams = { - /** - * To - */ - to: string; - /** - * Value - */ - value: string; - /** - * Data - */ - data: string; -}; - -/** - * UpdateAgentHandlerParams - */ -export type UpdateAgentHandlerParams = { - /** - * Name - */ - name?: string | null; - /** - * Description - */ - description?: string | null; - /** - * Prompts - */ - prompts?: Array | null; - /** - * Triggers - */ - triggers?: Array | null; - /** - * Tools - */ - tools?: Array | null; -}; - -/** - * UpdateAgentToolParams - */ -export type UpdateAgentToolParams = { - /** - * Name - */ - name?: string | null; - /** - * Data - */ - data?: - | ( - | ({ - type: "agent"; - } & AgentToolDataAgent) - | ({ - type: "builtin"; - } & AgentToolDataBuiltin) - | ({ - type: "mcp"; - } & AgentToolDataMcp) - | ({ - type: "api"; - } & AgentToolDataApi) - ) - | null; - /** - * Description - */ - description?: string | null; -}; - -/** - * UpdateAgentTriggerParams - */ -export type UpdateAgentTriggerParams = { - /** - * Name - */ - name?: string | null; - /** - * Data - */ - data?: - | ( - | ({ - type: "continuous"; - } & AgentTriggerDataContinuous) - | ({ - type: "time"; - } & AgentTriggerDataTime) - ) - | null; - /** - * Is Paused - */ - is_paused?: boolean | null; - /** - * Prompts - */ - prompts?: Array | null; -}; - -/** - * UpdateConversationHandlerParams - */ -export type UpdateConversationHandlerParams = { - /** - * Title - */ - title?: string | null; - /** - * Is Public - */ - is_public?: boolean | null; -}; - -/** - * UpdateMessageHandlerParams - */ -export type UpdateMessageHandlerParams = { - /** - * Inputs - */ - inputs?: Array | null; - options?: AgentTaskOptions | null; - /** - * Stream - */ - stream?: boolean; -}; - -/** - * UpdateSessionParams - */ -export type UpdateSessionParams = { - /** - * Title - */ - title?: string | null; - /** - * Model Name - */ - model_name?: string | null; - /** - * Is Public - */ - is_public?: boolean | null; - context?: CompletionContextInput | null; -}; - -/** - * UpdateUserWalletParams - */ -export type UpdateUserWalletParams = { - type?: WalletType | null; - /** - * Data - */ - data?: WalletDataServer | WalletDataEip4337 | null; -}; - -/** - * UserAgentResponse - */ -export type UserAgentResponse = { - /** - * Id - */ - id: string; - /** - * Name - */ - name: string; - /** - * Description - */ - description?: string | null; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * UserConversationResponse - */ -export type UserConversationResponse = { - /** - * Id - */ - id: string; - /** - * Title - */ - title: string; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; - /** - * Agent Id - */ - agent_id: string; -}; - -/** - * UserMemoryResponse - */ -export type UserMemoryResponse = { - /** - * Id - */ - id: string; -}; - -/** - * UserResponse - */ -export type UserResponse = { - /** - * Id - */ - id: string; - /** - * Agents - */ - agents: Array; - /** - * Memories - */ - memories: Array; - /** - * Conversations - */ - conversations: Array; - /** - * Wallets - */ - wallets: Array; -}; - -/** - * UserWalletResponse - */ -export type UserWalletResponse = { - /** - * Id - */ - id: string; - type: WalletType; - /** - * Address - */ - address: string; - /** - * Data - */ - data: - | ({ - type: "server"; - } & WalletDataServer) - | ({ - type: "eip4337"; - } & WalletDataEip4337); - /** - * Transactions - */ - transactions?: Array; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * ValidationError - */ -export type ValidationError = { - /** - * Location - */ - loc: Array; - /** - * Message - */ - msg: string; - /** - * Error Type - */ - type: string; -}; - -/** - * VerifyJwtResponse - */ -export type VerifyJwtResponse = { - /** - * Address - */ - address: string; - /** - * Is Valid - */ - is_valid: boolean; -}; - -/** - * WalletDataEIP4337 - */ -export type WalletDataEip4337 = { - /** - * Type - */ - type?: "eip4337"; - /** - * Signer Address - */ - signer_address: string; - /** - * Factory Address - */ - factory_address: string; - /** - * Smart Account Address - */ - smart_account_address: string; - /** - * Entrypoint Address - */ - entrypoint_address: string; - /** - * Sponsor Gas - */ - sponsor_gas?: boolean; - /** - * Chain Ids - */ - chain_ids?: Array | null; -}; - -/** - * WalletDataServer - */ -export type WalletDataServer = { - /** - * Type - */ - type?: "server"; - /** - * Smart Account Address - */ - smart_account_address: string; -}; - -/** - * WalletTransaction - */ -export type WalletTransaction = { - /** - * Id - */ - id: string; - /** - * Chain Id - */ - chain_id: number; - /** - * Params - */ - params: Array; - /** - * Hash - */ - hash: string | null; - /** - * Submitted At - */ - submitted_at: string | null; - /** - * Cancelled At - */ - cancelled_at: string | null; - /** - * Errored At - */ - errored_at: string | null; - /** - * Error Message - */ - error_message: string | null; - /** - * Created At - */ - created_at: string; - /** - * Updated At - */ - updated_at: string; -}; - -/** - * WalletType - */ -export type WalletType = "eoa" | "server" | "eip4337" | "eip7702"; - -export type DeprecatedGetSessionsData = { - body?: never; - path?: never; - query?: never; - url: "/session/list"; -}; - -export type DeprecatedGetSessionsResponses = { - /** - * Successful Response - */ - 200: ResponseModelListSessionList; -}; - -export type DeprecatedGetSessionsResponse = - DeprecatedGetSessionsResponses[keyof DeprecatedGetSessionsResponses]; - -export type DeprecatedDeleteSessionData = { - body?: never; - path: { - /** - * The id of the session to delete - */ - session_id: string; - }; - query?: never; - url: "/session/{session_id}"; -}; - -export type DeprecatedDeleteSessionErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeprecatedDeleteSessionError = - DeprecatedDeleteSessionErrors[keyof DeprecatedDeleteSessionErrors]; - -export type DeprecatedDeleteSessionResponses = { - /** - * Successful Response - */ - 200: ResponseModelSessionDeleteResponse; -}; - -export type DeprecatedDeleteSessionResponse = - DeprecatedDeleteSessionResponses[keyof DeprecatedDeleteSessionResponses]; - -export type DeprecatedGetSessionData = { - body?: never; - path: { - /** - * The id of the session to fetch - */ - session_id: string; - }; - query?: never; - url: "/session/{session_id}"; -}; - -export type DeprecatedGetSessionErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeprecatedGetSessionError = - DeprecatedGetSessionErrors[keyof DeprecatedGetSessionErrors]; - -export type DeprecatedGetSessionResponses = { - /** - * Successful Response - */ - 200: ResponseModelSession; -}; - -export type DeprecatedGetSessionResponse = - DeprecatedGetSessionResponses[keyof DeprecatedGetSessionResponses]; - -export type DeprecatedUpdateSessionData = { - body: UpdateSessionParams; - path: { - /** - * The id of the session to update - */ - session_id: string; - }; - query?: never; - url: "/session/{session_id}"; -}; - -export type DeprecatedUpdateSessionErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeprecatedUpdateSessionError = - DeprecatedUpdateSessionErrors[keyof DeprecatedUpdateSessionErrors]; - -export type DeprecatedUpdateSessionResponses = { - /** - * Successful Response - */ - 200: ResponseModelSession; -}; - -export type DeprecatedUpdateSessionResponse = - DeprecatedUpdateSessionResponses[keyof DeprecatedUpdateSessionResponses]; - -export type DeprecatedCreateSessionData = { - body: CreateSessionParams; - path?: never; - query?: never; - url: "/session"; -}; - -export type DeprecatedCreateSessionErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeprecatedCreateSessionError = - DeprecatedCreateSessionErrors[keyof DeprecatedCreateSessionErrors]; - -export type DeprecatedCreateSessionResponses = { - /** - * Successful Response - */ - 200: ResponseModelSession; -}; - -export type DeprecatedCreateSessionResponse = - DeprecatedCreateSessionResponses[keyof DeprecatedCreateSessionResponses]; - -export type DeprecatedClearSessionData = { - body?: never; - path: { - /** - * The id of the session to update - */ - session_id: string; - }; - query?: never; - url: "/session/{session_id}/clear"; -}; - -export type DeprecatedClearSessionErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeprecatedClearSessionError = - DeprecatedClearSessionErrors[keyof DeprecatedClearSessionErrors]; - -export type DeprecatedClearSessionResponses = { - /** - * Successful Response - */ - 200: ResponseModelSession; -}; - -export type DeprecatedClearSessionResponse = - DeprecatedClearSessionResponses[keyof DeprecatedClearSessionResponses]; - -export type DeprecatedChatData = { - /** - * Req - */ - body: ChatParamsSingleMessage | ChatParamsMultiMessages; - path?: never; - query?: never; - url: "/chat"; -}; - -export type DeprecatedChatErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeprecatedChatError = - DeprecatedChatErrors[keyof DeprecatedChatErrors]; - -export type DeprecatedChatResponses = { - /** - * Successful Response - */ - 200: ChatResponse; -}; - -export type DeprecatedChatResponse = - DeprecatedChatResponses[keyof DeprecatedChatResponses]; - -export type DeprecatedChatCompletionsData = { - body: CompletionParams; - path?: never; - query?: never; - url: "/chat/completions"; -}; - -export type DeprecatedChatCompletionsErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeprecatedChatCompletionsError = - DeprecatedChatCompletionsErrors[keyof DeprecatedChatCompletionsErrors]; - -export type DeprecatedChatCompletionsResponses = { - /** - * Successful Response - */ - 200: CompletionResponse; -}; - -export type DeprecatedChatCompletionsResponse = - DeprecatedChatCompletionsResponses[keyof DeprecatedChatCompletionsResponses]; - -export type DeprecatedExecuteData = { - /** - * Req - */ - body: ChatParamsSingleMessage | ChatParamsMultiMessages; - path?: never; - query?: never; - url: "/execute"; -}; - -export type DeprecatedExecuteErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeprecatedExecuteError = - DeprecatedExecuteErrors[keyof DeprecatedExecuteErrors]; - -export type DeprecatedExecuteResponses = { - /** - * Successful Response - */ - 200: ChatResponse; -}; - -export type DeprecatedExecuteResponse = - DeprecatedExecuteResponses[keyof DeprecatedExecuteResponses]; - -export type FeedbackData = { - body: FeedbackParams; - path?: never; - query?: never; - url: "/feedback"; -}; - -export type FeedbackErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type FeedbackError = FeedbackErrors[keyof FeedbackErrors]; - -export type FeedbackResponses = { - /** - * Successful Response - */ - 200: ResponseModelFeedback; -}; - -export type FeedbackResponse = FeedbackResponses[keyof FeedbackResponses]; - -export type GetModelsData = { - body?: never; - path?: never; - query?: never; - url: "/models"; -}; - -export type GetModelsResponses = { - /** - * Successful Response - */ - 200: ModelResponse; -}; - -export type GetModelsResponse = GetModelsResponses[keyof GetModelsResponses]; - -export type GetAuthDelegatePayloadData = { - body: GetPayloadParams; - path?: never; - query?: never; - url: "/auth/delegate/payload"; -}; - -export type GetAuthDelegatePayloadErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetAuthDelegatePayloadError = - GetAuthDelegatePayloadErrors[keyof GetAuthDelegatePayloadErrors]; - -export type GetAuthDelegatePayloadResponses = { - /** - * Successful Response - */ - 200: ResponseModelGetPayloadResponse; -}; - -export type GetAuthDelegatePayloadResponse = - GetAuthDelegatePayloadResponses[keyof GetAuthDelegatePayloadResponses]; - -export type AuthDelegateLoginData = { - body: LoginParams; - path?: never; - query?: never; - url: "/auth/delegate/login"; -}; - -export type AuthDelegateLoginErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type AuthDelegateLoginError = - AuthDelegateLoginErrors[keyof AuthDelegateLoginErrors]; - -export type AuthDelegateLoginResponses = { - /** - * Successful Response - */ - 200: ResponseModelLoginResponse; -}; - -export type AuthDelegateLoginResponse = - AuthDelegateLoginResponses[keyof AuthDelegateLoginResponses]; - -export type VerifyAuthData = { - body?: never; - path?: never; - query?: never; - url: "/auth/verify"; -}; - -export type VerifyAuthResponses = { - /** - * Successful Response - */ - 200: ResponseModelVerifyJwtResponse; -}; - -export type VerifyAuthResponse = VerifyAuthResponses[keyof VerifyAuthResponses]; - -export type GetUserData = { - body?: never; - path?: never; - query?: never; - url: "/user"; -}; - -export type GetUserResponses = { - /** - * Successful Response - */ - 200: ResponseModelUserResponse; -}; - -export type GetUserResponse = GetUserResponses[keyof GetUserResponses]; - -export type GetUserWalletsData = { - body?: never; - path?: never; - query?: never; - url: "/user/wallets"; -}; - -export type GetUserWalletsResponses = { - /** - * Successful Response - */ - 200: ResponseModelListUserWalletResponse; -}; - -export type GetUserWalletsResponse = - GetUserWalletsResponses[keyof GetUserWalletsResponses]; - -export type DeleteUserWalletData = { - body?: never; - path: { - /** - * Wallet Id - */ - wallet_id: string; - }; - query?: never; - url: "/user/wallet/{wallet_id}"; -}; - -export type DeleteUserWalletErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeleteUserWalletError = - DeleteUserWalletErrors[keyof DeleteUserWalletErrors]; - -export type DeleteUserWalletResponses = { - /** - * Successful Response - */ - 200: unknown; -}; - -export type GetUserWalletData = { - body?: never; - path: { - /** - * Wallet Id - */ - wallet_id: string; - }; - query?: never; - url: "/user/wallet/{wallet_id}"; -}; - -export type GetUserWalletErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetUserWalletError = GetUserWalletErrors[keyof GetUserWalletErrors]; - -export type GetUserWalletResponses = { - /** - * Successful Response - */ - 200: ResponseModelUserWalletResponse; -}; - -export type GetUserWalletResponse = - GetUserWalletResponses[keyof GetUserWalletResponses]; - -export type UpdateUserWalletData = { - body: UpdateUserWalletParams; - path: { - /** - * Wallet Id - */ - wallet_id: string; - }; - query?: never; - url: "/user/wallet/{wallet_id}"; -}; - -export type UpdateUserWalletErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type UpdateUserWalletError = - UpdateUserWalletErrors[keyof UpdateUserWalletErrors]; - -export type UpdateUserWalletResponses = { - /** - * Successful Response - */ - 200: unknown; -}; - -export type CreateUserWalletData = { - body: CreateUserWalletParams; - path?: never; - query?: never; - url: "/user/wallet"; -}; - -export type CreateUserWalletErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type CreateUserWalletError = - CreateUserWalletErrors[keyof CreateUserWalletErrors]; - -export type CreateUserWalletResponses = { - /** - * Successful Response - */ - 200: unknown; -}; - -export type GetAgentsData = { - body?: never; - path?: never; - query?: never; - url: "/agents"; -}; - -export type GetAgentsResponses = { - /** - * Successful Response - */ - 200: ResponseModelListAgentListResponse; -}; - -export type GetAgentsResponse = GetAgentsResponses[keyof GetAgentsResponses]; - -export type DeleteAgentData = { - body?: never; - path: { - /** - * Agent Id - */ - agent_id: string; - }; - query?: never; - url: "/agent/{agent_id}"; -}; - -export type DeleteAgentErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeleteAgentError = DeleteAgentErrors[keyof DeleteAgentErrors]; - -export type DeleteAgentResponses = { - /** - * Successful Response - */ - 200: ResponseModelUuid; -}; - -export type DeleteAgentResponse = - DeleteAgentResponses[keyof DeleteAgentResponses]; - -export type GetAgentData = { - body?: never; - path: { - /** - * Agent Id - */ - agent_id: string; - }; - query?: never; - url: "/agent/{agent_id}"; -}; - -export type GetAgentErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetAgentError = GetAgentErrors[keyof GetAgentErrors]; - -export type GetAgentResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentResponse; -}; - -export type GetAgentResponse = GetAgentResponses[keyof GetAgentResponses]; - -export type UpdateAgentData = { - body: UpdateAgentHandlerParams; - path: { - /** - * Agent Id - */ - agent_id: string; - }; - query?: never; - url: "/agent/{agent_id}"; -}; - -export type UpdateAgentErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type UpdateAgentError = UpdateAgentErrors[keyof UpdateAgentErrors]; - -export type UpdateAgentResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentResponse; -}; - -export type UpdateAgentResponse = - UpdateAgentResponses[keyof UpdateAgentResponses]; - -export type CreateAgentData = { - body: CreateAgentHandlerParams; - path?: never; - query?: never; - url: "/agent"; -}; - -export type CreateAgentErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type CreateAgentError = CreateAgentErrors[keyof CreateAgentErrors]; - -export type CreateAgentResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentResponse; -}; - -export type CreateAgentResponse = - CreateAgentResponses[keyof CreateAgentResponses]; - -export type DeleteAgentTriggerData = { - body?: never; - path: { - /** - * Agent Id - */ - agent_id: string; - /** - * Trigger Id - */ - trigger_id: string; - }; - query?: never; - url: "/agent/{agent_id}/trigger/{trigger_id}"; -}; - -export type DeleteAgentTriggerErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeleteAgentTriggerError = - DeleteAgentTriggerErrors[keyof DeleteAgentTriggerErrors]; - -export type DeleteAgentTriggerResponses = { - /** - * Successful Response - */ - 200: ResponseModelUuid; -}; - -export type DeleteAgentTriggerResponse = - DeleteAgentTriggerResponses[keyof DeleteAgentTriggerResponses]; - -export type GetAgentTriggerData = { - body?: never; - path: { - /** - * Agent Id - */ - agent_id: string; - /** - * Trigger Id - */ - trigger_id: string; - }; - query?: never; - url: "/agent/{agent_id}/trigger/{trigger_id}"; -}; - -export type GetAgentTriggerErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetAgentTriggerError = - GetAgentTriggerErrors[keyof GetAgentTriggerErrors]; - -export type GetAgentTriggerResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentTriggerResponse; -}; - -export type GetAgentTriggerResponse = - GetAgentTriggerResponses[keyof GetAgentTriggerResponses]; - -export type UpdateAgentTriggerData = { - body: UpdateAgentTriggerParams; - path: { - /** - * Agent Id - */ - agent_id: string; - /** - * Trigger Id - */ - trigger_id: string; - }; - query?: never; - url: "/agent/{agent_id}/trigger/{trigger_id}"; -}; - -export type UpdateAgentTriggerErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type UpdateAgentTriggerError = - UpdateAgentTriggerErrors[keyof UpdateAgentTriggerErrors]; - -export type UpdateAgentTriggerResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentTriggerResponse; -}; - -export type UpdateAgentTriggerResponse = - UpdateAgentTriggerResponses[keyof UpdateAgentTriggerResponses]; - -export type CreateAgentTriggerData = { - body: CreateAgentTriggerParams; - path: { - /** - * Agent Id - */ - agent_id: string; - }; - query?: never; - url: "/agent/{agent_id}/trigger"; -}; - -export type CreateAgentTriggerErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type CreateAgentTriggerError = - CreateAgentTriggerErrors[keyof CreateAgentTriggerErrors]; - -export type CreateAgentTriggerResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentTriggerResponse; -}; - -export type CreateAgentTriggerResponse = - CreateAgentTriggerResponses[keyof CreateAgentTriggerResponses]; - -export type DeleteAgentToolData = { - body?: never; - path: { - /** - * Agent Id - */ - agent_id: string; - /** - * Tool Id - */ - tool_id: string; - }; - query?: never; - url: "/agent/{agent_id}/tool/{tool_id}"; -}; - -export type DeleteAgentToolErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeleteAgentToolError = - DeleteAgentToolErrors[keyof DeleteAgentToolErrors]; - -export type DeleteAgentToolResponses = { - /** - * Successful Response - */ - 200: ResponseModelUuid; -}; - -export type DeleteAgentToolResponse = - DeleteAgentToolResponses[keyof DeleteAgentToolResponses]; - -export type GetAgentToolData = { - body?: never; - path: { - /** - * Agent Id - */ - agent_id: string; - /** - * Tool Id - */ - tool_id: string; - }; - query?: never; - url: "/agent/{agent_id}/tool/{tool_id}"; -}; - -export type GetAgentToolErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetAgentToolError = GetAgentToolErrors[keyof GetAgentToolErrors]; - -export type GetAgentToolResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentToolResponse; -}; - -export type GetAgentToolResponse = - GetAgentToolResponses[keyof GetAgentToolResponses]; - -export type UpdateAgentToolData = { - body: UpdateAgentToolParams; - path: { - /** - * Agent Id - */ - agent_id: string; - /** - * Tool Id - */ - tool_id: string; - }; - query?: never; - url: "/agent/{agent_id}/tool/{tool_id}"; -}; - -export type UpdateAgentToolErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type UpdateAgentToolError = - UpdateAgentToolErrors[keyof UpdateAgentToolErrors]; - -export type UpdateAgentToolResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentToolResponse; -}; - -export type UpdateAgentToolResponse = - UpdateAgentToolResponses[keyof UpdateAgentToolResponses]; - -export type CreateAgentToolData = { - body: CreateAgentToolParams; - path: { - /** - * Agent Id - */ - agent_id: string; - }; - query?: never; - url: "/agent/{agent_id}/tool"; -}; - -export type CreateAgentToolErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type CreateAgentToolError = - CreateAgentToolErrors[keyof CreateAgentToolErrors]; - -export type CreateAgentToolResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentToolResponse; -}; - -export type CreateAgentToolResponse = - CreateAgentToolResponses[keyof CreateAgentToolResponses]; - -export type GetAgentWalletsData = { - body?: never; - path: { - /** - * Agent Id - */ - agent_id: string; - }; - query?: never; - url: "/agent/{agent_id}/wallets"; -}; - -export type GetAgentWalletsErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetAgentWalletsError = - GetAgentWalletsErrors[keyof GetAgentWalletsErrors]; - -export type GetAgentWalletsResponses = { - /** - * Successful Response - */ - 200: ResponseModelListAgentWalletResponse; -}; - -export type GetAgentWalletsResponse = - GetAgentWalletsResponses[keyof GetAgentWalletsResponses]; - -export type GetAgentWalletData = { - body?: never; - path: { - /** - * Agent Id - */ - agent_id: string; - /** - * Wallet Id - */ - wallet_id: string; - }; - query?: never; - url: "/agent/{agent_id}/wallet/{wallet_id}"; -}; - -export type GetAgentWalletErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetAgentWalletError = - GetAgentWalletErrors[keyof GetAgentWalletErrors]; - -export type GetAgentWalletResponses = { - /** - * Successful Response - */ - 200: ResponseModelAgentWalletResponse; -}; - -export type GetAgentWalletResponse = - GetAgentWalletResponses[keyof GetAgentWalletResponses]; - -export type GetConversationsData = { - body?: never; - path?: never; - query?: { - /** - * Agent Id - */ - agent_id?: string | null; - }; - url: "/conversations"; -}; - -export type GetConversationsErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetConversationsError = - GetConversationsErrors[keyof GetConversationsErrors]; - -export type GetConversationsResponses = { - /** - * Successful Response - */ - 200: ResponseModelListConversationListResponse; -}; - -export type GetConversationsResponse = - GetConversationsResponses[keyof GetConversationsResponses]; - -export type DeleteConversationData = { - body?: never; - path: { - /** - * Conversation Id - */ - conversation_id: string; - }; - query?: never; - url: "/conversation/{conversation_id}"; -}; - -export type DeleteConversationErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeleteConversationError = - DeleteConversationErrors[keyof DeleteConversationErrors]; - -export type DeleteConversationResponses = { - /** - * Successful Response - */ - 200: ResponseModelUuid; -}; - -export type DeleteConversationResponse = - DeleteConversationResponses[keyof DeleteConversationResponses]; - -export type GetConversationData = { - body?: never; - path: { - /** - * Conversation Id - */ - conversation_id: string; - }; - query?: never; - url: "/conversation/{conversation_id}"; -}; - -export type GetConversationErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetConversationError = - GetConversationErrors[keyof GetConversationErrors]; - -export type GetConversationResponses = { - /** - * Successful Response - */ - 200: ResponseModelConversationResponseReadable; -}; - -export type GetConversationResponse = - GetConversationResponses[keyof GetConversationResponses]; - -export type UpdateConversationData = { - body: UpdateConversationHandlerParams; - path: { - /** - * Conversation Id - */ - conversation_id: string; - }; - query?: never; - url: "/conversation/{conversation_id}"; -}; - -export type UpdateConversationErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type UpdateConversationError = - UpdateConversationErrors[keyof UpdateConversationErrors]; - -export type UpdateConversationResponses = { - /** - * Successful Response - */ - 200: ResponseModelConversationResponseReadable; -}; - -export type UpdateConversationResponse = - UpdateConversationResponses[keyof UpdateConversationResponses]; - -export type CreateConversationData = { - body: CreateConversationHandlerParams; - path?: never; - query?: never; - url: "/conversation"; -}; - -export type CreateConversationErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type CreateConversationError = - CreateConversationErrors[keyof CreateConversationErrors]; - -export type CreateConversationResponses = { - /** - * Successful Response - */ - 200: ResponseModelConversationResponseReadable; -}; - -export type CreateConversationResponse = - CreateConversationResponses[keyof CreateConversationResponses]; - -export type CreateConversationMessageData = { - body: CreateMessageHandlerParams; - path: { - /** - * Conversation Id - */ - conversation_id: string; - }; - query?: never; - url: "/conversation/{conversation_id}/message"; -}; - -export type CreateConversationMessageErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type CreateConversationMessageError = - CreateConversationMessageErrors[keyof CreateConversationMessageErrors]; - -export type CreateConversationMessageResponses = { - /** - * Successful Response - */ - 200: ResponseModelConversationMessageResponseReadable; -}; - -export type CreateConversationMessageResponse = - CreateConversationMessageResponses[keyof CreateConversationMessageResponses]; - -export type UpdateConversationMessageData = { - body: UpdateMessageHandlerParams; - path: { - /** - * Conversation Id - */ - conversation_id: string; - /** - * Message Id - */ - message_id: string; - }; - query?: never; - url: "/conversation/{conversation_id}/message/{message_id}"; -}; - -export type UpdateConversationMessageErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type UpdateConversationMessageError = - UpdateConversationMessageErrors[keyof UpdateConversationMessageErrors]; - -export type UpdateConversationMessageResponses = { - /** - * Successful Response - */ - 200: ResponseModelConversationMessageResponseReadable; -}; - -export type UpdateConversationMessageResponse = - UpdateConversationMessageResponses[keyof UpdateConversationMessageResponses]; - -export type GetRegistryAgentsData = { - body?: never; - path?: never; - query?: { - /** - * User Id - */ - user_id?: string | null; - /** - * Search Name - */ - search_name?: string | null; - /** - * Search Description - */ - search_description?: string | null; - /** - * Created After - */ - created_after?: string | null; - /** - * Created Before - */ - created_before?: string | null; - /** - * Updated After - */ - updated_after?: string | null; - /** - * Updated Before - */ - updated_before?: string | null; - /** - * Sort By - */ - sort_by?: "created_at" | "updated_at" | "name"; - /** - * Sort Order - */ - sort_order?: "asc" | "desc"; - /** - * Limit - */ - limit?: number; - /** - * Offset - */ - offset?: number; - }; - url: "/registry/agents"; -}; - -export type GetRegistryAgentsErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetRegistryAgentsError = - GetRegistryAgentsErrors[keyof GetRegistryAgentsErrors]; - -export type GetRegistryAgentsResponses = { - /** - * Successful Response - */ - 200: ResponseModelListRegistryAgentListResponse; -}; - -export type GetRegistryAgentsResponse = - GetRegistryAgentsResponses[keyof GetRegistryAgentsResponses]; - -export type ClientOptions = { - baseUrl: "https://nebula-api.thirdweb-dev.com" | (string & {}); -}; diff --git a/packages/nebula/src/configure.ts b/packages/nebula/src/configure.ts deleted file mode 100644 index bb1cd5ea30c..00000000000 --- a/packages/nebula/src/configure.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { ThirdwebClient } from "thirdweb"; -import { - type Config, - createClient, - createConfig, -} from "./client/client/index.js"; -import { client } from "./client/client.gen.js"; - -export type NebulaClientOptions = { - readonly clientId?: string; - readonly secretKey?: string; - readonly authToken?: string; -}; - -export function getNebulaClient(baseUrl: string, options: NebulaClientOptions) { - return createClient( - createConfig({ - baseUrl, - headers: { - ...(options.clientId && { "x-client-id": options.clientId }), - ...(options.secretKey && { "x-secret-key": options.secretKey }), - ...(options.authToken && { - authorization: `Bearer ${options.authToken}`, - }), - }, - }), - ); -} - -export function configure( - options: NebulaClientOptions & { override?: Config }, -) { - client.setConfig({ - bodySerializer: stringify, - headers: { - ...(options.clientId && { "x-client-id": options.clientId }), - ...(options.secretKey && { "x-secret-key": options.secretKey }), - ...(options.authToken && { - authorization: `Bearer ${options.authToken}`, - }), - }, - ...(options.override ?? {}), - }); -} - -export function configureWithClient( - twClient: ThirdwebClient, - options?: NebulaClientOptions, - override?: Config, -) { - client.setConfig({ - bodySerializer: stringify, - headers: { - ...(twClient.clientId && { "x-client-id": twClient.clientId }), - ...(twClient.secretKey && { "x-secret-key": twClient.secretKey }), - ...(options?.authToken && { - authorization: `Bearer ${options.authToken}`, - }), - }, - ...(override ?? {}), - }); -} - -function stringify( - // biome-ignore lint/suspicious/noExplicitAny: JSON.stringify signature - value: any, - // biome-ignore lint/suspicious/noExplicitAny: JSON.stringify signature - replacer?: ((this: any, key: string, value: any) => any) | null, - space?: string | number, -) { - const res = JSON.stringify( - value, - (key, value_) => { - const value__ = typeof value_ === "bigint" ? value_.toString() : value_; - return typeof replacer === "function" ? replacer(key, value__) : value__; - }, - space, - ); - return res; -} diff --git a/packages/nebula/src/exports/thirdweb.ts b/packages/nebula/src/exports/thirdweb.ts deleted file mode 100644 index a52f62aba29..00000000000 --- a/packages/nebula/src/exports/thirdweb.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type { CreateClientConfig } from "../client/client.gen.js"; -export * from "../client/index.js"; -export { - configure, - configureWithClient, - getNebulaClient, - type NebulaClientOptions, -} from "../configure.js"; diff --git a/packages/nebula/tsconfig.base.json b/packages/nebula/tsconfig.base.json deleted file mode 100644 index ec2b1a33e1e..00000000000 --- a/packages/nebula/tsconfig.base.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - // This tsconfig file contains the shared config for the build (tsconfig.build.json) and type checking (tsconfig.json) config. - "compilerOptions": { - // Incremental builds - // NOTE: Enabling incremental builds speeds up `tsc`. Keep in mind though that it does not reliably bust the cache when the `tsconfig.json` file changes. - "allowJs": false, - "allowSyntheticDefaultImports": true, - "checkJs": false, - - // Interop constraints - "esModuleInterop": false, - "exactOptionalPropertyTypes": false, - "forceConsistentCasingInFileNames": true, - "importHelpers": true, - // Incremental builds - // NOTE: Enabling incremental builds speeds up `tsc`. Keep in mind though that it does not reliably bust the cache when the `tsconfig.json` file changes. - "incremental": false, - - // jsx for "/react" portion - "jsx": "react-jsx", - "lib": [ - "ES2022", // By using ES2022 we get access to the `.cause` property on `Error` instances. - "DOM", // We are adding `DOM` here to get the `fetch`, etc. types. This should be removed once these types are available via DefinitelyTyped. - "DOM.Iterable" // Adding `DOM.Iterable` for the Headers.entries() method. - ], - "module": "NodeNext", - - // Language and environment - "moduleResolution": "NodeNext", - "noFallthroughCasesInSwitch": true, - "noImplicitOverride": true, - "noImplicitReturns": true, - "noUncheckedIndexedAccess": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - - // Skip type checking for node modules - "skipLibCheck": true, - - // Type checking - "strict": true, - "target": "ES2021", - "useDefineForClassFields": true, - "useUnknownInCatchVariables": true, - "verbatimModuleSyntax": true - }, - // This tsconfig file contains the shared config for the build (tsconfig.build.json) and type checking (tsconfig.json) config. - "include": [] -} diff --git a/packages/nebula/tsconfig.build.json b/packages/nebula/tsconfig.build.json deleted file mode 100644 index 63325457c67..00000000000 --- a/packages/nebula/tsconfig.build.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "rootDir": "./src", - "sourceMap": true - }, - "exclude": [ - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.test-d.ts", - "src/**/*.bench.ts", - "src/**/*.macro.ts" - ], - "extends": "./tsconfig.base.json", - "include": ["src"] -} diff --git a/packages/nebula/tsconfig.json b/packages/nebula/tsconfig.json deleted file mode 100644 index bd4c14699e3..00000000000 --- a/packages/nebula/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - // This configuration is used for local development and type checking. - "compilerOptions": { - "baseUrl": ".", - "paths": { - "~test/*": ["./test/src/*"] - } - }, - "exclude": [], - // This configuration is used for local development and type checking. - "extends": "./tsconfig.base.json", - "include": ["src", "test"] -} diff --git a/packages/vault-sdk/CHANGELOG.md b/packages/vault-sdk/CHANGELOG.md deleted file mode 100644 index 3defc311b9b..00000000000 --- a/packages/vault-sdk/CHANGELOG.md +++ /dev/null @@ -1,141 +0,0 @@ -# @thirdweb-dev/react-native-adapter - -## 0.1.1 - -### Patch Changes - -- [#8263](https://github.com/thirdweb-dev/js/pull/8263) [`fe50abd`](https://github.com/thirdweb-dev/js/commit/fe50abd5aba396c244dc8c5c1539e75ccd28ca97) Thanks [@d4mr](https://github.com/d4mr)! - Fixed bug with listing solana accounts response type - -## 0.1.0 - -### Minor Changes - -- [#8168](https://github.com/thirdweb-dev/js/pull/8168) [`35c7d21`](https://github.com/thirdweb-dev/js/commit/35c7d21e368f9ea5636c8663ba31b7d473b5b343) Thanks [@d4mr](https://github.com/d4mr)! - Added Vault operations support for Solana. - -## 0.0.3 - -### Patch Changes - -- [#7058](https://github.com/thirdweb-dev/js/pull/7058) [`e71e7d7`](https://github.com/thirdweb-dev/js/commit/e71e7d70a66a9843166a518d38fe9d454258d587) Thanks [@d4mr](https://github.com/d4mr)! - added secret key and default vault url - -## 0.0.2 - -### Patch Changes - -- [#6639](https://github.com/thirdweb-dev/js/pull/6639) [`c81fed3`](https://github.com/thirdweb-dev/js/commit/c81fed36171c987f668cede5d9744e47ca956ca3) Thanks [@MananTank](https://github.com/MananTank)! - Introducing vault sdk - -## 1.5.4 - -### Patch Changes - -- [#6527](https://github.com/thirdweb-dev/js/pull/6527) [`4f51201`](https://github.com/thirdweb-dev/js/commit/4f51201249713cdac28bf7d6062cdf67a4e89144) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update dependencies - -## 1.5.3 - -### Patch Changes - -- [#5746](https://github.com/thirdweb-dev/js/pull/5746) [`e42ffc6`](https://github.com/thirdweb-dev/js/commit/e42ffc6a931a8d80492a091d79e2d9b38e4ba1d7) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Downgrade aws libraries - -## 1.5.2 - -### Patch Changes - -- [#5594](https://github.com/thirdweb-dev/js/pull/5594) [`b7c8854`](https://github.com/thirdweb-dev/js/commit/b7c885432726eeaf3401217573f2cff0f5247ff7) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Support for Expo 52 and React Native 0.76 - -## 1.5.1 - -### Patch Changes - -- [#5150](https://github.com/thirdweb-dev/js/pull/5150) [`9fadbcc`](https://github.com/thirdweb-dev/js/commit/9fadbcc17abfe302933f7b860ab7c3b4fb577789) Thanks [@jnsdls](https://github.com/jnsdls)! - update dependencies - -- [#5151](https://github.com/thirdweb-dev/js/pull/5151) [`06c0cf3`](https://github.com/thirdweb-dev/js/commit/06c0cf3898419edc79ba042d041612a8ae6967f8) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - update to latest @mobile-wallet-protocol/client - -## 1.5.0 - -### Minor Changes - -- [#4992](https://github.com/thirdweb-dev/js/pull/4992) [`1994d9e`](https://github.com/thirdweb-dev/js/commit/1994d9e52d3a3874e6111ff7bc688f95618fbc25) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Updated required dependencies - -## 1.4.4 - -### Patch Changes - -- [#4874](https://github.com/thirdweb-dev/js/pull/4874) [`783d844`](https://github.com/thirdweb-dev/js/commit/783d84467d81db856a1f0b3509036bbc612ba7e5) Thanks [@jnsdls](https://github.com/jnsdls)! - update dependencies - -## 1.4.3 - -### Patch Changes - -- [#4789](https://github.com/thirdweb-dev/js/pull/4789) [`e384001`](https://github.com/thirdweb-dev/js/commit/e38400195f2644ef8dfcfbce5fa127a9a218247d) Thanks [@MananTank](https://github.com/MananTank)! - Fix whitespaces in UI components - -## 1.4.2 - -### Patch Changes - -- [#4665](https://github.com/thirdweb-dev/js/pull/4665) [`6ce7c83`](https://github.com/thirdweb-dev/js/commit/6ce7c83a3b9eb2374ad2f8163d9c6a68bba4bc42) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update @mobile-wallet-protocol/client to 0.0.3 - -## 1.4.1 - -### Patch Changes - -- [#4603](https://github.com/thirdweb-dev/js/pull/4603) [`b837b69`](https://github.com/thirdweb-dev/js/commit/b837b690ae27fb8bf45f6cd51820f7591e94dab0) Thanks [@jnsdls](https://github.com/jnsdls)! - bump various dependencies - -## 1.4.0 - -### Minor Changes - -- [#4527](https://github.com/thirdweb-dev/js/pull/4527) [`b76a82c`](https://github.com/thirdweb-dev/js/commit/b76a82c30345e06d7b2c203c1e20bf7ec7e0dd9d) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Update React Native dependencies and add support for React Native 0.75 - -## 1.3.0 - -### Minor Changes - -- [#4094](https://github.com/thirdweb-dev/js/pull/4094) [`f1d087e`](https://github.com/thirdweb-dev/js/commit/f1d087e24e8ad74948c0cdfa85d3705319753850) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Support for Coinbase Smart Wallet in React Native - - You can now use the Coinbase Smart Wallet in your React Native apps. - - ```ts - const wallet = createWallet("com.coinbase.wallet", { - appMetadata: { - name: "My app name", - }, - mobileConfig: { - callbackURL: "https://example.com", - }, - walletConfig: { - options: "smartWalletOnly", - }, - }); - - await wallet.connect({ - client, - }); - ``` - -## 1.2.0 - -### Minor Changes - -- [#3271](https://github.com/thirdweb-dev/js/pull/3271) [`3a1fd98`](https://github.com/thirdweb-dev/js/commit/3a1fd985fc4b2720f4d46d54b562c00b2edf21ce) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Align inAppWallet secret sharing implementation with web and previous RN SDK - -## 1.1.1 - -### Patch Changes - -- [#3162](https://github.com/thirdweb-dev/js/pull/3162) [`b9b185b`](https://github.com/thirdweb-dev/js/commit/b9b185b665e9cc2085f0cc07e3a3cc06a755b42a) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Add support for CB wallet in react native - -## 1.1.0 - -### Minor Changes - -- [#3064](https://github.com/thirdweb-dev/js/pull/3064) [`f55fa4c`](https://github.com/thirdweb-dev/js/commit/f55fa4ca856924a0a1eb6b8e5fe743d76b6e2760) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - In-app wallet support for react native - -### Patch Changes - -- [#3110](https://github.com/thirdweb-dev/js/pull/3110) [`49aa6e4`](https://github.com/thirdweb-dev/js/commit/49aa6e41d5df93204821b72f17f1ba5c3cfe41f7) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Phone number sign in for React Native - -## 1.0.0 - -### Major Changes - -- [#3037](https://github.com/thirdweb-dev/js/pull/3037) [`f006429`](https://github.com/thirdweb-dev/js/commit/f006429d7c2415e9f2206e081f6b867854842f0b) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - initial release diff --git a/packages/vault-sdk/README.md b/packages/vault-sdk/README.md deleted file mode 100644 index 610166b5fb5..00000000000 --- a/packages/vault-sdk/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Vault SDK - -This package contains utilities to interact with Vault, thirdweb's key management servive. - -[View documentation](https://portal.thirdweb.com/vault) diff --git a/packages/vault-sdk/biome.json b/packages/vault-sdk/biome.json deleted file mode 100644 index f9869db792f..00000000000 --- a/packages/vault-sdk/biome.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/2.0.6/schema.json", - "extends": "//" -} diff --git a/packages/vault-sdk/package.json b/packages/vault-sdk/package.json deleted file mode 100644 index c18bc805f39..00000000000 --- a/packages/vault-sdk/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "author": "thirdweb eng ", - "bugs": { - "url": "https://github.com/thirdweb-dev/js/issues" - }, - "dependencies": { - "@noble/ciphers": "^1.2.1", - "@noble/curves": "1.8.2", - "@noble/hashes": "1.7.2", - "@solana/addresses": "^3.0.0", - "@solana/keys": "^3.0.0", - "@solana/kit": "^4.0.0", - "@solana/rpc": "^3.0.0", - "@solana/transactions": "^3.0.0", - "abitype": "1.0.8", - "jose": "6.0.11" - }, - "devDependencies": { - "@biomejs/biome": "2.0.6", - "@solana-program/system": "^0.8.1", - "bs58": "^6.0.0", - "rimraf": "6.0.1", - "vitest": "3.2.4" - }, - "engines": { - "node": ">=18" - }, - "exports": { - ".": { - "types": "./dist/types/exports/thirdweb.d.ts", - "import": "./dist/esm/exports/thirdweb.js", - "default": "./dist/cjs/exports/thirdweb.js" - }, - "./package.json": "./package.json" - }, - "files": [ - "dist/*", - "src/*" - ], - "license": "Apache-2.0", - "main": "./dist/cjs/exports/thirdweb.js", - "module": "./dist/esm/exports/thirdweb.js", - "name": "@thirdweb-dev/vault-sdk", - "peerDependencies": { - "typescript": ">=5.0.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - }, - "repository": { - "type": "git", - "url": "git+https://github.com/thirdweb-dev/js.git#main" - }, - "scripts": { - "build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types", - "build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json", - "build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json", - "build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", - "clean": "rimraf dist", - "test:solana": "vitest ./tests/solana.test.ts", - "dev": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm --watch", - "fix": "biome check ./src --fix", - "format": "biome format ./src --write", - "lint": "biome check ./src" - }, - "type": "module", - "types": "./dist/types/exports/thirdweb.d.ts", - "typings": "./dist/types/exports/thirdweb.d.ts", - "version": "0.1.1" -} diff --git a/packages/vault-sdk/src/exports/thirdweb.ts b/packages/vault-sdk/src/exports/thirdweb.ts deleted file mode 100644 index 687441a9be9..00000000000 --- a/packages/vault-sdk/src/exports/thirdweb.ts +++ /dev/null @@ -1,72 +0,0 @@ -export { - createAccessToken, - createEoa, - createServiceAccount, - createSignedAccessToken, - createSolanaAccount, - createVaultClient, - getServiceAccount, - listAccessTokens, - listEoas, - listSolanaAccounts, - ping, - revokeAccessToken, - rotateServiceAccount, - signAuthorization, - signMessage, - signSolanaMessage, - signSolanaTransaction, - signStructuredMessage, - signTransaction, - signTypedData, - type VaultClient, -} from "../sdk.js"; - -export { - ParseTransactionError, - parseTransaction, -} from "../transaction-parser.js"; - -export type { - AccessTokenData, - Auth, - Authorization, - CheckedSignTypedDataPayload, - CreateAccessTokenPayload, - CreateEoaPayload, - CreateServiceAccountPayload, - CreateSolanaAccountPayload, - EncryptedPayload, - GenericPayload, - GetAccessTokensData, - GetAccessTokensOptions, - GetServiceAccountPayload, - ListAccessTokensPayload, - ListEoaPayload, - ListSolanaAccountsPayload, - Payload, - PingPayload, - PolicyComponent, - RevokeAccessTokenPayload, - RotateServiceAccountPayload, - SignAuthorizationData, - SignAuthorizationOptions, - SignAuthorizationPayload, - SignAuthorizationRules, - SignedAuthorization, - SignMessagePayload, - SignSolanaMessagePayload, - SignSolanaTransactionPayload, - SignStructuredMessageData, - SignStructuredMessageOptions, - SignStructuredMessagePayload, - SignTransactionPayload, - SignTypedDataPayload, - StructuredMessageInput, - UnencryptedErrorResponse, - UserOperationV06Input, - UserOperationV06Rules, - UserOperationV07Input, - UserOperationV07Rules, - VaultError, -} from "../types.js"; diff --git a/packages/vault-sdk/src/sdk.ts b/packages/vault-sdk/src/sdk.ts deleted file mode 100644 index 25bb00c0796..00000000000 --- a/packages/vault-sdk/src/sdk.ts +++ /dev/null @@ -1,664 +0,0 @@ -import { xchacha20poly1305 } from "@noble/ciphers/chacha"; -import { x25519 } from "@noble/curves/ed25519"; -import { hkdf } from "@noble/hashes/hkdf"; -import { sha256 } from "@noble/hashes/sha256"; -import { bytesToHex, hexToBytes, randomBytes } from "@noble/hashes/utils"; - -import { - address, - getBase58Encoder, - getTransactionDecoder, - getTransactionEncoder, -} from "@solana/kit"; - -import type { TypedData } from "abitype"; -import * as jose from "jose"; -import type { - CheckedSignTypedDataPayload, - CreateAccessTokenPayload, - CreateEoaPayload, - CreateServiceAccountPayload, - CreateSolanaAccountPayload, - EncryptedPayload, - GetServiceAccountPayload, - ListAccessTokensPayload, - ListEoaPayload, - ListSolanaAccountsPayload, - Payload, - PingPayload, - PolicyComponent, - Prettify, - RevokeAccessTokenPayload, - RotateServiceAccountPayload, - SignAuthorizationPayload, - SignMessagePayload, - SignSolanaMessagePayload, - SignSolanaTransactionPayload, - SignStructuredMessagePayload, - SignTransactionPayload, - UnencryptedErrorResponse, -} from "./types.js"; - -function encryptForEnclave( - payload: Payload["input"], - enclavePublicKey: Uint8Array, -): { encryptedPayload: EncryptedPayload; ephemeralPrivateKey: Uint8Array } { - const ephemeralPrivateKey = randomBytes(32); - // Generate ephemeral keypair - const ephemeralPublicKey = x25519.getPublicKey(ephemeralPrivateKey); - - // Derive shared secret using X25519 - const sharedSecret = x25519.getSharedSecret( - ephemeralPrivateKey, - enclavePublicKey, - ); - - // Key derivation - const encryptionKey = hkdf(sha256, sharedSecret, undefined, "encryption", 32); - - // Convert message to bytes if it's not already - const messageBytes = - typeof payload === "string" - ? new TextEncoder().encode(payload) - : new TextEncoder().encode(JSON.stringify(payload)); - - // XChaCha20-Poly1305 encryption - const nonce = randomBytes(24); // 24-byte nonce for XChaCha20 - const cipher = xchacha20poly1305(encryptionKey, nonce); - const ciphertext = cipher.encrypt(messageBytes); - - // Format the encrypted package - return { - encryptedPayload: { - ciphertext: bytesToHex(ciphertext), - ephemeralPublicKey: bytesToHex(ephemeralPublicKey), - nonce: bytesToHex(nonce), - }, - ephemeralPrivateKey: ephemeralPrivateKey, - }; -} - -function isErrorResponse( - response: UnencryptedErrorResponse | EncryptedPayload, -): response is UnencryptedErrorResponse { - return (response as UnencryptedErrorResponse).error !== undefined; -} - -function decryptFromEnclave( - encryptedPackage: EncryptedPayload, - ephemeralPrivateKey: Uint8Array, -) { - const { ephemeralPublicKey, nonce, ciphertext } = encryptedPackage; - - // Convert hex strings back to bytes - const pubKey = hexToBytes(ephemeralPublicKey); - const nonceBytes = hexToBytes(nonce); - const ciphertextBytes = hexToBytes(ciphertext); - - // Derive the same shared secret (from the enclave's ephemeral public key) - const sharedSecret = x25519.getSharedSecret(ephemeralPrivateKey, pubKey); - // Derive the same encryption key - const encryptionKey = hkdf(sha256, sharedSecret, undefined, "encryption", 32); - - // Decrypt the ciphertext - const cipher = xchacha20poly1305(encryptionKey, nonceBytes); - const decrypted = cipher.decrypt(ciphertextBytes); - - // Convert bytes back to string and parse JSON if needed - const decryptedText = new TextDecoder().decode(decrypted); - try { - return JSON.parse(decryptedText); - } catch { - return decryptedText; - } -} - -export type VaultClient = { - baseUrl: string; - publicKey: Uint8Array; - headers: Record; -}; - -export async function createVaultClient(clientOptions?: { - baseUrl?: string; - secretKey?: string; -}): Promise { - const baseUrl = clientOptions?.baseUrl ?? "https://engine.thirdweb.com"; - // Construct the full URL for the fetch call - const url = new URL("api/v1/enclave", baseUrl).toString(); - - type IntrospectionResponse = { - publicKey: string; - }; - - const headers = { - // Indicate we accept JSON responses - Accept: "application/json", - ...(clientOptions?.secretKey - ? { "x-secret-key": clientOptions?.secretKey } - : {}), - }; - - try { - const response = await fetch(url, { - headers, - method: "GET", - }); - - // fetch doesn't throw on HTTP errors (like 4xx, 5xx) by default. - // Check if the request was successful (status in the range 200-299). - if (!response.ok) { - // You might want more sophisticated error handling here, - // potentially trying to parse an error message from the response body. - throw new Error( - `Failed to fetch enclave public key: ${response.status} ${response.statusText}`, - ); - } - - // Parse the JSON response body - const data = (await response.json()) as IntrospectionResponse; - - if (!data.publicKey) { - throw new Error("Invalid response format: publicKey missing"); - } - - const publicKeyBytes = hexToBytes(data.publicKey); - - return { - baseUrl, // Store baseUrl - headers, - publicKey: publicKeyBytes, - }; - } catch (error) { - // Handle network errors or JSON parsing errors - throw new Error(`Failed to fetch enclave public key: ${error}`); // Re-throw or handle as appropriate for your application - } -} - -// ========== Main API function ========== -type SendRequestParams

= { - request: P["input"]; - client: VaultClient; -}; - -async function sendRequest

({ - request, - client, -}: SendRequestParams

): Promise> { - const { encryptedPayload, ephemeralPrivateKey } = encryptForEnclave( - request, - client.publicKey, - ); - - // Construct the full URL using the client's baseUrl - const url = new URL("api/v1/enclave", client.baseUrl).toString(); - - try { - const response = await fetch(url, { - // Stringify the JSON payload for the request body - body: JSON.stringify(encryptedPayload), - headers: { - ...client.headers, - Accept: "application/json", - "Content-Type": "application/json", // Good practice to specify accept header - }, - method: "POST", - }); - - // IMPORTANT: Replicate ky's throwHttpErrors: false behavior. - // We proceed to parse the body regardless of response.ok status, - // as the body itself might contain the structured error (UnencryptedErrorResponse) - // or the encrypted success payload. - - let responseData: EncryptedPayload | UnencryptedErrorResponse; - try { - responseData = await response.json(); - } catch (parseError) { - // If JSON parsing fails (e.g., 500 error with HTML body), - // construct a generic error response. - return { - data: null, - error: { - code: "FETCH_PARSE_ERROR", - message: `Failed to parse response: ${ - response.status - } ${response.statusText}. ${ - parseError instanceof Error - ? parseError.message - : String(parseError) - }`, - }, - success: false, - } as Prettify; // Cast needed because error isn't strictly EncryptedError | UnencryptedError - } - - // Now check if the *parsed* response indicates an error - if (isErrorResponse(responseData)) { - console.error("🚨 Error response from enclave:", responseData); - return { - data: null, - error: responseData.error, - success: false, // Use the error from the response body - } as Prettify; - } - - // If it's not an error response, it must be the EncryptedPayload - const decryptedResponse = decryptFromEnclave( - responseData, // No need for 'as EncryptedPayload' if isErrorResponse is accurate - ephemeralPrivateKey, - ); - - // The decrypted response should match the expected success structure P["output"] - // which includes { success: true, data: ..., error: null } - return decryptedResponse as Prettify; - } catch (error) { - // Catch network errors during the fetch itself - return { - data: null, - error: { - code: "FETCH_NETWORK_ERROR", - message: - error instanceof Error ? error.message : "Unknown network error", - }, - success: false, - } as Prettify; // Cast needed - } -} - -// ========== Generic Helper Params ========== -type PayloadParams

= { - request: Prettify>; - client: VaultClient; -}; - -// ========== Helper functions ========== -export function ping({ client, request: options }: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "ping", - ...options, - }, - }); -} - -export function createServiceAccount({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "serviceAccount:create", - ...options, - }, - }); -} - -export function getServiceAccount({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "serviceAccount:get", - ...options, - }, - }); -} - -export function rotateServiceAccount({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "serviceAccount:rotate", - ...options, - }, - }); -} - -export function createEoa({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "eoa:create", - ...options, - }, - }); -} - -export function listEoas({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "eoa:list", - ...options, - }, - }); -} - -export function signTransaction({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "eoa:signTransaction", - ...options, - }, - }); -} - -export function signMessage({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "eoa:signMessage", - ...options, - }, - }); -} - -export function createAccessToken({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "accessToken:create", - ...options, - }, - }); -} - -export function signTypedData< - Types extends TypedData, - PrimaryType extends keyof Types, ->({ - client, - request: options, -}: PayloadParams>) { - return sendRequest>({ - client, - request: { - auth: options.auth, - operation: "eoa:signTypedData", - options: { - from: options.options.from, - typedData: options.options.typedData, - }, - }, - }); -} - -export function revokeAccessToken({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "accessToken:revoke", - ...options, - }, - }); -} - -export function signAuthorization({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "eoa:signAuthorization", - ...options, - }, - }); -} - -export function signStructuredMessage({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "eoa:signStructuredMessage", - ...options, - }, - }); -} - -export function listAccessTokens({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "accessToken:list", - ...options, - }, - }); -} - -// ========== Solana Functions ========== - -export function createSolanaAccount({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "solana:create", - ...options, - }, - }); -} - -export function listSolanaAccounts({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "solana:list", - ...options, - }, - }); -} - -export function signSolanaTransaction({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "solana:signTransaction", - ...options, - }, - }); -} - -/** - * Reconstruct a signed solana transaction from the vault signature using @solana/kit - */ -export function reconstructSolanaSignedTransaction( - base64Transaction: string, - base58Signature: string, - signerPubkey: string, -): Uint8Array { - // Decode the base64 transaction into bytes - const base64TransactionBytes = new Uint8Array( - Buffer.from(base64Transaction, "base64"), - ); - // Decode the transaction to get its structure - const transactionDecoder = getTransactionDecoder(); - const transaction = transactionDecoder.decode(base64TransactionBytes); - - // Decode the base58 signature to bytes - const base58Encoder = getBase58Encoder(); - const signatureBytes = base58Encoder.encode(base58Signature); - - // Add the signature to the transaction - const signedTransaction = { - ...transaction, - signatures: { - ...transaction.signatures, - [address(signerPubkey)]: signatureBytes, - }, - }; - - // Re-encode the signed transaction - const transactionEncoder = getTransactionEncoder(); - const signedTransactionBytes = transactionEncoder.encode(signedTransaction); - - return new Uint8Array(signedTransactionBytes); -} - -export function signSolanaMessage({ - client, - request: options, -}: PayloadParams) { - return sendRequest({ - client, - request: { - operation: "solana:signMessage", - ...options, - }, - }); -} - -const SIGNED_TOKEN_PREFIX = "vt_sat_"; -const DEFAULT_SIGNING_CONTEXT = "encryption"; // Default context for HKDF - -export interface CreateSignedAccessTokenParams { - /** The VaultClient instance (used to get the enclave public key). */ - vaultClient: VaultClient; - /** The base access token string obtained from the createAccessToken API call. */ - baseAccessToken: string; - /** The specific policies to embed in the signed token's claims. */ - additionalPolicies: PolicyComponent[]; - /** The desired expiration time for the signed token (Unix timestamp in seconds). */ - expiryTimestamp: number; - /** Optional: The context string for HKDF key derivation. Defaults to "encryption". MUST match server expectation. */ - signingContext?: string; -} - -/** - * Creates a client-side "signed access token". - * This involves encrypting the baseAccessToken and embedding it, along with - * additional policies and expiry, into a JWT signed using a key derived - * from the baseAccessToken itself. - * - * NOTE: This function is ASYNCHRONOUS because JWT signing using Web Crypto is async. - * - * @param params - The parameters for creating the signed token. - * @returns A Promise resolving to the signed access token string (prefixed). - * @throws If any cryptographic operation or JWT signing fails. - */ -export async function createSignedAccessToken({ - vaultClient, - baseAccessToken, - additionalPolicies, - expiryTimestamp, - signingContext = DEFAULT_SIGNING_CONTEXT, -}: CreateSignedAccessTokenParams): Promise { - if (!vaultClient || !vaultClient.publicKey) { - throw new Error("Vault client or enclave public key is missing."); - } - if (!baseAccessToken) { - throw new Error("Base access token is required."); - } - if (!additionalPolicies) { - throw new Error("Additional policies are required."); - } - if (typeof expiryTimestamp !== "number" || expiryTimestamp <= 0) { - throw new Error("Valid expiry timestamp is required."); - } - - try { - const enclavePublicKey = vaultClient.publicKey; - const contextBytes = new TextEncoder().encode(signingContext); - - // 1. Generate client ephemeral keys for this operation - const clientEphemeralPrivateKey = randomBytes(32); - const clientEphemeralPublicKey = x25519.getPublicKey( - clientEphemeralPrivateKey, - ); - - // 2. Derive shared secret (Client Ephemeral Private Key + Enclave Public Key) - const sharedSecret = x25519.getSharedSecret( - clientEphemeralPrivateKey, - enclavePublicKey, - ); - - // 3. Derive encryption key using HKDF - const encryptionKey = hkdf( - sha256, - sharedSecret, - undefined, // No salt - contextBytes, // Use the provided or default context - 32, // 32 bytes key length - ); - - // 4. Encrypt the base access token string - const nonce = randomBytes(24); // 24-byte nonce for XChaCha20 - const cipher = xchacha20poly1305(encryptionKey, nonce); - const baseTokenBytes = new TextEncoder().encode(baseAccessToken); - const ciphertext = cipher.encrypt(baseTokenBytes); - - // 5. Prepare JWT Signing Key (SHA-256 hash of the base token) - const secretBytes = new TextEncoder().encode(baseAccessToken); - const hashBuffer = await crypto.subtle.digest("SHA-256", secretBytes); - const jwtSigningKey = new Uint8Array(hashBuffer); - - // 6. Prepare JWT Claims - const claims = { - encrypted_token: bytesToHex(ciphertext), - ephemeral_public_key: bytesToHex(clientEphemeralPublicKey), - // Match Rust SignedTokenClaims struct (ensure names match server expectation) - exp: expiryTimestamp, - iat: Math.floor(Date.now() / 1000), - nonce: bytesToHex(nonce), - policies: additionalPolicies, - }; - - // 7. Sign the JWT using HS256 - const jwt = await new jose.SignJWT(claims) - .setProtectedHeader({ alg: "HS256" }) - // .setIssuedAt(claims.iat) // Included in claims - // .setExpirationTime(claims.exp) // Included in claims - .sign(jwtSigningKey); - - // 8. Prepend the prefix - const signedAccessToken = `${SIGNED_TOKEN_PREFIX}${jwt}`; - return signedAccessToken; - } catch (error) { - console.error("Error during signed access token creation:", error); - throw new Error( - `Failed to create signed access token: ${ - error instanceof Error ? error.message : String(error) - }`, - ); - } -} diff --git a/packages/vault-sdk/src/transaction-parser.ts b/packages/vault-sdk/src/transaction-parser.ts deleted file mode 100644 index bb50599b11f..00000000000 --- a/packages/vault-sdk/src/transaction-parser.ts +++ /dev/null @@ -1,921 +0,0 @@ -// Update type definitions for our standardized types -import type { - AccessList, - Address, - EthereumTypedTransaction, - SignedAuthorization, - TxEip1559, - TxEip2930, - TxEip4844, - TxEip4844WithSidecar, - TxEip7702, - TxLegacy, -} from "./transaction-types.js"; - -// Custom error class for transaction parsing errors -class ParseTransactionError extends Error { - constructor(message: string) { - super(message); - this.name = "ParseTransactionError"; - } -} - -/** - * Type predicate assert function that helps TypeScript understand - * that the condition guarantees a value is not null or undefined - */ -function assert( - condition: T | null | undefined, - message: string, - // The double negative here (!!) converts the value to a boolean - // while preserving the type information - predicate: (value: T) => boolean = (value) => !!value, -): asserts condition is T { - if (!condition || !predicate(condition)) { - throw new ParseTransactionError(message); - } -} -// Type definitions for client-side data -type Hex = string; - -// Define possible sidecar formats we might receive -type SingleSidecar = { - blobs?: string[]; - commitments?: string[]; - proofs?: string[]; -}; - -type MultipleSidecar = { - blob: string; - commitment: string; - proof: string; -}[]; - -// Client-side transaction input format -type ClientSideSignTransactionOptions = { - type?: string | undefined; - accessList?: - | Array<{ - address: string; - storageKeys: string[]; - }> - | readonly { - address: string; - storageKeys: readonly string[]; - }[] - | undefined; - chainId?: number | bigint | string | undefined; - gasPrice?: bigint | string | undefined; - maxFeePerGas?: bigint | string | undefined; - maxPriorityFeePerGas?: bigint | string | undefined; - data?: Hex | undefined; - input?: Hex | undefined; - to?: string | null | undefined; - nonce?: number | bigint | string | undefined; - value?: bigint | string | undefined; - gas?: bigint | string | number | undefined; - gasLimit?: bigint | string | number | undefined; - authorizationList?: readonly { - address: string; - r: Hex | bigint; - s: Hex | bigint; - // always need either v or yParity. v is only for backwards compatibility - v?: bigint | number | string; - yParity?: number | bigint | string; - nonce: number | bigint | string; - chainId: number | bigint | string; - }[]; - - blobVersionedHashes?: string[] | undefined; - maxFeePerBlobGas?: bigint | string | undefined; - // Direct blob fields - blobs?: string[] | undefined; - commitments?: string[] | undefined; - proofs?: string[] | undefined; - // Sidecar options - could be in different formats - sidecar?: SingleSidecar | undefined; - sidecars?: MultipleSidecar | undefined; -}; - -/** - * Parse client transaction data into standardized transaction format - */ -function parseTransaction( - clientTx: ClientSideSignTransactionOptions, -): EthereumTypedTransaction { - try { - // Normalize and validate basics first - const normalizedTx = { - // Handle gas/gasLimit field, converting to hex - gasLimit: normalizeGasLimit(clientTx), - // Handle string/data field, prioritizing input - input: normalizeInputData(clientTx), - - // Convert nonce to hex string - nonce: normalizeNonce(clientTx), - - // Handle to address, null for contract creation - to: normalizeTo(clientTx), - - // Convert value to hex string - value: normalizeValue(clientTx), - }; - - // Determine transaction type - let transaction: EthereumTypedTransaction; - - // First check if type is explicitly provided - if (clientTx.type !== undefined) { - const normalizedType = normalizeTypeField(clientTx.type); - transaction = createTransactionFromType( - normalizedType, - clientTx, - normalizedTx, - ); - } else { - // If no type, infer from available fields - transaction = inferTransactionType(clientTx, normalizedTx); - } - - // Final validation - validateTransaction(transaction); - - return transaction; - } catch (error) { - // Ensure all errors are ParseTransactionError - if (error instanceof ParseTransactionError) { - throw error; - } - - throw new ParseTransactionError( - error instanceof Error ? error.message : String(error), - ); - } -} - -/** - * Convert any numeric value to a standardized hex string - */ -function toHexString(value: number | bigint | string | undefined): string { - if (value === undefined) { - return "0x0"; - } - - let bigIntValue: bigint; - - // Convert to BigInt for consistent handling - if (typeof value === "string") { - // Check if it's already a hex string - if (value.startsWith("0x")) { - return value; - } - // Parse decimal string - bigIntValue = BigInt(value); - } else if (typeof value === "number") { - bigIntValue = BigInt(value); - } else { - bigIntValue = value; - } - - // Convert to lowercase hex string with 0x prefix - return `0x${bigIntValue.toString(16)}`; -} - -/** - * Normalize the type field to standard hex format (0x00, 0x01, etc.) - */ -function normalizeTypeField(typeValue: string): string { - // Handle hex format (0x0, 0x01, etc.) - if (typeValue.startsWith("0x")) { - const numericPart = typeValue.substring(2); - return `0x${numericPart.padStart(2, "0")}`; - } - - // Handle numeric format (0, 1, etc.) - const numericValue = Number.parseInt(typeValue, 10); - return `0x${numericValue.toString(16).padStart(2, "0")}`; -} - -/** - * Create transaction based on explicit type - */ -function createTransactionFromType( - normalizedType: string, - clientTx: ClientSideSignTransactionOptions, - normalizedFields: { - input: string; - nonce: string; - value: string; - to: Address | null; - gasLimit: string; - }, -): EthereumTypedTransaction { - switch (normalizedType) { - case "0x00": - return createLegacyTransaction(clientTx, normalizedFields); - case "0x01": - return createEip2930Transaction(clientTx, normalizedFields); - case "0x02": - return createEip1559Transaction(clientTx, normalizedFields); - case "0x03": - return createEip4844Transaction(clientTx, normalizedFields); - case "0x05": - return createEip7702Transaction(clientTx, normalizedFields); - default: - throw new ParseTransactionError( - `Unsupported transaction type: ${normalizedType}`, - ); - } -} - -/** - * Infer transaction type based on available fields - */ -function inferTransactionType( - clientTx: ClientSideSignTransactionOptions, - normalizedFields: { - input: string; - nonce: string; - value: string; - to: Address | null; - gasLimit: string; - }, -): EthereumTypedTransaction { - // Check for EIP-4844 specific fields (blob-related) - if (hasBlobFields(clientTx)) { - return createEip4844Transaction(clientTx, normalizedFields); - } - - // Check for EIP-7702 specific fields (authorization list) - if (clientTx.authorizationList) { - return createEip7702Transaction(clientTx, normalizedFields); - } - - // Check for EIP-1559 specific fields (fee market) - if ( - clientTx.maxFeePerGas !== undefined && - clientTx.maxPriorityFeePerGas !== undefined - ) { - return createEip1559Transaction(clientTx, normalizedFields); - } - - // Check for EIP-2930 specific fields (access list + chain ID) - if (clientTx.accessList !== undefined && clientTx.chainId !== undefined) { - return createEip2930Transaction(clientTx, normalizedFields); - } - - // Check for legacy transaction with chainId - if (clientTx.chainId !== undefined) { - return createLegacyTransaction(clientTx, normalizedFields); - } - - // Default to legacy with no chainId - return createLegacyTransaction(clientTx, normalizedFields); -} - -/** - * Check if transaction has blob-related fields (EIP-4844) - */ -function hasBlobFields(clientTx: ClientSideSignTransactionOptions): boolean { - return ( - clientTx.blobVersionedHashes !== undefined || - clientTx.blobs !== undefined || - clientTx.sidecar !== undefined || - clientTx.sidecars !== undefined || - clientTx.maxFeePerBlobGas !== undefined - ); -} - -/** - * Normalize input/data field - */ -function normalizeInputData( - clientTx: ClientSideSignTransactionOptions, -): string { - const { data, input } = clientTx; - - // If both exist, verify they match - if (data !== undefined && input !== undefined) { - // Check if they're effectively the same (considering empty values) - const isDataEmpty = data === "0x" || data === ""; - const isInputEmpty = input === "0x" || input === ""; - - assert( - data === input || (isDataEmpty && isInputEmpty), - "Data and input fields do not match", - ); - - // Prefer input, but use whichever has content - return input || data; - } - - // If only one exists, use that - if (input !== undefined) return input; - if (data !== undefined) return data; - - // Default to empty hex - return "0x"; -} - -/** - * Normalize nonce to hex string - */ -function normalizeNonce(clientTx: ClientSideSignTransactionOptions): string { - const { nonce } = clientTx; - - if (nonce === undefined) { - return "0x0"; // Default nonce as hex - } - - return toHexString(nonce); -} - -/** - * Normalize value to hex string - */ -function normalizeValue(clientTx: ClientSideSignTransactionOptions): string { - const { value } = clientTx; - - if (value === undefined) { - return "0x0"; // Default value as hex - } - - return toHexString(value); -} - -/** - * Normalize to address - */ -function normalizeTo( - clientTx: ClientSideSignTransactionOptions, -): Address | null { - const { to } = clientTx; - - if (to === undefined || to === null) { - return null; // Contract creation - } - - return to as Address; -} - -/** - * Normalize gas limit to hex string - */ -function normalizeGasLimit(clientTx: ClientSideSignTransactionOptions): string { - const { gas, gasLimit } = clientTx; - - // Prefer gasLimit, fall back to gas - const rawGasLimit = gasLimit !== undefined ? gasLimit : gas; - - assert(rawGasLimit, "Gas limit not specified"); - - return toHexString(rawGasLimit); -} - -/** - * Normalize chain ID to hex string - */ -function normalizeChainId( - chainId: number | bigint | string | undefined, -): string | undefined { - if (chainId === undefined) { - return undefined; - } - - return toHexString(chainId); -} - -/** - * Normalize gas price to hex string - */ -function normalizeGasPrice(value: bigint | string | undefined): string { - assert(value, "Gas price value not specified"); - - return toHexString(value); -} - -/** - * Normalize access list - */ -function normalizeAccessList( - clientTx: ClientSideSignTransactionOptions, -): AccessList { - const { accessList } = clientTx; - - // Always return an array, empty if not provided - if (!accessList) { - return []; - } - - return accessList as AccessList; -} - -/** - * Normalizes the authorization list from client format to standardized format - */ -function normalizeAuthorizationList( - clientAuthList?: readonly { - address: string; - r: string | bigint; - s: string | bigint; - v?: bigint | number | string; - yParity?: number | bigint | string; - nonce: number | bigint | string; - chainId: number | bigint | string; - }[], -): SignedAuthorization[] { - if (!clientAuthList || clientAuthList.length === 0) { - throw new ParseTransactionError( - "Authorization list is required and cannot be empty", - ); - } - - return Array.from(clientAuthList).map((auth, index) => { - // Validate required fields - assert(auth.address, `Authorization at index ${index} is missing address`); - assert(auth.r, `Authorization at index ${index} is missing r value`); - assert(auth.s, `Authorization at index ${index} is missing s value`); - assert(auth.chainId, `Authorization at index ${index} is missing chainId`); - - // Get yParity either from yParity field or derived from v - let yParity: number; - - if (auth.yParity !== undefined) { - // Convert yParity to number (0 or 1) - const rawYParity = - typeof auth.yParity === "string" - ? auth.yParity.startsWith("0x") - ? Number.parseInt(auth.yParity, 16) - : Number.parseInt(auth.yParity, 10) - : Number(auth.yParity); - - // Validate yParity is 0 or 1 - if (rawYParity !== 0 && rawYParity !== 1) { - throw new ParseTransactionError( - `Authorization at index ${index} has invalid yParity: must be 0 or 1`, - ); - } - - yParity = rawYParity; - } else if (auth.v !== undefined) { - // Derive yParity from v - // Note: v is either 27/28 (for legacy) or chainId*2 + 35/36 - const v = - typeof auth.v === "string" - ? auth.v.startsWith("0x") - ? BigInt(auth.v) - : BigInt(auth.v) - : BigInt(auth.v); - - // Extract yParity from v - if (v === 27n || v === 28n) { - // Legacy format - yParity = v === 27n ? 0 : 1; - } else { - // EIP-155 format: v = chainId * 2 + 35 + yParity - const chainId = - typeof auth.chainId === "string" - ? auth.chainId.startsWith("0x") - ? BigInt(auth.chainId) - : BigInt(auth.chainId) - : BigInt(auth.chainId); - - const expectedBase = chainId * 2n + 35n; - if (v === expectedBase) { - yParity = 0; - } else if (v === expectedBase + 1n) { - yParity = 1; - } else { - throw new ParseTransactionError( - `Authorization at index ${index} has invalid v value for the given chainId`, - ); - } - } - } else { - throw new ParseTransactionError( - `Authorization at index ${index} is missing both yParity and v`, - ); - } - - return { - address: auth.address as Address, - chainId: toHexString(auth.chainId), - r: toHexString(auth.r), - s: toHexString(auth.s), - yParity, - }; - }); -} - -/** - * Extract and normalize blob data from various possible formats - */ -function extractBlobData(clientTx: ClientSideSignTransactionOptions): { - blobs: string[]; - commitments: string[]; - proofs: string[]; -} | null { - // Direct fields on the transaction - if (clientTx.blobs && clientTx.commitments && clientTx.proofs) { - return { - blobs: clientTx.blobs, - commitments: clientTx.commitments, - proofs: clientTx.proofs, - }; - } - - // Single sidecar object - if (clientTx.sidecar) { - const { blobs, commitments, proofs } = clientTx.sidecar; - if (blobs && commitments && proofs) { - return { blobs, commitments, proofs }; - } - } - - // Multiple sidecars array - if ( - clientTx.sidecars && - Array.isArray(clientTx.sidecars) && - clientTx.sidecars.length > 0 - ) { - const blobs: string[] = []; - const commitments: string[] = []; - const proofs: string[] = []; - - for (const sidecar of clientTx.sidecars) { - if (sidecar.blob && sidecar.commitment && sidecar.proof) { - blobs.push(sidecar.blob); - commitments.push(sidecar.commitment); - proofs.push(sidecar.proof); - } - } - - if (blobs.length > 0 && commitments.length > 0 && proofs.length > 0) { - return { blobs, commitments, proofs }; - } - } - - return null; -} - -/** - * Create a legacy transaction - */ -function createLegacyTransaction( - clientTx: ClientSideSignTransactionOptions, - normalizedFields: { - input: string; - nonce: string; - value: string; - to: Address | null; - gasLimit: string; - }, -): TxLegacy { - const { chainId, gasPrice } = clientTx; - const { input, nonce, value, to, gasLimit } = normalizedFields; - - assert(gasPrice, "Gas price is required for legacy transactions"); - - return { - chainId: normalizeChainId(chainId), - gasLimit, // Optional for legacy - gasPrice: normalizeGasPrice(gasPrice), - input, - nonce, - to, - type: "0x00", - value, - }; -} - -/** - * Create an EIP-2930 transaction - */ -function createEip2930Transaction( - clientTx: ClientSideSignTransactionOptions, - normalizedFields: { - input: string; - nonce: string; - value: string; - to: Address | null; - gasLimit: string; - }, -): TxEip2930 { - const { chainId, gasPrice } = clientTx; - const { input, nonce, value, to, gasLimit } = normalizedFields; - - assert(chainId, "Chain ID is required for EIP-2930 transactions"); - assert(gasPrice, "Gas price is required for EIP-2930 transactions"); - - return { - accessList: normalizeAccessList(clientTx), - chainId: normalizeChainId(chainId) as string, // Required for EIP-2930 - gasLimit, - gasPrice: normalizeGasPrice(gasPrice), - input, - nonce, - to, - type: "0x01", - value, - }; -} - -/** - * Create an EIP-1559 transaction - */ -function createEip1559Transaction( - clientTx: ClientSideSignTransactionOptions, - normalizedFields: { - input: string; - nonce: string; - value: string; - to: Address | null; - gasLimit: string; - }, -): TxEip1559 { - const { chainId, maxFeePerGas, maxPriorityFeePerGas } = clientTx; - const { input, nonce, value, to, gasLimit } = normalizedFields; - - assert(chainId, "Chain ID is required for EIP-1559 transactions"); - assert(maxFeePerGas, "Max fee per gas is required for EIP-1559 transactions"); - assert( - maxPriorityFeePerGas, - "Max priority fee per gas is required for EIP-1559 transactions", - ); - - return { - accessList: normalizeAccessList(clientTx), - chainId: normalizeChainId(chainId) as string, - gasLimit, - input, - maxFeePerGas: normalizeGasPrice(maxFeePerGas), - maxPriorityFeePerGas: normalizeGasPrice(maxPriorityFeePerGas), - nonce, - to, - type: "0x02", // Always provide access list, empty array if not specified - value, - }; -} - -/** - * Create an EIP-4844 transaction - */ -function createEip4844Transaction( - clientTx: ClientSideSignTransactionOptions, - normalizedFields: { - input: string; - nonce: string; - value: string; - to: Address | null; - gasLimit: string; - }, -): TxEip4844 | TxEip4844WithSidecar { - const { - chainId, - maxFeePerGas, - maxPriorityFeePerGas, - blobVersionedHashes, - maxFeePerBlobGas, - } = clientTx; - const { input, nonce, value, gasLimit } = normalizedFields; - const { to } = normalizedFields; - - // Validate required fields - assert(to !== null, "EIP-4844 transactions require a valid to address"); - assert(chainId, "Chain ID is required for EIP-4844 transactions"); - assert(maxFeePerGas, "Max fee per gas is required for EIP-4844 transactions"); - assert( - maxPriorityFeePerGas, - "Max priority fee per gas is required for EIP-4844 transactions", - ); - assert( - blobVersionedHashes, - "Blob versioned hashes are required for EIP-4844 transactions", - ); - assert( - maxFeePerBlobGas, - "Max fee per blob gas is required for EIP-4844 transactions", - ); - - // Base transaction without sidecar - const baseTransaction: TxEip4844 = { - accessList: normalizeAccessList(clientTx), - blobVersionedHashes, - chainId: normalizeChainId(chainId) as string, - gasLimit, - input, - maxFeePerBlobGas: normalizeGasPrice(maxFeePerBlobGas), - maxFeePerGas: normalizeGasPrice(maxFeePerGas), - maxPriorityFeePerGas: normalizeGasPrice(maxPriorityFeePerGas), - nonce, - to: to as Address, - type: "0x03", - value, - }; - - // Check for blob data in any of the possible formats - const blobData = extractBlobData(clientTx); - - // If we have blob data, include it flattened in the transaction - if (blobData) { - return { - ...baseTransaction, - ...blobData, - } as TxEip4844WithSidecar; - } - - return baseTransaction; -} - -/** - * Create an EIP-7702 transaction - */ -function createEip7702Transaction( - clientTx: ClientSideSignTransactionOptions, - normalizedFields: { - input: string; - nonce: string; - value: string; - to: Address | null; - gasLimit: string; - }, -): TxEip7702 { - const { chainId, maxFeePerGas, maxPriorityFeePerGas, authorizationList } = - clientTx; - const { input, nonce, value, gasLimit } = normalizedFields; - const { to } = normalizedFields; - - // Validations - assert(to !== null, "EIP-7702 transactions require a valid to address"); - assert(chainId, "Chain ID is required for EIP-7702 transactions"); - assert(maxFeePerGas, "Max fee per gas is required for EIP-7702 transactions"); - assert( - maxPriorityFeePerGas, - "Max priority fee per gas is required for EIP-7702 transactions", - ); - assert( - authorizationList, - "Authorization list is required for EIP-7702 transactions", - ); - - return { - accessList: normalizeAccessList(clientTx), - authorizationList: normalizeAuthorizationList(authorizationList), - chainId: normalizeChainId(chainId) as string, - gasLimit, - input, - maxFeePerGas: normalizeGasPrice(maxFeePerGas), - maxPriorityFeePerGas: normalizeGasPrice(maxPriorityFeePerGas), - nonce, - to: to as Address, - type: "0x05", - value, - }; -} - -/** - * Validate that a transaction has all required fields - */ -function validateTransaction(transaction: EthereumTypedTransaction): void { - // Common validations for all transaction types - assert(transaction.nonce, "Transaction nonce is required"); - assert(transaction.value, "Transaction value is required"); - assert(transaction.input, "Transaction input is required"); - - // Type-specific validations - switch (transaction.type) { - case "0x00": // Legacy - validateLegacyTransaction(transaction as TxLegacy); - break; - - case "0x01": // EIP-2930 - validateEip2930Transaction(transaction as TxEip2930); - break; - - case "0x02": // EIP-1559 - validateEip1559Transaction(transaction as TxEip1559); - break; - - case "0x03": // EIP-4844 - // Determine if it has sidecar data - if ("blobs" in transaction) { - validateEip4844WithSidecarTransaction( - transaction as TxEip4844WithSidecar, - ); - } else { - validateEip4844Transaction(transaction as TxEip4844); - } - break; - - case "0x05": // EIP-7702 - validateEip7702Transaction(transaction as TxEip7702); - break; - - default: - throw new ParseTransactionError( - `Unknown transaction type: ${transaction}`, - ); - } -} - -/** - * Validate legacy transaction - */ -function validateLegacyTransaction(tx: TxLegacy): void { - assert(tx.gasPrice, "Legacy transaction requires gasPrice"); - assert(tx.gasLimit, "Legacy transaction requires gasLimit"); -} - -/** - * Validate EIP-2930 transaction - */ -function validateEip2930Transaction(tx: TxEip2930): void { - assert(tx.chainId, "EIP-2930 transaction requires chainId"); - assert(tx.gasPrice, "EIP-2930 transaction requires gasPrice"); - assert(tx.gasLimit, "EIP-2930 transaction requires gasLimit"); - assert(tx.accessList, "EIP-2930 transaction requires accessList"); -} - -/** - * Validate EIP-1559 transaction - */ -function validateEip1559Transaction(tx: TxEip1559): void { - assert(tx.chainId, "EIP-1559 transaction requires chainId"); - assert(tx.maxFeePerGas, "EIP-1559 transaction requires maxFeePerGas"); - assert( - tx.maxPriorityFeePerGas, - "EIP-1559 transaction requires maxPriorityFeePerGas", - ); - assert(tx.gasLimit, "EIP-1559 transaction requires gasLimit"); - assert(tx.accessList, "EIP-1559 transaction requires accessList"); -} - -/** - * Validate EIP-4844 transaction - */ -function validateEip4844Transaction(tx: TxEip4844): void { - assert(tx.chainId, "EIP-4844 transaction requires chainId"); - assert(tx.maxFeePerGas, "EIP-4844 transaction requires maxFeePerGas"); - assert( - tx.maxPriorityFeePerGas, - "EIP-4844 transaction requires maxPriorityFeePerGas", - ); - assert(tx.gasLimit, "EIP-4844 transaction requires gasLimit"); - assert(tx.accessList, "EIP-4844 transaction requires accessList"); - assert( - tx.blobVersionedHashes, - "EIP-4844 transaction requires blobVersionedHashes", - ); - assert(tx.maxFeePerBlobGas, "EIP-4844 transaction requires maxFeePerBlobGas"); -} - -/** - * Validate EIP-4844 transaction with sidecar - */ -function validateEip4844WithSidecarTransaction(tx: TxEip4844WithSidecar): void { - // First validate base EIP-4844 fields - validateEip4844Transaction(tx); - - // Then validate sidecar fields - assert( - tx.blobs && tx.blobs.length > 0, - "EIP-4844 transaction with sidecar requires blobs", - ); - assert( - tx.commitments && tx.commitments.length > 0, - "EIP-4844 transaction with sidecar requires commitments", - ); - assert( - tx.proofs && tx.proofs.length > 0, - "EIP-4844 transaction with sidecar requires proofs", - ); - - // Check counts match - assert( - tx.blobs.length === tx.commitments.length && - tx.blobs.length === tx.proofs.length, - "EIP-4844 transaction with sidecar requires matching counts of blobs, commitments, and proofs", - ); -} - -/** - * Validate EIP-7702 transaction - */ -function validateEip7702Transaction(tx: TxEip7702): void { - assert(tx.chainId, "EIP-7702 transaction requires chainId"); - assert(tx.maxFeePerGas, "EIP-7702 transaction requires maxFeePerGas"); - assert( - tx.maxPriorityFeePerGas, - "EIP-7702 transaction requires maxPriorityFeePerGas", - ); - assert(tx.gasLimit, "EIP-7702 transaction requires gasLimit"); - assert(tx.accessList, "EIP-7702 transaction requires accessList"); - assert( - tx.authorizationList, - "EIP-7702 transaction requires non-empty authorizationList", - () => tx.authorizationList.length > 0, - ); -} - -// Export the main parser and error type -export { parseTransaction, ParseTransactionError }; diff --git a/packages/vault-sdk/src/transaction-types.ts b/packages/vault-sdk/src/transaction-types.ts deleted file mode 100644 index a30d68fbb58..00000000000 --- a/packages/vault-sdk/src/transaction-types.ts +++ /dev/null @@ -1,144 +0,0 @@ -// Basic types that will be used across transactions -type Address = string; -type ChainId = string; // Hex string for chain ID -type Bytes = string; // Hex string -type U256 = string; // Hex string for big numbers -type B256 = string; // 32-byte hash as hex string -type Bytes48 = string; // 48-byte value as hex string - -// Common transaction destination type (address or contract creation) -type TxKind = Address | null; // null represents contract creation - -// Access list for EIP-2930 and later -type AccessListEntry = { - address: Address; - storageKeys: string[]; // Array of hex strings representing storage keys -}; -type AccessList = AccessListEntry[]; - -// Authorization for EIP-7702 -type SignedAuthorization = { - chainId: U256; - address: Address; - r: U256; - s: U256; - yParity: number; // 0 or 1 -}; - -// Blob structures for EIP-4844 -type Blob = string; // Raw data as string - -type BlobTransactionSidecar = { - blobs: Blob[]; - commitments: Bytes48[]; - proofs: Bytes48[]; -}; - -// Legacy transaction (pre-EIP-2930) -type TxLegacy = { - type: "0x00"; // Legacy - chainId?: ChainId; // Optional for legacy transactions - nonce: string; // Hex string - gasPrice: string; // Hex string - gasLimit: string; // Hex string - to: TxKind; - value: U256; - input: Bytes; -}; - -// EIP-2930 transaction -type TxEip2930 = { - type: "0x01"; // EIP-2930 - chainId: ChainId; - nonce: string; // Hex string - gasPrice: string; // Hex string - gasLimit: string; // Hex string - to: TxKind; - value: U256; - accessList: AccessList; - input: Bytes; -}; - -// EIP-1559 transaction -type TxEip1559 = { - type: "0x02"; // EIP-1559 - chainId: ChainId; - nonce: string; // Hex string - gasLimit: string; // Hex string - maxFeePerGas: string; // Hex string - maxPriorityFeePerGas: string; // Hex string - to: TxKind; - value: U256; - accessList: AccessList; - input: Bytes; -}; - -// EIP-7702 transaction -type TxEip7702 = { - type: "0x05"; // EIP-7702 - chainId: ChainId; - nonce: string; // Hex string - gasLimit: string; // Hex string - maxFeePerGas: string; // Hex string - maxPriorityFeePerGas: string; // Hex string - to: Address; // Note: different from others, only Address not TxKind - value: U256; - accessList: AccessList; - authorizationList: SignedAuthorization[]; - input: Bytes; -}; - -// Basic EIP-4844 transaction -type TxEip4844 = { - type: "0x03"; // EIP-4844 - chainId: ChainId; - nonce: string; // Hex string - gasLimit: string; // Hex string - maxFeePerGas: string; // Hex string - maxPriorityFeePerGas: string; // Hex string - to: Address; // Note: only Address not TxKind - value: U256; - accessList: AccessList; - blobVersionedHashes: B256[]; - maxFeePerBlobGas: string; // Hex string - input: Bytes; -}; - -// EIP-4844 transaction with sidecar - flattened format -type TxEip4844WithSidecar = TxEip4844 & { - // Flattened sidecar fields - blobs: string[]; - commitments: Bytes48[]; - proofs: Bytes48[]; -}; - -// Union type for all Ethereum transaction types -type EthereumTypedTransaction = - | TxLegacy - | TxEip2930 - | TxEip1559 - | TxEip4844 - | TxEip4844WithSidecar - | TxEip7702; - -export type { - Address, - ChainId, - Bytes, - U256, - B256, - Bytes48, - TxKind, - AccessListEntry, - AccessList, - SignedAuthorization, - Blob, - BlobTransactionSidecar, - TxLegacy, - TxEip2930, - TxEip1559, - TxEip7702, - TxEip4844, - TxEip4844WithSidecar, - EthereumTypedTransaction, -}; diff --git a/packages/vault-sdk/src/types.ts b/packages/vault-sdk/src/types.ts deleted file mode 100644 index 00cfc805dff..00000000000 --- a/packages/vault-sdk/src/types.ts +++ /dev/null @@ -1,723 +0,0 @@ -import type { - Address, - TypedData, - TypedDataDomain, - TypedDataToPrimitiveTypes, -} from "abitype"; -import type { EthereumTypedTransaction } from "./transaction-types.js"; - -export type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// Encrypted types -export type EncryptedPayload = { - ephemeralPublicKey: string; - nonce: string; - ciphertext: string; -}; - -// ========== Authentication Types ========== -type AdminKeyAuth = { - adminKey: string; -}; - -type AccessTokenAuth = { - accessToken: string; -}; - -type SessionTokenAuth = { - sessionToken: string; -}; - -// Regular Auth union (excluding RotationCodeAuth) -export type Auth = AdminKeyAuth | AccessTokenAuth | SessionTokenAuth; - -// Separate RotationCodeAuth (used only for rotation) -type RotationCodeAuth = { - rotationCode: string; -}; - -// ========== Base Types ========== -// Represents Address, Bytes, U256, I256 as strings for broad compatibility -type Bytes = string; // e.g., "0x..." -// type HexString = string; // Generic hex string -type BigNumberString = string; // String representation of U256/I256 - -type UnencryptedError = { - message: string; - status: number; - type: string; - details?: string; -}; - -export type UnencryptedErrorResponse = { - error: UnencryptedError; -}; - -type EncryptedError = { - code: string; - message: string; - details?: string | { reason: string }; -}; - -type GenericSuccessResponse = { - success: true; - data: Data; - error: null; -}; - -type GenericErrorResponse = { - success: false; - data: null; - error: EncryptedError | UnencryptedError; -}; - -export type VaultError = EncryptedError | UnencryptedError; - -type GenericResponse = - | GenericSuccessResponse - | GenericErrorResponse; - -// ========== Payload Type ========== -export type OmitNever = { - [K in keyof T as T[K] extends never ? never : K]: T[K]; -}; - -export type GenericPayload< - T extends { - operation: string; - auth?: Auth | RotationCodeAuth | never; - options?: Record | never; - data: unknown; - }, -> = { - input: OmitNever<{ - operation: T["operation"]; - options: T["options"]; - auth: T["auth"]; - }>; - output: GenericResponse; -}; - -// ========== Options Types ========== -type CreateServiceAccountOptions = { - metadata: Record; -}; - -type MetadataValue = string | number | boolean; - -type CreateEoaOptions = { - metadata: Record; -}; - -type GetEoasOptions = { - page?: number; - pageSize?: number; -}; - -type PingOptions = { - message: string; -}; - -type SignTransactionOptions = { - transaction: EthereumTypedTransaction; - from: string; -}; - -export type SignAuthorizationOptions = { - from: Address; - authorization: Authorization; // Use the defined type -}; - -export type SignStructuredMessageOptions = { - from: Address; - structuredMessage: StructuredMessageInput; // Use the defined type - chainId?: number; // Keep as number for ChainId -}; - -export type GetAccessTokensOptions = { - page?: number; - pageSize?: number; -}; - -type SignMessageOptions = { - message: string; - from: string; - chainId?: number; - format?: "text" | "hex"; -}; - -// ========== Solana Options Types ========== - -// Solana message type that's compatible with both Kit and our Rust serialization -export type SolanaVersionedMessage = { - version: "legacy" | "v0"; - header: { - numRequiredSignatures: number; - numReadonlySignedAccounts: number; - numReadonlyUnsignedAccounts: number; - }; - staticAccountKeys: string[]; // Use string instead of SolanaAddress for simplicity - recentBlockhash: string; - instructions: Array<{ - programIdIndex: number; - accountKeyIndexes: number[]; - data: Uint8Array; - }>; - addressTableLookups?: Array<{ - accountKey: string; // Use string instead of SolanaAddress - writableIndexes: number[]; - readonlyIndexes: number[]; - }>; -}; - -type CreateSolanaAccountOptions = { - metadata: Record; -}; - -type GetSolanaAccountsOptions = { - page?: number; - pageSize?: number; -}; - -type SignSolanaTransactionOptions = { - transaction: string; // Base64 encoded VersionedTransaction - from: string; // Use string for Solana public key -}; - -type SignSolanaMessageOptions = { - message: string; - from: string; // Use string for Solana public key - format?: "text" | "hex"; -}; - -type CheckedSignTypedDataOptions< - Types extends TypedData, - PrimaryType extends keyof Types | "EIP712Domain" = keyof Types, -> = { - typedData: { - domain: TypedDataDomain; - types: Types; - primaryType: PrimaryType; - message: TypedDataToPrimitiveTypes[PrimaryType]; - }; - from: string; -}; - -// biome-ignore lint/suspicious/noExplicitAny: we truly want to accept anything here -type SignedTypedDataOptions = CheckedSignTypedDataOptions; - -// ========== User Operation Types ========== - -// Corresponds to Rust UserOperationV06Input -export type UserOperationV06Input = { - sender: Address; - nonce: BigNumberString; // U256 - initCode?: Bytes; // Optional due to #[serde(default)] - callData: Bytes; - callGasLimit: BigNumberString; // U256 - verificationGasLimit: BigNumberString; // U256 - preVerificationGas: BigNumberString; // U256 - maxFeePerGas: BigNumberString; // U256 - maxPriorityFeePerGas: BigNumberString; // U256 - paymasterAndData?: Bytes; // Optional due to #[serde(default)] - signature?: Bytes; // Optional due to #[serde(default)] - entrypoint?: Address; // Optional due to #[serde(default = ...)] -}; - -// Corresponds to Rust UserOperationV07Input -export type UserOperationV07Input = { - sender: Address; - nonce: BigNumberString; // U256 - factory?: Address; // Optional due to #[serde(default)] - factoryData?: Bytes; // Optional due to #[serde(default)] - callData: Bytes; - callGasLimit: BigNumberString; // U256 - verificationGasLimit: BigNumberString; // U256 - preVerificationGas: BigNumberString; // U256 - maxFeePerGas: BigNumberString; // U256 - maxPriorityFeePerGas: BigNumberString; // U256 - paymaster?: Address; // Optional due to #[serde(default)] - paymasterData?: Bytes; // Optional due to #[serde(default)] - Assuming default is empty bytes - paymasterVerificationGasLimit?: BigNumberString; // U256 - Assuming default is 0 - paymasterPostOpGasLimit?: BigNumberString; // U256 - Assuming default is 0 - signature?: Bytes; // Optional due to #[serde(default)] - entrypoint?: Address; // Optional due to #[serde(default = ...)] -}; - -// Corresponds to Rust StructuredMessageInput enum -export type StructuredMessageInput = - | { useropV06: UserOperationV06Input } - | { useropV07: UserOperationV07Input }; - -// ========== Policy Types ========== -type RegexRule = { - pattern: string; -}; - -type NumberRuleOp = "greaterThan" | "lessThan" | "equalTo"; - -type NumberRule = { - op: NumberRuleOp; - value: number | BigNumberString; -}; - -type Rule = NumberRule | RegexRule; - -type MetadataRule = { - key: string; - rule: Rule; -}; - -// ========== Policy Rule Structs ========== - -// Corresponds to Rust UserOperationV06Rules -export type UserOperationV06Rules = { - sender?: Rule; - nonce?: Rule; - initCode?: Rule; - callData?: Rule; - callGasLimit?: Rule; - verificationGasLimit?: Rule; - preVerificationGas?: Rule; - maxFeePerGas?: Rule; - maxPriorityFeePerGas?: Rule; - paymasterAndData?: Rule; - chainId?: Rule; - entrypoint?: Rule; // Optional, but Rust has a default func -}; - -// Corresponds to Rust UserOperationV07Rules -export type UserOperationV07Rules = { - sender?: Rule; - nonce?: Rule; - factory?: Rule; - factoryData?: Rule; - callData?: Rule; - callGasLimit?: Rule; - verificationGasLimit?: Rule; - preVerificationGas?: Rule; - maxFeePerGas?: Rule; - maxPriorityFeePerGas?: Rule; - paymaster?: Rule; - paymasterVerificationGasLimit?: Rule; - paymasterPostOpGasLimit?: Rule; - paymasterData?: Rule; - chainId?: Rule; - entrypoint?: Rule; // Optional, but Rust has a default func -}; - -// Corresponds to Rust SignAuthorizationRules -export type SignAuthorizationRules = { - chainId?: Rule; - nonce?: Rule; - address?: Rule; -}; - -export type PolicyComponent = - | { - type: "eoa:create"; - requiredMetadataPatterns?: MetadataRule[]; - allowedMetadataPatterns?: MetadataRule[]; - } - | { - type: "eoa:read"; - metadataPatterns?: MetadataRule[]; - } - | { - type: "eoa:signTransaction"; - allowlist?: Address[]; - metadataPatterns?: MetadataRule[]; - payloadPatterns: Record; - } - | { - type: "eoa:signMessage"; - allowlist?: Address[]; - metadataPatterns?: MetadataRule[]; - chainId?: number; - messagePattern?: string; - } - | { - type: "eoa:signTypedData"; - allowlist?: Address[]; - metadataPatterns?: MetadataRule[]; - } - | { - type: "eoa:signAuthorization"; - allowlist?: Address[]; - metadataPatterns?: MetadataRule[]; - payloadPatterns?: SignAuthorizationRules; - } - | { - type: "eoa:signStructuredMessage"; - allowlist?: Address[]; - metadataPatterns?: MetadataRule[]; - // Define how UserOp rules are applied, e.g., separate for v6/v7 - structuredPatterns: { - useropV06?: UserOperationV06Rules; - useropV07?: UserOperationV07Rules; - }; - } - | { - type: "solana:create"; - requiredMetadataPatterns?: MetadataRule[]; - allowedMetadataPatterns?: MetadataRule[]; - } - | { - type: "solana:read"; - metadataPatterns?: MetadataRule[]; - } - | { - type: "solana:signTransaction"; - allowlist?: string[]; // Use string for Solana addresses - metadataPatterns?: MetadataRule[]; - payloadPatterns?: Record; - transactionPatterns?: SolanaTransactionPatterns; - } - | { - type: "solana:signMessage"; - allowlist?: string[]; // Use string for Solana addresses - metadataPatterns?: MetadataRule[]; - messagePattern?: string; - } - | { - type: "accessToken:read"; - metadataPatterns?: MetadataRule[]; - revealSensitive: boolean; - }; - -// Solana transaction patterns -export type SolanaTransactionPatterns = { - programs?: ProgramAccessControl; - writableAccounts?: AccountAccessControl; - requiredCosigners?: string[]; - maxInstructions?: number; - canPayFees?: boolean; -}; - -export type ProgramAccessControl = - | { - type: "allow"; - programs: string[]; - } - | { - type: "deny"; - programs: string[]; - }; - -export type AccountAccessControl = - | { - type: "allow"; - accounts: string[]; - } - | { - type: "deny"; - accounts: string[]; - }; - -type OwnerType = string; // Define based on your eoa models - -type CreateAccessTokenOptions = { - policies: PolicyComponent[]; - expiresAt: string; // ISO date string - metadata: Record; -}; - -type RevokeAccessTokenOptions = { - id: string; // UUID -}; - -// ========== Authorization Types ========== - -// Corresponds to Rust Authorization struct -export type Authorization = { - chainId: BigNumberString; // U256 - address: Address; - nonce: number; // u64 -}; - -// Corresponds to Rust SignedAuthorization struct -// Merges Authorization fields due to #[serde(flatten)] -export type SignedAuthorization = Authorization & { - yParity: number; // U8 (typically 0 or 1) - r: BigNumberString; // U256 - s: BigNumberString; // U256 -}; - -// ========== Response Data Types ========== -type PingData = { - timestamp: number; - pong: string; -}; - -type CreateServiceAccountData = { - id: string; // UUID - adminKey: string; - rotationCode: string; - createdAt: string; // ISO date string - updatedAt: string; // ISO date string -}; - -type GetServiceAccountData = { - id: string; // UUID - metadata: Record; - createdAt: string; // ISO date string - updatedAt: string; // ISO date string -}; - -type RotateServiceAccountData = { - newAdminKey: string; - newRotationCode: string; -}; - -type EoaData = { - id: string; // UUID - address: string; - metadata: Record; - createdAt: string; // ISO date string - updatedAt: string; // ISO date string -}; - -type GetEoasData = { - items: EoaData[]; - page: number; - pageSize: number; - totalRecords: number; -}; - -type SignTransactionData = { - signature: string; -}; - -type SignMessageData = { - signature: string; -}; - -// ========== Solana Data Types ========== -type CreateSolanaAccountData = { - pubkey: string; - metadata: Record; - createdAt: string; - updatedAt: string; -}; - -type GetSolanaAccountsData = { - items: CreateSolanaAccountData[]; - totalCount: number; - page: number; - pageSize: number; -}; - -type SignSolanaTransactionData = { - signature: string; // Base58 encoded signature - signerPubkey: string; // Use string for Solana public key -}; - -type SignSolanaMessageData = { - signature: string; // Base58 encoded signature -}; - -type SignTypedDataData = { - signature: string; -}; - -export type AccessTokenData = { - accessToken: string; - id: string; // UUID - issuerId: string; // UUID - issuerType: OwnerType; - policies: PolicyComponent[]; - expiresAt: string; // ISO date string - metadata: Record; - createdAt: string; // ISO date string - updatedAt: string; // ISO date string - /** - * If nullish then token hasn't been explicitly revoked, otherwise the ISO date string of the revocation. - * Note that an access token will be "implicitly" revoked if the token issuer account gets rotated. Check the isRotated field for this - */ - revokedAt?: string; // ISO date string - /** - * Reflects whether the issuer of this token has "rotated" their account, which implicitly revokes the token, but is not tracked by the revokedAt? field. - */ - isRotated: boolean; -}; - -// Update SignAuthorizationData to use the defined SignedAuthorization type -export type SignAuthorizationData = { - signedAuthorization: SignedAuthorization; // Use the defined type -}; - -// Add SignStructuredMessageData (as defined previously) -export type SignStructuredMessageData = { - signature: Bytes; - message: string; // This likely represents the UserOp hash in Rust -}; - -// Add GetAccessTokensData (as defined previously) -export type GetAccessTokensData = { - items: AccessTokenData[]; - page: number; - pageSize: number; - totalRecords: number; // Rust uses u64, TS uses number -}; - -// ========== Operation Payloads ========== -export type PingPayload = GenericPayload<{ - operation: "ping"; - options: PingOptions; - auth: never; - data: PingData; -}>; - -export type CreateServiceAccountPayload = GenericPayload<{ - operation: "serviceAccount:create"; - options: CreateServiceAccountOptions; - auth: never; - data: CreateServiceAccountData; -}>; - -export type GetServiceAccountPayload = GenericPayload<{ - operation: "serviceAccount:get"; - options: never; - auth: Auth; - data: GetServiceAccountData; -}>; - -export type RotateServiceAccountPayload = GenericPayload<{ - operation: "serviceAccount:rotate"; - options: never; - auth: RotationCodeAuth; // Only accepts RotationCodeAuth - data: RotateServiceAccountData; -}>; - -export type CreateEoaPayload = GenericPayload<{ - operation: "eoa:create"; - auth: Auth; - options: CreateEoaOptions; - data: EoaData; -}>; - -export type ListEoaPayload = GenericPayload<{ - operation: "eoa:list"; - auth: Auth; - options: GetEoasOptions; - data: GetEoasData; -}>; - -export type SignTransactionPayload = GenericPayload<{ - operation: "eoa:signTransaction"; - auth: Auth; - options: SignTransactionOptions; - data: SignTransactionData; -}>; - -export type SignAuthorizationPayload = GenericPayload<{ - operation: "eoa:signAuthorization"; - auth: Auth; // Assuming Auth is defined as before - options: SignAuthorizationOptions; - data: SignAuthorizationData; -}>; - -// Add SignStructuredMessagePayload (using defined types) -export type SignStructuredMessagePayload = GenericPayload<{ - operation: "eoa:signStructuredMessage"; - auth: Auth; // Assuming Auth is defined as before - options: SignStructuredMessageOptions; - data: SignStructuredMessageData; -}>; - -export type CheckedSignTypedDataPayload< - Types extends TypedData, - PrimaryType extends keyof Types | "EIP712Domain" = keyof Types, -> = GenericPayload<{ - operation: "eoa:signTypedData"; - auth: Auth; - options: CheckedSignTypedDataOptions; - data: SignTypedDataData; -}>; - -export type SignTypedDataPayload = GenericPayload<{ - operation: "eoa:signTypedData"; - auth: Auth; - options: SignedTypedDataOptions; - data: SignTypedDataData; -}>; - -export type SignMessagePayload = GenericPayload<{ - operation: "eoa:signMessage"; - auth: Auth; - options: SignMessageOptions; - data: SignMessageData; -}>; - -export type CreateAccessTokenPayload = GenericPayload<{ - operation: "accessToken:create"; - auth: Auth; - options: CreateAccessTokenOptions; - data: AccessTokenData; -}>; - -// Add ListAccessTokensPayload (using defined types) -export type ListAccessTokensPayload = GenericPayload<{ - operation: "accessToken:list"; - auth: Auth; - data: GetAccessTokensData; -}>; - -export type RevokeAccessTokenPayload = GenericPayload<{ - operation: "accessToken:revoke"; - auth: Auth; - options: RevokeAccessTokenOptions; - data: AccessTokenData; -}>; - -// ========== Solana Payload Types ========== -export type CreateSolanaAccountPayload = GenericPayload<{ - operation: "solana:create"; - auth: Auth; - options: CreateSolanaAccountOptions; - data: CreateSolanaAccountData; -}>; - -export type ListSolanaAccountsPayload = GenericPayload<{ - operation: "solana:list"; - auth: Auth; - options: GetSolanaAccountsOptions; - data: GetSolanaAccountsData; -}>; - -export type SignSolanaTransactionPayload = GenericPayload<{ - operation: "solana:signTransaction"; - auth: Auth; - options: SignSolanaTransactionOptions; - data: SignSolanaTransactionData; -}>; - -export type SignSolanaMessagePayload = GenericPayload<{ - operation: "solana:signMessage"; - auth: Auth; - options: SignSolanaMessageOptions; - data: SignSolanaMessageData; -}>; - -// ========== Union of all payloads ========== -export type Payload = - | PingPayload - | CreateServiceAccountPayload - | GetServiceAccountPayload - | RotateServiceAccountPayload - | CreateEoaPayload - | ListEoaPayload - | SignTransactionPayload - | SignMessagePayload - | SignTypedDataPayload - | CreateAccessTokenPayload - | RevokeAccessTokenPayload - | SignAuthorizationPayload - | SignStructuredMessagePayload - | ListAccessTokensPayload - | CreateSolanaAccountPayload - | ListSolanaAccountsPayload - | SignSolanaTransactionPayload - | SignSolanaMessagePayload; diff --git a/packages/vault-sdk/tests/.env.example b/packages/vault-sdk/tests/.env.example deleted file mode 100644 index 0ab3952ac14..00000000000 --- a/packages/vault-sdk/tests/.env.example +++ /dev/null @@ -1,6 +0,0 @@ -# Solana RPC Configuration -SOLANA_RPC_HTTP_URL=http://127.0.0.1:8899 -SOLANA_RPC_WS_URL=ws://127.0.0.1:8900 - -# Vault Configuration -VAULT_URL=http://localhost:3000 \ No newline at end of file diff --git a/packages/vault-sdk/tests/env-setup.ts b/packages/vault-sdk/tests/env-setup.ts deleted file mode 100644 index afc7d9be561..00000000000 --- a/packages/vault-sdk/tests/env-setup.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { dirname, join } from "node:path"; -import { loadEnvFile } from "node:process"; -import { fileURLToPath } from "node:url"; - -const __dirname = dirname(fileURLToPath(import.meta.url)); - -try { - loadEnvFile(join(__dirname, ".env")); -} catch (_error) { - console.warn("No .env file found, using default values"); -} diff --git a/packages/vault-sdk/tests/solana.test.ts b/packages/vault-sdk/tests/solana.test.ts deleted file mode 100644 index 9b136f36777..00000000000 --- a/packages/vault-sdk/tests/solana.test.ts +++ /dev/null @@ -1,1700 +0,0 @@ -import { - address, - airdropFactory, - appendTransactionMessageInstruction, - type Base64EncodedWireTransaction, - compileTransaction, - createNoopSigner, - createSolanaRpc, - createSolanaRpcSubscriptions, - createTransactionMessage, - type DevnetUrl, - devnet, - getBase64EncodedWireTransaction, - lamports, - pipe, - type Signature, - setTransactionMessageFeePayer, - setTransactionMessageLifetimeUsingBlockhash, -} from "@solana/kit"; -import { getTransferSolInstruction } from "@solana-program/system"; -import bs58 from "bs58"; -import { beforeAll, describe, expect, it } from "vitest"; -import { - createAccessToken, - createServiceAccount, - createSolanaAccount, - createVaultClient, - signSolanaTransaction, - type VaultClient, -} from "../src/exports/thirdweb.js"; -import { reconstructSolanaSignedTransaction } from "../src/sdk.js"; - -// Environment variables with fallbacks -const SOLANA_RPC_HTTP_URL = - process.env.SOLANA_RPC_HTTP_URL || "http://127.0.0.1:8899"; -const SOLANA_RPC_WS_URL = - process.env.SOLANA_RPC_WS_URL || "ws://127.0.0.1:8900"; -const VAULT_URL = process.env.VAULT_URL || "http://localhost:3000"; -const LAMPORTS_PER_SOL = 1_000_000_000n; - -/** - * Generate Solana explorer URL with custom RPC endpoint - */ -function getExplorerUrl(path: string, type: "address" | "tx" = "tx"): string { - const encodedRpcUrl = encodeURIComponent(SOLANA_RPC_HTTP_URL); - return `https://explorer.solana.com/${type}/${path}?cluster=custom&customUrl=${encodedRpcUrl}`; -} - -/** - * Send a signed transaction to the Solana network - */ -async function sendSignedTransaction( - rpc: ReturnType, - signedTransactionBytes: Uint8Array, -): Promise { - const base64SignedTransaction = Buffer.from(signedTransactionBytes).toString( - "base64", - ); - - const response = await rpc - .sendTransaction(base64SignedTransaction as Base64EncodedWireTransaction, { - encoding: "base64", - skipPreflight: false, - preflightCommitment: "confirmed", - }) - .send(); - - return response; -} - -describe("Solana Vault Integration Tests", () => { - let vaultClient: VaultClient; - let adminKey: string; - let senderPubkey: string; - let receiverPubkey: string; - let rpc: ReturnType>; - let rpcSubscriptions: ReturnType< - typeof createSolanaRpcSubscriptions - >; - - beforeAll(async () => { - // Setup RPC connections - rpc = createSolanaRpc(devnet(SOLANA_RPC_HTTP_URL)); - rpcSubscriptions = createSolanaRpcSubscriptions(devnet(SOLANA_RPC_WS_URL)); - - // Create vault client - vaultClient = await createVaultClient({ baseUrl: VAULT_URL }); - - // Create service account - const serviceAccountResult = await createServiceAccount({ - client: vaultClient, - request: { - options: { - metadata: { - name: "Solana Test Service Account", - description: "Testing Solana integration", - }, - }, - }, - }); - - adminKey = serviceAccountResult.data?.adminKey || ""; - expect(adminKey).toBeTruthy(); - - // Create sender account - const senderAccount = await createSolanaAccount({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - metadata: { - name: "Test Sender", - purpose: "Sender account for tests", - }, - }, - }, - }); - - // Create receiver account - const receiverAccount = await createSolanaAccount({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - metadata: { - name: "Test Receiver", - purpose: "Receiver account for tests", - }, - }, - }, - }); - - senderPubkey = senderAccount.data?.pubkey || ""; - receiverPubkey = receiverAccount.data?.pubkey || ""; - - expect(senderPubkey).toBeTruthy(); - expect(receiverPubkey).toBeTruthy(); - - console.log("\n=== Account Setup ==="); - console.log(`Sender account: ${senderPubkey}`); - console.log(`View sender: ${getExplorerUrl(senderPubkey, "address")}`); - console.log(`Receiver account: ${receiverPubkey}`); - console.log(`View receiver: ${getExplorerUrl(receiverPubkey, "address")}`); - - // Airdrop minimal SOL to sender (just enough for tx fees + transfers) - // ~5000 lamports per tx fee * 4 txs + 4 lamports for transfers = ~20004 lamports - console.log("\n=== Airdrop ==="); - console.log("Requesting airdrop of 3000000000 lamports (3 SOL)..."); - const airdrop = airdropFactory({ rpc, rpcSubscriptions }); - const airdropSignature = await airdrop({ - commitment: "confirmed", - recipientAddress: address(senderPubkey), - lamports: lamports(3_000_000_000n), // 3 SOL for tests - }); - - console.log(`Airdrop signature: ${airdropSignature}`); - console.log(`View airdrop: ${getExplorerUrl(airdropSignature)}`); - - // Wait a bit for airdrop to confirm - await new Promise((resolve) => setTimeout(resolve, 2000)); - }, 60000); // 60 second timeout for setup - - describe("Vault Health Check", () => { - it("should successfully connect to vault", async () => { - const response = await fetch(`${VAULT_URL}/health`, { - method: "GET", - headers: { "Content-Type": "application/json" }, - }); - - expect(response.ok).toBe(true); - }); - }); - - describe("Account Management", () => { - it("should have created sender account with valid pubkey", () => { - expect(senderPubkey).toMatch(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/); - }); - - it("should have created receiver account with valid pubkey", () => { - expect(receiverPubkey).toMatch(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/); - }); - - it("should have different pubkeys for sender and receiver", () => { - expect(senderPubkey).not.toBe(receiverPubkey); - }); - }); - - describe("Access Token - Solana Account Creation", () => { - it("should create a Solana account using an access token", async () => { - // Create an access token with solana:create permission - const expiresAt = new Date(Date.now() + 3600000).toISOString(); // 1 hour from now - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:create", - allowedMetadataPatterns: [ - { - key: "purpose", - rule: { pattern: ".*" }, // Allow any purpose - }, - { - key: "name", - rule: { pattern: ".*" }, - }, - ], - }, - { - type: "solana:read", - metadataPatterns: [ - { - key: "purpose", - rule: { pattern: ".*" }, // Allow reading any - }, - ], - }, - ], - expiresAt, - metadata: { - name: "Solana Access Token", - description: "Token for creating Solana accounts", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - expect(accessTokenResult.data?.accessToken).toBeTruthy(); - - const accessToken = accessTokenResult.data?.accessToken || ""; - console.log("\n=== Access Token Created ==="); - console.log(`Access Token ID: ${accessTokenResult.data?.id}`); - - // Use the access token to create a new Solana account - const accountResult = await createSolanaAccount({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - metadata: { - name: "Access Token Created Account", - purpose: "Testing access token creation", - }, - }, - }, - }); - - expect(accountResult.success).toBe(true); - expect(accountResult.data?.pubkey).toBeTruthy(); - expect(accountResult.data?.pubkey).toMatch( - /^[1-9A-HJ-NP-Za-km-z]{32,44}$/, - ); - - console.log("\n=== Account Created via Access Token ==="); - console.log(`Account pubkey: ${accountResult.data?.pubkey}`); - console.log( - `View account: ${getExplorerUrl(accountResult.data?.pubkey || "", "address")}`, - ); - console.log(`Created at: ${accountResult.data?.createdAt}`); - }); - - it("should fail to create account without proper permissions", async () => { - // Create an access token without solana:create permission (only read) - const expiresAt = new Date(Date.now() + 3600000).toISOString(); // 1 hour from now - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:read", - metadataPatterns: [ - { - key: "purpose", - rule: { pattern: ".*" }, - }, - ], - }, - ], - expiresAt, - metadata: { - name: "Read-Only Token", - description: "Token without create permission", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - // Attempt to create account should fail - const accountResult = await createSolanaAccount({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - metadata: { - name: "Should Fail", - purpose: "This should not work", - }, - }, - }, - }); - - expect(accountResult.success).toBe(false); - expect(accountResult.error).toBeTruthy(); - }); - }); - - describe("Transaction Creation and Signing", () => { - it("should create a valid transfer transaction", async () => { - const transferAmount = lamports(100_000_000n); - - // Get latest blockhash - const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); - expect(latestBlockhash.blockhash).toBeTruthy(); - - const signer = createNoopSigner(address(senderPubkey)); - - // Create transfer instruction - const transferInstruction = getTransferSolInstruction({ - source: signer, - destination: address(receiverPubkey), - amount: transferAmount, - }); - - // Build transaction message - const transactionMessage = pipe( - createTransactionMessage({ version: 0 }), - (tx) => setTransactionMessageFeePayer(address(senderPubkey), tx), - (tx) => - setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx), - (tx) => appendTransactionMessageInstruction(transferInstruction, tx), - ); - - // Compile transaction - const compiledTransaction = compileTransaction(transactionMessage); - const base64Transaction = - getBase64EncodedWireTransaction(compiledTransaction); - - expect(base64Transaction).toBeTruthy(); - expect(base64Transaction.length).toBeGreaterThan(0); - }); - - it("should sign transaction with vault and return valid signature", async () => { - const transferAmount = lamports(100_000_000n); - - // Get latest blockhash - const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); - - const signer = createNoopSigner(address(senderPubkey)); - - // Create transfer instruction - const transferInstruction = getTransferSolInstruction({ - source: signer, - destination: address(receiverPubkey), - amount: transferAmount, - }); - - // Build transaction message - const transactionMessage = pipe( - createTransactionMessage({ version: 0 }), - (tx) => setTransactionMessageFeePayer(address(senderPubkey), tx), - (tx) => - setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx), - (tx) => appendTransactionMessageInstruction(transferInstruction, tx), - ); - - // Compile and encode - const compiledTransaction = compileTransaction(transactionMessage); - const base64Transaction = - getBase64EncodedWireTransaction(compiledTransaction); - - // Sign with vault - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - expect(signatureResult.data?.signerPubkey).toBe(senderPubkey); - - // Validate signature format (base58) - const signature = signatureResult.data?.signature || ""; - expect(signature).toMatch(/^[1-9A-HJ-NP-Za-km-z]+$/); - - // Decode to verify it's 64 bytes - const signatureBytes = bs58.decode(signature); - expect(signatureBytes.length).toBe(64); - }); - }); - - describe("End-to-End Transfer", () => { - it("should create, sign, and broadcast a SOL transfer", async () => { - const transferAmount = lamports(100_000_000n); - - // Get sender's initial balance - const initialBalance = await rpc.getBalance(address(senderPubkey)).send(); - console.log( - `Initial sender balance: ${Number(initialBalance.value) / Number(LAMPORTS_PER_SOL)} SOL`, - ); - - // Get latest blockhash - const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); - - const signer = createNoopSigner(address(senderPubkey)); - - // Create transfer instruction - const transferInstruction = getTransferSolInstruction({ - source: signer, - destination: address(receiverPubkey), - amount: transferAmount, - }); - - // Build transaction message - const transactionMessage = pipe( - createTransactionMessage({ version: 0 }), - (tx) => setTransactionMessageFeePayer(address(senderPubkey), tx), - (tx) => - setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx), - (tx) => appendTransactionMessageInstruction(transferInstruction, tx), - ); - - // Compile and encode - const compiledTransaction = compileTransaction(transactionMessage); - const base64Transaction = - getBase64EncodedWireTransaction(compiledTransaction); - - // Sign with vault - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - if (!signatureResult.success) { - throw new Error("Failed to sign transaction"); - } - - const { signature, signerPubkey } = signatureResult.data; - expect(signerPubkey).toBe(senderPubkey); - - // Reconstruct signed transaction - const signedTransactionBytes = reconstructSolanaSignedTransaction( - base64Transaction, - signature, - senderPubkey, - ); - - expect(signedTransactionBytes.length).toBeGreaterThan(0); - - // Send transaction to network - const txSignature = await sendSignedTransaction( - rpc, - signedTransactionBytes, - ); - - expect(txSignature).toBeTruthy(); - expect(typeof txSignature).toBe("string"); - - console.log("\n=== Transfer Transaction ==="); - console.log(`Transaction signature: ${txSignature}`); - console.log(`View transaction: ${getExplorerUrl(txSignature)}`); - - // Wait for confirmation - await new Promise((resolve) => setTimeout(resolve, 3000)); - - // Verify transaction was successful - const txDetails = await rpc - .getTransaction(txSignature as Signature, { - encoding: "json", - maxSupportedTransactionVersion: 0, - }) - .send(); - - expect(txDetails).toBeTruthy(); - expect(txDetails?.meta?.err).toBeNull(); - - // Get final balance - const finalBalance = await rpc.getBalance(address(senderPubkey)).send(); - console.log( - `Final sender balance: ${Number(finalBalance.value) / Number(LAMPORTS_PER_SOL)} SOL`, - ); - - // Balance should have decreased (transfer amount + fees) - expect(Number(finalBalance.value)).toBeLessThan( - Number(initialBalance.value), - ); - }, 30000); // 30 second timeout for network operations - }); - - describe("Multiple Transfers", () => { - it("should handle multiple sequential transfers", async () => { - const numTransfers = 3; - const transferAmount = lamports(100_000_000n); - - const signatures: string[] = []; - - for (let i = 0; i < numTransfers; i++) { - console.log(`\nProcessing transfer ${i + 1}/${numTransfers}...`); - - // Get latest blockhash (fresh for each transaction) - const { value: latestBlockhash } = await rpc - .getLatestBlockhash() - .send(); - - const signer = createNoopSigner(address(senderPubkey)); - - // Create transfer instruction - const transferInstruction = getTransferSolInstruction({ - source: signer, - destination: address(receiverPubkey), - amount: transferAmount, - }); - - // Build transaction - const transactionMessage = pipe( - createTransactionMessage({ version: 0 }), - (tx) => setTransactionMessageFeePayer(address(senderPubkey), tx), - (tx) => - setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx), - (tx) => appendTransactionMessageInstruction(transferInstruction, tx), - ); - - const compiledTransaction = compileTransaction(transactionMessage); - const base64Transaction = - getBase64EncodedWireTransaction(compiledTransaction); - - // Sign with vault - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - if (!signatureResult.success) continue; - - // Reconstruct and send - const signedTransactionBytes = reconstructSolanaSignedTransaction( - base64Transaction, - signatureResult.data.signature, - senderPubkey, - ); - - const txSignature = await sendSignedTransaction( - rpc, - signedTransactionBytes, - ); - - signatures.push(txSignature); - console.log(`Transfer ${i + 1} signature: ${txSignature}`); - console.log(`View transfer ${i + 1}: ${getExplorerUrl(txSignature)}`); - - // Wait between transactions - await new Promise((resolve) => setTimeout(resolve, 2000)); - } - - expect(signatures.length).toBe(numTransfers); - console.log(`\n=== Summary ===`); - console.log(`Completed ${numTransfers} transfers successfully!`); - for (let i = 0; i < signatures.length; i++) { - console.log(`Transfer ${i + 1}: ${getExplorerUrl(signatures[i])}`); - } - }, 60000); // 60 second timeout - }); - - describe("Access Token - Transaction Pattern Policies", () => { - // Helper to create a simple transfer transaction - const createTransferTransaction = async ( - from: string, - to: string, - amount: bigint, - ) => { - const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); - const signer = createNoopSigner(address(from)); - - const transferInstruction = getTransferSolInstruction({ - source: signer, - destination: address(to), - amount: lamports(amount), - }); - - const transactionMessage = pipe( - createTransactionMessage({ version: 0 }), - (tx) => setTransactionMessageFeePayer(address(from), tx), - (tx) => - setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, tx), - (tx) => appendTransactionMessageInstruction(transferInstruction, tx), - ); - - const compiledTransaction = compileTransaction(transactionMessage); - return getBase64EncodedWireTransaction(compiledTransaction); - }; - - describe("Program Access Control", () => { - it("should allow transaction with allowed program", async () => { - // System program ID (used for transfers) - const systemProgramId = "11111111111111111111111111111111"; - - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - programs: { - type: "allow", - programs: [systemProgramId], - }, - }, - }, - ], - expiresAt, - metadata: { - name: "Allow System Program Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should deny transaction with non-allowed program", async () => { - // Only allow a different program (not system program) - const fakeProgramId = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; - - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - programs: { - type: "allow", - programs: [fakeProgramId], - }, - }, - }, - ], - expiresAt, - metadata: { - name: "Restricted Program Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - - it("should allow transaction when program is not in deny list", async () => { - // Deny a different program (not system program) - const fakeProgramId = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; - - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - programs: { - type: "deny", - programs: [fakeProgramId], - }, - }, - }, - ], - expiresAt, - metadata: { - name: "Deny List Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should deny transaction when program is in deny list", async () => { - // Deny system program - const systemProgramId = "11111111111111111111111111111111"; - - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - programs: { - type: "deny", - programs: [systemProgramId], - }, - }, - }, - ], - expiresAt, - metadata: { - name: "Deny System Program Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - }); - - describe("Can Pay Fees", () => { - it("should allow fee payment when canPayFees is true", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - canPayFees: true, - }, - }, - ], - expiresAt, - metadata: { - name: "Allow Fees Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should deny fee payment when canPayFees is false", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - canPayFees: false, - }, - }, - ], - expiresAt, - metadata: { - name: "No Fees Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - - expect( - typeof signatureResult.error?.details === "object" - ? signatureResult.error?.details.reason - : "", - ).toContain("not authorized to pay transaction fees"); - }); - - it("should allow fee payment by default (no transactionPatterns)", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - // No transactionPatterns means default behavior (allow fees) - }, - ], - expiresAt, - metadata: { - name: "Default Behavior Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - }); - - describe("Max Instructions", () => { - it("should allow transaction within instruction limit", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - maxInstructions: 5, // Allow up to 5 instructions - }, - }, - ], - expiresAt, - metadata: { - name: "Max 5 Instructions Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - // Create transaction with 1 instruction - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should deny transaction exceeding instruction limit", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - maxInstructions: 0, // No instructions allowed - }, - }, - ], - expiresAt, - metadata: { - name: "Zero Instructions Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - // Create transaction with 1 instruction (exceeds limit of 0) - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - }); - - describe("Combined Transaction Patterns", () => { - it("should enforce multiple patterns together", async () => { - const systemProgramId = "11111111111111111111111111111111"; - - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - programs: { - type: "allow", - programs: [systemProgramId], - }, - maxInstructions: 5, - canPayFees: true, - }, - }, - ], - expiresAt, - metadata: { - name: "Combined Patterns Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should fail if any pattern is violated", async () => { - const systemProgramId = "11111111111111111111111111111111"; - - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - programs: { - type: "allow", - programs: [systemProgramId], - }, - maxInstructions: 5, - canPayFees: false, // This will cause failure - }, - }, - ], - expiresAt, - metadata: { - name: "Combined Patterns (Violation) Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - }); - - describe("Writable Accounts Access Control", () => { - it("should allow transaction with allowed writable account", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - writableAccounts: { - type: "allow", - accounts: [senderPubkey, receiverPubkey], - }, - }, - }, - ], - expiresAt, - metadata: { - name: "Allow Writable Accounts Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should deny transaction with non-allowed writable account", async () => { - // Only allow sender to be writable, not receiver - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - writableAccounts: { - type: "allow", - accounts: [senderPubkey], // Only sender, not receiver - }, - }, - }, - ], - expiresAt, - metadata: { - name: "Restricted Writable Accounts Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - - it("should allow transaction when writable account is not in deny list", async () => { - // Deny a different account (not sender or receiver) - const fakeAccount = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; - - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - writableAccounts: { - type: "deny", - accounts: [fakeAccount], - }, - }, - }, - ], - expiresAt, - metadata: { - name: "Deny List Writable Accounts Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should deny transaction when writable account is in deny list", async () => { - // Deny receiver as writable - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - writableAccounts: { - type: "deny", - accounts: [receiverPubkey], - }, - }, - }, - ], - expiresAt, - metadata: { - name: "Deny Receiver Writable Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - }); - - describe("Required Cosigners", () => { - it("should allow transaction without cosigners when none required", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - requiredCosigners: [], // No cosigners required - }, - }, - ], - expiresAt, - metadata: { - name: "No Cosigners Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should deny transaction when required cosigner is missing", async () => { - // Require receiver as cosigner (but it won't be in the transaction) - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - requiredCosigners: [receiverPubkey], - }, - }, - ], - expiresAt, - metadata: { - name: "Required Cosigner Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - - it("should deny transaction when multiple required cosigners are missing", async () => { - // Require multiple cosigners that won't be in the transaction - const fakeCosigner1 = "CosignerAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; - const fakeCosigner2 = "CosignerBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; - - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - transactionPatterns: { - requiredCosigners: [fakeCosigner1, fakeCosigner2], - }, - }, - ], - expiresAt, - metadata: { - name: "Multiple Cosigners Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - - it("should allow transaction by default when no cosigners specified", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], - // No requiredCosigners field means any transaction is allowed - }, - ], - expiresAt, - metadata: { - name: "Default Cosigners Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - }); - - describe("Allowlist", () => { - it("should allow signing from account in allowlist", async () => { - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [senderPubkey], // Explicitly allow sender - }, - ], - expiresAt, - metadata: { - name: "Allowlist Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(true); - expect(signatureResult.data?.signature).toBeTruthy(); - }); - - it("should deny signing from account not in allowlist", async () => { - // Create allowlist with only receiver (not sender) - const expiresAt = new Date(Date.now() + 3600000).toISOString(); - const accessTokenResult = await createAccessToken({ - client: vaultClient, - request: { - auth: { adminKey }, - options: { - policies: [ - { - type: "solana:signTransaction", - allowlist: [receiverPubkey], // Only allow receiver, not sender - }, - ], - expiresAt, - metadata: { - name: "Restricted Allowlist Token", - }, - }, - }, - }); - - expect(accessTokenResult.success).toBe(true); - const accessToken = accessTokenResult.data?.accessToken || ""; - - const base64Transaction = await createTransferTransaction( - senderPubkey, - receiverPubkey, - 1n, - ); - - const signatureResult = await signSolanaTransaction({ - client: vaultClient, - request: { - auth: { accessToken }, - options: { - transaction: base64Transaction, - from: senderPubkey, - }, - }, - }); - - expect(signatureResult.success).toBe(false); - expect(signatureResult.error).toBeTruthy(); - }); - }); - }); -}); diff --git a/packages/vault-sdk/tsconfig.base.json b/packages/vault-sdk/tsconfig.base.json deleted file mode 100644 index 25c55988d49..00000000000 --- a/packages/vault-sdk/tsconfig.base.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - // This tsconfig file contains the shared config for the build (tsconfig.build.json) and type checking (tsconfig.json) config. - "compilerOptions": { - // Incremental builds - // NOTE: Enabling incremental builds speeds up `tsc`. Keep in mind though that it does not reliably bust the cache when the `tsconfig.json` file changes. - "allowJs": false, - "allowSyntheticDefaultImports": true, - "checkJs": false, - - // Interop constraints - "esModuleInterop": false, - "exactOptionalPropertyTypes": false, - "forceConsistentCasingInFileNames": true, - "importHelpers": true, - // Incremental builds - // NOTE: Enabling incremental builds speeds up `tsc`. Keep in mind though that it does not reliably bust the cache when the `tsconfig.json` file changes. - "incremental": false, - - // jsx for "/react" portion - "jsx": "react-jsx", - "lib": [ - "ES2022", // By using ES2022 we get access to the `.cause` property on `Error` instances. - "DOM" // We are adding `DOM` here to get the `fetch`, etc. types. This should be removed once these types are available via DefinitelyTyped. - ], - "module": "NodeNext", - - // Language and environment - "moduleResolution": "NodeNext", - "noFallthroughCasesInSwitch": true, - "noImplicitOverride": true, - "noImplicitReturns": true, - "noUncheckedIndexedAccess": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - - // Skip type checking for node modules - "skipLibCheck": true, - - // Type checking - "strict": true, - "target": "ES2021", - "useDefineForClassFields": true, - "useUnknownInCatchVariables": true, - "verbatimModuleSyntax": true - }, - // This tsconfig file contains the shared config for the build (tsconfig.build.json) and type checking (tsconfig.json) config. - "include": [] -} diff --git a/packages/vault-sdk/tsconfig.build.json b/packages/vault-sdk/tsconfig.build.json deleted file mode 100644 index 63325457c67..00000000000 --- a/packages/vault-sdk/tsconfig.build.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "moduleResolution": "node", - "rootDir": "./src", - "sourceMap": true - }, - "exclude": [ - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.test-d.ts", - "src/**/*.bench.ts", - "src/**/*.macro.ts" - ], - "extends": "./tsconfig.base.json", - "include": ["src"] -} diff --git a/packages/vault-sdk/tsconfig.json b/packages/vault-sdk/tsconfig.json deleted file mode 100644 index bd4c14699e3..00000000000 --- a/packages/vault-sdk/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - // This configuration is used for local development and type checking. - "compilerOptions": { - "baseUrl": ".", - "paths": { - "~test/*": ["./test/src/*"] - } - }, - "exclude": [], - // This configuration is used for local development and type checking. - "extends": "./tsconfig.base.json", - "include": ["src", "test"] -} diff --git a/packages/vault-sdk/vitest.config.ts b/packages/vault-sdk/vitest.config.ts deleted file mode 100644 index 58f6496a323..00000000000 --- a/packages/vault-sdk/vitest.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { join } from "node:path"; -import { defineConfig } from "vitest/config"; - -export default defineConfig({ - test: { - globals: true, - environment: "node", - testTimeout: 60000, // 60 seconds default timeout - hookTimeout: 60000, // 60 seconds for beforeAll/afterAll - teardownTimeout: 10000, - sequence: { - shuffle: false, // Run tests in order - }, - // load .env.test - setupFiles: [join(__dirname, "./tests/env-setup.ts")], - }, -}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef7ffa32d77..730909c9d35 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,7 +125,7 @@ importers: version: 1.2.7(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) '@sentry/nextjs': specifier: 9.34.0 - version: 9.34.0(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(encoding@0.1.13)(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react@19.2.1)(webpack@5.99.9(esbuild@0.25.5)) + version: 9.34.0(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(encoding@0.1.13)(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react@19.2.1)(webpack@5.99.9) '@shazow/whatsabi': specifier: 0.22.2 version: 0.22.2(@noble/hashes@1.8.0)(typescript@5.8.3)(zod@3.25.75) @@ -318,7 +318,7 @@ importers: version: 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10)) '@storybook/nextjs': specifier: 9.0.15 - version: 9.0.15(esbuild@0.25.5)(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9(esbuild@0.25.5)) + version: 9.0.15(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9) '@types/color': specifier: 4.2.0 version: 4.2.0 @@ -523,7 +523,7 @@ importers: version: 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5)) '@storybook/nextjs': specifier: 9.0.15 - version: 9.0.15(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9) + version: 9.0.15(esbuild@0.25.5)(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9(esbuild@0.25.5)) '@types/node': specifier: 22.14.1 version: 22.14.1 @@ -655,7 +655,7 @@ importers: version: 0.1.5 geist: specifier: ^1.5.1 - version: 1.5.1(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)) + version: 1.5.1(next@15.3.8(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)) lucide-react: specifier: 0.525.0 version: 0.525.0(react@19.2.1) @@ -824,7 +824,7 @@ importers: version: 0.7.43 geist: specifier: ^1.5.1 - version: 1.5.1(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)) + version: 1.5.1(next@15.3.8(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)) github-slugger: specifier: ^2.0.0 version: 2.0.0 @@ -1014,7 +1014,7 @@ importers: specifier: 5.0.4 version: 5.0.4(vite@7.1.7(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) '@wagmi/cli': - specifier: latest + specifier: 2.8.0 version: 2.8.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10) buffer: specifier: ^6.0.3 @@ -1229,28 +1229,6 @@ importers: specifier: ^2.8.1 version: 2.8.1 - packages/nebula: - dependencies: - thirdweb: - specifier: workspace:* - version: link:../thirdweb - typescript: - specifier: '>=5.0.4' - version: 5.8.3 - devDependencies: - '@biomejs/biome': - specifier: 2.0.6 - version: 2.0.6 - '@hey-api/openapi-ts': - specifier: 0.76.0 - version: 0.76.0(magicast@0.3.5)(typescript@5.8.3) - rimraf: - specifier: 6.0.1 - version: 6.0.1 - tslib: - specifier: ^2.8.1 - version: 2.8.1 - packages/nexus: dependencies: x402: @@ -1728,7 +1706,7 @@ importers: version: 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5)) '@storybook/nextjs': specifier: 9.0.15 - version: 9.0.15(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9) + version: 9.0.15(next@15.3.8(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9) '@types/react': specifier: 19.2.7 version: 19.2.7 @@ -1751,58 +1729,6 @@ importers: specifier: 5.8.3 version: 5.8.3 - packages/vault-sdk: - dependencies: - '@noble/ciphers': - specifier: ^1.2.1 - version: 1.3.0 - '@noble/curves': - specifier: 1.8.2 - version: 1.8.2 - '@noble/hashes': - specifier: 1.7.2 - version: 1.7.2 - '@solana/addresses': - specifier: ^3.0.0 - version: 3.0.3(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/keys': - specifier: ^3.0.0 - version: 3.0.3(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/kit': - specifier: ^4.0.0 - version: 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5)) - '@solana/rpc': - specifier: ^3.0.0 - version: 3.0.3(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transactions': - specifier: ^3.0.0 - version: 3.0.3(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - abitype: - specifier: 1.0.8 - version: 1.0.8(typescript@5.8.3)(zod@3.25.76) - jose: - specifier: 6.0.11 - version: 6.0.11 - typescript: - specifier: '>=5.0.4' - version: 5.8.3 - devDependencies: - '@biomejs/biome': - specifier: 2.0.6 - version: 2.0.6 - '@solana-program/system': - specifier: ^0.8.1 - version: 0.8.1(@solana/kit@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5))) - bs58: - specifier: ^6.0.0 - version: 6.0.0 - rimraf: - specifier: 6.0.1 - version: 6.0.1 - vitest: - specifier: 3.2.4 - version: 3.2.4(@types/debug@4.1.12)(@types/node@24.0.10)(@vitest/ui@3.2.4)(happy-dom@18.0.1)(jiti@2.4.2)(lightningcss@1.30.1)(msw@2.10.2(@types/node@24.0.10)(typescript@5.8.3))(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - packages/wagmi-adapter: dependencies: typescript: @@ -4234,9 +4160,11 @@ packages: '@metamask/sdk-analytics@0.0.5': resolution: {integrity: sha512-fDah+keS1RjSUlC8GmYXvx6Y26s3Ax1U9hGpWb6GSY5SAdmTSIqp2CvYy6yW0WgLhnYhW+6xERuD0eVqV63QIQ==} + deprecated: No longer maintained, superseded by @metamask/connect-analytics '@metamask/sdk-communication-layer@0.33.1': resolution: {integrity: sha512-0bI9hkysxcfbZ/lk0T2+aKVo1j0ynQVTuB3sJ5ssPWlz+Z3VwveCkP1O7EVu1tsVVCb0YV5WxK9zmURu2FIiaA==} + deprecated: No longer maintained, superseded by https://docs.metamask.io/metamask-connect peerDependencies: cross-fetch: ^4.0.0 eciesjs: '*' @@ -4246,9 +4174,11 @@ packages: '@metamask/sdk-install-modal-web@0.32.1': resolution: {integrity: sha512-MGmAo6qSjf1tuYXhCu2EZLftq+DSt5Z7fsIKr2P+lDgdTPWgLfZB1tJKzNcwKKOdf6q9Qmmxn7lJuI/gq5LrKw==} + deprecated: No longer maintained, superseded by https://docs.metamask.io/metamask-connect '@metamask/sdk@0.33.1': resolution: {integrity: sha512-1mcOQVGr9rSrVcbKPNVzbZ8eCl1K0FATsYH3WJ/MH4WcZDWGECWrXJPNMZoEAkLxWiMe8jOQBumg2pmcDa9zpQ==} + deprecated: No longer maintained, superseded by https://docs.metamask.io/metamask-connect '@metamask/superstruct@3.2.1': resolution: {integrity: sha512-fLgJnDOXFmuVlB38rUN5SmU7hAFQcCjrg3Vrxz67KTY7YHFnSNEKvX4avmEBdOI0yTCxZjwMCFEqsC8k2+Wd3g==} @@ -4782,7 +4712,7 @@ packages: '@paulmillr/qr@0.2.1': resolution: {integrity: sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ==} - deprecated: 'The package is now available as "qr": npm install qr' + deprecated: 'Switch to "qr" (new package name) for security updates: npm install qr' '@phosphor-icons/core@2.1.1': resolution: {integrity: sha512-v4ARvrip4qBCImOE5rmPUylOEK4iiED9ZyKjcvzuezqMaiRASCHKcRIuvvxL/twvLpkfnEODCOJp5dM4eZilxQ==} @@ -5859,6 +5789,7 @@ packages: '@safe-global/safe-gateway-typescript-sdk@3.23.1': resolution: {integrity: sha512-6ORQfwtEJYpalCeVO21L4XXGSdbEMfyp2hEv6cP82afKXSwvse6d3sdelgaPWUxHIsFRkWvHDdzh8IyyKHZKxw==} engines: {node: '>=16'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. '@scalar/api-client@2.5.26': resolution: {integrity: sha512-f5NWAr8aRBpANLAWVhIXlO3ehe/lY47nufoltnpR4QLu0xSNwAa8MdL9hQuU9Cka6cGp/h9NE60ad1qM1m/eFA==} @@ -6782,12 +6713,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/fast-stable-stringify@4.0.0': - resolution: {integrity: sha512-sNJRi0RQ93vkGQ9VyFTSGm6mfKLk0FWOFpJLcqyP0BNUK1CugBaUMnxAmGqNaVSCktJagTSLqAMi9k1VSdh+Cg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/functional@2.3.0': resolution: {integrity: sha512-AgsPh3W3tE+nK3eEw/W9qiSfTGwLYEvl0rWaxHht/lRcuDVwfKRzeSa5G79eioWFFqr+pTtoCr3D3OLkwKz02Q==} engines: {node: '>=20.18.0'} @@ -6800,24 +6725,12 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/functional@4.0.0': - resolution: {integrity: sha512-duprxASuT0VXlHj3bLBdy9+ZpqdmCZhzCUmTsXps4UlDKr9PxSCQIQ+NK6OPhtBWOh1sNEcT1f1nY/MVqF/KHg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/instruction-plans@3.0.3': resolution: {integrity: sha512-eqoaPtWtmLTTpdvbt4BZF5H6FIlJtXi9H7qLOM1dLYonkOX2Ncezx5NDCZ9tMb2qxVMF4IocYsQnNSnMfjQF1w==} engines: {node: '>=20.18.0'} peerDependencies: typescript: '>=5.3.3' - '@solana/instruction-plans@4.0.0': - resolution: {integrity: sha512-FcyptPR5XmKoj1EyF9xARiqy2BuF+CfrIxTU0WQn5Tix/y7whKYz5CCFtBlWbwIcGxQftmG5tAlcidgnCb7jVw==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/instructions@2.3.0': resolution: {integrity: sha512-PLMsmaIKu7hEAzyElrk2T7JJx4D+9eRwebhFZpy2PXziNSmFF929eRHKUsKqBFM3cYR1Yy3m6roBZfA+bGE/oQ==} engines: {node: '>=20.18.0'} @@ -6830,12 +6743,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/instructions@4.0.0': - resolution: {integrity: sha512-/Lf3E+6mhe6EL7a3+9FY020yq71lVNgueplJGr221b4wP6ykwPVtoaAiNf+lIrRRYkW8DC81auhmjd2DYpND1w==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/keys@2.3.0': resolution: {integrity: sha512-ZVVdga79pNH+2pVcm6fr2sWz9HTwfopDVhYb0Lh3dh+WBmJjwkabXEIHey2rUES7NjFa/G7sV8lrUn/v8LDCCQ==} engines: {node: '>=20.18.0'} @@ -6848,12 +6755,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/keys@4.0.0': - resolution: {integrity: sha512-aPz+LF9QK3EHjuklYBnnalcLVHUNz5s4m4DXNVGAtjJD7Q9zEu2dBUm9mRKwlLbQibNOEGa1m86HCjcboqXdjg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/kit@2.3.0': resolution: {integrity: sha512-sb6PgwoW2LjE5oTFu4lhlS/cGt/NB3YrShEyx7JgWFWysfgLdJnhwWThgwy/4HjNsmtMrQGWVls0yVBHcMvlMQ==} engines: {node: '>=20.18.0'} @@ -6866,12 +6767,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/kit@4.0.0': - resolution: {integrity: sha512-5c4qMRL+ciWewEtNZ2gX4wf4VpscZYXbWnU2kBiyQhWiqj8zzFIh6iCHbqMX/Myx3pOHfQs/m/iQCnQHPOag9Q==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/nominal-types@2.3.0': resolution: {integrity: sha512-uKlMnlP4PWW5UTXlhKM8lcgIaNj8dvd8xO4Y9l+FVvh9RvW2TO0GwUO6JCo7JBzCB0PSqRJdWWaQ8pu1Ti/OkA==} engines: {node: '>=20.18.0'} @@ -6925,12 +6820,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/programs@4.0.0': - resolution: {integrity: sha512-tJCNoKyDKfipGTsQtUO6R9EXk4l4ai+gYuD2R3NubJgMaLPBqIv3IMSCeDSvhuSCDuN2lQ1mLkQrDnE3lm0/iQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/promises@2.3.0': resolution: {integrity: sha512-GjVgutZKXVuojd9rWy1PuLnfcRfqsaCm7InCiZc8bqmJpoghlyluweNc7ml9Y5yQn1P2IOyzh9+p/77vIyNybQ==} engines: {node: '>=20.18.0'} @@ -6943,12 +6832,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/promises@4.0.0': - resolution: {integrity: sha512-zEh815+n2OrrQunZ6m1iuNcoZRc9YnQaTeivBSgl1SYfPaq/Qj/rRiK5DID25Njo4L44p5quu7aal3Bk/eR+tQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/rpc-api@2.3.0': resolution: {integrity: sha512-UUdiRfWoyYhJL9PPvFeJr4aJ554ob2jXcpn4vKmRVn9ire0sCbpQKYx6K8eEKHZWXKrDW8IDspgTl0gT/aJWVg==} engines: {node: '>=20.18.0'} @@ -6961,12 +6844,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/rpc-api@4.0.0': - resolution: {integrity: sha512-nfQkTJCIW3qzUDRrhvr9MBm9jKQ+dZn4ypK35UDPrV+QB5Gc9UmPJ6prvpPtDq8WoU7wqUzswKeY3k7qtgYjEg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/rpc-parsed-types@2.3.0': resolution: {integrity: sha512-B5pHzyEIbBJf9KHej+zdr5ZNAdSvu7WLU2lOUPh81KHdHQs6dEb310LGxcpCc7HVE8IEdO20AbckewDiAN6OCg==} engines: {node: '>=20.18.0'} @@ -6979,12 +6856,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/rpc-parsed-types@4.0.0': - resolution: {integrity: sha512-aOjwJwen5D0aDXoSths+ekdBO4mu7nmM+yASqCVW2PLN6v7NZmRBzV1/PgMFjDTiymVQj25ipCUvL395s1wsKg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/rpc-spec-types@2.3.0': resolution: {integrity: sha512-xQsb65lahjr8Wc9dMtP7xa0ZmDS8dOE2ncYjlvfyw/h4mpdXTUdrSMi6RtFwX33/rGuztQ7Hwaid5xLNSLvsFQ==} engines: {node: '>=20.18.0'} @@ -7033,12 +6904,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/rpc-subscriptions-api@4.0.0': - resolution: {integrity: sha512-6/MzQT9VkcD7Rh8ExoGdbERTSEubA5eI+Q0R9FRuujl/SIy2BsWaNxaBMuZS0DFmKbIHM+m1ptUFdjKAVjGQuw==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/rpc-subscriptions-channel-websocket@2.3.0': resolution: {integrity: sha512-2oL6ceFwejIgeWzbNiUHI2tZZnaOxNTSerszcin7wYQwijxtpVgUHiuItM/Y70DQmH9sKhmikQp+dqeGalaJxw==} engines: {node: '>=20.18.0'} @@ -7053,13 +6918,6 @@ packages: typescript: '>=5.3.3' ws: ^8.18.0 - '@solana/rpc-subscriptions-channel-websocket@4.0.0': - resolution: {integrity: sha512-dc4cGfkQJEdkux/CXpItffuytnSU6wktReHEBL+2xaYmF+yGMBeBLzTvkCJ9BbGGfBMf06c5y5QH8X48W5CJdg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - ws: ^8.18.0 - '@solana/rpc-subscriptions-spec@2.3.0': resolution: {integrity: sha512-rdmVcl4PvNKQeA2l8DorIeALCgJEMSu7U8AXJS1PICeb2lQuMeaR+6cs/iowjvIB0lMVjYN2sFf6Q3dJPu6wWg==} engines: {node: '>=20.18.0'} @@ -7072,12 +6930,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/rpc-subscriptions-spec@4.0.0': - resolution: {integrity: sha512-2ROfFymoy/TjDAlEPpsmSQAr6LZwG4l/UIhkW7+/VraRu7QPAycuWfSopJnG8D7F3fksICFSeQNwwgBXTN1TWA==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/rpc-subscriptions@2.3.0': resolution: {integrity: sha512-Uyr10nZKGVzvCOqwCZgwYrzuoDyUdwtgQRefh13pXIrdo4wYjVmoLykH49Omt6abwStB0a4UL5gX9V4mFdDJZg==} engines: {node: '>=20.18.0'} @@ -7090,12 +6942,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/rpc-subscriptions@4.0.0': - resolution: {integrity: sha512-rM+R4Xpsym0tYF3sGAEpdY+D+c6fOMk/fhCEewR+veqdubRfvI5QEhq4kHs8qdKKuRbcpGmedPC306H+PQ6Hmg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/rpc-transformers@2.3.0': resolution: {integrity: sha512-UuHYK3XEpo9nMXdjyGKkPCOr7WsZsxs7zLYDO1A5ELH3P3JoehvrDegYRAGzBS2VKsfApZ86ZpJToP0K3PhmMA==} engines: {node: '>=20.18.0'} @@ -7108,12 +6954,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/rpc-transformers@4.0.0': - resolution: {integrity: sha512-3B3C9zpqN2O76CJV9tethtybMFdT2ViN5b2u8sObftGNFqxPmjt7XmbOmPdn7zwLyRM5S2RuZShzfcVJpBf+yQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/rpc-transport-http@2.3.0': resolution: {integrity: sha512-HFKydmxGw8nAF5N+S0NLnPBDCe5oMDtI2RAmW8DMqP4U3Zxt2XWhvV1SNkAldT5tF0U1vP+is6fHxyhk4xqEvg==} engines: {node: '>=20.18.0'} @@ -7126,12 +6966,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/rpc-transport-http@4.0.0': - resolution: {integrity: sha512-RjXcQehF3wHm8eoIala+MrdmS3mDSPRl+xwEWzmA1QmBdQl44/XTNOdPJvNkqWXrzE+bAsZGfn0gVua/oCC+zQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/rpc-types@2.3.0': resolution: {integrity: sha512-O09YX2hED2QUyGxrMOxQ9GzH1LlEwwZWu69QbL4oYmIf6P5dzEEHcqRY6L1LsDVqc/dzAdEs/E1FaPrcIaIIPw==} engines: {node: '>=20.18.0'} @@ -7162,12 +6996,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/rpc@4.0.0': - resolution: {integrity: sha512-KF91ghi7P48aeWd4eSY5Fly/ioYz9ww2loQd/YqV3eLQwo3/2HUWd6r6lpSHsLh/HUoUkm+EsYmVN8r/3mE5fg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/signers@2.3.0': resolution: {integrity: sha512-OSv6fGr/MFRx6J+ZChQMRqKNPGGmdjkqarKkRzkwmv7v8quWsIRnJT5EV8tBy3LI4DLO/A8vKiNSPzvm1TdaiQ==} engines: {node: '>=20.18.0'} @@ -7180,12 +7008,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/signers@4.0.0': - resolution: {integrity: sha512-r3ZrltruadsQXmx3fsGOSqAZ3SsgD7zq/QB8sT6IOVcg11Pgdvx48/CEv7djdy44wF4HVpqNCZLfi12EhoaSXQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/spl-token-group@0.0.7': resolution: {integrity: sha512-V1N/iX7Cr7H0uazWUT2uk27TMqlqedpXHRqqAbVO2gvmJyT0E0ummMEAVQeXZ05ZhQ/xF39DLSdBp90XebWEug==} engines: {node: '>=16'} @@ -7216,12 +7038,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/subscribable@4.0.0': - resolution: {integrity: sha512-lDI4HkDuGkmdnX7hSgvJsFFadkQxt0pLHIpZTxOt7/6KBDtNs63NTwJGd3d/EuA7ReXwYg5HDG0QtOm64divXQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/sysvars@2.3.0': resolution: {integrity: sha512-LvjADZrpZ+CnhlHqfI5cmsRzX9Rpyb1Ox2dMHnbsRNzeKAMhu9w4ZBIaeTdO322zsTr509G1B+k2ABD3whvUBA==} engines: {node: '>=20.18.0'} @@ -7252,12 +7068,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/transaction-confirmation@4.0.0': - resolution: {integrity: sha512-DTBIMB5/UCOpVyL5E0xwswtxs/PGeSD1VL5+C1UCPlggpZNIOlhZoaQqFO56wrJDFASzPMx+dakda5BUuhQkBg==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/transaction-messages@2.3.0': resolution: {integrity: sha512-bgqvWuy3MqKS5JdNLH649q+ngiyOu5rGS3DizSnWwYUd76RxZl1kN6CoqHSrrMzFMvis6sck/yPGG3wqrMlAww==} engines: {node: '>=20.18.0'} @@ -7270,12 +7080,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/transaction-messages@4.0.0': - resolution: {integrity: sha512-rQo0rRyvkrROFZHUT0uL3vqeBBtxTsNKDtx8pZo6BC3TgGA7V1MoSC3rVOLwYCK6rK5NJZiYNjmneHz/7hVpwQ==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/transactions@2.3.0': resolution: {integrity: sha512-LnTvdi8QnrQtuEZor5Msje61sDpPstTVwKg4y81tNxDhiyomjuvnSNLAq6QsB9gIxUqbNzPZgOG9IU4I4/Uaug==} engines: {node: '>=20.18.0'} @@ -7288,12 +7092,6 @@ packages: peerDependencies: typescript: '>=5.3.3' - '@solana/transactions@4.0.0': - resolution: {integrity: sha512-bmHIIVTQq+Wlqg4es91Ew4KSbOrvdfPsKg/pVha8ZR77huwvfqQMxRyYF4zMQ+Fm3QXGFKOU0RPVKKYic15jBw==} - engines: {node: '>=20.18.0'} - peerDependencies: - typescript: '>=5.3.3' - '@solana/wallet-adapter-base@0.9.23': resolution: {integrity: sha512-apqMuYwFp1jFi55NxDfvXUX2x1T0Zh07MxhZ/nCCTGys5raSfYUh82zen2BLv8BSDj/JxZ2P/s7jrQZGrX8uAw==} engines: {node: '>=16'} @@ -8100,6 +7898,7 @@ packages: '@ungap/structured-clone@1.2.1': resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==} + deprecated: Potential CWE-502 - Update to 1.3.1 or higher '@unhead/dom@1.11.20': resolution: {integrity: sha512-jgfGYdOH+xHJF/j8gudjsYu3oIjFyXhCWcgKaw3vQnT616gSqyqnGQGOItL+BQtQZACKNISwIfx5PuOtztMKLA==} @@ -8462,6 +8261,7 @@ packages: '@walletconnect/ethereum-provider@2.21.1': resolution: {integrity: sha512-SSlIG6QEVxClgl1s0LMk4xr2wg4eT3Zn/Hb81IocyqNSGfXpjtawWxKxiC5/9Z95f1INyBD6MctJbL/R1oBwIw==} + deprecated: 'Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases' '@walletconnect/events@1.0.1': resolution: {integrity: sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==} @@ -8653,6 +8453,7 @@ packages: '@xmldom/xmldom@0.8.10': resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} engines: {node: '>=10.0.0'} + deprecated: this version has critical issues, please update to the latest version '@xtuc/ieee754@1.2.0': resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -9147,6 +8948,7 @@ packages: basic-ftp@5.0.5: resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} engines: {node: '>=10.0.0'} + deprecated: Security vulnerability fixed in 5.2.1, please upgrade bech32@1.1.4: resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} @@ -11356,20 +11158,23 @@ packages: glob@10.4.5: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@11.0.0: resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} engines: {node: 20 || >=22} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me hasBin: true glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me glob@9.3.5: resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==} engines: {node: '>=16 || 14 >=14.17'} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} @@ -14457,6 +14262,7 @@ packages: react-native-quick-crypto@0.7.14: resolution: {integrity: sha512-ePl0pNgw0TCl9sn9zVX6es58PHXIA6pdDm5+dHawypD+cacyvzfpAFEqYR6opFtnBff/HHtsQrS0zX0AAfwodQ==} + deprecated: 'Security: secret keys are truncated at the first NUL byte, producing low-entropy derived keys. Upgrade to >=1.0.0. See GHSA-wrf3-fwx3-8jrv' react-native-svg@15.12.0: resolution: {integrity: sha512-iE25PxIJ6V0C6krReLquVw6R0QTsRTmEQc4K2Co3P6zsimU/jltcDBKYDy1h/5j9S/fqmMeXnpM+9LEWKJKI6A==} @@ -14609,6 +14415,7 @@ packages: recharts@2.15.3: resolution: {integrity: sha512-EdOPzTwcFSuqtvkDoaM5ws/Km1+WTAO2eizL7rqiG0V2UVhTnz0m7J2i0CjVPUCdEkZImaWvXLbZDS2H5t6GFQ==} engines: {node: '>=14'} + deprecated: 1.x and 2.x branches are no longer active. Bump to Recharts v3 to receive latest features and bugfixes. See https://github.com/recharts/recharts/wiki/3.0-migration-guide peerDependencies: react: ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -15588,6 +15395,7 @@ packages: tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} + deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me tar@7.4.3: resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} @@ -16263,14 +16071,17 @@ packages: uuid@7.0.3: resolution: {integrity: sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true uvu@0.5.6: @@ -16902,9 +16713,6 @@ packages: zod@3.25.75: resolution: {integrity: sha512-OhpzAmVzabPOL6C3A3gpAifqr9MqihV/Msx3gor2b2kviCgcb+HM9SEOpMWwwNp9MRunWnhtAKUoo0AHhjyPPg==} - zod@3.25.76: - resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} - zod@4.1.12: resolution: {integrity: sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==} @@ -24839,7 +24647,7 @@ snapshots: '@sentry/core@9.34.0': {} - '@sentry/nextjs@9.34.0(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(encoding@0.1.13)(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react@19.2.1)(webpack@5.99.9(esbuild@0.25.5))': + '@sentry/nextjs@9.34.0(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(encoding@0.1.13)(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react@19.2.1)(webpack@5.99.9)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.34.0 @@ -24850,7 +24658,7 @@ snapshots: '@sentry/opentelemetry': 9.34.0(@opentelemetry/api@1.9.0)(@opentelemetry/context-async-hooks@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.57.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.34.0) '@sentry/react': 9.34.0(react@19.2.1) '@sentry/vercel-edge': 9.34.0 - '@sentry/webpack-plugin': 3.5.0(encoding@0.1.13)(webpack@5.99.9(esbuild@0.25.5)) + '@sentry/webpack-plugin': 3.5.0(encoding@0.1.13)(webpack@5.99.9) chalk: 3.0.0 next: 15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) resolve: 1.22.8 @@ -24927,12 +24735,12 @@ snapshots: '@opentelemetry/api': 1.9.0 '@sentry/core': 9.34.0 - '@sentry/webpack-plugin@3.5.0(encoding@0.1.13)(webpack@5.99.9(esbuild@0.25.5))': + '@sentry/webpack-plugin@3.5.0(encoding@0.1.13)(webpack@5.99.9)': dependencies: '@sentry/bundler-plugin-core': 3.5.0(encoding@0.1.13) unplugin: 1.0.1 uuid: 9.0.1 - webpack: 5.99.9(esbuild@0.25.5) + webpack: 5.99.9 transitivePeerDependencies: - encoding - supports-color @@ -25661,10 +25469,6 @@ snapshots: dependencies: '@solana/kit': 3.0.3(typescript@5.8.3)(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@solana-program/system@0.8.1(@solana/kit@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5)))': - dependencies: - '@solana/kit': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5)) - '@solana-program/token-2022@0.4.2(@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(@solana/sysvars@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3))': dependencies: '@solana/kit': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) @@ -25986,10 +25790,6 @@ snapshots: dependencies: typescript: 5.8.3 - '@solana/fast-stable-stringify@4.0.0(typescript@5.8.3)': - dependencies: - typescript: 5.8.3 - '@solana/functional@2.3.0(typescript@5.8.3)': dependencies: typescript: 5.8.3 @@ -25998,10 +25798,6 @@ snapshots: dependencies: typescript: 5.8.3 - '@solana/functional@4.0.0(typescript@5.8.3)': - dependencies: - typescript: 5.8.3 - '@solana/instruction-plans@3.0.3(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/errors': 3.0.3(typescript@5.8.3) @@ -26013,17 +25809,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/instruction-plans@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/instructions': 4.0.0(typescript@5.8.3) - '@solana/promises': 4.0.0(typescript@5.8.3) - '@solana/transaction-messages': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transactions': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/instructions@2.3.0(typescript@5.8.3)': dependencies: '@solana/codecs-core': 2.3.0(typescript@5.8.3) @@ -26036,12 +25821,6 @@ snapshots: '@solana/errors': 3.0.3(typescript@5.8.3) typescript: 5.8.3 - '@solana/instructions@4.0.0(typescript@5.8.3)': - dependencies: - '@solana/codecs-core': 4.0.0(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - typescript: 5.8.3 - '@solana/keys@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/assertions': 2.3.0(typescript@5.8.3) @@ -26064,17 +25843,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/keys@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/assertions': 4.0.0(typescript@5.8.3) - '@solana/codecs-core': 4.0.0(typescript@5.8.3) - '@solana/codecs-strings': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/nominal-types': 4.0.0(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/kit@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/accounts': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) @@ -26229,32 +25997,6 @@ snapshots: - fastestsmallesttextencoderdecoder - ws - '@solana/kit@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5))': - dependencies: - '@solana/accounts': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/addresses': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/codecs': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/functional': 4.0.0(typescript@5.8.3) - '@solana/instruction-plans': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/instructions': 4.0.0(typescript@5.8.3) - '@solana/keys': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/programs': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-parsed-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-spec-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-subscriptions': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5)) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/signers': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/sysvars': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transaction-confirmation': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5)) - '@solana/transaction-messages': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transactions': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/nominal-types@2.3.0(typescript@5.8.3)': dependencies: typescript: 5.8.3 @@ -26328,14 +26070,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/programs@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/addresses': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/promises@2.3.0(typescript@5.8.3)': dependencies: typescript: 5.8.3 @@ -26344,10 +26078,6 @@ snapshots: dependencies: typescript: 5.8.3 - '@solana/promises@4.0.0(typescript@5.8.3)': - dependencies: - typescript: 5.8.3 - '@solana/rpc-api@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/addresses': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) @@ -26382,23 +26112,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc-api@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/addresses': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/codecs-core': 4.0.0(typescript@5.8.3) - '@solana/codecs-strings': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/keys': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-parsed-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-spec': 4.0.0(typescript@5.8.3) - '@solana/rpc-transformers': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transaction-messages': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transactions': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/rpc-parsed-types@2.3.0(typescript@5.8.3)': dependencies: typescript: 5.8.3 @@ -26407,10 +26120,6 @@ snapshots: dependencies: typescript: 5.8.3 - '@solana/rpc-parsed-types@4.0.0(typescript@5.8.3)': - dependencies: - typescript: 5.8.3 - '@solana/rpc-spec-types@2.3.0(typescript@5.8.3)': dependencies: typescript: 5.8.3 @@ -26467,19 +26176,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc-subscriptions-api@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/addresses': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/keys': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-subscriptions-spec': 4.0.0(typescript@5.8.3) - '@solana/rpc-transformers': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transaction-messages': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transactions': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/rpc-subscriptions-channel-websocket@2.3.0(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/errors': 2.3.0(typescript@5.8.3) @@ -26534,15 +26230,6 @@ snapshots: typescript: 5.8.3 ws: 8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5) - '@solana/rpc-subscriptions-channel-websocket@4.0.0(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5))': - dependencies: - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/functional': 4.0.0(typescript@5.8.3) - '@solana/rpc-subscriptions-spec': 4.0.0(typescript@5.8.3) - '@solana/subscribable': 4.0.0(typescript@5.8.3) - typescript: 5.8.3 - ws: 8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5) - '@solana/rpc-subscriptions-spec@2.3.0(typescript@5.8.3)': dependencies: '@solana/errors': 2.3.0(typescript@5.8.3) @@ -26559,14 +26246,6 @@ snapshots: '@solana/subscribable': 3.0.3(typescript@5.8.3) typescript: 5.8.3 - '@solana/rpc-subscriptions-spec@4.0.0(typescript@5.8.3)': - dependencies: - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/promises': 4.0.0(typescript@5.8.3) - '@solana/rpc-spec-types': 4.0.0(typescript@5.8.3) - '@solana/subscribable': 4.0.0(typescript@5.8.3) - typescript: 5.8.3 - '@solana/rpc-subscriptions@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: '@solana/errors': 2.3.0(typescript@5.8.3) @@ -26675,24 +26354,6 @@ snapshots: - fastestsmallesttextencoderdecoder - ws - '@solana/rpc-subscriptions@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5))': - dependencies: - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/fast-stable-stringify': 4.0.0(typescript@5.8.3) - '@solana/functional': 4.0.0(typescript@5.8.3) - '@solana/promises': 4.0.0(typescript@5.8.3) - '@solana/rpc-spec-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-subscriptions-api': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-subscriptions-channel-websocket': 4.0.0(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5)) - '@solana/rpc-subscriptions-spec': 4.0.0(typescript@5.8.3) - '@solana/rpc-transformers': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/subscribable': 4.0.0(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/rpc-transformers@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/errors': 2.3.0(typescript@5.8.3) @@ -26715,17 +26376,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc-transformers@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/functional': 4.0.0(typescript@5.8.3) - '@solana/nominal-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-spec-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/rpc-transport-http@2.3.0(typescript@5.8.3)': dependencies: '@solana/errors': 2.3.0(typescript@5.8.3) @@ -26742,14 +26392,6 @@ snapshots: typescript: 5.8.3 undici-types: 7.16.0 - '@solana/rpc-transport-http@4.0.0(typescript@5.8.3)': - dependencies: - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/rpc-spec': 4.0.0(typescript@5.8.3) - '@solana/rpc-spec-types': 4.0.0(typescript@5.8.3) - typescript: 5.8.3 - undici-types: 7.16.0 - '@solana/rpc-types@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/addresses': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) @@ -26816,21 +26458,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/rpc@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/fast-stable-stringify': 4.0.0(typescript@5.8.3) - '@solana/functional': 4.0.0(typescript@5.8.3) - '@solana/rpc-api': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-spec': 4.0.0(typescript@5.8.3) - '@solana/rpc-spec-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-transformers': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-transport-http': 4.0.0(typescript@5.8.3) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/signers@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/addresses': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) @@ -26859,20 +26486,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/signers@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/addresses': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/codecs-core': 4.0.0(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/instructions': 4.0.0(typescript@5.8.3) - '@solana/keys': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/nominal-types': 4.0.0(typescript@5.8.3) - '@solana/transaction-messages': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transactions': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/spl-token-group@0.0.7(@solana/web3.js@1.98.2(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10))(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/codecs': 2.0.0-rc.1(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) @@ -26917,11 +26530,6 @@ snapshots: '@solana/errors': 3.0.3(typescript@5.8.3) typescript: 5.8.3 - '@solana/subscribable@4.0.0(typescript@5.8.3)': - dependencies: - '@solana/errors': 4.0.0(typescript@5.8.3) - typescript: 5.8.3 - '@solana/sysvars@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/accounts': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) @@ -27054,23 +26662,6 @@ snapshots: - fastestsmallesttextencoderdecoder - ws - '@solana/transaction-confirmation@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5))': - dependencies: - '@solana/addresses': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/codecs-strings': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/keys': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/promises': 4.0.0(typescript@5.8.3) - '@solana/rpc': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/rpc-subscriptions': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@6.0.5)) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transaction-messages': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transactions': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - - ws - '@solana/transaction-messages@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/addresses': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) @@ -27101,21 +26692,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/transaction-messages@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/addresses': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/codecs-core': 4.0.0(typescript@5.8.3) - '@solana/codecs-data-structures': 4.0.0(typescript@5.8.3) - '@solana/codecs-numbers': 4.0.0(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/functional': 4.0.0(typescript@5.8.3) - '@solana/instructions': 4.0.0(typescript@5.8.3) - '@solana/nominal-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/transactions@2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': dependencies: '@solana/addresses': 2.3.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) @@ -27152,24 +26728,6 @@ snapshots: transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/transactions@4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3)': - dependencies: - '@solana/addresses': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/codecs-core': 4.0.0(typescript@5.8.3) - '@solana/codecs-data-structures': 4.0.0(typescript@5.8.3) - '@solana/codecs-numbers': 4.0.0(typescript@5.8.3) - '@solana/codecs-strings': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/errors': 4.0.0(typescript@5.8.3) - '@solana/functional': 4.0.0(typescript@5.8.3) - '@solana/instructions': 4.0.0(typescript@5.8.3) - '@solana/keys': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/nominal-types': 4.0.0(typescript@5.8.3) - '@solana/rpc-types': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - '@solana/transaction-messages': 4.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.8.3) - typescript: 5.8.3 - transitivePeerDependencies: - - fastestsmallesttextencoderdecoder - '@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.2(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10))': dependencies: '@solana/wallet-standard-features': 1.3.0 @@ -27320,9 +26878,9 @@ snapshots: ts-dedent: 2.2.0 vite: 7.1.7(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - '@storybook/builder-webpack5@9.0.15(esbuild@0.25.5)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3)': + '@storybook/builder-webpack5@9.0.15(esbuild@0.25.5)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(typescript@5.8.3)': dependencies: - '@storybook/core-webpack': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10)) + '@storybook/core-webpack': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5)) case-sensitive-paths-webpack-plugin: 2.4.0 cjs-module-lexer: 1.4.3 css-loader: 6.11.0(webpack@5.99.9(esbuild@0.25.5)) @@ -27330,7 +26888,7 @@ snapshots: fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.8.3)(webpack@5.99.9(esbuild@0.25.5)) html-webpack-plugin: 5.6.3(webpack@5.99.9(esbuild@0.25.5)) magic-string: 0.30.18 - storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10) + storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5) style-loader: 3.3.4(webpack@5.99.9(esbuild@0.25.5)) terser-webpack-plugin: 5.3.14(esbuild@0.25.5)(webpack@5.99.9(esbuild@0.25.5)) ts-dedent: 2.2.0 @@ -27347,6 +26905,33 @@ snapshots: - uglify-js - webpack-cli + '@storybook/builder-webpack5@9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3)': + dependencies: + '@storybook/core-webpack': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10)) + case-sensitive-paths-webpack-plugin: 2.4.0 + cjs-module-lexer: 1.4.3 + css-loader: 6.11.0(webpack@5.99.9) + es-module-lexer: 1.7.0 + fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.8.3)(webpack@5.99.9) + html-webpack-plugin: 5.6.3(webpack@5.99.9) + magic-string: 0.30.18 + storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10) + style-loader: 3.3.4(webpack@5.99.9) + terser-webpack-plugin: 5.3.14(webpack@5.99.9) + ts-dedent: 2.2.0 + webpack: 5.99.9 + webpack-dev-middleware: 6.1.3(webpack@5.99.9) + webpack-hot-middleware: 2.26.1 + webpack-virtual-modules: 0.6.2 + optionalDependencies: + typescript: 5.8.3 + transitivePeerDependencies: + - '@rspack/core' + - '@swc/core' + - esbuild + - uglify-js + - webpack-cli + '@storybook/builder-webpack5@9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(typescript@5.8.3)': dependencies: '@storybook/core-webpack': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5)) @@ -27401,7 +26986,7 @@ snapshots: react: 19.2.1 react-dom: 19.2.1(react@19.2.1) - '@storybook/nextjs@9.0.15(esbuild@0.25.5)(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9(esbuild@0.25.5))': + '@storybook/nextjs@9.0.15(esbuild@0.25.5)(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9(esbuild@0.25.5))': dependencies: '@babel/core': 7.28.4 '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.28.4) @@ -27417,9 +27002,9 @@ snapshots: '@babel/preset-typescript': 7.27.1(@babel/core@7.28.4) '@babel/runtime': 7.28.2 '@pmmmwh/react-refresh-webpack-plugin': 0.5.17(react-refresh@0.14.2)(type-fest@4.41.0)(webpack-hot-middleware@2.26.1)(webpack@5.99.9(esbuild@0.25.5)) - '@storybook/builder-webpack5': 9.0.15(esbuild@0.25.5)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3) - '@storybook/preset-react-webpack': 9.0.15(esbuild@0.25.5)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3) - '@storybook/react': 9.0.15(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3) + '@storybook/builder-webpack5': 9.0.15(esbuild@0.25.5)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(typescript@5.8.3) + '@storybook/preset-react-webpack': 9.0.15(esbuild@0.25.5)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(typescript@5.8.3) + '@storybook/react': 9.0.15(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(typescript@5.8.3) '@types/semver': 7.7.0 babel-loader: 9.2.1(@babel/core@7.28.4)(webpack@5.99.9(esbuild@0.25.5)) css-loader: 6.11.0(webpack@5.99.9(esbuild@0.25.5)) @@ -27435,7 +27020,7 @@ snapshots: resolve-url-loader: 5.0.0 sass-loader: 14.2.1(webpack@5.99.9(esbuild@0.25.5)) semver: 7.7.2 - storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10) + storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5) style-loader: 3.3.4(webpack@5.99.9(esbuild@0.25.5)) styled-jsx: 5.1.7(@babel/core@7.28.4)(react@19.2.1) tsconfig-paths: 4.2.0 @@ -27461,7 +27046,67 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - '@storybook/nextjs@9.0.15(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9)': + '@storybook/nextjs@9.0.15(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9)': + dependencies: + '@babel/core': 7.28.4 + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.28.4) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.28.4) + '@babel/plugin-syntax-import-assertions': 7.27.1(@babel/core@7.28.4) + '@babel/plugin-transform-class-properties': 7.27.1(@babel/core@7.28.4) + '@babel/plugin-transform-export-namespace-from': 7.27.1(@babel/core@7.28.4) + '@babel/plugin-transform-numeric-separator': 7.27.1(@babel/core@7.28.4) + '@babel/plugin-transform-object-rest-spread': 7.28.0(@babel/core@7.28.4) + '@babel/plugin-transform-runtime': 7.28.0(@babel/core@7.28.4) + '@babel/preset-env': 7.28.0(@babel/core@7.28.4) + '@babel/preset-react': 7.27.1(@babel/core@7.28.4) + '@babel/preset-typescript': 7.27.1(@babel/core@7.28.4) + '@babel/runtime': 7.28.2 + '@pmmmwh/react-refresh-webpack-plugin': 0.5.17(react-refresh@0.14.2)(type-fest@4.41.0)(webpack-hot-middleware@2.26.1)(webpack@5.99.9) + '@storybook/builder-webpack5': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3) + '@storybook/preset-react-webpack': 9.0.15(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3) + '@storybook/react': 9.0.15(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3) + '@types/semver': 7.7.0 + babel-loader: 9.2.1(@babel/core@7.28.4)(webpack@5.99.9) + css-loader: 6.11.0(webpack@5.99.9) + image-size: 2.0.2 + loader-utils: 3.3.1 + next: 15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + node-polyfill-webpack-plugin: 2.0.1(webpack@5.99.9) + postcss: 8.5.23 + postcss-loader: 8.1.1(postcss@8.5.23)(typescript@5.8.3)(webpack@5.99.9) + react: 19.2.1 + react-dom: 19.2.1(react@19.2.1) + react-refresh: 0.14.2 + resolve-url-loader: 5.0.0 + sass-loader: 14.2.1(webpack@5.99.9) + semver: 7.7.2 + storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10) + style-loader: 3.3.4(webpack@5.99.9) + styled-jsx: 5.1.7(@babel/core@7.28.4)(react@19.2.1) + tsconfig-paths: 4.2.0 + tsconfig-paths-webpack-plugin: 4.2.0 + optionalDependencies: + typescript: 5.8.3 + webpack: 5.99.9 + transitivePeerDependencies: + - '@rspack/core' + - '@swc/core' + - '@types/webpack' + - babel-plugin-macros + - esbuild + - node-sass + - sass + - sass-embedded + - sockjs-client + - supports-color + - type-fest + - uglify-js + - webpack-cli + - webpack-dev-server + - webpack-hot-middleware + - webpack-plugin-serve + + '@storybook/nextjs@9.0.15(next@15.3.8(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1))(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(type-fest@4.41.0)(typescript@5.8.3)(webpack-hot-middleware@2.26.1)(webpack@5.99.9)': dependencies: '@babel/core': 7.28.4 '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.28.4) @@ -27521,9 +27166,9 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - '@storybook/preset-react-webpack@9.0.15(esbuild@0.25.5)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3)': + '@storybook/preset-react-webpack@9.0.15(esbuild@0.25.5)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(typescript@5.8.3)': dependencies: - '@storybook/core-webpack': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10)) + '@storybook/core-webpack': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5)) '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.8.3)(webpack@5.99.9(esbuild@0.25.5)) '@types/semver': 7.7.0 find-up: 7.0.0 @@ -27533,7 +27178,7 @@ snapshots: react-dom: 19.2.1(react@19.2.1) resolve: 1.22.10 semver: 7.7.2 - storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10) + storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5) tsconfig-paths: 4.2.0 webpack: 5.99.9(esbuild@0.25.5) optionalDependencies: @@ -27545,6 +27190,30 @@ snapshots: - uglify-js - webpack-cli + '@storybook/preset-react-webpack@9.0.15(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10))(typescript@5.8.3)': + dependencies: + '@storybook/core-webpack': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10)) + '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.8.3)(webpack@5.99.9) + '@types/semver': 7.7.0 + find-up: 7.0.0 + magic-string: 0.30.18 + react: 19.2.1 + react-docgen: 7.1.1 + react-dom: 19.2.1(react@19.2.1) + resolve: 1.22.10 + semver: 7.7.2 + storybook: 9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@5.0.10) + tsconfig-paths: 4.2.0 + webpack: 5.99.9 + optionalDependencies: + typescript: 5.8.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - supports-color + - uglify-js + - webpack-cli + '@storybook/preset-react-webpack@9.0.15(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5))(typescript@5.8.3)': dependencies: '@storybook/core-webpack': 9.0.15(storybook@9.0.15(@testing-library/dom@10.4.0)(bufferutil@4.0.9)(prettier@3.6.2)(utf-8-validate@6.0.5)) @@ -28827,15 +28496,6 @@ snapshots: msw: 2.10.2(@types/node@22.14.1)(typescript@5.8.3) vite: 7.1.7(@types/node@22.14.1)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - '@vitest/mocker@3.2.4(msw@2.10.2(@types/node@24.0.10)(typescript@5.8.3))(vite@7.1.7(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))': - dependencies: - '@vitest/spy': 3.2.4 - estree-walker: 3.0.3 - magic-string: 0.30.18 - optionalDependencies: - msw: 2.10.2(@types/node@24.0.10)(typescript@5.8.3) - vite: 7.1.7(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - '@vitest/mocker@3.2.4(msw@2.7.5(@types/node@24.0.10)(typescript@5.8.3))(vite@7.1.7(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0))': dependencies: '@vitest/spy': 3.2.4 @@ -31439,11 +31099,6 @@ snapshots: typescript: 5.8.3 zod: 3.25.75 - abitype@1.0.8(typescript@5.8.3)(zod@3.25.76): - optionalDependencies: - typescript: 5.8.3 - zod: 3.25.76 - abitype@1.0.8(typescript@5.8.3)(zod@4.1.12): optionalDependencies: typescript: 5.8.3 @@ -33607,8 +33262,8 @@ snapshots: '@typescript-eslint/parser': 7.14.1(eslint@8.57.0)(typescript@5.8.3) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.0) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.0) eslint-plugin-react: 7.37.5(eslint@8.57.0) eslint-plugin-react-hooks: 5.2.0(eslint@8.57.0) @@ -33627,7 +33282,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.0): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1 @@ -33638,7 +33293,7 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.10.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color @@ -33663,18 +33318,18 @@ snapshots: - bluebird - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.12.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.14.1(eslint@8.57.0)(typescript@5.8.3) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -33685,7 +33340,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -34544,7 +34199,7 @@ snapshots: strip-ansi: 6.0.1 wide-align: 1.1.5 - geist@1.5.1(next@15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)): + geist@1.5.1(next@15.3.8(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)): dependencies: next: 15.3.8(@babel/core@7.28.4)(@opentelemetry/api@1.9.0)(@playwright/test@1.53.2)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) @@ -37000,32 +36655,6 @@ snapshots: - '@types/node' optional: true - msw@2.10.2(@types/node@24.0.10)(typescript@5.8.3): - dependencies: - '@bundled-es-modules/cookie': 2.0.1 - '@bundled-es-modules/statuses': 1.0.1 - '@bundled-es-modules/tough-cookie': 0.1.6 - '@inquirer/confirm': 5.1.14(@types/node@24.0.10) - '@mswjs/interceptors': 0.39.5 - '@open-draft/deferred-promise': 2.2.0 - '@open-draft/until': 2.1.0 - '@types/cookie': 0.6.0 - '@types/statuses': 2.0.6 - graphql: 16.11.0 - headers-polyfill: 4.0.3 - is-node-process: 1.2.0 - outvariant: 1.4.3 - path-to-regexp: 6.3.0 - picocolors: 1.1.1 - strict-event-emitter: 0.5.1 - type-fest: 4.41.0 - yargs: 17.7.2 - optionalDependencies: - typescript: 5.8.3 - transitivePeerDependencies: - - '@types/node' - optional: true - msw@2.7.5(@types/node@24.0.10)(typescript@5.8.3): dependencies: '@bundled-es-modules/cookie': 2.0.1 @@ -41429,50 +41058,6 @@ snapshots: - tsx - yaml - vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.0.10)(@vitest/ui@3.2.4)(happy-dom@18.0.1)(jiti@2.4.2)(lightningcss@1.30.1)(msw@2.10.2(@types/node@24.0.10)(typescript@5.8.3))(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0): - dependencies: - '@types/chai': 5.2.2 - '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(msw@2.10.2(@types/node@24.0.10)(typescript@5.8.3))(vite@7.1.7(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0)) - '@vitest/pretty-format': 3.2.4 - '@vitest/runner': 3.2.4 - '@vitest/snapshot': 3.2.4 - '@vitest/spy': 3.2.4 - '@vitest/utils': 3.2.4 - chai: 5.2.0 - debug: 4.4.1 - expect-type: 1.2.1 - magic-string: 0.30.18 - pathe: 2.0.3 - picomatch: 4.0.3 - std-env: 3.9.0 - tinybench: 2.9.0 - tinyexec: 0.3.2 - tinyglobby: 0.2.15 - tinypool: 1.1.1 - tinyrainbow: 2.0.0 - vite: 7.1.7(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - vite-node: 3.2.4(@types/node@24.0.10)(jiti@2.4.2)(lightningcss@1.30.1)(terser@5.43.1)(tsx@4.20.3)(yaml@2.8.0) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/debug': 4.1.12 - '@types/node': 24.0.10 - '@vitest/ui': 3.2.4(vitest@3.2.4) - happy-dom: 18.0.1 - transitivePeerDependencies: - - jiti - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - vlq@1.0.1: {} vm-browserify@1.1.2: {} @@ -42224,9 +41809,6 @@ snapshots: zod@3.25.75: {} - zod@3.25.76: - optional: true - zod@4.1.12: {} zustand@5.0.0(@types/react@19.2.7)(react@19.2.1)(use-sync-external-store@1.4.0(react@19.2.1)):